| Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
Formerly, `__send__(*args)` modified `args` with `Array#shift`.
This bug affects optcarrot.
This changeset avoids the array destruction by using
`args = args[1, len-1]`.
|
|
|
|
Which loads 16bit integer to the register. The instruction number should
be reorder on massive instruction refactoring. The instruction is added
for `mruby/c` which had performance issue with `OP_EXT`. With this
instruction, `mruby/c` VM can just raise errors on `OP_EXT` extension
instructions.
|
|
`mrb_run` requires to push callinfo stack before calling, which is very
hard from outside of `vm.c`. So there should be virtually no correct
usage of the function, hence the cause of #4488. We removed it.
You can use `mrb_top_run(mrb, proc, self, 0)` instead of
`mrb_run(mrb, proc self)`.
|
|
|
|
The tranpoline code in 6a0b68f8b was wrong; reverted.
|
|
|
|
If `mrb->jmp` is `NULL` and the function `mrb_funcall_with_block()` is
called, GC Arena is returned from the function with over-used.
- A normal (no global exodus) return will consume two GC Arena's.
- In the event of an exception, five GC Arena are consumed.
This patch reduces consumption in both cases to one.
|
|
My cat stepped on the keyboard at the last moment before the commit.
|
|
|
|
In top-level, `mid` is `NULL`. We used to ignore 'mid` update for `NULL`.
|
|
|
|
For efficiency with `MRB_WORD_BOXING` (implement type predicate macros for
all `enum mrb_vtype`).
|
|
* mrb_sym2name -> mrb_sym_name
* mrb_sym2name_len -> mrb_sym_name_len
* mrb_sym2str -> mrb_sym_str
|
|
We needed to preserve the original method name somewhere. We kept it in
the `env` structure pointed from aliased methods. #1457 and #1531 tried
to address this issue. But this patch is more memory efficient.
Limitation: this fix does not support `super` from methods defined by
`define_method`. This limitation may be addressed in the future, but
it's low priority.
|
|
This is partial `aspec` check that only checks `MRB_ARGS_NONE()`.
|
|
ref: https://github.com/mruby/mruby/pull/4483#issuecomment-498001736
In this configuration, `tt` of `RBreak::val` is set into `RBreak::flags`.
|
|
|
|
But this changes requires `OP_ARYCAT` and `OP_ARYPUSH` to accept `nil`
as their first operand. Alternative VMs (e.g. `mruby/c`) that understand
mruby bytecode need to be updated.
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
Example:
$ bin/mruby -e '(Float::INFINITY - Float::INFINITY).nan?'
zsh: segmentation fault
Cause:
`SET_FLOAT_VALUE` is not used. It is needed for normalizing NaN.
Treatment:
In my environment, this issue could be reproduced only when
`infinity - infinity`, however `SET_FLOAT_VALUE` should be used in all
arithmetic operations (regardless of boxing setting), I think.
So I fixed all similar codes by extracting to macro.
|
|
|
|
|
|
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()
|
|
|
|
Suppress a compiler (clang) warning bellow:
src/vm.c:104:38: warning: suggest braces around initialization of
subobject [-Wmissing-braces]
const mrb_value mrb_value_zero = { 0 };
^
{}
|
|
|
|
|
|
|
|
|
|
|
|
The saving `pc` position should be beginning of the instruction.
But after `mruby 2.0` byte code modification, the `pc` variable
points the beginning of the next instruction. We save the previous
position in a local variable `pc0`.
|
|
|
|
|
|
It should be done by planned embedded symbols.
|
|
Reduce instruction size
|
|
|
|
|
|
|
|
|
|
|
|
|