Yukihiro "Matz" Matsumoto
59dc7d0763
Removed a debug printf; fix #3834
2017-10-28 23:39:21 +09:00
Yukihiro "Matz" Matsumoto
1b45e034ba
Remove one of the lines that did the same thing; fix #3836
...
The change is suggested by `ukrainskiysergey` in #3836 .
I deleted the other line for clarity. I also updated comment lines.
2017-10-28 23:35:01 +09:00
Yukihiro "Matz" Matsumoto
6316e0c75d
Should clear ensure stack at OP_RETURN break; #3715
...
This is a resurrection of d0a7e01 , which is accidentally
removed by 93f5f22; Fix #3715
2017-10-28 23:27:07 +09:00
Yukihiro "Matz" Matsumoto
92e24f809b
Should check if callinfo stack is popped before updating the stack.
...
This is a resurrection of 75c374c , which is accidentally removed by
93f5f22; Fix #3507 #3512 #3518 #3521
2017-10-28 23:10:28 +09:00
Yukihiro "Matz" Matsumoto
c7c9543bed
Fixed UPVAR gotchas; fix #3835
...
Both `uvenv` function and `env` generation in `create_proc_from_string`
function have bugs to handling enclosed environment objects.
2017-10-28 23:08:31 +09:00
Yukihiro "Matz" Matsumoto
57dad6e3fd
Remove a debug variable
2017-10-28 01:37:51 +09:00
Yukihiro "Matz" Matsumoto
23d18bbd62
Add parentheses to pacify a warning.
2017-10-28 01:32:25 +09:00
Yukihiro "Matz" Matsumoto
93f5f22577
Heavily refactored how lexical scope links are implemented; fix #3821
...
Instead of `irep` links, we added a `upper` link to `struct RProc`.
To make a space for the `upper` link, we moved `target_class` reference.
If a `Proc` does not have `env`, `target_class` is saved in an `union`
shared with `env` (if a `Proc` has env, you can tell it by `MRB_PROC_ENV_P()).
Otherwise `target_class` is referenced from `env->c`. We removed links
in `env` as well.
This change removes 2 members from `mrb_irep` struct, thus saving 2
words per method/proc/block. This also fixes potential memory leaks
due to the circular references caused by a link from `mrb_irep`.
2017-10-28 00:29:30 +09:00
Yukihiro "Matz" Matsumoto
3f9d00ded3
comment out bench build from standard build_config.rb
2017-10-28 00:29:30 +09:00
Yukihiro "Matz" Matsumoto
4614b9d632
remove inline from replacement memcpy&memset
2017-10-28 00:29:30 +09:00
Yukihiro "Matz" Matsumoto
5405b47f41
Update test for Kernel#local_variables
2017-10-28 00:29:30 +09:00
Yukihiro "Matz" Matsumoto
14877469d1
Remove MRB_API from mrb_env_unshare()
2017-10-28 00:29:30 +09:00
Yukihiro "Matz" Matsumoto
07cf7b16f3
Add some peephole optimizations
2017-10-28 00:29:30 +09:00
Yukihiro "Matz" Matsumoto
6c966a1f86
Change the order of "expected" and "actual" in test
2017-10-28 00:29:30 +09:00
Yukihiro "Matz" Matsumoto
0cf5a0ee37
Use alias to implement attr method
2017-10-28 00:29:30 +09:00
Yukihiro "Matz" Matsumoto
fda64be996
Flush stdout after every print from tests
2017-10-28 00:29:30 +09:00
Yukihiro "Matz" Matsumoto
71eeb86a99
Format codedump for OP_{LE,LT,GE,GT}.
2017-10-28 00:29:30 +09:00
Yukihiro "Matz" Matsumoto
d08205b40d
Merge pull request #3833 from bggd/appveyor_winbison_ruby24
...
Appveyor Improvements
2017-10-25 00:31:44 +09:00
bggd
7f4cc0de51
Turn on method cache for AppVeyor CI
2017-10-24 21:39:05 +09:00
bggd
7a13e89509
Use Ruby 2.4 instead of AppVeyor's Default(Ruby 1.9)
2017-10-24 21:37:36 +09:00
bggd
8a9b6c4352
Use win_bison instead of Cygwin's bison. Use YACC environment variable instead of global PATH
2017-10-24 21:31:37 +09:00
Yukihiro "Matz" Matsumoto
0c3ee0ba66
Add `Array#{permutation,combination}.
2017-10-20 10:38:58 +09:00
Yukihiro "Matz" Matsumoto
f2394859e3
Add main.define_method
2017-10-19 10:39:06 +09:00
Yukihiro "Matz" Matsumoto
fc930700b7
Add Kernel#itself; CRuby2.2
2017-10-18 10:21:54 +09:00
Yukihiro "Matz" Matsumoto
ce916b99b8
Add Hash#to_proc; CRuby2.3
2017-10-18 10:18:43 +09:00
Yukihiro "Matz" Matsumoto
b5dfbce767
Add Numeric#{positive?,negative?}; CRuby2.3
2017-10-18 10:10:37 +09:00
Yukihiro "Matz" Matsumoto
44f07045d1
Add Hash#fetch_values; CRuby2.3
2017-10-18 10:05:39 +09:00
Yukihiro "Matz" Matsumoto
913b83d579
Merge branch 'dabroz-fix-get-argc'
2017-10-17 15:24:00 +09:00
Yukihiro "Matz" Matsumoto
3c20c96f84
Use a new function: mrb_get_argc(); ref #3826
2017-10-17 15:23:32 +09:00
Yukihiro "Matz" Matsumoto
b890528a18
Remove mrb_vm_get_argc; ref #3826
2017-10-17 15:22:45 +09:00
Yukihiro "Matz" Matsumoto
344a7ce20c
Merge branch 'fix-get-argc' of https://github.com/dabroz/mruby into dabroz-fix-get-argc
2017-10-17 15:07:05 +09:00
Yukihiro "Matz" Matsumoto
4122c320bb
Add {String,Symbol}#casecmp?; CRuby2.4
2017-10-17 13:26:37 +09:00
Yukihiro "Matz" Matsumoto
db8265f428
Add Comparable#uniq; CRuby2.4
2017-10-17 12:46:51 +09:00
Yukihiro "Matz" Matsumoto
4e365156d1
Add Comparable#clamp; CRuby2.4
2017-10-17 11:19:12 +09:00
Yukihiro "Matz" Matsumoto
061d804a59
Add Numeric#{finite?,infinite?}; CRuby2.4
2017-10-17 11:19:12 +09:00
Yukihiro "Matz" Matsumoto
332d8d2a1c
Add String#delete_{prefix,suffix}; CRuby2.5
2017-10-17 11:19:12 +09:00
Yukihiro "Matz" Matsumoto
1519616ecb
Add Kernel#yield_self; CRuby2.5
2017-10-17 09:10:13 +09:00
Yukihiro "Matz" Matsumoto
c96def7c96
Remove top-level constant lookup; CRuby2.5
2017-10-17 08:45:06 +09:00
Yukihiro "Matz" Matsumoto
e59ad60327
do/end blocks to work with rescue/ensure/else; CRuby2.5
2017-10-17 08:17:31 +09:00
Yukihiro "Matz" Matsumoto
fb85855fa1
Add more checks before accessing struct pointer; ref #3831
2017-10-17 07:43:35 +09:00
Yukihiro "Matz" Matsumoto
be2c1592ed
Check struct-array pointer before accessing; fix #3831
2017-10-16 22:53:36 +09:00
Yukihiro "Matz" Matsumoto
1988bec23e
Need to adjust the stack length of the top-level environment; fix #3819
2017-10-16 22:35:25 +09:00
Yukihiro "Matz" Matsumoto
c3710dbb96
Fix a compile error on zero mrbgem case.
2017-10-16 18:46:15 +09:00
Yukihiro "Matz" Matsumoto
6b0c22e395
Merge pull request #3830 from dearblue/fix-alias-for-struct-accessors
...
fix alias for Struct accessors
2017-10-16 18:45:52 +09:00
dearblue
44e2c97152
fix alias for Struct accessors
2017-10-15 23:43:55 +09:00
Yukihiro "Matz" Matsumoto
fa974a1f6a
Merge pull request #3828 from asfluido/master
...
Correct a small error in parse.y
2017-10-12 20:19:24 +09:00
Carlo Prelz
af3d5d6c8a
Correct a small error in parse.y, which causes the reading of unassigned memory (triggers an error when address sanitizer is active)
2017-10-12 09:54:02 +02:00
Tomasz Dąbrowski
be86d8b45f
correctly handle *splat arguments in mrb_get_argc, also add mrb_vm_get_argc and mrb_get_argv
...
Fixes #3825
2017-10-10 18:40:38 +02:00
Yukihiro "Matz" Matsumoto
80e03f3ffb
Merge pull request #3824 from nobu/bug/paren_arg
...
Bug/paren arg
2017-10-09 12:39:13 +09:00
Nobuyoshi Nakada
82983330a3
Fix parse error on TRICK2013/yhara
2017-10-09 08:56:46 +09:00