| Age | Commit message (Collapse) | Author |
|
|
|
Normal `TYPED_FIXABLE(f,mrb_float)` does not work on 64bit int from
casting problems. The new approach works well, but assumes two's
complement and IEEE-754 floating point numbers.
|
|
Functions that are called infrequently need not to be inline.
|
|
Unify type of line number to `uint16_t`
|
|
|
|
|
|
|
|
|
|
In #4550, @shuuji proposed the name name `MRB_STR_NO_MULTI_BYTE` for
more precise description. Although I agree that the name name is
correct, but the flag means the string does not contain multi byte UTF-8
characters, i.e. all characters fit in the range of ASCII.
|
|
|
|
shuujii/fix-String-byteslice-with-MRB_UTF8_STRING-and-some-edge-cases
Fix `String#byteslice` with `MRB_UTF8_STRING` and some edge cases
|
|
Example:
$ bin/mruby -e '
p "あa".byteslice(1)
p "bar".byteslice(3)
p "bar".byteslice(4..0)
'
Before this patch:
"a"
""
RangeError (4..0 out of range)
After this patch (same as Ruby):
"\x81"
nil
nil
|
|
shuujii/fix-struct-RRange-overflow-on-32-bit-CPU-with-MRB_NAN_BOXING
Fix `struct RRange` overflow on 32-bit CPU with `MRB_NAN_BOXING`
|
|
`(r).value.bp` and `v` have the same value due to assignment of the line
preceding the removed line.
|
|
|
|
Before this patch:
$ bin/mruby -e 'p Struct.new("A-")'
#=> Struct::"A-"
After this patch:
$ bin/mruby -e 'p Struct.new("A-")'
#=> NameError: identifier A- needs to be constant
|
|
|
|
This time, the allocated memory comes from the string object, which is
referenced from GC arena. The memory region will be reclaimed when the C
function called from VM is terminated, or the GC arena is restored.
|
|
When I found this function, I expected it to behave the same as the
`alloca(3)` function, but it is accually the `mrb_alloca()` function
does not free the heap until the `mrb_close()` function is called.
Also, even if it is deleted, it can be replaced with the combination
of the `MRB_TT_DATA` object and the `mrb_gv_set()` function if it is
sure necessary.
|
|
|
|
Read irep from buffers
|
|
Or `Float` if `mrb_float` value is too big (or too small) to fit in
`mrb_int`. The `_int_` in `mrb_int_value` means `Integral` module, which
represents integer-like values in mruby.
|
|
New functions:
* mrb_num_plus(mrb, x, y)
* mrb_num_minus(mrb, x, y)
* num_num_mul(mrb, x, y)
|
|
Because it is not currently output by `mrbc`.
|
|
|
|
Not only mruby, it is one of the difficult things to adjust the performance vs. memory efficiency of the software.
If the approximate target device is divided and the adjustment value for it is prepared by default, it is a good indicator to do fine adjustment.
This PR divides into four profiles.
***Caution: There is no basis for the definitions in the patch.***
- `MRB_CONSTRAINED_BASELINE_PROFILE` - for microprocessors. Reduce memory consumption.
- `MRB_BASELINE_PROFILE` - Default value of mruby.
- `MRB_MAIN_PROFILE` - For desktop computers. Assume that a huge amount of RAM, 10 MiB or more, is on board.
- `MRB_HIGH_PROFILE` - for servers. Assume that mruby VM has a long life.
As you can see the profile name has been ~~stolen~~ imitated from H.264.
|
|
* mrb_fixnum_plus()
* mrb_fixnum_minus()
* mrb_fixnum_mul()
|
|
|
|
|
|
The previous value (`UINT16_MAX`) was too long for symbols, so it raises
an exception after the length check.
|
|
|
|
shuujii/fix-name-assignment-to-frozen-anonymous-class-module
Fix name assignment to frozen anonymous class/module
|
|
|
|
|
|
- (Modify) `MRB_INT16`
- (Add) `MRB_INT32`
- (Modify) `MRB_INT64`
- (Add) `MRB_USE_ETEXT_EDATA`
- (Add) `MRB_NO_INIT_ARRAY_START
- (Add) `MRB_WITHOUT_FLOAT`
- (Add) `MRB_METHOD_CACHE`
- (Add) `MRB_METHOD_CACHE_SIZE`
- (Add) `MRB_METHOD_TABLE_INLINE
- (Add) `MRB_ENABLE_ALL_SYMBOLS`
|
|
User definable `mrb_ro_data_p()` functions are available
by defining `MRB_USE_CUSTOM_RO_DATA_P`.
(Limitation) It can not be defined as an inline function.
|
|
Add new functions (with `MRB_API`):
- `mrb_read_irep_buf()`
- `mrb_load_irep_buf()`
- `mrb_load_irep_buf_cxt()`
|
|
|
|
|
|
Fix the following issues:
A = Class.new.freeze #=> FrozenError
Module.new::B = Class.new.freeze #=> FrozenError
String::B = Module.new.freeze #=> FrozenError
|
|
Change modifier to `MRB_INLINE` from `static inline`
|
|
In `SET_OBJ_VALUE()`, branch isn't removed because `switch` condition isn't
constant expression.
|
|
|
|
|
|
|
|
|
|
Extract frozen checking to function
|
|
|
|
|
|
Update version and release date. `mruby 2.0.1 (2019-4-4)`
|