From 7a071fabd74fa6335cdbdb0ee6433e485450a816 Mon Sep 17 00:00:00 2001 From: "Nicolas B. Pierron" Date: Tue, 4 Dec 2012 17:34:38 -0800 Subject: [PATCH] Bug 810253 - Add tests and comments. r=dvander --- js/src/ion/IonAnalysis.cpp | 2 ++ js/src/jit-test/tests/ion/bug810253.js | 8 ++++++++ 2 files changed, 10 insertions(+) create mode 100644 js/src/jit-test/tests/ion/bug810253.js diff --git a/js/src/ion/IonAnalysis.cpp b/js/src/ion/IonAnalysis.cpp index c6d1880fea5..72f900ca884 100644 --- a/js/src/ion/IonAnalysis.cpp +++ b/js/src/ion/IonAnalysis.cpp @@ -177,6 +177,8 @@ IsPhiObservable(MPhi *phi) if (slot == 1) return true; + // If the Phi is one of the formal argument, and we are using an argument + // object in the function. The phi might be observable after a bailout. CompileInfo &info = phi->block()->info(); if (info.fun() && info.hasArguments()) { // We do not support arguments object inside inline frames yet. diff --git a/js/src/jit-test/tests/ion/bug810253.js b/js/src/jit-test/tests/ion/bug810253.js new file mode 100644 index 00000000000..2c8685fd919 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug810253.js @@ -0,0 +1,8 @@ +function f(x) { + // Enter via OSR. + for (var j = 0; j < 100; j++) { }; + + for (var i = 0; i < arguments.length; i++) + assertEq(arguments[i], i); +}; +f(0, 1, 2, 3);