| Age | Commit message (Collapse) | Author |
|
The newer `clang` warns implicit float conversions.
|
|
Get an irep symbol if it's `OP_GETSV` or `OP_SETSV`
|
|
Update `doc/opcode.md` [ci skip]
|
|
The difference of `include/mruby/ops.h` is applied.
- OP_NOP - update semantics
- OP_GETSV - update semantics
- OP_SETSV - update semantics
- OP_GETUPVAR - update prefix
- OP_SETUPVAR - update prefix
- OP_JMPIF - update operands and semantics
- OP_JMPNOT - update operands and semantics
- OP_JMPNIL - add entry
- OP_ONERR - update semantics
- OP_POPERR - update prefix
- OP_EPOP - update prefix
- OP_SENDB - update semantics
- OP_ADD - update prefix and operands
- OP_ADDI - update operands and semantics
- OP_SUB - update prefix and operands
- OP_SUBI - update semantics
- OP_MUL - update prefix and operands
- OP_DIV - update prefix and operands
- OP_EQ - update prefix and operands
- OP_LT - update prefix and operands
- OP_LE - update prefix and operands
- OP_GT - update prefix and operands
- OP_GE - update prefix and operands
- OP_ARYDUP - add entry
- OP_INTERN - add entry
- OP_HASHCAT - add entry
- OP_ERR - update semantics
|
|
|
|
Remove byteorder constants; ref 87576b8
|
|
Fix boundary check for `OP_LOADI16`; ref fa8668c
|
|
The `FLAG_BYTEORDER_NATIVE` and `FLAG_BYTEORDER_NONATIVE` are no longer
needed.
|
|
It was making a negative integer if the highest-order bit of a 16-bit
integer was 1.
no patched:
```ruby
p 0x7fff # => 32767
p 0x8000 # => -32768
p 0xffff # => -1
p 0x10000 # => 65536
```
|
|
shuujii/fix-some-Hash-methods-are-inconsistent-with-values
Fix some `Hash` methods are inconsistent with `values`
|
|
Inconsistent when hash has duplicate key.
### Example
```ruby
# example.rb
keys = (1..3).map{[_1]}
h = keys.to_h{[_1, _1[0]]}
keys[0][0] = 2
p h.values
p h.each_value.to_a
p h
```
#### Before this patch:
```console
$ bin/mruby example.rb
[1, 2, 3]
[1, 1, 3]
{[2]=>1, [2]=>1, [3]=>3}
```
#### After this patch (same as Ruby)
```console
$ bin/mruby example.rb
[1, 2, 3]
[1, 2, 3]
{[2]=>1, [2]=>2, [3]=>3}
```
|
|
|
|
|
|
|
|
`cmpnum` function may return `nil` on error.
|
|
|
|
Since `mruby 2.0`, compiled bytecode no longer depends on the
endian of the machine.
|
|
You don't have to specify endian since `mruby 2.0`.
|
|
|
|
- Add `OP_LOADI16`
- Update keyword argument related ops (e.g. OP_KEY_P, etc.)
- Fix some wrong descriptions
|
|
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)`.
|
|
|
|
|
|
Enable MRB_METHOD_T_STRUCT by default on 32bit GUN/Linux
|
|
Because we can't use the highest 2 bits of function pointers.
|
|
Avoid changing directory in `mruby-io` test
|
|
Refine `.travis.yml`
|
|
* Disable automatic update and clean up on `brew install` (install time
160 sec -> 5 sec).
* Avoid using deprecated keys.
|
|
Sorting the list of gems at build time by name
|
|
Avoid comparing pointers and integers
|
|
Makes `mrb_any_to_s()` accept an object whose class is `NULL`
|
|
|
|
|
|
When using `mrb_any_to_s()` for debugging purposes, giving an object
whose class is `NULL` no longer causes a SIGSEGV and no crash.
This is achieved by making `mrb_class_name()` and `mrb_str_cat_cstr()`
null safe.
|
|
Printing them in sorted order makes it easier to find the desired gem.
But it has come to completely ignore the dependency.
|
|
`assert()` can be completely removed when `NDEBUG` is set.
|
|
|
|
|
|
Ref #4982 #4983
|
|
|
|
|
|
The behavior is different from CRuby, but we believe this is a right
behavior for mruby, which only supports either ASCII or UTF-8
exclusively; fix #4983, ref #4982
```
$ printf '\xe3\x81' | ruby -e 'p STDIN.readchar'
"\xE3\x81"
```
```
$ printf '\xe3\x81' | mruby -e 'p STDIN.readchar'
"\xE3"
```
|
|
This fix only effective when `MRB_UTF8_STRING` is set.
|
|
- mrb_utf8len() - returns the size of a UTF-8 char (in bytes)
- mrb_utf8_strlen() - returns the length of a UTF-8 string (in char)
|
|
The bug was introduced by #4712. The `getc' problem resurrected.
It should be addressed soon.
|
|
|
|
|
|
|