Modified: MacRuby/trunk/compiler.cpp (4533 => 4534)
--- MacRuby/trunk/compiler.cpp 2010-09-22 01:00:06 UTC (rev 4533)
+++ MacRuby/trunk/compiler.cpp 2010-09-22 20:53:10 UTC (rev 4534)
@@ -6181,7 +6181,10 @@
bool need_wb = false;
Value *slot = compile_lvar_slot(vid, &need_wb);
if (need_wb) {
- Value *args[] = { slot, val };
+ Value *args[] = {
+ new BitCastInst(slot, RubyObjPtrTy, "", bb),
+ new BitCastInst(val, RubyObjTy, "", bb)
+ };
return CallInst::Create(writeBarrierFunc, args, args + 2, "", bb);
}
else {
Modified: MacRuby/trunk/kernel.c (4533 => 4534)
--- MacRuby/trunk/kernel.c 2010-09-22 01:00:06 UTC (rev 4533)
+++ MacRuby/trunk/kernel.c 2010-09-22 20:53:10 UTC (rev 4534)
@@ -25,10 +25,10 @@
#endif
PRIMITIVE VALUE
-vm_gc_wb(void *slot, void *val)
+vm_gc_wb(VALUE *slot, VALUE val)
{
GC_WB(slot, val);
- return (VALUE)val;
+ return val;
}
PRIMITIVE VALUE