| Age | Commit message (Collapse) | Author |
|
This reverts commit 3dc8d9d7b3d0be2f91fa050a13e3b422500df628.
|
|
|
|
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.
|
|
The #4520 tried to address the issue, but it changes the type of
`mrb_check_frozen` argument; close #4520
|
|
|
|
- They are not include in Ruby.
- Appear in duplicate when `$1`-`$9` are defined.
|
|
shuujii/fix-name-assignment-to-frozen-anonymous-class-module
Fix name assignment to frozen anonymous class/module
|
|
|
|
Fix the following issues:
A = Class.new.freeze #=> FrozenError
Module.new::B = Class.new.freeze #=> FrozenError
String::B = Module.new.freeze #=> FrozenError
|
|
|
|
|
|
Extract frozen checking to function
|
|
|
|
|
|
Fix the following example:
Object.const_set :A, Module.new{const_set :B, Class.new}
ab = A::B.to_s
p ab #=> "A::B" # Good
ab[0] = "x"
p A::B.to_s #=> "x::B" # Bad
|
|
Functions to add prototypes to headers:
* mrb_ary_splice()
* mrb_notimplement()
* mrb_vformat()
* mrb_cstr_to_dbl()
* mrb_cstr_to_inum()
Functions to be made `static` (`MRB_API` was not needed):
* mrb_mod_module_function()
* mrb_obj_hash()
* mrb_str_len_to_inum()
Functions to remove `MRB_API` from definitions (referenced from within `libmruby`):
* mrb_mod_cv_defined()
* mrb_mod_cv_get()
* mrb_f_send()
|
|
- `@@?` etc are invalid class variable name.
- `@1` etc are invalid instance variable name.
|
|
`X!` etc are invalid constant name.
|
|
|
|
|
|
* return `void` instead of `mrb_bool'.
* non zero return value from `func` breaks the loop.
* no longer remove items on negative return value from `func`.
|
|
|
|
This reverts commit 1997fcf98f596f6af2bf1d20ccde1b1abfe7324d.
It became the default behavior.
|
|
into dearblue-assign-anon-class-name
|
|
example:
a = Class.new
a::A = a
|
|
|
|
|
|
|
|
|
|
This reverts commit c96def7c96c50f3b8e22e47ce31a6c5a37939dfd.
This change was from my misunderstanding.
|
|
`mrb_iv_p` -> `mrb_iv_name_sym_p`
`mrb_iv_check` -> `mrb_iv_name_sym_check`
|
|
|
|
Use segment list for instance variable again to reduce memory.
|
|
|
|
`FrozenError` is a subclass of `RuntimeError` which used to be
raised. [Ruby2.5]
|
|
|
|
|
|
|
|
|
|
Unlike method definition, constant reference should start from
`MRB_PROC_TARGET_CLASS(ci->proc)`, not `ci->target_class`.
In addition, `MRB_PROC_TARGET_CLASS(ci->proc)` is always set.
|
|
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`.
|
|
|
|
Instead of `irep -> proc` chain, we use `irep -> irep` chain to
avoid GC bugs like #3804. We added `target_class` reference to
`mrb_irep` struct. That means one more word consumption per `irep`.
|
|
|
|
|
|
For performance reason. Segmented list consumes slightly less memory
but takes a lot of time especially when there are many slots in the
segment lists (e.g. class constants).
|
|
|
|
|
|
`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.
|
|
The change removes several internal instance variables used by
class name management. The variables `__classid__` and `__classpath__`
are no longer available. `__outer__` is used only for unnamed outer
classes/modules (and will be removed after they are named).
[Important note]
Along with this change we removed several public functions.
- mrb_class_outer_module()
- mrb_class_sym()
We believe no one have used those functions, but if you do, please
ask us for the workaround.
|