Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(126)

Unified Diff: test/mjsunit/parallel-initial-prototype-change.js

Issue 16641002: Fix parallel recompilation wrt initial object/array map dependency. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/x64/lithium-codegen-x64.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/parallel-initial-prototype-change.js
diff --git a/test/mjsunit/elide-double-hole-check-6.js b/test/mjsunit/parallel-initial-prototype-change.js
similarity index 77%
copy from test/mjsunit/elide-double-hole-check-6.js
copy to test/mjsunit/parallel-initial-prototype-change.js
index 01a8096f85c2381d400d436198daa59fe7ca9ce0..5544bebc1d49256f50b00a42d71a06f740ed7aaa 100644
--- a/test/mjsunit/elide-double-hole-check-6.js
+++ b/test/mjsunit/parallel-initial-prototype-change.js
@@ -26,14 +26,25 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax
+// Flags: --parallel-recompilation --parallel-recompilation-delay=50
+
+function assertUnoptimized(fun) {
+ assertTrue(%GetOptimizationStatus(fun) != 1);
+}
function f1(a, i) {
return a[i] + 0.5;
}
+
var arr = [0.0,,2.5];
assertEquals(0.5, f1(arr, 0));
assertEquals(0.5, f1(arr, 0));
-%OptimizeFunctionOnNextCall(f1);
+
+// Optimized code of f1 depends on initial object and array maps.
+%OptimizeFunctionOnNextCall(f1, "parallel");
assertEquals(0.5, f1(arr, 0));
-Array.prototype.__proto__[1] = 1.5;
+assertUnoptimized(f1); // Not yet optimized.
+Object.prototype[1] = 1.5; // Invalidate current initial object map.
assertEquals(2, f1(arr, 1));
+%CompleteOptimization(f1); // Conclude optimization with...
+assertUnoptimized(f1); // ... bailing out due to map dependency.
« no previous file with comments | « src/x64/lithium-codegen-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698