Tomasz Dąbrowski
536b95eb48
fix: mrbgems\mruby-kernel-ext\src\kernel.c(114): warning C4244: 'function': conversion from 'mrb_int' to 'int', possible loss of data
2017-09-27 22:22:04 +02:00
Tomasz Dąbrowski
01b9b71902
fix mrbgems/mruby-range-ext/src/range.c:142:71: error: use of undeclared identifier 'FLT_EPSILON'
2017-08-26 12:11:57 +02:00
Yukihiro "Matz" Matsumoto
0c52112dd4
Keep Range class in mrb_state structure for performance.
2017-08-26 02:01:50 +09:00
Yukihiro "Matz" Matsumoto
4c9a604877
Added method cache.
...
To enable method cache, define `MRB_METHOD_CACHE` or
`MRB_METHOD_CACHE_SIZE`. The cache size must be power of 2.
The default cache size is 128.
The measurement:
I measured simple benchmarks found in benchmark/ directory. With
method cache enabled, we gained 6-8% performance improvement, with
97-99% cache hit rate.
2017-08-22 22:17:01 +09:00
Yukihiro "Matz" Matsumoto
3f90af6b42
(Try to) fix mixture of int and size_t in UTF-8 conversion.
...
This only effects VC.
2017-08-22 07:35:51 +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
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
9a59cd7af8
Silence mrbmemcpy and mrbmemset warnings.
2017-06-23 17:54:02 +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
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
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
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
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
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
9fc62d28d0
pre-allocate arena overflow error
2016-11-28 09:52:57 +09:00
Yukihiro "Matz" Matsumoto
f9f19f34dd
replace _cstr by _lit for litral C strings; ref #3300
2016-11-27 20:53:25 +09:00
Tomasz Dąbrowski
72ed7eebc3
Fixed Range.size to use proper floating point tolerance
2016-11-24 12:50:49 +01:00
Tomasz Dąbrowski
1af9e363f2
Fixes for compiling mruby as C++
2016-11-24 09:28:00 +09:00
Tomasz Dąbrowski
c385782cfe
mrb_assert definition moved to the beggining of mruby.h
...
So that other files can immediately use it.
2016-11-21 12:37:45 +01:00
Felix Jones
e3c8092ccd
Renamed class_under_defined to class_defined_under
2016-11-10 19:51:56 +00:00
Felix Jones
cc5f40b2db
mrb_class_under_defined docs renamed parent and child to outer and inner
2016-11-06 13:19:14 +00:00
Felix Jones
8d6aa06548
Added mrb_class_under_defined
2016-11-06 13:01:21 +00:00
Nobuyoshi Nakada
6511bfd79a
Removed trailing spaces
2016-09-28 12:29:41 +09:00
Kazuaki Tanaka
cb29c9b415
Fix return value type of bytecode_decoder
2016-09-20 23:15:49 +00:00
Kazuaki Tanaka
968ebac001
Bytecode decoder support, MRB_BYTECODE_DECODE_OPTION
2016-09-20 23:07:28 +00:00
Yukihiro "Matz" Matsumoto
0c28c7d754
change backtrace sep from const char* to char
2016-03-07 10:59:34 +09:00
Yukihiro "Matz" Matsumoto
5e514c910f
cache mrb_regexp_p(); ref #980
2016-02-04 23:22:01 +09:00
Prayag Verma
70283a94a5
Update license year range to 2016
2016-01-18 08:55:12 +05:30
Yukihiro "Matz" Matsumoto
f7afe1d82a
change mrb_run related API names; compatibility macros provided
2016-01-07 22:36:29 +09:00
Yukihiro "Matz" Matsumoto
bd462c5edc
mruby-fiber: fiber_switch() to use nesting VM when it's called from C API or mrb_funcall(); close #3056
2016-01-02 13:48:45 +09:00
Kouhei Sutou
a561bdb25f
Support backtrace after method calls
...
GitHub: fix #2902 , #2917
The current implementation traverses stack to retrieve backtrace. But
stack will be changed when some operations are occurred. It means that
backtrace may be broken after some operations.
This change (1) saves the minimum information to retrieve backtrace when
exception is raised and (2) restores backtrace from the minimum
information when backtrace is needed. It reduces overhead for creating
backtrace Ruby objects.
The space for the minimum information is reused by multiple
exceptions. So memory allocation isn't occurred for each exception.
2015-12-29 20:36:12 +09:00
Ralph Desir
af33394281
Undid newline and whitespace on YARD doc
2015-12-12 20:21:53 -05:00
Ralph Desir
e27985416f
One space indentation.
2015-12-12 18:28:42 -05:00
Ralph Desir(Mav7)
4e267d74c6
Added YARD docs in new mruby.h
2015-12-11 01:52:44 -05:00
Yukihiro "Matz" Matsumoto
065966dae4
common.h are supposed to be included from other header, so call it with quotes; ref #3032
2015-11-28 00:10:38 +09:00
Yukihiro "Matz" Matsumoto
5c405dea3d
include changed from by quotes ("") to by brackets (<>); close #3032
2015-11-27 17:48:23 +09:00
Yukihiro "Matz" Matsumoto
4440566b95
DISABLE_STDIO/ENABLE_DEBUG macros to rename; close #3014
...
changes:
* rename DISABLE_STDIO -> MRB_DISABLE_STDIO
* rename ENABLE_DEBUG -> MRB_ENABLE_DEBUG_HOOK
* no more opposite macro definitions (e.g. ENABLE_STDIO, DISABLE_DEBUG).
* rewrite above macro references throughout the code.
* update documents
2015-11-17 07:30:34 +09:00
Yukihiro "Matz" Matsumoto
6ce31f334e
Merge pull request #3017 from Mav7/master
...
Added type annotation to YARD.
2015-11-17 02:54:19 +09:00
Mav7
6f43e95163
Added type annotation to YARD.
2015-11-16 12:39:52 -05:00
Yukihiro "Matz" Matsumoto
4e63ea9649
Merge pull request #3011 from Mav7/master
...
Added more YARD docs to mruby.h
2015-11-15 05:10:52 +09:00
Mav7
66a839eb54
Added more YARD docs to mruby.h
2015-11-14 05:37:10 -05:00
Yukihiro "Matz" Matsumoto
9c108002bf
Merge pull request #3008 from Mav7/master
...
Added YARD documentation in mruby.h
2015-11-10 09:50:15 +09:00
Mav7
27146dca16
Added YARD documentation in mruby.h
2015-11-09 12:16:14 -05:00
Yukihiro "Matz" Matsumoto
727f2485c9
Merge pull request #2999 from sagmor/better-docs
...
More Docs
2015-10-22 07:10:16 +09:00
Seba Gamboa
f0e9974221
Fix Unknown tag error
2015-10-20 12:16:47 -03:00