mimaki
e52f1bd74e
Check mrbc_context is null
2014-05-21 17:12:03 +09:00
Yukihiro "Matz" Matsumoto
54c2dcf231
allow NULL (no variable) in lvar section of mrb format; fix #2294
...
This fix use UINT16_MAX for NULL symbol tag, that means maximum symbol length
is not UINT16_MAX-1.
2014-05-19 18:39:37 +09:00
yui-knk
45305686fe
Add a space aftre bracket.
2014-05-18 19:40:17 +09:00
Yukihiro "Matz" Matsumoto
9184d254e2
resize register number in LVAR section from 32bits to 16bits
2014-05-14 17:32:30 +09:00
Yukihiro "Matz" Matsumoto
10459a5eb2
Merge branch 'dump_lv' of https://github.com/take-cheeze/mruby into take-cheeze-dump_lv
2014-05-14 11:27:41 +09:00
Jun Hiroe
37d2690d0f
Refactor read_lineno_record_1() in load.c
2014-05-05 13:37:14 +09:00
take_cheeze
5073d14e28
Remove lv_len and use nlocals - 1 instead.
...
Check that `lv`'s length is always `nlocals - 1`.
2014-04-29 22:06:59 +09:00
take_cheeze
4c7f9897c2
Support local variables information dumping.
2014-04-29 20:47:50 +09:00
Yukihiro "Matz" Matsumoto
70a4cc6b08
codedump for binary mrb files as well
2014-04-29 19:05:49 +09:00
Yukihiro "Matz" Matsumoto
48f36d3f0e
better integer size assertion suggested by usak
2014-04-25 04:33:08 +09:00
Yukihiro "Matz" Matsumoto
320f0711f0
remove -Wsign-compare warnings
2014-04-25 02:33:33 +09:00
Yukihiro "Matz" Matsumoto
306b1d3c51
Merge pull request #1948 from monaka/pr-remove-unused-null-check
...
Remove redundant NULL checks.
2014-03-26 13:32:18 +09:00
Masaki Muranaka
dcff9012e3
Remove redundant NULL checks.
...
mrb_malloc causes an exception when memory was empty.
2014-03-26 11:21:20 +09:00
Yukihiro "Matz" Matsumoto
bfd2a539ed
add new function mrb_toplevel_run to prevent running through C function boudaries on exceptions; close #1942
2014-03-26 01:09:09 +09:00
Yukihiro "Matz" Matsumoto
72c274473b
remove size_t cast in mrb_assert() since ((size_t)n <= SIZE_MAX) is always true
2014-03-19 09:07:59 +09:00
Yukihiro "Matz" Matsumoto
3e24e06b29
add a space after C reserved words
2014-03-18 23:57:29 +09:00
Yukihiro "Matz" Matsumoto
c476c1b528
symbol length type to be mrb_int
2014-03-15 15:43:40 +09:00
take_cheeze
bbb7ba46b2
don't use of anonymous unions
2014-03-11 22:01:00 +09:00
Masaki Muranaka
270d25bf2d
Make type casts safer.
2014-03-08 15:53:59 +09:00
cubicdaiya
019d15c3ee
Use mrb_exc_new_str_lit widely
2014-03-04 02:45:53 +09:00
take_cheeze
78915f9601
support c++ exception
2014-03-01 20:05:29 +09:00
cubicdaiya
67de10bfcb
use C style comments instead of C++ style comments
...
According to CONTRIBUTING.md,
Don't use C++ style comments
/* This is the prefered comment style */
Use C++ style comments only for temporary comment e.g. commenting out some code lines.
2014-03-01 03:31:45 +09:00
cremno
18433731ed
remove various preprocessor conditionals
...
- HAVE_IEEEFP_H is nowhere defined or needed at all
- FreeBSD < 4 is unsupported since years
- MSVC workaround (around what exactly?)
2014-01-02 07:33:33 +01:00
Yukihiro "Matz" Matsumoto
b72f3f92f7
use static symbols for debug filename info
2013-12-25 14:52:13 +09:00
Yukihiro "Matz" Matsumoto
48ad07eb41
zero copy str_new from static allocate irep
2013-12-25 09:48:57 +09:00
Yukihiro "Matz" Matsumoto
bd76b2dea8
zero copy intern from static allocate irep
2013-12-25 08:49:18 +09:00
Yukihiro "Matz" Matsumoto
9c6398a444
rename mrb_intern2() to mrb_intern(); huge API incompatibility; close #1513
2013-11-29 08:47:28 +09:00
Yukihiro "Matz" Matsumoto
9ac386923d
float objects in pool are objects when MRB_WORD_BOXING is set
2013-11-27 17:29:28 +09:00
kyab
1a6244d99d
Fix build error for MRB_WORD_BOXING
2013-11-26 20:28:24 +09:00
Yukihiro "Matz" Matsumoto
fb386011df
rename API mrb_str_dup_static() -> mrb_str_pool()
2013-11-20 08:37:16 +09:00
Yukihiro "Matz" Matsumoto
16e1fbc1e8
mrb format should be portable among configurations (e.g. MRB_NAN_BOXING)
2013-11-20 07:34:57 +09:00
Yukihiro "Matz" Matsumoto
d73dfa8708
resolve conflict
2013-11-20 07:29:55 +09:00
Miura Hideki
54c5b12fb7
irep->pool struct pool -> mrb_value
2013-11-19 20:38:02 +09:00
Per Lundberg
d073129d9d
Fixed so that it builds with VS2013. VLA:s are not supported, because of its strict C89 world view.
2013-11-19 09:29:20 +02:00
takahashim
305b5d691b
fix warning: "implicit conversion from enumeration type 'enum mrb_vtype' to different enumeration type 'enum irep_pool_type' [-Wenum-conversion]"
2013-11-17 14:18:16 +09:00
Yukihiro "Matz" Matsumoto
3286e63202
wrong size of filenames buffer
2013-11-15 11:46:30 +09:00
Yukihiro "Matz" Matsumoto
04a2c58e94
add new function mrb_load_irep_file_cxt() and simplifies mruby.c
2013-11-15 10:49:40 +09:00
Yukihiro "Matz" Matsumoto
71354b91cb
enum mrb_vtype varies on compile time configuration, namely MRB_NAN_BOXING
2013-11-15 02:45:52 +09:00
fleuria
87fa03ebce
fix length check in read_section_debug(); fix #1572
2013-11-14 20:16:46 +08:00
Yukihiro "Matz" Matsumoto
c6cc92ac87
remove possible free-after-realloc problem; close #1570
2013-11-14 14:59:26 +09:00
Yukihiro "Matz" Matsumoto
fc83acfcff
remove unnecessary jump
2013-11-14 09:46:41 +09:00
Yukihiro "Matz" Matsumoto
ca704e5438
pacify some warnings on OpenBSD
2013-11-13 10:33:10 +09:00
Yukihiro "Matz" Matsumoto
7078fcd9e4
fixnum in irep->pool may overflow
2013-11-13 10:15:57 +09:00
Yukihiro "Matz" Matsumoto
7e64d7e531
check for corrupted mrb file data
2013-11-10 03:08:01 +09:00
Yukihiro "Matz" Matsumoto
7aabc657f1
protect returning irep (in proc) from GC
2013-11-09 04:08:24 +09:00
Yukihiro "Matz" Matsumoto
c8936754e8
wrong return value from read_lineno_record()
2013-11-07 08:20:03 +09:00
Yukihiro "Matz" Matsumoto
677a2ac226
irep->pool not to be GCed
2013-11-07 04:20:46 +09:00
Yukihiro "Matz" Matsumoto
e92d4e2680
modified to use irep->reps to reference child ireps. preparation for
...
removing irep array from mrb_state. note that instructions OP_LAMBDA,
OP_EXEC and OP_EPUSH are incompatible, and dumped mrb format has changed.
2013-11-07 03:54:22 +09:00
fleuria
a511957ec8
refactor mrb_context_run()
2013-11-03 12:05:25 +08:00
fleuria
d75a907edf
introduce mrb_context_run()
...
currently there are two scnenario to call mrb_run(), the first is
calling a proc, in this case mrb should create a new environment,
discarding all the variables except args, reciever and block.
the second is calling the newly generated irep, like in mirb.
in this case, the variables should be kept after mrb_run().
so we introduce mrb_context_run() to handle this seperately.
2013-11-03 11:32:59 +08:00