• R/O
  • HTTP
  • SSH
  • HTTPS

提交

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

mrubyを超漢字で動作させる


Commit MetaInfo

修订版2dcc2444fa7a6a332267fc4e06f487472133e0b0 (tree)
时间2014-07-16 12:58:37
作者Yukihiro "Matz" Matsumoto <matz@ruby...>
CommiterYukihiro "Matz" Matsumoto

Log Message

need to call write_barrier on every fiber context switch

更改概述

差异

--- a/mrbgems/mruby-fiber/src/fiber.c
+++ b/mrbgems/mruby-fiber/src/fiber.c
@@ -279,7 +279,8 @@ fiber_transfer(mrb_state *mrb, mrb_value self)
279279 mrb->c->status = MRB_FIBER_TRANSFERRED;
280280 mrb->c = c;
281281 c->status = MRB_FIBER_RUNNING;
282- MARK_CONTEXT_MODIFY(c);
282+ MARK_CONTEXT_MODIFY(c);
283+ mrb_write_barrier(mrb, (struct RBasic*)c->fib);
283284 return fiber_result(mrb, a, len);
284285 }
285286
@@ -310,6 +311,7 @@ mrb_fiber_yield(mrb_state *mrb, mrb_int len, const mrb_value *a)
310311 mrb->c = c->prev;
311312 c->prev = NULL;
312313 MARK_CONTEXT_MODIFY(mrb->c);
314+ mrb_write_barrier(mrb, (struct RBasic*)c->fib);
313315 return fiber_result(mrb, a, len);
314316 }
315317