Yukihiro "Matz" Matsumoto
db437b04a4
mrb_obj_respond_to to use mrb_method_search_vm.
2017-08-22 14:23:46 +09:00
Yukihiro "Matz" Matsumoto
0d865a77d5
c (mrbc_context) may be NULL; fix #3787
2017-08-22 09:47:10 +09:00
Yukihiro "Matz" Matsumoto
ab3b6dbd2a
strlen returns size_t; need to cast before assigning to int.
2017-08-22 08:14:09 +09:00
Yukihiro "Matz" Matsumoto
3f90af6b42
(Try to) fix mixture of int and size_t in UTF-8 conversion.
...
This only effects VC.
2017-08-22 07:35:51 +09:00
Yukihiro "Matz" Matsumoto
a7d611fb23
Reduce signed/unsigned warnings in dump.c
2017-08-19 21:50:36 +09:00
Yukihiro "Matz" Matsumoto
5d0fc7e57a
Reduce signed/unsigned warnings in fmt_fp.c
2017-08-19 17:09:30 +09:00
Yukihiro "Matz" Matsumoto
8cea1f8907
Use ptrdiff_t instead of int.
2017-08-19 15:51:08 +09:00
Yukihiro "Matz" Matsumoto
a117ec771b
Remove mixed signed/unsigned comparison in debug.c.
2017-08-19 14:42:30 +09:00
Yukihiro "Matz" Matsumoto
834523945e
Replace stack pop() by push_n(2); pop_n(3); fix #3783
...
To calculate correct register windows size. The fix was suggested
by Christopher Aue.
2017-08-19 11:56:04 +09:00
Yukihiro "Matz" Matsumoto
db098d3e0e
Type check before traversing irep->outer; fix #3782
2017-08-19 11:39:42 +09:00
Yukihiro "Matz" Matsumoto
2294ebdd44
Call mrb_full_gc before gc_each_objects; ref #3782
...
Otherwise dead object may be seen from `#each_object`.
2017-08-19 11:38:11 +09:00
Yukihiro "Matz" Matsumoto
9146d5c34f
Zero width unshift should not touch memory; ref #3780
2017-08-19 11:11:26 +09:00
Yukihiro "Matz" Matsumoto
8b3298b2d6
Unshift pointer move size was wrong (not len but alen); fix #3780
2017-08-19 11:08:46 +09:00
Yukihiro "Matz" Matsumoto
29ad0a7964
capacify' for mrb_str_new_capa should not be 0`.
2017-08-18 23:42:34 +09:00
Yukihiro "Matz" Matsumoto
a8bd06904d
mrb_str_cat: capa should not be zero to avoid infinite loops.
2017-08-18 23:42:34 +09:00
Yukihiro "Matz" Matsumoto
a06adb176f
mrb_str_cat: capa should be bigger than total.
2017-08-18 23:42:33 +09:00
Yukihiro "Matz" Matsumoto
8b5be554c7
ARY_CAPA handles capacity for embedded arrays by itself.
2017-08-18 23:42:33 +09:00
Yukihiro "Matz" Matsumoto
8fbc4bef55
Reduce signed/unsigned comparison warnings; ref #3785
2017-08-18 22:54:59 +09:00
Yukihiro "Matz" Matsumoto
f1767fd079
Separate mrb_str_buf_new and mrb_str_new_capa.
...
`mrb_str_buf_new` is an old function that ensures capacity size of
`MRB_STR_BUF_MIN_SIZE` minimum. Usually one need to use
`mrb_str_new_capa` instead.
2017-08-18 22:17:48 +09:00
Yukihiro "Matz" Matsumoto
722d123b87
Remove code duplication in mrb_str_concat.
2017-08-18 22:17:48 +09:00
Yukihiro "Matz" Matsumoto
198c898817
Rename mrb_str_concat2 to mrb_str_concat_m.
...
According to the naming convention a function that implements
a method should be suffixed by `_m`.
2017-08-18 22:17:47 +09:00
Yukihiro "Matz" Matsumoto
4c25738ac7
Merge str_buf_cat and mrb_str_cat.
2017-08-18 22:17:47 +09:00
Yukihiro "Matz" Matsumoto
2adb0c201e
Merge pull request #3786 from christopheraue/3784_fix
...
Reset ci in OP_SUPER after potential realloc
2017-08-18 22:17:33 +09:00
Yukihiro "Matz" Matsumoto
11c3ad999e
Merge pull request #3781 from clayton-shopify/fix-hash-compact-bang
...
Check whether internal khash is initialized in Hash#compact!
2017-08-18 22:13:33 +09:00
Yukihiro "Matz" Matsumoto
f229ed917e
Merge pull request #3785 from miura1729/original
...
Improve Array structure
2017-08-18 20:37:31 +09:00
Miura Hideki
75ec86ed00
Improve Array structure
2017-08-18 20:12:00 +09:00
Christopher Aue
6b0860ce61
Reset ci in OP_SUPER after potential realloc
2017-08-18 13:11:08 +02:00
Clayton Smith
5dc688fb12
Check whether internal khash is initialized in Hash#compact!
2017-08-17 12:13:41 -04:00
Yukihiro "Matz" Matsumoto
0789ec71e0
Merge pull request #3779 from christopheraue/vm_refactoring
...
Some more vm refactorings
2017-08-13 07:11:21 +09:00
Christopher Aue
d5ac785b31
Reintroduced not storing converted proc directly in the stack
2017-08-12 23:59:40 +02:00
Christopher Aue
198df61039
Removed unneeded ci->nregs checks in OP_SEND and OP_SUPER
...
Because of #3504 `ci->nregs = bidx+1` was introduced in b64f08784c .
This led to the follow up error #3551 whose fix introduced the `if (bidx >= ci->nregs)`
check in 071164b799 and the `stack_extend(mrb, ci->nregs)`
in 93d802987e .
Then, the code causing #3504 reappeared again in #3590 . The fix for it moved the code
dealing with the block in OP_SUPER from below the `cipush` to above the `cipush`
in d9fb8b69b0 . The `if (bidx >= ci->nregs) { ... }` from
then on works with the original callinfo and not the pushed one. `ci->nregs` needed to
be modified for the pushed one because it is initialized to 0. But for the original ci
it is propertly set and a check is not needed.
2017-08-12 23:27:17 +02:00
Christopher Aue
f2d4640998
Extended stack always based on ci->nregs
2017-08-12 14:47:22 +02:00
Christopher Aue
3f591d71c6
Refactored variable usage in OP_SEND and OP_SUPER
2017-08-12 14:31:18 +02:00
Yukihiro "Matz" Matsumoto
8bf492f127
Reduce integer type mismatch warnings in VC.
2017-08-12 09:35:35 +09:00
Yukihiro "Matz" Matsumoto
baa5d2e3f7
Remove some empty lines; ref #3778
2017-08-11 22:39:31 +09:00
Yukihiro "Matz" Matsumoto
0828a962c0
Merge pull request #3778 from christopheraue/vm_refactoring
...
Refactored OP_SEND and OP_SUPER and calculate argc right at the top
2017-08-11 22:38:32 +09:00
Yukihiro "Matz" Matsumoto
42f9af41fb
Merge pull request #3777 from christopheraue/super_method_missing_test
...
Added basic test for calling a missing method through super
2017-08-11 22:35:40 +09:00
Christopher Aue
731dd78aa0
Added basic test for calling a missing method through super
2017-08-11 14:09:22 +02:00
Christopher Aue
58f5115b22
Refactored OP_SEND and OP_SUPER and calculate argc right at the top
2017-08-11 13:42:06 +02:00
Yukihiro "Matz" Matsumoto
d077a5f0a6
scan_hex may be used to parse both unicode and hex escape.
...
The error checks for both usage should be separated; ref #3774
2017-08-11 14:25:02 +09:00
Yukihiro "Matz" Matsumoto
56d4e41d76
Fixed a wrong condition in scan_hex; fix #3774
2017-08-11 14:14:30 +09:00
Yukihiro "Matz" Matsumoto
96d4c2d385
Remove an unused argument from each_backtrace_func.
2017-08-11 13:52:24 +09:00
Yukihiro "Matz" Matsumoto
1d781da8a6
Should not include float.h here.
2017-08-11 13:52:01 +09:00
Yukihiro "Matz" Matsumoto
db72cdae28
Merge branch 'christopheraue-super_method_missing_fix'
2017-08-11 13:16:40 +09:00
Yukihiro "Matz" Matsumoto
ab39ed4f82
Defer mid update after unshift; ref #3776
2017-08-11 13:15:50 +09:00
Yukihiro "Matz" Matsumoto
9feb069124
Merge branch 'super_method_missing_fix' of https://github.com/christopheraue/mruby into christopheraue-super_method_missing_fix
2017-08-11 13:14:32 +09:00
Yukihiro "Matz" Matsumoto
0ff28c9e60
Silence integer type conversion warnings.
2017-08-11 13:10:31 +09:00
Yukihiro "Matz" Matsumoto
ef0b239704
Remove unnecessary inline function ary_elt.
...
And the function does not conform the naming convention anyway.
2017-08-11 12:57:37 +09:00
Yukihiro "Matz" Matsumoto
67e2dddb82
Remove mrb_ary_len function. Use RARRAY_LEN instead.
2017-08-11 12:52:36 +09:00
Yukihiro "Matz" Matsumoto
8f6b2121d9
Update document comment of array C API functions.
2017-08-11 12:51:45 +09:00