Yukihiro "Matz" Matsumoto
bfd2a539ed
add new function mrb_toplevel_run to prevent running through C function boudaries on exceptions; close #1942
2014-03-26 01:09:09 +09:00
take_cheeze
f536492521
use FiberError in vm.c
2014-03-22 03:19:58 +09:00
Yukihiro "Matz" Matsumoto
36836c8eb9
should restore proc after rescue; close #1891
2014-03-20 16:10:12 +09:00
Yukihiro "Matz" Matsumoto
9084e03556
rename mrb_yield_internal to mrb_yield_with_class since it's no longer internal
2014-03-19 08:57:54 +09:00
cubicdaiya
019d15c3ee
Use mrb_exc_new_str_lit widely
2014-03-04 02:45:53 +09:00
Yukihiro "Matz" Matsumoto
369c6c3649
Kernel#send does not use mrb_funcall anymore for most cases; ref #1680
2014-03-03 13:31:29 +09:00
take_cheeze
b98890a4b7
clear exc_catched before jumping to L_RAISE
2014-03-01 20:53:31 +09:00
take_cheeze
78915f9601
support c++ exception
2014-03-01 20:05:29 +09:00
Yukihiro "Matz" Matsumoto
675fd3dc80
allow send method not to call mrb_funcall if calling method is implemented in Ruby; fix #1680 ref #1765
2014-03-01 18:13:10 +09:00
Yukihiro "Matz" Matsumoto
8e170ce915
exception in fiber should make resume to raise in parent fiber context; close #1765
2014-03-01 12:58:31 +09:00
cubicdaiya
67de10bfcb
use C style comments instead of C++ style comments
...
According to CONTRIBUTING.md,
Don't use C++ style comments
/* This is the prefered comment style */
Use C++ style comments only for temporary comment e.g. commenting out some code lines.
2014-03-01 03:31:45 +09:00
Yukihiro "Matz" Matsumoto
6bd3d88edd
support break from fiber block; fix #1766
2014-02-28 18:43:35 +09:00
Yukihiro "Matz" Matsumoto
03fde35760
restore proc after restoring from fiber; ref #1766
2014-02-28 12:50:32 +09:00
Yukihiro "Matz" Matsumoto
d264e1addd
fix indent
2014-02-27 03:50:59 +09:00
cubicdaiya
4c283714f6
use mrb_str_new_lit instead of mrb_str_new for C string literal
2014-02-26 22:34:12 +09:00
take_cheeze
08ea324593
move src/error.h to include/mruby/error.h
2014-02-20 22:41:29 +09:00
Yukihiro "Matz" Matsumoto
e29efb02bd
normalize NaN after division that may generate NaN; fix #1712
2014-02-15 19:59:26 +09:00
cremno
8a3a3a5a49
Clang and ICC/ICL: define DIRECT_THREADED
...
This is most likely only needed on Windows be-
cause __GNUC__ is not defined by both compilers.
It might fail with some unusual configurations.
If that is the case, feel free to open an issue.
2014-02-11 23:55:52 +01:00
Yukihiro "Matz" Matsumoto
00bdaec766
initialize ci->stackent at the top; #1691
2014-02-09 19:20:16 +09:00
Miura Hideki
5df82e357c
Store raw stack address in callinfo instead of offset from stbas
2014-02-09 16:42:25 +09:00
Yukihiro "Matz" Matsumoto
04eb577b69
Fiber.new{break} caused SEGV
2014-02-05 12:51:17 +09:00
Yukihiro "Matz" Matsumoto
e0e5aebc66
add callback invocation from OP_DEBUG
2014-01-23 15:08:38 +09:00
cremno
aa655b9ee1
remove superfluous includes
...
- reduce compile time by a little bit (full-core: ~0.7s for me)
- thanks to 'include-what-you-use' for some help
- include Standard C header files before any other (coding style)
2014-01-07 17:56:30 +01:00
Yukihiro "Matz" Matsumoto
791021575c
need not to initialize ci->err at toplevel
2014-01-05 20:03:45 +09:00
Yukihiro "Matz" Matsumoto
f5cca078e3
avoid decrimenting eidx out of ecall()
2014-01-05 19:18:13 +09:00
h2so5
0e23038a60
execute ensure clause correctly without OP_EPOP
2014-01-05 16:24:20 +09:00
Yukihiro "Matz" Matsumoto
2122cf48db
pop ensure stack before execution; close #1638
2014-01-04 01:30:38 +09:00
Yukihiro "Matz" Matsumoto
6bcbef5064
always clear ci->err
2014-01-04 00:54:05 +09:00
Yukihiro "Matz" Matsumoto
4b68fbcd83
quicker release of arena after ensure calls
2014-01-04 00:13:28 +09:00
h2so5
77f215c837
use macros for assignments to ci->err
2014-01-03 21:54:58 +09:00
nanami
87a392067a
Fixed callinfo buffer overflow while calling ensure handlers
2013-12-15 22:25:59 +08:00
Yukihiro "Matz" Matsumoto
3c2f51aef2
remove unnecessary keep size adjustment in stack_extend_alloc(); close #1602
2013-12-05 10:36:43 +09:00
Yukihiro "Matz" Matsumoto
da8405a0f7
Merge pull request #1600 from take-cheeze/mrb_intern_lit
...
Proposal of mrb_intern_lit macro.
2013-12-01 21:29:46 -08:00
take_cheeze
df780ae5e9
add mrb_intern_lit for creating symbol from string literal
2013-12-01 10:38:59 +09:00
Yukihiro "Matz" Matsumoto
e981f0b45c
inline mrb_gc_arena_restore() and stack_extend() in VM loop
2013-12-01 00:56:30 +09:00
Yukihiro "Matz" Matsumoto
9c6398a444
rename mrb_intern2() to mrb_intern(); huge API incompatibility; close #1513
2013-11-29 08:47:28 +09:00
Yukihiro "Matz" Matsumoto
d73dfa8708
resolve conflict
2013-11-20 07:29:55 +09:00
Miura Hideki
54c5b12fb7
irep->pool struct pool -> mrb_value
2013-11-19 20:38:02 +09:00
Yukihiro "Matz" Matsumoto
f9b14f49e6
Merge pull request #1584 from cremno/rename-mrb_exc_new3
...
renamed mrb_exc_new3 to mrb_exc_new_str
2013-11-18 16:24:42 -08:00
Yukihiro "Matz" Matsumoto
8954241687
clear ci->err after const set; revert 5b51b1; ref #1583
2013-11-19 09:21:55 +09:00
cremno
aacadb2365
renamed mrb_exc_new3 to mrb_exc_new_str
...
- more descriptive name (there's no mrb_exc_new2)
- no wrapper (macro/static inline function) for
backwards compatibility because nothing besides
mruby itself seems to be calling this function:
<http://mruby-code-search.ongaeshi.me/home?query=mrb_exc_new3 >
2013-11-18 21:01:03 +01:00
Yukihiro "Matz" Matsumoto
52070a9898
check upper callinfo to call ensure block; close #1579
2013-11-18 07:07:33 +09:00
Yukihiro "Matz" Matsumoto
71354b91cb
enum mrb_vtype varies on compile time configuration, namely MRB_NAN_BOXING
2013-11-15 02:45:52 +09:00
Yukihiro "Matz" Matsumoto
16b34d187a
remove warning on NAN_BOXING
2013-11-15 02:27:19 +09:00
Yukihiro "Matz" Matsumoto
677a2ac226
irep->pool not to be GCed
2013-11-07 04:20:46 +09:00
Yukihiro "Matz" Matsumoto
e92d4e2680
modified to use irep->reps to reference child ireps. preparation for
...
removing irep array from mrb_state. note that instructions OP_LAMBDA,
OP_EXEC and OP_EPUSH are incompatible, and dumped mrb format has changed.
2013-11-07 03:54:22 +09:00
fleuria
a511957ec8
refactor mrb_context_run()
2013-11-03 12:05:25 +08:00
fleuria
d75a907edf
introduce mrb_context_run()
...
currently there are two scnenario to call mrb_run(), the first is
calling a proc, in this case mrb should create a new environment,
discarding all the variables except args, reciever and block.
the second is calling the newly generated irep, like in mirb.
in this case, the variables should be kept after mrb_run().
so we introduce mrb_context_run() to handle this seperately.
2013-11-03 11:32:59 +08:00
Yukihiro "Matz" Matsumoto
a228841668
restore context status to RUNNING on automatic yield at the end of the block; fix #1555
2013-10-31 11:54:57 +09:00
Yukihiro "Matz" Matsumoto
f8fea6931c
preserve only arguments on stack; fix #1527
2013-10-30 12:01:18 +09:00