Commit Graph

3964 Commits

Author SHA1 Message Date
Hiroshi Mimaki 7d7f9feee7 Wrong pool data length for negative floating value in a mrb file. 2018-11-07 17:20:18 +09:00
Yukihiro "Matz" Matsumoto d25ebec988 Fixed wrong ArgumentError with keyword arguments; fix #4159 2018-11-05 21:52:17 +09:00
Yukihiro "Matz" Matsumoto d47003aea4 Fixed a bug in argument number check with kwargs; fix #4159 2018-11-05 07:44:25 +09:00
Yukihiro "Matz" Matsumoto d9e2532552 Remove reserved symbols for now.
It should be done by planned embedded symbols.
2018-11-02 22:58:12 +09:00
Yukihiro "Matz" Matsumoto 9c5e28646b Merge pull request #4151 from take-cheeze/remove_op_symidx
Reduce instruction size
2018-11-02 22:37:47 +09:00
take-cheeze 57a435aa1d Suppress warning 2018-11-02 15:49:34 +09:00
take-cheeze 659c680a5b Fix dump and load with endianess 2018-11-02 15:47:28 +09:00
Yukihiro "Matz" Matsumoto 0419f07915 Add NULL checks for mrb->ci and proc->upeer; #4024 2018-11-02 14:57:03 +09:00
Yukihiro "Matz" Matsumoto 7ad53273a2 Silence Appveyor's VC compilation warnings. 2018-11-01 22:52:12 +09:00
Yukihiro "Matz" Matsumoto d68da042b3 The env object referenced from fibers may be freed; fix #4154
By dffa203 that reclaim `env` objects from heaps, there's more chance
for `env` objects referenced from fibers may be freed from heap pages.
2018-11-01 22:36:06 +09:00
Hiroshi Mimaki 73727aeb50 Fixed a bug in INIT_DISPATCH for non direct threading; fix #4153 2018-11-01 11:10:47 +09:00
take-cheeze 486c9d902d Fix codedumper 2018-10-29 19:35:31 +09:00
take-cheeze 557805da07 Fix operator 2018-10-29 19:29:43 +09:00
take-cheeze 68714ab648 Fix SEGV 2018-10-29 19:26:00 +09:00
take-cheeze e022080390 Define null symbol 2018-10-29 19:22:53 +09:00
take-cheeze 3248de83b6 Reduce instruction size 2018-10-29 19:17:05 +09:00
take-cheeze b37b312081 Rename libmruby stuff to avoid confusion 2018-10-29 14:07:16 +09:00
Yukihiro "Matz" Matsumoto fa33a4d75a We need no write barrier here; ref #4143 2018-10-29 12:01:27 +09:00
Yukihiro "Matz" Matsumoto 3dc3643e34 Marking from terminated fibers are not needed; ref #4143
The old condition marks the top-level callinfo even after the
fiber is terminated.
2018-10-29 11:58:10 +09:00
Yukihiro "Matz" Matsumoto dffa203d07 Need to mark shared env objects as MRB_TT_FREE; fix #4143
The following code mistakenly exits from the function without marking
the env object as `MRB_TT_FREE`.

``` ruby
      if (MRB_ENV_STACK_SHARED_P(e)) {
        /* cannot be freed */
        return; // <- should be `break`
      }
```
2018-10-29 11:51:04 +09:00
Yukihiro "Matz" Matsumoto 7ff84789c3 Add argument check to Array#clear; fix #4144 2018-10-29 10:12:10 +09:00
Yukihiro "Matz" Matsumoto 80b5a56f51 Need to freeze string keys. 2018-10-20 19:02:12 +09:00
Yukihiro "Matz" Matsumoto e5f160dc7e Should not compare undef (deleted) key in hashes; fix #4136 2018-10-12 19:00:45 +09:00
Yukihiro "Matz" Matsumoto 249fef7dc4 Add NULL check in sg_compact(); fix #4139 2018-10-12 08:30:57 +09:00
Yukihiro "Matz" Matsumoto 82e00ce60f Hash#delete should return the deleted value; fix #4133 2018-10-12 08:25:54 +09:00
Yukihiro "Matz" Matsumoto 54ec08c7f1 Implement Hash#rehash in C using sg_compact(). 2018-09-26 23:09:48 +09:00
Yukihiro "Matz" Matsumoto d78acc7afe Add index to larger segment lists for performance 2018-09-26 23:09:48 +09:00
Yukihiro "Matz" Matsumoto 8ffd4e47fb Use mrb_undef_value for delete mark instead of shifting Hash entry table.
That means entry table should be compacted periodically by `sg_compact()`.
2018-09-26 23:09:48 +09:00
Yukihiro "Matz" Matsumoto e8dcfe1745 Use segmented list to implement Hash [Experimental]
I know it's not hash at all, but reduce memory consumption.
2018-09-26 12:55:22 +09:00
Yukihiro "Matz" Matsumoto 78195eb2ae Small refactoring in vm.c 2018-09-26 12:17:38 +09:00
sbsoftware 8fc56f062e Add compiler flag to disable direct threading (#4075)
* Add option to disable direct threading

* Prepend MRB_ to option name
2018-09-21 11:22:53 +09:00
Yukihiro "Matz" Matsumoto 9bd2a3b5d9 Fixed a top-level local variable bug in mirb.
`OP_STOP` returned a wrong value.
2018-09-21 00:51:29 +09:00
Yukihiro "Matz" Matsumoto 159575f630 Renamed is_namespace() to namespace_p(). 2018-09-20 13:57:43 +09:00
Yukihiro "Matz" Matsumoto 505e601730 Revert "Add MRB_IMPROVE_META_PROGRAMMING configuration"
This reverts commit 1997fcf98f.
It became the default behavior.
2018-09-20 13:53:55 +09:00
Yukihiro "Matz" Matsumoto d192a52edb Merge branch 'assign-anon-class-name' of https://github.com/dearblue/mruby into dearblue-assign-anon-class-name 2018-09-20 13:50:16 +09:00
Yukihiro "Matz" Matsumoto fa5f5954da Merge pull request #4112 from dearblue/fix-outer-module-name
Fix outer module name
2018-09-20 13:47:16 +09:00
Yukihiro "Matz" Matsumoto e9b1d9dc2f Array size may be changed in mrb_get_args() reentry.
fix #4116; fix #4117; fix #4118; fix #4119; fix #4120
2018-09-18 07:07:43 +09:00
dearblue 292ea06d4d Fix outer module name
example:
  a = Module.new
  a::B = Module.new
  p [a, a::B] # => [#<Module:0x801825890>, #<Class:0x801825890>::B]
              # => [#<Module:0x801825890>, #<Module:0x801825890>::B] (Fixed)
2018-09-08 10:25:30 +09:00
dearblue 5e6cd86f6e Fix to not define outer when outer is itself.
example:
  a = Class.new
  a::A = a
2018-09-07 23:56:06 +09:00
dearblue 366848996a Clear terminated space 2018-09-07 22:32:34 +09:00
dearblue 1997fcf98f Add MRB_IMPROVE_META_PROGRAMMING configuration 2018-09-07 22:32:34 +09:00
dearblue 1595e8368a Fix indent 2018-09-07 22:32:34 +09:00
dearblue 9b0ef58a48 A class/module name is now defined for meta programing 2018-09-07 22:32:34 +09:00
dearblue fd57af3ea4 Undesirable line split 2018-09-07 22:32:34 +09:00
dearblue 2a24b40d30 Not set a class/module name into anonymous class/module 2018-09-07 22:32:34 +09:00
Yukihiro "Matz" Matsumoto 0b44e802a9 Need to check if merging hash is empty; fix #4107 2018-09-06 23:30:32 +09:00
Yukihiro "Matz" Matsumoto 2a9525caab Add argv and argc check in OP_ENTER; fix #4102
`argv` may be retrieved from an array whose `ptr` is `NULL` when it`s
empty.
2018-09-05 07:06:25 +09:00
Yukihiro "Matz" Matsumoto 9b5910bd0f Revert "Remove top-level constant lookup; CRuby2.5"; fix #4070
This reverts commit c96def7c96.
This change was from my misunderstanding.
2018-09-04 21:19:07 +09:00
Yukihiro "Matz" Matsumoto 7592dfcf7d Need more precise constant name check.
This change was inspired by [ruby-bugs#7573]
2018-09-04 20:50:54 +09:00
Yukihiro "Matz" Matsumoto c2634e18b6 Add type casts to silence MSVC warnings. 2018-09-04 16:22:50 +09:00