summaryrefslogtreecommitdiffhomepage
path: root/src/vm.c
AgeCommit message (Collapse)Author
2017-07-21Move NULL check to `mrb_env_unshare()`; ref #3750Yukihiro "Matz" Matsumoto
2017-07-21Should not raise `LocalJumpError` on funcall'ed frame; fix #3750Yukihiro "Matz" Matsumoto
2017-07-19Avoid C undefined behavior of division by zero; close #3745Yukihiro "Matz" Matsumoto
2017-07-18Simplify `mrb_gc_arena_restore()` to reduce overhead.Yukihiro "Matz" Matsumoto
It will no longer shrink arena region. Instead `vm.c` uses a static function `mrb_gc_arena_shrink()` to shrink.
2017-07-12Add `inline` modifier to `cipush()` and `cipop()` functions.Yukihiro "Matz" Matsumoto
2017-07-05Check stack size before accessing env stack; fix #3727Yukihiro "Matz" Matsumoto
2017-07-01`break` should not cross fiber-context boundary; fix #3724Yukihiro "Matz" Matsumoto
2017-07-01`super` may be called from a block; fix #3723Yukihiro "Matz" Matsumoto
2017-06-21Should call `ecall()` before callinfo adjustment; fix #3715Yukihiro "Matz" Matsumoto
2017-06-20#3711 fixMiura Hideki
2017-06-17Store operands to local variables.Yukihiro "Matz" Matsumoto
Mostly for debugging purpose.
2017-06-16Allow `break` from a block called by `mrb_yield`; close #3359Yukihiro "Matz" Matsumoto
This means #3701 is now OK to merge.
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.