Christopher Aue
c7018ea962
Added mrb_str_index to the mrb API
2017-07-28 21:07:20 +02:00
Yukihiro "Matz" Matsumoto
4696093673
Rename MRB_SEGMENT_SIZE to MRB_IV_SEGMENT_SIZE.
2017-07-27 16:14:03 +09:00
Yukihiro "Matz" Matsumoto
1e41026b28
Always use MRB_USE_IV_SEGLIST.
2017-07-27 16:14:03 +09:00
Yukihiro "Matz" Matsumoto
f26d00d9e8
Embed small size array elements in the heap.
...
It reduces the memory consumption and sometimes improve the
performance as well. For example, the consumed memory size
of `bench/bm_ao_render.rb` is reduced from 1.2GB to 1GB, and
its total execution time become 18.795 sec from 22.229 sec.
2017-07-27 16:13:06 +09:00
Yukihiro "Matz" Matsumoto
5d44f8582e
Remove loop from OP_POPERR.
2017-07-27 10:30:43 +09:00
Yukihiro "Matz" Matsumoto
7d5cf8749a
(0).div(0.0) should be NaN; fix #3754
2017-07-26 15:48:50 +09:00
Yukihiro "Matz" Matsumoto
46ab8fdf07
(0.0).div(0) should not be infinity; fix #3753
2017-07-25 15:28:41 +09:00
Yukihiro "Matz" Matsumoto
9fa3d77114
0/0 should not be infinity; fix #3752
2017-07-25 15:11:31 +09:00
Yukihiro "Matz" Matsumoto
308341b990
Clear mrb_callinfo struct by zero initializer.
2017-07-24 16:47:11 +09:00
Yukihiro "Matz" Matsumoto
1c360965e7
Need to unshare env on OP_R_BREAK too.
2017-07-21 10:57:21 +09:00
Yukihiro "Matz" Matsumoto
5fee3f5869
Move NULL check to mrb_env_unshare(); ref #3750
2017-07-21 10:14:15 +09:00
Yukihiro "Matz" Matsumoto
e2c9a30571
Should not raise LocalJumpError on funcall'ed frame; fix #3750
2017-07-21 07:17:21 +09:00
Yukihiro "Matz" Matsumoto
aa3cb0466e
Avoid C undefined behavior of division by zero; close #3745
2017-07-19 09:49:41 +09:00
Yukihiro "Matz" Matsumoto
14a72b0800
Avoid constant-set duplication; ref #3747
2017-07-19 09:03:07 +09:00
Yukihiro "Matz" Matsumoto
a8bffdae50
Merge branch 'const_set_mod_to_s' of https://github.com/christopheraue/mruby into christopheraue-const_set_mod_to_s
2017-07-19 08:58:06 +09:00
Christopher Aue
468cc34c93
Fixed Module#to_s and #name for #const_set modules
2017-07-18 22:55:37 +02:00
Yukihiro "Matz" Matsumoto
329938ef15
Simplify mrb_gc_arena_restore() to reduce overhead.
...
It will no longer shrink arena region. Instead `vm.c` uses
a static function `mrb_gc_arena_shrink()` to shrink.
2017-07-18 23:26:36 +09:00
Yukihiro "Matz" Matsumoto
e5fbe350b3
Avoid float operation to shrink arena buffer size.
2017-07-12 14:52:03 +09:00
Yukihiro "Matz" Matsumoto
9501b18362
Add inline modifier to cipush() and cipop() functions.
2017-07-12 14:50:44 +09:00
Yukihiro "Matz" Matsumoto
a18904a4c2
Use "$!" specifier of mrb_get_args.
2017-07-12 14:49:55 +09:00
Yukihiro "Matz" Matsumoto
e9b57124a0
Update mrb_get_args() document.
2017-07-12 14:49:06 +09:00
Yukihiro "Matz" Matsumoto
adf453a584
Add "*!" argument specifier to avoid stack copying.
2017-07-12 14:48:23 +09:00
Yukihiro "Matz" Matsumoto
059d707e3a
Add ary_modify_check() to Array#unshift; ref #3737
2017-07-12 14:44:36 +09:00
ksss
bf48473cf6
Should only check frozen for Array#pop
2017-07-09 18:05:21 +09:00
ksss
e581f2ed97
Should only check frozen fix #3737
2017-07-09 17:47:10 +09:00
Yukihiro "Matz" Matsumoto
718a9ceb6e
Reduce allocation size of backtrace arrays.
2017-07-06 09:33:53 +09:00
Yukihiro "Matz" Matsumoto
542f0f7b16
Avoid out-of-bounds access of the backtrace array.
2017-07-06 09:32:28 +09:00
Yukihiro "Matz" Matsumoto
2ef5d22b60
Put a space between error position and error message.
...
For readability's sake.
2017-07-05 18:34:27 +09:00
Yukihiro "Matz" Matsumoto
bd66c5d716
Check stack size before accessing env stack; fix #3727
2017-07-05 09:19:06 +09:00
Yukihiro "Matz" Matsumoto
cc01dedc65
Avoid undefined behavior of left shifting negative integer; #3728
2017-07-05 03:11:39 +09:00
Yukihiro "Matz" Matsumoto
c377d504f6
Avoid undefined behavior of signed integer overflow; fix #3728
2017-07-05 03:11:39 +09:00
Yukihiro "Matz" Matsumoto
9b8956cdd0
break should not cross fiber-context boundary; fix #3724
2017-07-01 12:45:27 +09:00
Yukihiro "Matz" Matsumoto
7d99830211
super may be called from a block; fix #3723
2017-07-01 12:45:27 +09:00
Yukihiro "Matz" Matsumoto
877e16501c
No longer need to copy argv from mrb_get_args; ref #3722
2017-06-27 22:47:26 +09:00
Yukihiro "Matz" Matsumoto
1a3b32343e
Copy argv from VM stack to avoid use-after-free; fix #3722
2017-06-27 22:43:37 +09:00
Yukihiro "Matz" Matsumoto
b200c7475a
No need to mark stacks of terminated fibers; fix #3720
2017-06-22 02:05:14 +09:00
Yukihiro "Matz" Matsumoto
c41e262667
Add write barrier to protect singleton class from GC; fix #3717
2017-06-22 01:20:22 +09:00
Yukihiro "Matz" Matsumoto
d0a7e01d9c
Should call ecall() before callinfo adjustment; fix #3715
2017-06-21 02:51:55 +09:00
Yukihiro "Matz" Matsumoto
bf1cb87b34
Array size can be cause integer overflow; fix #3710
2017-06-20 20:19:37 +09:00
Miura Hideki
0fa94f9ead
#3711 fix
2017-06-20 12:50:00 +09:00
Yukihiro "Matz" Matsumoto
667e788159
Use mrb_int instead of int as argument to mrb_hash_new_capa.
2017-06-19 09:21:07 +09:00
Yukihiro "Matz" Matsumoto
b0f918d1bd
Use mrb_int instead of int.
2017-06-17 10:51:23 +09:00
Yukihiro "Matz" Matsumoto
4b55174fc5
Merge pull request #3706 from MasahikoSawada/fix_typo
...
Fix a typo in gc.c.
2017-06-17 08:40:57 +09:00
Yukihiro "Matz" Matsumoto
08c385ff66
Mark the GC arena in final_marking_phase.
...
Arena can be modified during the marking phase.
2017-06-17 08:39:43 +09:00
Yukihiro "Matz" Matsumoto
819ccd3b85
Mark the root context in final_marking_phase.
...
Because the root context cannot be marked from fibers.
2017-06-17 08:39:43 +09:00
Yukihiro "Matz" Matsumoto
8daabe7115
Mark global variables in final_marking_phase; fix #3704
2017-06-17 08:39:43 +09:00
Yukihiro "Matz" Matsumoto
a985847224
Store operands to local variables.
...
Mostly for debugging purpose.
2017-06-17 08:39:43 +09:00
Yukihiro "Matz" Matsumoto
497a0a791e
Correct comments in gc.c
2017-06-17 08:39:43 +09:00
Yukihiro "Matz" Matsumoto
aa8121cf3a
Use mrb_int instead of size_t for array capacity and length.
2017-06-17 08:39:43 +09:00
Masahiko Sawada
4f0900ef6e
Fix a typo in gc.c.
2017-06-17 00:06:16 +09:00