summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
2019-09-29Restore GC arena frequentlydearblue
2019-09-29Merge pull request #4737 from dearblue/hash-deleteYukihiro "Matz" Matsumoto
Add an annotation about the return value
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-29Remove unnecessary assignmentsdearblue
2019-09-29Merge pull request #4735 from shuujii/remove-unused-node-type-in-codegenYukihiro "Matz" Matsumoto
Remove unused node type in `codegen()`
2019-09-29Add an annotation about the return valuedearblue
2019-09-29Escape the AST stringdearblue
2019-09-28Remove unused node type in `codegen()`KOBAYASHI Shuji
2019-09-28Merge pull request #4734 from shuujii/simplify-arguments-check-in-String-rindexYukihiro "Matz" Matsumoto
Simplify arguments check in `String#rindex`
2019-09-28Replace `mrb_sym_name` with `mrb_sym_dump`; ref #4684Yukihiro "Matz" Matsumoto
2019-09-27Simplify arguments check in `String#rindex`KOBAYASHI Shuji
Also fix document about type of the first argument.
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-26Use proper type specifier for `mrb_raisef()`; ref #4731Yukihiro "Matz" Matsumoto
The following two may be different: * `%d` for `int` * `%i` for `mrb_int`
2019-09-26Merge pull request #4732 from dearblue/inttypesYukihiro "Matz" Matsumoto
Use inttypes for `snprintf()`
2019-09-26Merge pull request #4731 from dearblue/consistent-typeYukihiro "Matz" Matsumoto
Keep the type of `posarg` consistent
2019-09-25Merge pull request #4728 from shuujii/remove-MRB_TT_HAS_BASIC-macroYukihiro "Matz" Matsumoto
Remove `MRB_TT_HAS_BASIC` macro
2019-09-25Merge pull request #4729 from dearblue/fix-4598Yukihiro "Matz" Matsumoto
Fix `MRB_WITHOUT_FLOAT` reversal; fix #4598
2019-09-25Merge pull request #4730 from dearblue/fall-throughYukihiro "Matz" Matsumoto
Add "fall through"
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-25Keep the type of `posarg` consistentdearblue
Match the type with the caller and related functions.
2019-09-25Add "fall through"dearblue
2019-09-25Fix `MRB_WITHOUT_FLOAT` reversal; fix #4598dearblue
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-24Merge pull request #4727 from ↵Yukihiro "Matz" Matsumoto
shuujii/exception-initialize-should-not-allow-two-or-more-arguments `Exception#initialize` should not allow two or more arguments
2019-09-24`Exception#initialize` should not allow two or more argumentsKOBAYASHI Shuji
2019-09-23Merge pull request #4726 from ↵Yukihiro "Matz" Matsumoto
shuujii/fix-Fixnum-overflow-test-in-Integer-lshift-test Fix `Fixnum` overflow test in `Integer#<<` test
2019-09-23Fix `Fixnum` overflow test in `Integer#<<` testKOBAYASHI Shuji
- Skip when `MRB_WITHOUT_FLOAT` is defined. - Make `Fixnum` overflow even when `MRB_INT64` is defined.
2019-09-23Merge pull request #4725 from ↵Yukihiro "Matz" Matsumoto
shuujii/implement-all-type-predicate-macros-for-MRB_WORD_BOXING Implement all type predicate macros for `MRB_WORD_BOXING`
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-22Merge pull request #4716 from MaskRay/rodataYukihiro "Matz" Matsumoto
Rename MRB_USE_ETEXT_EDATA to MRB_USE_LINK_TIME_RO_DATA_P and support lld linked programs
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-21Merge pull request #4724 from ↵Yukihiro "Matz" Matsumoto
shuujii/use-mrb_define_method-instead-of-mrb_define_alias Use `mrb_define_method` instead of `mrb_define_alias`
2019-09-21Use `mrb_define_method` instead of `mrb_define_alias`KOBAYASHI Shuji
2019-09-20Fix compatibility issue of class variables.Yukihiro "Matz" Matsumoto
Singleton class definition do not introduce its own class variable scope in CRuby/JRuby. So should mruby. ``` module Mod1 class << Object.new C = 1 @@cv = 1 p Module.nesting, # => [#<Class:#<Object:0x55cb16e60a50>>, Mod1] constants, # => [:C] class_variables, # => [] Mod1.class_variables # => [:@@cv] end end ```
2019-09-20Add optional argument to `Module#class_variables`.Yukihiro "Matz" Matsumoto
2019-09-20Merge pull request #4723 from shuujii/fix-typo-in-Array-difference-documentYukihiro "Matz" Matsumoto
Fix typo in `Array#difference` document [ci skip]
2019-09-20Fix typo in `Array#difference` document [ci skip]KOBAYASHI Shuji
2019-09-20Merge pull request #4722 from shuujii/simplify-arguments-check-in-String-indexYukihiro "Matz" Matsumoto
Simplify arguments check in `String#index`
2019-09-19Simplify arguments check in `String#index`KOBAYASHI Shuji
Also fix document about type of the first argument.
2019-09-18Merge pull request #4720 from shuujii/fix-Enumerable-filter_map-without-blockYukihiro "Matz" Matsumoto
Fix `Enumerable#filter_map` without block; ref d380c7d2
2019-09-18Fix `Enumerable#filter_map` without block; ref d380c7d2KOBAYASHI Shuji
2019-09-18Merge pull request #4719 from shuujii/remove-unneeded-mrb_get_argsYukihiro "Matz" Matsumoto
Remove `mrb_get_args(mrb, "")`; ref 30f37872
2019-09-18Remove `mrb_get_args(mrb, "")`; ref 30f37872KOBAYASHI Shuji
2019-09-18Fix `super` from aliased methods to work correctly; fix #4718Yukihiro "Matz" Matsumoto
We needed to preserve the original method name somewhere. We kept it in the `env` structure pointed from aliased methods. #1457 and #1531 tried to address this issue. But this patch is more memory efficient. Limitation: this fix does not support `super` from methods defined by `define_method`. This limitation may be addressed in the future, but it's low priority.
2019-09-17Merge pull request #4717 from shuujii/fix-Fixnum-to_s-inspect-argument-specsYukihiro "Matz" Matsumoto
Fix `Fixnum#(to_s|inspect)` argument specs
2019-09-17Fix `Fixnum#(to_s|inspect)` argument specsKOBAYASHI Shuji
Before this patch: $ bin/mruby -e 'p 3.to_s(2)' trace (most recent call last): [0] -e:1 -e:1: 'to_s': wrong number of arguments (1 for 0) (ArgumentError) After this patch: $ bin/mruby -e 'p 3.to_s(2)' "11"
2019-09-17Merge pull request #4714 from dearblue/shrink-mrb_get_argsYukihiro "Matz" Matsumoto
Shrink `mrb_get_args()`