summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-fiber
AgeCommit message (Collapse)Author
2020-06-20Add `mrb_get_arg1()` that retrieves single (and only) argument.Yukihiro "Matz" Matsumoto
`mrb_get_arg1()` raises `ArgumentError` if the method does not receive one argument. And replaces all `mrb_get_args(mrb, "o", &arg)` by the new function.
2019-10-30Fix argument specs to `Fiber`KOBAYASHI Shuji
2019-09-26Use type predicate macros instead of `mrb_type` if possibleKOBAYASHI Shuji
For efficiency with `MRB_WORD_BOXING` (implement type predicate macros for all `enum mrb_vtype`).
2019-09-16Entrust "no block given" error to `mrb_get_args()`dearblue
Some error messages will be changed.
2019-09-02Small refactoring in `fiber.c`.Yukihiro "Matz" Matsumoto
2019-05-30Fix missing assertions in `mruby-fiber` testKOBAYASHI Shuji
2018-08-01Remove `nregs` member from `mrb_callinfo`.Yukihiro "Matz" Matsumoto
This means reducing one word per a call frame.
2018-06-14Check for switching to uninitialized fiber; fix #4041Yukihiro "Matz" Matsumoto
The problem was caused by `Fiber.current.resume'.
2018-06-11Revert "No longer need to insert write barriers for fibers."Yukihiro "Matz" Matsumoto
This reverts commit c6736357a72049a0eb2a31ccabcc3cd2baba7c9e. The assumption was wrong and caused the issue; fix #4020
2018-06-07Extend stack when pushing arguments that does not fit in; fix #4038Yukihiro "Matz" Matsumoto
2018-04-13No longer need to insert write barriers for fibers.Yukihiro "Matz" Matsumoto
Those barriers are inserted to fix #3699 but all living fibers are marked from `mark_context()` anyway now.
2018-03-02Add `mrb_fiber_alive_p` to C API.Yukihiro "Matz" Matsumoto
2017-10-28Heavily refactored how lexical scope links are implemented; fix #3821Yukihiro "Matz" Matsumoto
Instead of `irep` links, we added a `upper` link to `struct RProc`. To make a space for the `upper` link, we moved `target_class` reference. If a `Proc` does not have `env`, `target_class` is saved in an `union` shared with `env` (if a `Proc` has env, you can tell it by `MRB_PROC_ENV_P()). Otherwise `target_class` is referenced from `env->c`. We removed links in `env` as well. This change removes 2 members from `mrb_irep` struct, thus saving 2 words per method/proc/block. This also fixes potential memory leaks due to the circular references caused by a link from `mrb_irep`.
2017-09-27fix: mrbgems\mruby-fiber\src\fiber.c(215): warning C4244: '=': conversion ↵Tomasz Dąbrowski
from 'mrb_int' to 'int', possible loss of data
2017-07-12Use "$!" specifier of `mrb_get_args`.Yukihiro "Matz" Matsumoto
2017-06-21Add write barrier to protect proc reference from fiber; fix #3719Yukihiro "Matz" Matsumoto
2017-06-15Call write barriers for stack-modified fibers; fix #3699Yukihiro "Matz" Matsumoto
2017-06-15Prevent Fiber#initialize to be called twice; fix #3705Yukihiro "Matz" Matsumoto
2017-05-26Fixed off-by-one error in `fiber_switch()`; ref #3641Yukihiro "Matz" Matsumoto
2017-05-25Raise an exception when transfer arguments are too many; fix #3641Yukihiro "Matz" Matsumoto
The fix was proposed by @block8437. Thank you.
2017-04-21Assign to local variable first; cosmetic change.Yukihiro "Matz" Matsumoto
2017-04-11Fiber#yield should check C function boundary; fix #3582Yukihiro "Matz" Matsumoto
2016-01-02mruby-fiber: fiber_switch() to use nesting VM when it's called from C API or ↵Yukihiro "Matz" Matsumoto
mrb_funcall(); close #3056
2015-12-31mruby-fiber: add Fiber.yield description; close #3066Yukihiro "Matz" Matsumoto
Fiber.yield cannot be called from #initialize which is called by mrb_funcall(). It is mruby limitation.
2015-11-27include changed from by quotes ("") to by brackets (<>); close #3032Yukihiro "Matz" Matsumoto
2015-06-19Fix typos in documentation and error messages [skip ci]Anton Davydov
2015-02-19new API function mrb_fiber_resume(); ref #1269Yukihiro "Matz" Matsumoto
2015-02-19add description comment to mrb_fiber_yield()Yukihiro "Matz" Matsumoto
2014-08-29Fix mismatches for MRB_API declarations.Tatsuhiko Kubo
2014-08-25Remove spaces in end-of-line.Tatsuhiko Kubo
2014-07-16need to call write_barrier on every fiber context switchYukihiro "Matz" Matsumoto
2014-07-15fiber stack allocation size should be bigger than irep->nregsYukihiro "Matz" Matsumoto
2014-07-09Clean up value.h and mrb_value boxingDavid Turnbull
2014-07-03fiber stack should not be cleared by zero when MRB_NAN_BOXING is set; close ↵Yukihiro "Matz" Matsumoto
#2439
2014-05-24Use `assert_*` method instead of using result value.take_cheeze
Use `do ... end` for test block.
2014-04-30remove trailing spacesNobuyoshi Nakada
2014-04-25eliminate plain int except for a few cases like arena_indexYukihiro "Matz" Matsumoto
2014-04-21Remove unnecessary `require 'fiber'` note in Fiber.current document.take_cheeze
2014-04-21Add document to Fiber#transfer .take_cheeze
2014-04-11Qualify argv argument of API `const`.Takeshi Watanabe
2014-03-22remove unnecessary mrb_get_args in fiber_switchtake_cheeze
2014-03-21add const qualifier to pacify warning; ref #1900Yukihiro "Matz" Matsumoto
2014-03-21make Fiber#transfer compatible with CRubytake_cheeze
2014-03-21implement Fiber#transfertake_cheeze
2014-03-20make behavior of Fiber without block compatible with CRubytake_cheeze
2014-03-20refactor and use assert_raise in fiber test checking exception raisetake_cheeze
2014-03-20use FiberError in fiber exception raisetake_cheeze
2014-03-19add root fiber resume test to know double resume checking is workingtake_cheeze
2014-03-19revert MRB_FIBER_RESUMED as MRB_FIBER_RESUMING to fix recurive resumetake_cheeze
2014-03-18add a space after C reserved wordsYukihiro "Matz" Matsumoto