summaryrefslogtreecommitdiffhomepage
path: root/src
AgeCommit message (Collapse)Author
2019-03-03Extract similar code fragment to method in `src/class.c`KOBAYASHI Shuji
2019-03-02Do not apply `mrb_ptr()` to immediate objects; fix #4307Yukihiro "Matz" Matsumoto
2019-03-02Print length of the `iseq` in code dump header; fix #4304Yukihiro "Matz" Matsumoto
2019-02-27Add newline to warning by `mrb_warn()`KOBAYASHI Shuji
2019-02-25Refactor `src/backtrace.c`KOBAYASHI Shuji
- Move calling `mrb_debug_get_filename()` to after `lineno` check. - Remove unneeded array check in `print_backtrace()`. - Add a few `const` qualifier.
2019-02-18Parenthesize expression to suppress warning; ref #4278Yukihiro "Matz" Matsumoto
2019-02-18Merge pull request #4283 from ↵Yukihiro "Matz" Matsumoto
shuujii/reorder-members-in-struct-backtrace_location Reorder members in `struct backtrace_location`
2019-02-18Reorder members in `struct backtrace_location`KOBAYASHI Shuji
`sizeof(struct backtrace_location)` is 24 bytes -> 16 bytes in LP64 data model etc.
2019-02-18Remove unneeded `memset()` in `src/backtrace.c`KOBAYASHI Shuji
2019-02-17Merge pull request #4279 from dearblue/fix-inline-packed-symbolsYukihiro "Matz" Matsumoto
Fix destroyed "inline packed symbols" on 32 bit mode with `MRB_WORD_BOXING`
2019-02-16Use `const int` instead of `enum`dearblue
2019-02-16Fix inline packed symbols on 32 bit mode with MRB_WORD_BOXINGdearblue
2019-02-16Add length argument for `sym_inline_unpack()`KOBAYASHI Shuji
`sym_inline_unpack_with_bit()` is moved inside of `sym_inline_unpack()` because this is used only one place.
2019-02-15Extract code fragment for unpacking into method in `sym_inline_unpack()`KOBAYASHI Shuji
2019-02-15Merge pull request #4276 from ↵Yukihiro "Matz" Matsumoto
shuujii/use-assert-for-checking-sym-in-sym_inline_unpack Use `mrb_assert()` for checking `sym` in `sym_inline_unpack()`
2019-02-14Use `mrb_assert()` for checking `sym` in `sym_inline_unpack()`KOBAYASHI Shuji
2019-02-14Add `const` to `pack_table` to `src/symbol.c`KOBAYASHI Shuji
2019-02-12Disable `Symbol.all_symbols`.Yukihiro "Matz" Matsumoto
2019-02-12Implement inline packed symbols.Yukihiro "Matz" Matsumoto
Small symbols with all alphanumeric characters (<5) are packed in 32bit symbol integer a la base64. This means those small symbols are not listed in `Symbol.all_symbols`.
2019-02-11Should not copy keys&values when a hash table is empty; fix #4270Yukihiro "Matz" Matsumoto
2019-02-11No strict argument check for blocks when keyword arguments exist; ref #4270Yukihiro "Matz" Matsumoto
2019-02-09`mrb_default_allocf()` is default allocator for NULL safedearblue
2019-02-06Implement symbol hash table to boost `find_symbol`.Yukihiro "Matz" Matsumoto
In 4174e02, we removed the symbol hash table from `mrb_state` but `find_symbol` was too slow with linear search. My performance estimation was wrong. So we implemented a new compact hash table for symbols.
2019-02-06Reduce invocation of `mrb_convert_type()` from `mrb_str_to_str()`.Yukihiro "Matz" Matsumoto
2019-02-06Remove symbol hash table from `mrb_state` structure.Yukihiro "Matz" Matsumoto
Use linear search instead. Number of symbols is usually small (<1K), so we don't need performance boost from hash tables. In our benchmark measurement, hash tables consumes 790KB for `build/full-debug/mrbtest`.
2019-02-05Merge pull request #4262 from shuujii/remove-old-comment-in-symbolYukihiro "Matz" Matsumoto
Remove old comment for `mrb_sym2name_len()` [ci skip]
2019-02-05Remove old comment for `mrb_sym2name_len()` [ci skip]KOBAYASHI Shuji
2019-02-05Fix markup and remove unneeded comment for doc in `src/string.c` [ci skip]KOBAYASHI Shuji
2019-02-04Fix `Symbol#size` for multi-byte characters with `MRB_UTF8_STRING`KOBAYASHI Shuji
Before: p :あ.size #=> 3 After: p :あ.size #=> 1
2019-01-29Remove unused macro in `src/string.c`KOBAYASHI Shuji
2019-01-19Remove `.gitkeep` filesKOBAYASHI Shuji
2019-01-18Merge pull request #4233 from ↵Yukihiro "Matz" Matsumoto
shuujii/remove-special-treatments-for-without-float-in-build-scripts Remove special treatments for `MRB_WITHOUT_FLOAT` in build scripts
2019-01-16Remove special treatments for `MRB_WITHOUT_FLOAT` in build scriptsKOBAYASHI Shuji
2019-01-16Avoid runtime evaluation for `MRB_WITHOUT_FLOAT`KOBAYASHI Shuji
2019-01-14Merge pull request #4222 from shuujii/use-g-instead-of-eYukihiro "Matz" Matsumoto
Use `%g` instead of `%e` for float representation in dump format
2019-01-13Use 2 digits exponent format for `printf` family on old MSVCKOBAYASHI Shuji
For conforming C standard.
2019-01-13Improve compatibility to CRuby for `Float#to_s`KOBAYASHI Shuji
Bfore: Float::INFINITY.to_s #=> "inf" 50.0.to_s #=> "50" 1e20.to_s #=> "1e+20" After / CRuby: Float::INFINITY.to_s #=> "Infinity" 50.0.to_s #=> "50.0" 1e20.to_s #=> "1.0e+20"
2019-01-11Use `%g` instead of `%e` for float representation in dump formatKOBAYASHI Shuji
`%g` use shorter representation than `%e`.
2019-01-10Remove duplicate code in numeric.cKOBAYASHI Shuji
2019-01-08Fix dump/load float leteral evaluate to infinityKOBAYASHI Shuji
Example: # example.rb p(2e308) p(-2e308) Good: $ bin/mruby example.rb inf -inf Bad: $ bin/mrbc example.rb $ bin/mruby -b example.mrb 0 -0 Cause: Float infinity representation is `inf` on dump and it is converted by corresponding `String#to_f` on load. Treatment: - Introduce new representations (`i`: +infinity, `I`: -infinity) - Allow old representations (`inf`, `-inf`, `infinity`, `-infinity`) too - Raise error for unknown representations (use corresponding `Kernel#Float`)
2019-01-04Integrate mrblib/float.rb into src/numeric.cKOBAYASHI Shuji
- Avoid hack for `MRB_WITHOUT_FLOAT` in build scripts - Avoid runtime dispatch for `MRB_WITHOUT_FLOAT`
2019-01-04Remove unused local variable `n` in `range_initialize`; #4213Yukihiro "Matz" Matsumoto
2019-01-04Merge pull request #4213 from shuujii/range-rafactorYukihiro "Matz" Matsumoto
range: Refactor range.h/range.c
2019-01-03range: Refactor range.h/range.cKOBAYASHI Shuji
Functions order, name, linkage and so on.
2019-01-03Remove `Kernel#class_defined?` which is not available in CRuby; #3829Yukihiro "Matz" Matsumoto
2019-01-01range: Embed edges in RRange on boxing environment.KOBAYASHI Shuji
[Breaking changes] Developers must use following APIs for accessing attributes of RRange because RRange structure depends on boxing setting. - mrb_range_beg - mrb_range_end - mrb_range_excl_p
2018-12-23Suppress a struct initializer warningKOBAYASHI Shuji
Suppress a compiler (clang) warning bellow: src/vm.c:104:38: warning: suggest braces around initialization of subobject [-Wmissing-braces] const mrb_value mrb_value_zero = { 0 }; ^ {}
2018-12-17Merge pull request #4189 from sdottaka/fix-mrb_ary_clearYukihiro "Matz" Matsumoto
Make mrb_ary_clear() function callable from C again
2018-12-17Small refactoring of #4188Yukihiro "Matz" Matsumoto
2018-12-17Recover `#to_int`; ref #4177Yukihiro "Matz" Matsumoto
We have removed implicit conversion to strings using `to_int`. But some users still using `to_int` as a typical integer method, i.e. they do string check by code like: `obj.respond_to?(:to_int)`. So we have recovered the method.