summaryrefslogtreecommitdiffhomepage
path: root/include
AgeCommit message (Collapse)Author
2019-11-19Release `mruby 2.1.0`.2.1.0Hiroshi Mimaki
2019-10-23Merge branch 'master' into stableHiroshi Mimaki
2019-10-23Add type cast to avoid an error from `int` and `enum` mixture; fix #4786Yukihiro "Matz" Matsumoto
2019-10-18Update version to `2.1.0`. (mruby 2.1.0 RC)2.1.0-rcHiroshi Mimaki
2019-10-06Get keyword arguments with `mrb_get_args()`dearblue
Keyword arguments can now be retrieved with the `:` specifier and `mrb_kwargs` data. For the interface, I referred to CRuby's `rb_get_kwargs()`. For implementation, I referred to `OP_KARG` or etc.
2019-10-04Freeze strings from `nil.to_s`, `true.to_s`, `false.to_s`.Yukihiro "Matz" Matsumoto
This is an experimental changes in Ruby 2.7.
2019-10-03Fix opcode semantics comment miss. (op_jmpnil)Hirohito Higashi
2019-10-03Fix opcode semantics comment miss.Hirohito Higashi
2019-09-30Remove a trailing space in `MRUBY_DESCRIPTION`KOBAYASHI Shuji
2019-09-29Remove unnecessary type `mrb_hash_value`dearblue
The type `mrb_hash_value` is no longer used by the segmented list implementation (ref e8dcfe1 and e65d426).
2019-09-29Add an annotation of the return value from `mrb_delete_key`; #4737Yukihiro "Matz" Matsumoto
The return value from `mrb_delete_key` needs to be protected from GC in some cases.
2019-09-27Merge pull request #4733 from ↵Yukihiro "Matz" Matsumoto
shuujii/use-type-predicate-macros-instead-of-mrb_type-if-possible Use type predicate macros instead of `mrb_type` if possible
2019-09-26Fixed `codedump` for human readable symbol format; ref #4684Yukihiro "Matz" Matsumoto
2019-09-26Use type predicate macros instead of `mrb_type` if possibleKOBAYASHI Shuji
For efficiency with `MRB_WORD_BOXING` (implement type predicate macros for all `enum mrb_vtype`).
2019-09-26Merge pull request #4732 from dearblue/inttypesYukihiro "Matz" Matsumoto
Use inttypes for `snprintf()`
2019-09-25Merge pull request #4728 from shuujii/remove-MRB_TT_HAS_BASIC-macroYukihiro "Matz" Matsumoto
Remove `MRB_TT_HAS_BASIC` macro
2019-09-25Rename symbol-to-string functions; close #4684Yukihiro "Matz" Matsumoto
* mrb_sym2name -> mrb_sym_name * mrb_sym2name_len -> mrb_sym_name_len * mrb_sym2str -> mrb_sym_str
2019-09-25Use inttypes for `snprintf()`dearblue
2019-09-25Remove `MRB_TT_HAS_BASIC` macroKOBAYASHI Shuji
The value of `MRB_TT_HAS_BASIC` is meaningless because `MRB_TT_HAS_BASIC` is no longer used with `MRB_WORD_BOXING` at b2c3d88f.
2019-09-22Implement all type predicate macros for `MRB_WORD_BOXING`KOBAYASHI Shuji
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`.
2019-09-21Rename MRB_USE_ETEXT_EDATA to MRB_USE_LINK_TIME_RO_DATA_P and support lld ↵Fangrui Song
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.
2019-09-16Remove `MRB_METHOD_TABLE_INLINE`.Yukihiro "Matz" Matsumoto
`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.
2019-09-16Raise `ArgumentError` by `aspec` check; ref #4688Yukihiro "Matz" Matsumoto
This is partial `aspec` check that only checks `MRB_ARGS_NONE()`.
2019-09-16Share common definition of `MRB_METHOD_FUNC_FL`.Yukihiro "Matz" Matsumoto
2019-09-16Use bit shifting to pack function pointers to `mrb_method_t`.Yukihiro "Matz" Matsumoto
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.
2019-09-16Refactor `mrb_method_t`.Yukihiro "Matz" Matsumoto
2019-09-15Refactor `mrb_type` in `include/mruby/boxing_word.h`KOBAYASHI Shuji
2019-09-14Add argument names to C function prototypes.Yukihiro "Matz" Matsumoto
2019-09-14Add a macro `mrb_frozen_p` that points to `MRB_FROZEN_P`.Yukihiro "Matz" Matsumoto
2019-09-14Remove `mrb_funcall` from `<=>` operations.Yukihiro "Matz" Matsumoto
2019-09-08Optimize `mrb_bool()` with `MRB_WORD_BOXING`KOBAYASHI Shuji
2019-09-07Increase symbol bit size on 32-bit mode with `MRB_WORD_BOXING`KOBAYASHI Shuji
This change increases the max length of lower inline symbols to 5 bytes.
2019-09-06Avoid bit fields in `mrb_value`; ref b2c3d88fKOBAYASHI Shuji
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.
2019-09-02Fix an error in refactoring; fix #4682Yukihiro "Matz" Matsumoto
2019-08-31Fix `mrb_immediate_p(MRB_TT_FREE)` to return `false`; ref #4679Yukihiro "Matz" Matsumoto
2019-08-31Refactor #4662 with different names.Yukihiro "Matz" Matsumoto
2019-08-31Implement `mrb_immediate_p` macro for `MRB_WORD_BOXING`KOBAYASHI Shuji
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`.
2019-08-26fix lots of warnings and make logo not so bigDavid Siaw
2019-08-26change doc directory and reduce warningsDavid Siaw
2019-08-23Fix `RBreak` exceeding 6 words on 32-bit mode w/o boxing and `MRB_USE_FLOAT`KOBAYASHI Shuji
ref: https://github.com/mruby/mruby/pull/4483#issuecomment-498001736 In this configuration, `tt` of `RBreak::val` is set into `RBreak::flags`.
2019-08-20Avoid C++ strict aliasing warning.Yukihiro "Matz" Matsumoto
Based on code proposed by @dearblue to avoid the warning: `dereferencing type-punned pointer will break strict-aliasing rules`.
2019-08-20Use `RBasic` padding for embedded string on 64-bit CPUKOBAYASHI Shuji
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.
2019-08-18Allow external definition of MRB_API macroRyan Lopopolo
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.
2019-08-19Merge pull request #4636 from davidsiaw/doxygenYukihiro "Matz" Matsumoto
Generate doxygen docs for mruby
2019-08-18fix up documentation for valuesDavid Siaw
2019-08-18Prohibit changes to iseq in principledearblue
2019-08-18fix up markdown display in doxygenDavid Siaw
2019-08-18first bit of doc generationDavid Siaw
2019-08-17Merge pull request #4634 from shuujii/refactor-set-unset-string-type-flagsYukihiro "Matz" Matsumoto
Refactor set/unset string type flags
2019-08-17Refactor set/unset string type flagsKOBAYASHI Shuji
Introduce `RSTR_SET_TYPE_FLAG` macro to set the specified string type flag and clear the others.