Yukihiro "Matz" Matsumoto
925137475c
should splat and iterate elements when "*ary" speficied in the case-when clause; close #1627
2014-01-04 11:25:53 +09:00
Yukihiro "Matz" Matsumoto
dc27c2be46
Merge pull request #1634 from cremno/use-mrb_fixnum_p
...
tiny word boxing optimization
2014-01-02 15:46:00 -08:00
cremno
09bb30870b
tiny word boxing optimization
2014-01-02 06:36:29 +01:00
cremno
d69deadfc8
codegen.c: remove superfluous return
2014-01-02 01:34:32 +01:00
cubicdaiya
325c3bcfa4
return-value of mrb_run is invalid in top-level-scope
...
The return-value of mrb_run in top-level-scope
should be the evaluated value at last.
2013-12-27 15:11:20 +09:00
Yukihiro "Matz" Matsumoto
14bff248c3
adjust register position for return value; fix #1620
2013-12-26 17:47:26 +09:00
Yukihiro "Matz" Matsumoto
efbaa53c53
revert fix in #1620
2013-12-26 17:43:53 +09:00
Carson McDonald
a89cba9fa4
Fix return when value expected
2013-12-25 12:17:33 -05:00
Yukihiro "Matz" Matsumoto
ee9e5fa6da
Merge branch 'master' of github.com:mruby/mruby
2013-12-25 10:06:24 +09:00
h2so5
6c6633843c
fix #1617
2013-12-24 13:33:26 +09:00
Yukihiro "Matz" Matsumoto
c209fa9514
class/module body to honor whether value is required or not; reduce a few instructions for normal cases
2013-12-24 12:29:06 +09:00
h2so5
61ac9ff2ea
fix codegen bug in NODE_CASE
2013-12-19 21:30:51 +09:00
Yukihiro "Matz" Matsumoto
415ec6aca2
avoid top-level pool release at codegen_error() and fixed some memory leaks
2013-12-03 01:47:50 +09:00
Yukihiro "Matz" Matsumoto
56a93a3357
should not access scope after releasing memory pool
2013-12-03 00:55:19 +09:00
Yukihiro "Matz" Matsumoto
155f3909f0
Merge pull request #1601 from carsonmcdonald/srcaptosizet
...
Change scapa and rcapa to size_t, use scapa.
2013-12-02 05:19:45 -08:00
Carson McDonald
ba67427872
Change scapa and rcapa to size_t, use scapa.
2013-12-02 06:51:07 -05:00
take_cheeze
df780ae5e9
add mrb_intern_lit for creating symbol from string literal
2013-12-01 10:38:59 +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
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
cremno
ec9b5e7fed
codegen_malloc/realloc: static + simple mem alloc
...
- there's no reason for both to have external linkage
- use simple versions of memory allocation functions
which are returning NULL instead of longjmp-ing,
so codegen_error will be called to cleanup.
2013-11-18 20:47:20 +01: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
bggd
0cbdbd81cb
Changed a variable declaration to top of block
2013-11-13 22:53:20 +09:00
Yukihiro "Matz" Matsumoto
7aabc657f1
protect returning irep (in proc) from GC
2013-11-09 04:08:24 +09:00
Yukihiro "Matz" Matsumoto
cba07b0275
type check before pool scan
2013-11-07 09:14:44 +09:00
Yukihiro "Matz" Matsumoto
465f633446
create Proc object before releasing memory pool
2013-11-07 08:16:41 +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
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
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
af5bec1fbc
fix #1519
...
the 128th element in an array literal would trigger a corner case on
splat mode checking, in which mruby will splat an that value into its
parent array. the issue was masked by the fact of ary_concat() also
accept non-array value:
1.9.3p286 :002> a = 1
1.9.3p286 :003> [*a]
=> [1]
the expected behaviour should be OP_ARYPUSH the 128th element, instead of
splat it by OP_ARYCAT.
2013-10-01 21:32:16 +08:00
Yukihiro "Matz" Matsumoto
4c1c7166bf
remove unreferenced local variables caused by mrb_assert()
2013-09-20 06:11:07 +09:00
Yukihiro "Matz" Matsumoto
12183fa250
rename node->filename to node->filename_index
2013-09-20 06:09:41 +09:00
Yukihiro "Matz" Matsumoto
58b1c0883b
refactor genop_peep(); ref #1505
2013-09-20 06:08:01 +09:00
Keita Obo
c4e5a8b167
Fix self value in a block is changed with return value for Fixnum, nil, instance variable.
...
Fix #1504
2013-09-18 00:57:23 +09:00
Keita Obo
0bce3a36d2
Fixed self value in a block is changed with return value
...
fix #1504
2013-09-18 00:20:13 +09:00
take_cheeze
af73a740cd
check file debug info is appended correctly
2013-09-07 20:25:53 +09:00
take_cheeze
8c738e348f
remove unnecessary scope filename update
2013-09-07 20:23:18 +09:00
take_cheeze
4308932231
update filename before appending file debug info
2013-09-07 20:22:16 +09:00
take_cheeze
0b806ca17b
reduce node size
2013-09-02 00:48:07 +09:00
take_cheeze
8082a37748
use uint16_t for line type
2013-09-02 00:48:06 +09:00
take_cheeze
3d1fffbd6b
support multiple filename in irep
2013-09-02 00:48:06 +09:00
fleuria
6dcf2ffb08
fix #1459
...
gen_vmassignment() missed a pop() in a conditional branch, but we have
to keep each conditional branch 's stack depth the same all the time
when it left execution.
2013-08-12 14:18:09 +08:00
Yukihiro "Matz" Matsumoto
53f750dbed
def statement and define_method now return symbol a la Ruby2.1
2013-08-09 22:25:45 +09:00
Yukihiro "Matz" Matsumoto
4229b41c68
Merge pull request #1421 from carsonmcdonald/fixfor1419
...
Remove pop that was done when not a return val
2013-07-29 09:16:29 -07:00