Christopher Aue
c7018ea962
Added mrb_str_index to the mrb API
2017-07-28 21:07:20 +02:00
Yukihiro "Matz" Matsumoto
1e41026b28
Always use MRB_USE_IV_SEGLIST.
2017-07-27 16:14:03 +09:00
Yukihiro "Matz" Matsumoto
f26d00d9e8
Embed small size array elements in the heap.
...
It reduces the memory consumption and sometimes improve the
performance as well. For example, the consumed memory size
of `bench/bm_ao_render.rb` is reduced from 1.2GB to 1GB, and
its total execution time become 18.795 sec from 22.229 sec.
2017-07-27 16:13:06 +09:00
Yukihiro "Matz" Matsumoto
329938ef15
Simplify mrb_gc_arena_restore() to reduce overhead.
...
It will no longer shrink arena region. Instead `vm.c` uses
a static function `mrb_gc_arena_shrink()` to shrink.
2017-07-18 23:26:36 +09:00
Yukihiro "Matz" Matsumoto
fc666bfe20
POSFIXABLE and NEGFIXABLE should take one argument.
2017-07-11 09:02:24 +09:00
Yukihiro "Matz" Matsumoto
46dee5716f
Resurrect POSFIXABLE and NEGFIXABLE; ref 9186828
2017-07-10 09:42:48 +09:00
Yukihiro "Matz" Matsumoto
ce6c05600a
Add fallback definitions of DBL_EPSILPN and LDBL_EPSILON; fix #3733
...
This is a workaround for mingw-w64 (5.3.1) bug.
2017-07-07 22:47:49 +09:00
Yukihiro "Matz" Matsumoto
91868286be
FIXABLE_FLOAT() fails sometimes in MRB_INT64 environment.
2017-07-06 09:05:46 +09:00
Yukihiro "Matz" Matsumoto
c6bd8ceab7
Merge pull request #3726 from mruby/stable
...
mruby-1.3.0
2017-07-04 15:46:38 +09:00
Hiroshi Mimaki
277391e1b2
Set the mruby-1.3.0 release date to 2017-7-4.
2017-07-04 09:15:16 +09:00
Yukihiro "Matz" Matsumoto
aee1476ebd
Provide better way to check compile errors.
...
Now you can just call `mrb_load_*` functions then check
`context->parser_nerr > 0` if the return value is `undef`,
instead of calling `mrb_parse_*` functions independently.
ref #3248 #3331
2017-06-28 16:04:40 +09:00
Yukihiro "Matz" Matsumoto
15945e14b9
Revert "Make mrb_load_exec a static function."
...
This reverts commit 7944d9a6d4 .
Because it voids #3248 and #3331 . But we should add better way
to check whether compile errors occur without duplicated callings.
2017-06-28 16:00:59 +09:00
Yukihiro "Matz" Matsumoto
7944d9a6d4
Make mrb_load_exec a static function.
2017-06-23 17:56:12 +09:00
Yukihiro "Matz" Matsumoto
9a59cd7af8
Silence mrbmemcpy and mrbmemset warnings.
2017-06-23 17:54:02 +09:00
Yukihiro "Matz" Matsumoto
4d3027b08e
Increment the version number to 1.3.0.
2017-06-19 16:47:25 +09:00
Yukihiro "Matz" Matsumoto
ea250d5f52
Increment RITE_BINARY_FORMAT_VER.
...
The behavior of `OP_RAISE` has been changed.
2017-06-19 09:23:03 +09:00
Yukihiro "Matz" Matsumoto
667e788159
Use mrb_int instead of int as argument to mrb_hash_new_capa.
2017-06-19 09:21:07 +09:00
Yukihiro "Matz" Matsumoto
d4d99dd6d7
Allow break from a block called by mrb_yield; close #3359
...
This means #3701 is now OK to merge.
2017-06-16 11:34:11 +09:00
Yukihiro "Matz" Matsumoto
bb1bfaa2fb
Add helper functions to use gdb reverse-next.
...
On my machine, gdb reverse-next does not work with memcpy and memset.
Add naive implementation of those functions to override.
2017-06-15 13:32:15 +09:00
Yukihiro "Matz" Matsumoto
788cea2b43
Revert "Simplify rescue stack management; ref #3683 "
...
This reverts commit eb5a606fe2 and
079f310fbc .
The rescue stack works differently from ensure stack, so the change
caused #3686 and #3688 . It might take long to solve the problems,
so that I would revert the changes for now. Fix #3688
2017-06-03 23:32:15 +09:00
Yukihiro "Matz" Matsumoto
c041206ad1
Add checks for break from proc-closure; fix #3640
2017-06-03 12:44:29 +09:00
Yukihiro "Matz" Matsumoto
eb5a606fe2
Simplify rescue stack management; ref #3683
2017-06-01 19:18:24 +09:00
Yukihiro "Matz" Matsumoto
7ff90b52d8
Simplify ensure stack management; fix #3683
2017-06-01 19:17:48 +09:00
Yukihiro "Matz" Matsumoto
ff7df939ba
Restore MRB_API function mrb_exc_backtrace(mrb, exc); ref 9644ad5
2017-05-31 23:15:17 +09:00
Yukihiro "Matz" Matsumoto
27a5e10454
Avoid using C++ style comments (//).
2017-05-30 11:47:59 +09:00
Yukihiro "Matz" Matsumoto
83fc915213
Add new range check macro FIXABLE_FLOAT(); ref #3652
...
When MRB_INT64, valid value range of mrb_int is bigger than double,
which only has 53 bits significant precision.
2017-05-26 09:54:10 +09:00
Yukihiro "Matz" Matsumoto
9e40586d43
Add cast to mrb_int in mrb_fixnum() when MRB_WORD_BOXING.
...
Without this cast, `long int:63` can cause warnings.
2017-05-26 02:16:18 +09:00
Yukihiro "Matz" Matsumoto
9644ad51b4
Simplify backtrace mechanism; fix #3633 #3634 #3644
...
Instead of preserving a backtrace in `mrb_state`, `mrb_exc_set`
keeps packed backtrace in an exception object. `#backtrace` unpacks
it to an array of strings.
2017-05-23 23:50:42 +09:00
Yukihiro "Matz" Matsumoto
d2458e66c2
Remove class info from backtrace lines.
2017-05-23 23:50:42 +09:00
Asmod4n
9057a3f3be
Add macOS support to mrb_ro_data_p
...
This adds macOS support to mrb_ro_data_p, fixes #3636
2017-04-25 20:34:07 +02:00
Yukihiro "Matz" Matsumoto
aa8e490fd5
Prevent GC during each_object; fix #3616
2017-04-25 17:25:48 +09:00
Yukihiro "Matz" Matsumoto
5513fcee22
Keep reference to mrb_context from env; fix #3619
2017-04-22 14:35:36 +09:00
Yukihiro "Matz" Matsumoto
62dae09bf6
Allow mrb_objspace_each_objects() to break iteration; ref #3359
2017-04-20 15:44:56 +09:00
Yukihiro "Matz" Matsumoto
6a0b68f8b8
Use trampoline technique for instance_exec; ref #3359
...
A new function `mrb_yield_cont()` is provided. You have to call it
at the end of a C defined method, e.g. `return mrb_yield_cont()`.
2017-04-19 19:54:55 +09:00
Yukihiro "Matz" Matsumoto
77331d127b
Unify else clause style
2017-04-03 16:56:27 +09:00
Yukihiro "Matz" Matsumoto
26169f9e25
Enhance OP_RESCUE to take B operand fas matching exception; ref #3487
2017-03-12 00:50:38 +09:00
Yukihiro "Matz" Matsumoto
000c68da97
OP_RETRUN to take B as matching exception; ref #3487
2017-03-11 16:32:29 +09:00
Yukihiro "Matz" Matsumoto
2d858cab3d
Use C++ ABI only when MRB_ENABLE_CXX_ABI is set; ref #3470
2017-03-02 20:37:21 +09:00
Yukihiro "Matz" Matsumoto
0bcf9e28fc
Reorganize C++ exceptions; ref #3470
...
There are 3 levels of C++ exception handling:
* default - no C++ exception (use setjmp/longjmp)
* enable_cxx_exception (use C++ exceptions with C ABI)
* enable_cxx_abi (use C++ ABI including exceptions)
2017-03-02 10:58:26 +09:00
Tomasz Dabrowski
bd2b76ea85
Build fix for 32-bit clang 3.8/3.9 with MRB_INT64
2017-02-16 13:39:21 +01:00
Yukihiro "Matz" Matsumoto
8efa7b00df
Preallocate SystemStackError; ref #3421
2017-02-15 11:59:47 +09:00
Yukihiro "Matz" Matsumoto
30aa521854
Do not use mrb_funcall() if Hash#default is not overridden; ref #3421
...
This change reduces the recursion level, but does not solve the stack
overflow issue entirely.
2017-02-14 00:22:12 +09:00
Yukihiro "Matz" Matsumoto
51d7a69ab0
Clear (o).w first for MRB_WORD_BOXING; ref #3396
2017-01-25 11:07:57 +09:00
Yukihiro "Matz" Matsumoto
28cf7a549d
Change return type of mrb_range_beg_len() from int to mrb_int.
...
ref #3411
2017-01-23 22:18:29 +09:00
Yukihiro "Matz" Matsumoto
f0f095bc13
Fix a double free problem in codegen.c; fix #3378
...
This issue was first reported by https://hackerone.com/geeknik
The fix was proposed by @titanous
2017-01-23 16:53:31 +09:00
Yukihiro "Matz" Matsumoto
5e1d923381
Changed the behavior of mrb_range_beg_len(); close #3411
...
The new API is:
int mrb_range_beg_len(mrb, range, &beg, &len, len, trunc)
The new argument `trunc` is a boolean value that specifies
whether the function truncates the range. The new return value
is an integer instead of a boolean, that is:
0: not a range
1: range with proper edges
2: out of range
To get the old behavior, you have to rewrite:
mrb_range_beg_len(mrb, range, &beg, &len, len)
to:
mrn_range_beg_len(mrb, range, &beg, &len, len, TRUE) == 1
[Breaking Change]
2017-01-23 14:35:26 +09:00
hhc0null
af4f6e8dc6
Fix a typo.
2017-01-12 00:02:17 +09:00
Yukihiro "Matz" Matsumoto
44edc51612
Raises Exception if raising exception class is redefined
...
close #3384
This issue was reported by https://hackerone.com/brakhane
2017-01-11 10:29:55 +09:00
Daniel Bovensiepen
2c77dfab04
Update Copyright to 2017
...
Signed-off-by: Daniel Bovensiepen <daniel@bovensiepen.net >
2017-01-06 14:27:57 +08:00
Yukihiro "Matz" Matsumoto
92c843dd07
rename prefix RBASIC_ to MRB_; ref #3340
2016-12-12 00:54:36 +09:00