summaryrefslogtreecommitdiffhomepage
path: root/src/vm.c
AgeCommit message (Collapse)Author
2017-06-16Need to unshare env from top callinfo; fix #3685Yukihiro "Matz" Matsumoto
2017-06-15Call write barriers for stack-modified fibers; fix #3699Yukihiro "Matz" Matsumoto
2017-06-15Protect the last exception object from GC in `ecall`; fix #3702Yukihiro "Matz" Matsumoto
2017-06-15Save the register value in a local variable for ease of debugging.Yukihiro "Matz" Matsumoto
2017-06-15Ensure size of the stack before handling exceptions; fix #3693Yukihiro "Matz" Matsumoto
2017-06-15Ensure size of the stack in OP_CALL.Yukihiro "Matz" Matsumoto
2017-06-14Clear stack in OP_CALL; fix #3694Yukihiro "Matz" Matsumoto
2017-06-14Fixed uninitialized local variable bug; ref #3692Yukihiro "Matz" Matsumoto
2017-06-14Avoid out-of-bound access of VM stack in OP_SENDB; fix #3692Yukihiro "Matz" Matsumoto
2017-06-03Revert "Simplify rescue stack management; ref #3683"Yukihiro "Matz" Matsumoto
This reverts commit eb5a606fe209944d0757301edb331ed7ff0fd31f and 079f310fbc9c23b97f062230c32bd91ac65e4835. 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-03Check if a block is a lambda before marking it orphan; ref #3640Yukihiro "Matz" Matsumoto
2017-06-03Add checks for `break from proc-closure`; fix #3640Yukihiro "Matz" Matsumoto
2017-06-02Make `break` in lambdas work as `return` according to CRuby behavior.Yukihiro "Matz" Matsumoto
2017-06-02Adjust ridx if `mrb_yield` terminated by `break`; fix #3686Yukihiro "Matz" Matsumoto
This issue is related to #3640.
2017-06-01Call `stack_clear()` after `stack_extend()`; fix #3682Yukihiro "Matz" Matsumoto
2017-06-01Simplify rescue stack management; ref #3683Yukihiro "Matz" Matsumoto
2017-06-01Simplify ensure stack management; fix #3683Yukihiro "Matz" Matsumoto
2017-06-01Hide OP_EXEC lambda body from `ObjectSpace#each_object`; fix #3680Yukihiro "Matz" Matsumoto
2017-06-01Clear VM stack in OP_EXEC; ref #3678Yukihiro "Matz" Matsumoto
2017-06-01Simplify code since OP_EXEC never takes CFUNC Proc; #3678Yukihiro "Matz" Matsumoto
2017-05-31Reduce the size of VM stack clear window; ref #3676Yukihiro "Matz" Matsumoto
2017-05-31Clear VM stack for top level; fix #3676Yukihiro "Matz" Matsumoto
Top-level local variables contained junk after ab25eaea2
2017-05-30Check env context before jump from OP_RETURN; fix #3673Yukihiro "Matz" Matsumoto
2017-05-30Exceptions in fibers must be re-raised via `#resume`; fix #3675Yukihiro "Matz" Matsumoto
2017-05-29Protect the returning value in OP_RETURN; fix #3669Yukihiro "Matz" Matsumoto
Even though the returning value is retrieved from the stack, it may be freed if GC is caused during stack rewinding (e.g. ensure calls).
2017-05-27Unwind callinfo (mrb->c->ci) when a fiber termitates with error.Yukihiro "Matz" Matsumoto
Fix #3668
2017-05-27Avoid unsharing env when context (mrb->c) differs; ref #3668Yukihiro "Matz" Matsumoto
2017-05-26Invoke ensure clauses on Fiber termination; fix #3666Yukihiro "Matz" Matsumoto
Related to #3662
2017-05-25Revert "Use env preserved in Proc structure in ecall(); fix #3612"Yukihiro "Matz" Matsumoto
This reverts commit e26e11860466676e5713fa0d9ab268ea8dbdcef9. Fix #3664
2017-05-25Invoke ensure clauses before switching context from fibers; fix #3662Yukihiro "Matz" Matsumoto
2017-05-25Clear top level env in `mrb_top_run()`; fix #3643Yukihiro "Matz" Matsumoto
2017-05-25Avoid unsharing stack if env refers top-level; ref #3643Yukihiro "Matz" Matsumoto
2017-05-25Check env stack length before `OP_SETUPVAR`; ref #3643Yukihiro "Matz" Matsumoto
2017-05-25Avoid using `mrb_raise()` in `mrb_vm_exec()`; ref #3660Yukihiro "Matz" Matsumoto
2017-05-25Preserve the current pc before `method_missing()`; fix #3660Yukihiro "Matz" Matsumoto
2017-05-23Simplify backtrace mechanism; fix #3633 #3634 #3644Yukihiro "Matz" Matsumoto
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-04-25Avoid duplicated `envadjust()` of env stacks; fix #3637Yukihiro "Matz" Matsumoto
2017-04-24Revert "Simplify pointer calculation in `envadjust`."Tomasz Dąbrowski
This reverts commit a1d32af91692c2b624e9c04fcd94aa958dbba626.
2017-04-22Small cosmetic changes.Yukihiro "Matz" Matsumoto
2017-04-22Use env preserved in Proc structure in ecall(); fix #3612Yukihiro "Matz" Matsumoto
2017-04-22Keep reference to mrb_context from env; fix #3619Yukihiro "Matz" Matsumoto
2017-04-21Simplify pointer calculation in `envadjust`.Yukihiro "Matz" Matsumoto
2017-04-21Fixed a possible memory leak.Yukihiro "Matz" Matsumoto
2017-04-21VM stack may be reallocated in `mrb_convert_type()`; fix #3622Yukihiro "Matz" Matsumoto
2017-04-20Do not raise an exception for living closure; ref #3359Yukihiro "Matz" Matsumoto
2017-04-19Use trampoline technique for `instance_exec`; ref #3359Yukihiro "Matz" Matsumoto
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-19Need to raise "break from proc-closure" error; fix #3359 fix #3495Yukihiro "Matz" Matsumoto
Some examples in #3359 still behave differently from CRuby.
2017-04-19Fixed a bug caused by last minute change; fix #3610Yukihiro "Matz" Matsumoto
Omitted `goto L_RAISE` to raise an exception.
2017-04-18Call envadjust() before updating VM stack.Yukihiro "Matz" Matsumoto
2017-04-18`super` may call context switching method like `send`; fix #3611Yukihiro "Matz" Matsumoto