| Age | Commit message (Collapse) | Author | |
|---|---|---|---|
| 2021-12-31 | class.c, variable,c: replace `size_t` by `int`. | Yukihiro "Matz" Matsumoto | |
| That reduce memory consumption by iv/mt tables. | |||
| 2021-12-27 | variable.c: need to initialize `size` of iv table. | Yukihiro "Matz" Matsumoto | |
| 2021-12-13 | variable.c: resurrect `size` member in `iv_tbl`. | Yukihiro "Matz" Matsumoto | |
| The existence of this member reduces memory and execution time. | |||
| 2021-12-08 | variable.c: fix clang integer warning. | Yukihiro "Matz" Matsumoto | |
| 2021-12-07 | variable.c: avoid redundant iv scan in `mrb_mod_cv_set()`. | Yukihiro "Matz" Matsumoto | |
| Now `iv_get()` returns `pos+1` if it finds the entry, so you don't need to call `iv_put()`. You can replace the entry value by assigning to `t->ptr[pos-1]`. | |||
| 2021-12-04 | variable.c: reduce array access in iv hash table. | Yukihiro "Matz" Matsumoto | |
| 2021-12-03 | variable.c: avoid `mrb_undef_value()` for delete entries. | Yukihiro "Matz" Matsumoto | |
| Instead embed deleted flag in the key (`mrb_sym` only occupies 30bits). | |||
| 2021-12-03 | variable.c: remove `size` member from `iv_tbl` to reduce memory. | Yukihiro "Matz" Matsumoto | |
| `iv_size()` is approximated by the allocated table size. | |||
| 2021-12-03 | variable.c: first iv allocation size should be 4 instead of 1. | Yukihiro "Matz" Matsumoto | |
| 2021-12-03 | variable.c: should not access `NULL[0]` to avoid asan warnings. | Yukihiro "Matz" Matsumoto | |
| 2021-12-01 | variable.c: reduce memory usage of instance variable table | Yukihiro "Matz" Matsumoto | |
| This is a fundamentally simplified reimplementation of #5317 by @shuujii Instead of having array of `struct iv_elem`, we have sequences of keys and values packed in single chunk of malloc'ed memory. We don't have to worry about gaps from alignment, especially on 64 bit architecture, where `sizeof(struct iv_elem)` probably consumes 16 bytes, but `sizeof(mrb_sym)+sizeof(mrb_value)` is 12 bytes. In addition, this change could improve memory access locality. close #5317 | |||
| 2021-06-17 | variable.c: add `skip` argument to skip `base` class in lookup. | Yukihiro "Matz" Matsumoto | |
| `mrb_vm_const_get` function looks up the constant first in the base class, so that fallback `const_get` need not to search from the base. | |||
| 2021-06-17 | variable.c: refactor `mrb_vm_const_get` function. | Yukihiro "Matz" Matsumoto | |
| 2021-06-17 | variable.c: skip prepended module for constant lookup. | Yukihiro "Matz" Matsumoto | |
| ```ruby module M FOO = 'm' end class A FOO = 'a' prepend M end class B < A def foo p FOO end end B.new.foo # should print `m` not `a` ``` | |||
| 2021-04-03 | chore: fix spelling | John Bampton | |
| 2021-01-26 | Revert "Minimize the changes in #5277" | Yukihiro "Matz" Matsumoto | |
| This reverts commit dc51d89ac22acc60b9bfeed87115863565b74085. | |||
| 2021-01-22 | Minimize the changes in #5277 | Yukihiro "Matz" Matsumoto | |
| Instead of including `mruby/presym.h` everywhere, we provided the fallback `mruby/presym.inc` under `include/mruby` directory, and specify `-I<build-dir>/include` before `-I<top-dir>/include` in `presym.rake`. So even when someone drops `-I<build-dir>/include` in compiler options, it just compiles without failure. | |||
| 2021-01-11 | Avoid including `presym.inc` in existing header files | KOBAYASHI Shuji | |
| Addressed an issue where existing programs linking `libmruby.a` could only be built by adding `<build-dir>/include` to compiler's include path. | |||
| 2020-11-12 | Remove unused argument of `mrb_obj_iv_tbl_memsize` | KOBAYASHI Shuji | |
| 2020-10-12 | Use hash table instead of segment list for instance variables. | Yukihiro "Matz" Matsumoto | |
| 2020-10-12 | Generate C struct from `irep` instead of binary dump. | Yukihiro "Matz" Matsumoto | |
| 2020-10-12 | Add functions that take symbols as arguments. | Yukihiro "Matz" Matsumoto | |
| - : | |||
| 2020-10-12 | Add `MRB_SYM()` for inline symbols. | Yukihiro "Matz" Matsumoto | |
| 2020-08-11 | Fix `mrb_int` and `size_t` combination warnings. | Yukihiro "Matz" Matsumoto | |
| 2020-07-24 | Change the logic to calculate object (`iv_tbl`) size; #5045 | Yukihiro "Matz" Matsumoto | |
| 2020-07-24 | Merge pull request #5045 from dearblue/memsize_of | Yukihiro "Matz" Matsumoto | |
| Improve `mruby-os-memsize` | |||
| 2020-07-24 | Avoid using FPU with `mruby-os-memsize`; ref #5032 | dearblue | |
| And, in the calculation of the instance variable size, the fraction was always rounded down because of division of integers, so fix it. At the same time, test items that are no longer passed due to this change are deleted. | |||
| 2020-07-22 | Use more `mrb_field_write_barrier` for instance variables. | Yukihiro "Matz" Matsumoto | |
| 2020-07-13 | Use object iv table size in calculation | Rory OConnell | |
| 2019-11-16 | Revert "Implement Ruby2.7's frozen strings from `Symbol#to_s`" | KOBAYASHI Shuji | |
| This feature was reverted from Ruby 2.7. | |||
| 2019-10-20 | Use `mrb_str_cat_str` instead of `mrb_str_concat` if possible | KOBAYASHI Shuji | |
| 2019-10-16 | Use `mrb_sym_name_len` instead of `mrb_sym_name` in `assign_class_name` | KOBAYASHI Shuji | |
| 2019-10-08 | Implement Ruby2.7's frozen strings from `Module#name` | KOBAYASHI Shuji | |
| 2019-09-26 | Use type predicate macros instead of `mrb_type` if possible | KOBAYASHI Shuji | |
| For efficiency with `MRB_WORD_BOXING` (implement type predicate macros for all `enum mrb_vtype`). | |||
| 2019-09-25 | Rename symbol-to-string functions; close #4684 | Yukihiro "Matz" Matsumoto | |
| * mrb_sym2name -> mrb_sym_name * mrb_sym2name_len -> mrb_sym_name_len * mrb_sym2str -> mrb_sym_str | |||
| 2019-09-20 | Fix compatibility issue of class variables. | Yukihiro "Matz" Matsumoto | |
| Singleton class definition do not introduce its own class variable scope in CRuby/JRuby. So should mruby. ``` module Mod1 class << Object.new C = 1 @@cv = 1 p Module.nesting, # => [#<Class:#<Object:0x55cb16e60a50>>, Mod1] constants, # => [:C] class_variables, # => [] Mod1.class_variables # => [:@@cv] end end ``` | |||
| 2019-09-20 | Add optional argument to `Module#class_variables`. | Yukihiro "Matz" Matsumoto | |
| 2019-09-09 | Fix `mod.constants` not to have duplicate constant names; #4698 | Yukihiro "Matz" Matsumoto | |
| The fix was based on PR from @dearblue | |||
| 2019-08-11 | Revert "Should have cleared `mrb->globals` in `mrb_gc_free_gv`; fix #4618" | Yukihiro "Matz" Matsumoto | |
| This reverts commit 3dc8d9d7b3d0be2f91fa050a13e3b422500df628. | |||
| 2019-08-06 | Should have cleared `mrb->globals` in `mrb_gc_free_gv`; fix #4618 | Yukihiro "Matz" Matsumoto | |
| 2019-08-05 | Use new specifiers/modifiers of `mrb_vfromat()` | KOBAYASHI Shuji | |
| The binary sizes (gems are only `mruby-bin-mruby`) are reduced slightly in my environment than before the introduction of new specifiers/modifiers (5116789a) with this change. ------------+-------------------+-------------------+-------- BINARY | BEFORE (5116789a) | AFTER (This PR) | RATIO ------------+-------------------+-------------------+-------- mruby | 593416 bytes | 593208 bytes | -0.04% libmruby.a | 769048 bytes | 767264 bytes | -0.23% ------------+-------------------+-------------------+-------- BTW, I accidentally changed `tasks/toolchains/visualcpp.rake` at #4613, so I put it back. | |||
| 2019-06-25 | Fixed `mrb_iv_remove` with immediate objects; fix #4519 | Yukihiro "Matz" Matsumoto | |
| The #4520 tried to address the issue, but it changes the type of `mrb_check_frozen` argument; close #4520 | |||
| 2019-06-16 | Fix cvar, ivar, const and method can be removed to frozen object | KOBAYASHI Shuji | |
| 2019-06-10 | `Kernel#global_variables` should not include undefined `$1`-`$9` | KOBAYASHI Shuji | |
| - They are not include in Ruby. - Appear in duplicate when `$1`-`$9` are defined. | |||
| 2019-05-15 | Merge pull request #4400 from ↵ | Yukihiro "Matz" Matsumoto | |
| shuujii/fix-name-assignment-to-frozen-anonymous-class-module Fix name assignment to frozen anonymous class/module | |||
| 2019-04-24 | Fix modiying class variable to frozen class/module | KOBAYASHI Shuji | |
| 2019-04-23 | Fix name assignment to frozen anonymous class/module | KOBAYASHI Shuji | |
| Fix the following issues: A = Class.new.freeze #=> FrozenError Module.new::B = Class.new.freeze #=> FrozenError String::B = Module.new.freeze #=> FrozenError | |||
| 2019-04-14 | Fix wrong size of instance variable if occur out of memory | dearblue | |
| 2019-04-14 | Remove pointer check after `mrb_malloc()` | dearblue | |
| 2019-04-10 | Merge pull request #4367 from shuujii/extract-frozen-checking-to-function | Yukihiro "Matz" Matsumoto | |
| Extract frozen checking to function | |||
