Bug 928140 - Add postbarrier when inlining UnsafeSetReservedSlot; r=shu
authorTerrence Cole <terrence@mozilla.com>
Thu, 17 Oct 2013 18:07:39 -0700
changeset 151181 7349a4fc4d5801341c564c00bbd902e18f91d402
parent 151180 e9b3eac5b6744e2147db5f67cec634bbfea83b9a
child 151182 15418b394a64450cecaa03d72f10d508fc6bc43e
push id25479
push usercbook@mozilla.com
push dateFri, 18 Oct 2013 09:36:13 +0000
treeherdermozilla-central@2def80d5a106 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersshu
bugs928140
milestone27.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 928140 - Add postbarrier when inlining UnsafeSetReservedSlot; r=shu
js/src/jit-test/tests/basic/spread-call-recursion.js
js/src/jit/MCallOptimize.cpp
--- a/js/src/jit-test/tests/basic/spread-call-recursion.js
+++ b/js/src/jit-test/tests/basic/spread-call-recursion.js
@@ -1,9 +1,8 @@
-if (!getBuildConfiguration()['generational-gc']) {
 let a = [];
 a.length = 30;
 
 function check(f) {
   try {
     f();
   } catch (e) {
     assertEq(e.message, "too much recursion");
@@ -12,9 +11,8 @@ function check(f) {
 
 let f = function() f(...a) + 1;
 let g = () => g(...a) + 1;
 let h = function() new h(...a) + 1;
 
 check(f);
 check(g);
 check(h);
-}
--- a/js/src/jit/MCallOptimize.cpp
+++ b/js/src/jit/MCallOptimize.cpp
@@ -1394,16 +1394,19 @@ IonBuilder::inlineUnsafeSetReservedSlot(
     uint32_t slot = arg->toConstant()->value().toPrivateUint32();
 
     callInfo.unwrapArgs();
 
     MStoreFixedSlot *store = MStoreFixedSlot::New(callInfo.getArg(0), slot, callInfo.getArg(2));
     current->add(store);
     current->push(store);
 
+    if (NeedsPostBarrier(info(), callInfo.getArg(2)))
+        current->add(MPostWriteBarrier::New(callInfo.thisArg(), callInfo.getArg(2)));
+
     return InliningStatus_Inlined;
 }
 
 IonBuilder::InliningStatus
 IonBuilder::inlineUnsafeGetReservedSlot(CallInfo &callInfo)
 {
     if (callInfo.argc() != 2 || callInfo.constructing())
         return InliningStatus_NotInlined;