summaryrefslogtreecommitdiffhomepage
path: root/src
AgeCommit message (Collapse)Author
2018-10-20Need to freeze string keys.Yukihiro "Matz" Matsumoto
2018-10-12Should not compare `undef` (deleted) key in hashes; fix #4136Yukihiro "Matz" Matsumoto
2018-10-12Add `NULL` check in `sg_compact()`; fix #4139Yukihiro "Matz" Matsumoto
2018-10-12`Hash#delete` should return the deleted value; fix #4133Yukihiro "Matz" Matsumoto
2018-09-26Implement `Hash#rehash` in C using `sg_compact()`.Yukihiro "Matz" Matsumoto
2018-09-26Add index to larger segment lists for performanceYukihiro "Matz" Matsumoto
2018-09-26Use `mrb_undef_value` for delete mark instead of shifting Hash entry table.Yukihiro "Matz" Matsumoto
That means entry table should be compacted periodically by `sg_compact()`.
2018-09-26Use segmented list to implement `Hash` [Experimental]Yukihiro "Matz" Matsumoto
I know it's not hash at all, but reduce memory consumption.
2018-09-26Small refactoring in vm.cYukihiro "Matz" Matsumoto
2018-09-21Add compiler flag to disable direct threading (#4075)sbsoftware
* Add option to disable direct threading * Prepend MRB_ to option name
2018-09-21Fixed a top-level local variable bug in `mirb`.Yukihiro "Matz" Matsumoto
`OP_STOP` returned a wrong value.
2018-09-20Renamed `is_namespace()` to `namespace_p()`.Yukihiro "Matz" Matsumoto
2018-09-20Revert "Add MRB_IMPROVE_META_PROGRAMMING configuration"Yukihiro "Matz" Matsumoto
This reverts commit 1997fcf98f596f6af2bf1d20ccde1b1abfe7324d. It became the default behavior.
2018-09-20Merge branch 'assign-anon-class-name' of https://github.com/dearblue/mruby ↵Yukihiro "Matz" Matsumoto
into dearblue-assign-anon-class-name
2018-09-20Merge pull request #4112 from dearblue/fix-outer-module-nameYukihiro "Matz" Matsumoto
Fix outer module name
2018-09-18Array size may be changed in `mrb_get_args()` reentry.Yukihiro "Matz" Matsumoto
fix #4116; fix #4117; fix #4118; fix #4119; fix #4120
2018-09-08Fix outer module namedearblue
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-07Fix to not define outer when outer is itself.dearblue
example: a = Class.new a::A = a
2018-09-07Clear terminated spacedearblue
2018-09-07Add MRB_IMPROVE_META_PROGRAMMING configurationdearblue
2018-09-07Fix indentdearblue
2018-09-07A class/module name is now defined for meta programingdearblue
2018-09-07Undesirable line splitdearblue
2018-09-07Not set a class/module name into anonymous class/moduledearblue
2018-09-06Need to check if merging hash is empty; fix #4107Yukihiro "Matz" Matsumoto
2018-09-05Add `argv` and `argc` check in `OP_ENTER`; fix #4102Yukihiro "Matz" Matsumoto
`argv` may be retrieved from an array whose `ptr` is `NULL` when it`s empty.
2018-09-04Revert "Remove top-level constant lookup; CRuby2.5"; fix #4070Yukihiro "Matz" Matsumoto
This reverts commit c96def7c96c50f3b8e22e47ce31a6c5a37939dfd. This change was from my misunderstanding.
2018-09-04Need more precise constant name check.Yukihiro "Matz" Matsumoto
This change was inspired by [ruby-bugs#7573]
2018-09-04Add type casts to silence MSVC warnings.Yukihiro "Matz" Matsumoto
2018-09-01Avoid warning in MSVC compilation.Yukihiro "Matz" Matsumoto
2018-09-01Move `Kernel#send` to `mruby-metaprog` gem.Yukihiro "Matz" Matsumoto
But `BasicObject#__send__` is still available from the core.
2018-09-01Avoid `NoMethodError` exception from `mrb_func_basic_p`.Yukihiro "Matz" Matsumoto
2018-09-01Fix ISO/JIS section numbers.Yukihiro "Matz" Matsumoto
2018-08-30Use `mrb_ensure_hash_type()` to check if an operand is a `Hash`; fix #4097Yukihiro "Matz" Matsumoto
2018-08-30Add new function `mrb_ensure_hash_type()`; ref #4097Yukihiro "Matz" Matsumoto
Unlike `mrb_check_hash_type()` that returns `nil` if the argument is not a `Hash`, `mrb_ensure_hash_type()` raises a `TypeError` exception.
2018-08-30Separate meta-programming features to `mruby-metaprog` gem.Yukihiro "Matz" Matsumoto
We assume meta-programming is less used in embedded environments. We have moved following methods: * Kernel module global_variables, local_variables, singleton_class, instance_variables, instance_variables_defined?, instance_variable_get, instance_variable_set, methods, private_methods, public_methods, protected_methods, singleton_methods, define_singleton_methods * Module class class_variables, class_variables_defined?, class_variable_get, class_variable_set, remove_class_variable, included_modules, instance_methods, remove_method, method_removed, constants * Module class methods constants, nesting Note: Following meta-programming methods are kept in the core: * Module class alias_method, undef_method, ancestors, const_defined?, const_get, const_set, remove_const, method_defined?, define_method * Toplevel object define_method `mruby-metaprog` gem is linked by default (specified in default.gembox). When it is removed, it will save 40KB (stripped:8KB) on x86-64 environment last time I measured.
2018-08-30Need to clear `mrb->c->cibase->ridx` (toplevel ridx) at L_STOP; fix #4092Yukihiro "Matz" Matsumoto
This problem only appears when `mrb` executed multiple times (i.e. `mirb`)
2018-08-30The operand of `OP_ARYDUP` may not be an array; fix #4094Yukihiro "Matz" Matsumoto
This commit also fix #4096.
2018-08-29Fix off-by-one error in `OP_EPUSH` and `OP_ONERR`; fix #4095Yukihiro "Matz" Matsumoto
2018-08-29Check the size of rescue&ensure stacks; ref #4088Yukihiro "Matz" Matsumoto
Those small stack indexes can cause integer overflow.
2018-08-29Simplified `#ifdef` nesting in `codedump.c`; fix #4089Yukihiro "Matz" Matsumoto
`printf()` and related functions should not be called when `MRB_DISABLE_STDIO` is defined.
2018-08-25Reduce integer casting warnings.Yukihiro "Matz" Matsumoto
2018-08-25fixup! New bytecode implementation of mruby VM.Yukihiro "Matz" Matsumoto
2018-08-25Hash splat `**` should not be ignored.Yukihiro "Matz" Matsumoto
Implemented by adding `OP_HASHCAT` that merges hashes.
2018-08-25Fixed a bug in `OP_HASHADD`.Yukihiro "Matz" Matsumoto
2018-08-25Add a new function `mrb_hash_merge()`.Yukihiro "Matz" Matsumoto
2018-08-25Add bytecode support for `MRB_WORD_BOXING`.Yukihiro "Matz" Matsumoto
2018-08-25New bytecode implementation of mruby VM.Yukihiro "Matz" Matsumoto
2018-08-25irep is released when Fiber is terminatedpyama86
2018-08-25Rename ambiguous function names.Yukihiro "Matz" Matsumoto
`mrb_iv_p` -> `mrb_iv_name_sym_p` `mrb_iv_check` -> `mrb_iv_name_sym_check`