- 12 Oct, 2020 40 commits
-
-
Yukihiro "Matz" Matsumoto authored
As described in ISO 15.2.30.
-
Yukihiro "Matz" Matsumoto authored
-
Yukihiro "Matz" Matsumoto authored
We still have `#define MRB_TT_FIXNUM MRB_TT_INTEGER` for compatibility.
-
cremno authored
-
cremno authored
-
cremno authored
Also remove some unnecessary code.
-
-
KOBAYASHI Shuji authored
Trailing `.0` is removed from `Float#to_s` and `Float#inspect` at 9d08025b. However, I think the more human-readable format is better for `Float#inspect`. For example, in the `Float#to_s` format, the failure message is not well understood when testing values including types by `eql?` (e.g. `Numeric#step` test). ```ruby assert "example" do exp = 1.0 act = 1 assert_operator(exp, :eql?, act) #=> Expected 1 to be eql? 1. end ```
-
Yukihiro "Matz" Matsumoto authored
-
dearblue authored
* The `Fixnum` constant is now an alias for the `Integer` class. * Remove `struct mrb_state::fixnum_class` member. If necessary, use `struct mrb_state::integer_class` instead.
-
KOBAYASHI Shuji authored
```console $ bin/mruby -e 'p({1 => 2}.key?(1.0))' true ``` ```console $ bin/mruby -e 'p({1 => 2}.key?(1.0))' false ```
-
Yukihiro "Matz" Matsumoto authored
close #3123
-
Yukihiro "Matz" Matsumoto authored
-
Yukihiro "Matz" Matsumoto authored
-
Lanza authored
-
Yukihiro "Matz" Matsumoto authored
TODO: Unlike CRuby, mruby's `Proc#parameters` does not distinguish required keyword arguments and optional keyword arguments currently.
-
Yukihiro "Matz" Matsumoto authored
-
Yukihiro "Matz" Matsumoto authored
-
Yukihiro "Matz" Matsumoto authored
-
Yukihiro "Matz" Matsumoto authored
You don't have to define explicit `host` build target any more.
-
Yukihiro "Matz" Matsumoto authored
- `MRB_WITHOUT_FLOAT` => `MRB_NO_FLOAT` - `MRB_USE_FLOAT` => `MRB_USE_FLOAT32` The former is to use `USE_XXX` naming convention. The latter is to make sure `float` is 32bit float and not floating point number in general.
-
Yukihiro "Matz" Matsumoto authored
-
Yukihiro "Matz" Matsumoto authored
That describes the changes in `mruby3`.
-
Yukihiro "Matz" Matsumoto authored
If this assertion fails, you have to define `MRB_USE_METHOD_T_STRUCT`.
-
Yukihiro "Matz" Matsumoto authored
It's the first change of renaming configuration options to `MRB_XXX` to `MRB_USE_XXX` or `MRB_NO_XXX`.
-
Yukihiro "Matz" Matsumoto authored
-
Yukihiro "Matz" Matsumoto authored
On platforms where `time_t` is unsigned, negative time can be a result of integer casting. Out-of-range error is too strict for those cases. This fix does not address wrong time value in `MRB_WORD_BOXING`. It will be addressed later (by introducing "big" integers).
-
Yukihiro "Matz" Matsumoto authored
-
Yukihiro "Matz" Matsumoto authored
On some platforms, `sizeof(mrb_value) > sizeof(void*)*3`, which makes `MRB_ARY_EMBED_LEN_MAX` zero. And zero sized array cause compile errors.
-
Yukihiro "Matz" Matsumoto authored
-
Yukihiro "Matz" Matsumoto authored
-
Yukihiro "Matz" Matsumoto authored
Remove `#ifdef` from `union mrb_value_`.
-
Yukihiro "Matz" Matsumoto authored
-
Yukihiro "Matz" Matsumoto authored
-
Yukihiro "Matz" Matsumoto authored
-
dearblue authored
Variables in jump destination block separate declaration and assignment.
-
dearblue authored
Changes made after `setjmp()` are destroyed and need reassignment. This problem is now caused by the addition of the `OP_JUW` instruction. When actually building on FreeBSD 12.1 with `clang10 -fsanitize=address`, mrbtest "NameError#name [15.2.31.2.1]" is failed. However, qualifying `pc` with `volatile` slows down significantly and increases the object code. Suppress them by qualifying only the variables that restore `pc`.
-
dearblue authored
When a global jump occurs, look at the catch handler table to determine where to jump. In that case, `pc` already shows the following instruction, but since the table shows `begin_offset ... end_offset`, the comparison is done with `begin_offset < pc && pc <= end_offset`. If there is a corresponding handler, move `pc` to `handler.target_offset` and continue running the VM. When a global jump across `ensure` is made by `return`, `break`, `next`, `redo` and `retry`, the extended `RBreak` object saves and restores the C-level execution position. This extended `RBreak` can have tag information, which makes it a pseudo coroutine (the "tag" mimics CRuby). The implementation of pseudo coroutines by `RBreak` is summarized by `CHECKPOINT_RESTORE ... CHECKPOINT_MAIN ... CHECKPOINT_END` and `throw_tagged_break` / `unwind_ensure` macros. The restart of processing is branched by `RBREAK_TAG_FOREACH(DISPATCH_CHECKPOINTS)`. - Not only `rescue` blocks but also `ensure` blocks are now sandwiched between `OP_EXCEPT` and `OP_RAISEIF`. - Remove the function `ecall()`. It is no longer necessary to re-enter the VM to perform an "ensure block". This will resolves #1888. - Added instruction `OP_JUW` (Jump while UnWind). It jumps unconditionally like `OP_JMP`, but searches the catch handler table and executes the ensure block. Since it searches the catch handler table, it is much heavier than `OP_JMP`.
-
dearblue authored
`OP_PUSHERR`, `OP_POPERR`, `OP_EPUSH` and `OP_EPOP` are removed.
-
dearblue authored
- `OP_EXCEPT` checks if `mrb->exc` is `NULL`, `MRB_TT_EXCEPTION` or `MRB_TT_BREAK`. If `mrb->exc` is `NULL`, it will be replaced with `nil`. - If `OP_RAISE` is `nil`, it does nothing and the immediately following instruction is executed (like `OP_NOP`). Also, in case of `RBreak` object, it moves to the processing for `break`. With this change, the instruction name is changed from `OP_RAISE` to `OP_RAISEIF`.
-