Commit Graph

1988 Commits

Author SHA1 Message Date
Yukihiro "Matz" Matsumoto 16b34d187a remove warning on NAN_BOXING 2013-11-15 02:27:19 +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
bggd 0cbdbd81cb Changed a variable declaration to top of block 2013-11-13 22:53:20 +09:00
Yukihiro "Matz" Matsumoto edd6c17c1e load_exec() no longer return fixnum value for no_exec; should close #1569 2013-11-13 15:48:13 +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 3bbf66f9f3 cancel #1565 since it breaks mirb; instead add special treatment to heredocs 2013-11-10 04:32:57 +09:00
Yukihiro "Matz" Matsumoto 7e64d7e531 check for corrupted mrb file data 2013-11-10 03:08:01 +09:00
Yukihiro "Matz" Matsumoto 29792d1725 Merge branch 'master' of github.com:mruby/mruby 2013-11-09 23:29:50 +09:00
Carson McDonald 0d0f3545f8 Change supress to suppress 2013-11-09 07:40:51 -05:00
Yukihiro "Matz" Matsumoto ec0a94dae6 Merge pull request #1565 from Fleurer/fix1564
nextc(): always return an '\n' at end of input
2013-11-08 17:22:59 -08:00
Yukihiro "Matz" Matsumoto 7aabc657f1 protect returning irep (in proc) from GC 2013-11-09 04:08:24 +09:00
Yukihiro "Matz" Matsumoto de790bdc27 allow irep to be GCed 2013-11-08 20:39:50 +09:00
fleuria fa71403bc5 nextc(): always return an '\n' at end of input
fix #1564
2013-11-08 11:40:26 +08:00
Yukihiro "Matz" Matsumoto cba07b0275 type check before pool scan 2013-11-07 09:14:44 +09:00
Yukihiro "Matz" Matsumoto b6a73f99bf call_iseq will never be NULL 2013-11-07 08:53:14 +09:00
Yukihiro "Matz" Matsumoto c8936754e8 wrong return value from read_lineno_record() 2013-11-07 08:20:03 +09:00
Yukihiro "Matz" Matsumoto 465f633446 create Proc object before releasing memory pool 2013-11-07 08:16:41 +09:00
Yukihiro "Matz" Matsumoto d8913dae3f forgot to free irep->reps 2013-11-07 04:22:10 +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
Yukihiro "Matz" Matsumoto f80401de6c resolved conflicts and updated to latest return value change of mrb_generate_code() 2013-11-05 00:13:01 +09:00
Yukihiro "Matz" Matsumoto e386760cc7 add Fiber.current 2013-11-04 23:58:32 +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
Yukihiro "Matz" Matsumoto 8af26752db remove scope->idx 2013-11-02 23:40:36 +09:00
Yukihiro "Matz" Matsumoto 22f90d9f70 codedump() to take irep structure 2013-11-02 23:26:19 +09:00
Yukihiro "Matz" Matsumoto 0be572df62 change return value from mrb_generate_code() 2013-11-02 23:20:04 +09:00
Yukihiro "Matz" Matsumoto 92825660ea changed argument type of mrb_ary_modify(); ref #1554 2013-11-01 09:57:20 +09:00
Yukihiro "Matz" Matsumoto af03812877 add mrb_ary_modify(mrb,a); you have to ensure mrb_value a to be an array; ref #1554 2013-10-31 23:34:08 +09:00
Yukihiro "Matz" Matsumoto 0fe744f919 Merge branch 'master' of github.com:mruby/mruby 2013-10-31 11:55:06 +09:00
Yukihiro "Matz" Matsumoto a228841668 restore context status to RUNNING on automatic yield at the end of the block; fix #1555 2013-10-31 11:54:57 +09:00
fleuria c64cae4d2d fix 3a4c8e2
unfortunately the previouse commit is incorrect, which still concate the
keywords, but like this:

      method='"end\nb"' (201)
2013-10-30 17:17:13 +08:00
Yukihiro "Matz" Matsumoto abe6db9454 resolve conflict #1552 2013-10-30 17:28:32 +09:00
Yukihiro "Matz" Matsumoto ad4ce2ba4e Merge pull request #1551 from Fleurer/fix1550
fix #1550
2013-10-30 01:25:41 -07:00
Yukihiro "Matz" Matsumoto 888ddf1c84 type check class/module in mrb_get_args(); close #1477 2013-10-30 13:24:55 +09:00
h2so5 12e00f9238 implement Class.new with block 2013-10-30 12:52:26 +09:00
Yukihiro "Matz" Matsumoto f8fea6931c preserve only arguments on stack; fix #1527 2013-10-30 12:01:18 +09:00
fleuria 3a4c8e2d9f fix #1550
emit a "\n" as the first token for parser instead of taking the
first character from the next file for lexer, to prevent mruby
"concatenate" two keywords between files

it should be regarded as a work around, for it can not resolve
this case:

$ cat a.rb
"
$ cat b.rb
b"

$ bin/mrbc -o- -v a.rb b.rb
mruby - Embeddable Ruby  Copyright (c) 2010-2013 mruby
developers
NODE_SCOPE:
        NODE_BEGIN:
                NODE_STR "

b " len 4
irep 0 nregs=2 nlocals=1 pools=1 syms=0
000 OP_STRING   R1      "\n\nb "
001 OP_STOP

thanks @bovi 's idea
2013-10-30 10:34:28 +08:00
h2so5 88758e3630 Uniquify the results of Object#methods 2013-10-27 04:04:06 +09:00
Yukihiro "Matz" Matsumoto 3a668241be nil/false should not be implicitly converted to integers in mrb_get_args(); close #1529 2013-10-26 17:11:09 +09:00
Yukihiro "Matz" Matsumoto 51213bfc7d mrb_Integer() should not convert strings to integers 2013-10-26 17:06:50 +09:00
Yukihiro "Matz" Matsumoto fcebd1243b Merge pull request #1530 from h2so5/args-explicit-conversion
Disable implicit integer conversion in mrb_get_args
2013-10-26 00:47:03 -07:00
fleuria c647dff1b2 fix #1544
We have already reserved that register in codegen()'s case NODE_DEF, but
what we care about is actually the previous register. So what we need is
get that register by cursp() after pop(), then recover the reservation
by push().
2013-10-25 02:48:25 +08:00
fleuria e648abf1c1 fix #1542 2013-10-23 15:39:52 +08:00
Yukihiro "Matz" Matsumoto 2607970ed9 move some methods to make floats and integers compatible [mruby special] 2013-10-22 16:18:11 +09:00
Yukihiro "Matz" Matsumoto 620f8b2721 implement some Numeric methods in Ruby 2013-10-22 15:59:41 +09:00
Yukihiro "Matz" Matsumoto 3ae0616710 implement Integer#succ in Ruby 2013-10-21 07:42:50 +09:00