[INFER] Allow rejoining after GCs triggered within IterNext, bug 674391.
authorBrian Hackett <bhackett1024@gmail.com>
Sun, 31 Jul 2011 08:54:17 -0700
changeset 76086 e5b57c9ebbe94042069d978567a2ba217eee0670
parent 76085 23dc255291ae9c719b89942192d627cf998bfc92
child 76087 d763fda00eb9a264e53e67f0188581757b81f0e8
push id3
push userfelipc@gmail.com
push dateFri, 30 Sep 2011 20:09:13 +0000
bugs674391
milestone8.0a1
[INFER] Allow rejoining after GCs triggered within IterNext, bug 674391.
js/src/jit-test/tests/jaeger/recompile/bug674391.js
js/src/methodjit/Compiler.cpp
new file mode 100644
--- /dev/null
+++ b/js/src/jit-test/tests/jaeger/recompile/bug674391.js
@@ -0,0 +1,10 @@
+a = [];
+for (var i = 0; i < 1000; i++) {
+  a[i] = i;
+}
+function foo(x) {
+  for (var i in x) {
+  }
+}
+schedulegc(100);
+foo(a);
--- a/js/src/methodjit/Compiler.cpp
+++ b/js/src/methodjit/Compiler.cpp
@@ -5514,17 +5514,17 @@ mjit::Compiler::iterNext(ptrdiff_t offse
     masm.storePtr(T4, Address(T1, offsetof(NativeIterator, props_cursor)));
 
     frame.freeReg(T4);
     frame.freeReg(T1);
     frame.freeReg(T2);
 
     stubcc.leave();
     stubcc.masm.move(Imm32(offset), Registers::ArgReg1);
-    OOL_STUBCALL(stubs::IterNext, REJOIN_NONE);
+    OOL_STUBCALL(stubs::IterNext, REJOIN_FALLTHROUGH);
 
     frame.pushUntypedPayload(JSVAL_TYPE_STRING, T3);
 
     /* Join with the stub call. */
     stubcc.rejoin(Changes(1));
 }
 
 bool