| Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
The type `mrb_hash_value` is no longer used by the segmented list
implementation (ref e8dcfe1 and e65d426).
|
|
The return value from `mrb_delete_key` needs to be protected from GC in
some cases.
|
|
shuujii/use-type-predicate-macros-instead-of-mrb_type-if-possible
Use type predicate macros instead of `mrb_type` if possible
|
|
|
|
For efficiency with `MRB_WORD_BOXING` (implement type predicate macros for
all `enum mrb_vtype`).
|
|
Use inttypes for `snprintf()`
|
|
Remove `MRB_TT_HAS_BASIC` macro
|
|
* mrb_sym2name -> mrb_sym_name
* mrb_sym2name_len -> mrb_sym_name_len
* mrb_sym2str -> mrb_sym_str
|
|
|
|
The value of `MRB_TT_HAS_BASIC` is meaningless because `MRB_TT_HAS_BASIC` is
no longer used with `MRB_WORD_BOXING` at b2c3d88f.
|
|
The default implementations of type predicate macros use `mrb_type`.
But `mrb_type` with `MRB_WORD_BOXING` isn't very efficient, so the new
implementations avoid `mrb_type`.
|
|
linked programs
In lld linked programs, .rodata comes before .text, thus mrb_ro_data_p
will return false for strings in .rodata. Change the lower bound from
_etext to __ehdr_start to catch these cases. This works for ld.bfd, gold
and lld, and it does not have false positives even if .init_array does
not exist.
Remove the branch that uses _edata: strings in .data can be modified so
this is semantically incorrect. Delete the __APPLE__ branch (its
manpages say get_etext() and get_edata() are strongly discouraged).
.init_array has been adopted by most ELF platforms to supersede .ctors.
Neither _etext nor _edata is used, so rename MRB_USE_ETEXT_EDATA to
MRB_USE_EHDR_START.
|
|
`MRB_METHOD_TABLE_INLINE` was fragile. It requires `-falign-functions=n`.
On platform that uses higher bits of function pointers, you can use new
`MRB_METHOD_T_STRUCT` configuration macro.
|
|
This is partial `aspec` check that only checks `MRB_ARGS_NONE()`.
|
|
|
|
So you don't need `-falign-functions=2` anymore. Instead your platform
must not use higher bits of the pointer (true for most platforms).
If not, you have to use `struct mrb_method_t` version.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This change increases the max length of lower inline symbols to 5 bytes.
|
|
The changes at b2c3d88f were inappropriate because the memory layout of bit
fields are implementation defined. Therefor, I fixed it not to use bit
fields.
|
|
|
|
|
|
|
|
The default implementation of `mrb_immediate_p` uses `mrb_type`. However,
in `MRB_WORD_BOXING`, `mrb_type` has many branches and is inefficient, so
provide an implementation that does not use `mrb_type`.
|
|
|
|
|
|
ref: https://github.com/mruby/mruby/pull/4483#issuecomment-498001736
In this configuration, `tt` of `RBreak::val` is set into `RBreak::flags`.
|
|
Based on code proposed by @dearblue to avoid the warning:
`dereferencing type-punned pointer will break strict-aliasing rules`.
|
|
On 64-bit CPU, there is padding in `RBasic`, so reorder the fields and use
it as buffer of embedded string. This change allows 4 more bytes to be
embedded on 64-bit CPU.
However, an incompatibility will occur if `RString::as::ary` is accessed
directly because `RString` structure has changed.
|
|
When building WebAssembly targets with clang (e.g. wasm32-unknown-unknown), all
symbols are hidden by default. To export a symbol, it must be marked with
__attribute__((visibility(default)))
Rather than detecting this exotic target in mruby, allow MRB_API to be defined
externally.
|
|
Generate doxygen docs for mruby
|
|
|
|
|
|
|
|
|
|
Refactor set/unset string type flags
|
|
Introduce `RSTR_SET_TYPE_FLAG` macro to set the specified string type flag and
clear the others.
|
|
|
|
|
|
* `mrb_vm_define_class`
* `mrb_vm_define_module`
Only functions called from user code requires `MRB_API`.
|
|
The condition to make an embedded string was incorrect. Because there were
several similar codes, extracted into `RSTR_EMBEDDABLE_P` macro.
|
|
Contrary to the name, `mrb_to_str` just checks type, no conversion.
|
|
`mrb_string_value_cstr` and `mrb_string_value_len`: obsolete
`mrb_string_cstr`: new function to retrieve NULL terminated C string
`RSTRING_CSTR`: wrapper macro of `mrb_string_cstr`
|