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

Unified Diff: test/mjsunit/parallel-invalidate-transition-map.js

Issue 16782004: Reland "Enable map dependency to in-flight compilation info." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: The fix. 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 | « test/mjsunit/parallel-initial-prototype-change.js ('k') | test/mjsunit/parallel-optimize-disabled.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/parallel-invalidate-transition-map.js
diff --git a/test/mjsunit/manual-parallel-recompile.js b/test/mjsunit/parallel-invalidate-transition-map.js
similarity index 68%
copy from test/mjsunit/manual-parallel-recompile.js
copy to test/mjsunit/parallel-invalidate-transition-map.js
index 8d660e047c7702ee15c4e65966268856a8e9c7a7..42a266f556e6ea0f75a83ad453a6d96ce11c81f0 100644
--- a/test/mjsunit/manual-parallel-recompile.js
+++ b/test/mjsunit/parallel-invalidate-transition-map.js
@@ -1,4 +1,4 @@
-// Copyright 2012 the V8 project authors. All rights reserved.
+// Copyright 2013 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
@@ -25,38 +25,32 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --allow-natives-syntax --expose-gc --parallel-recompilation
+// Flags: --track-fields --track-double-fields --allow-natives-syntax
+// Flags: --parallel-recompilation --parallel-recompilation-delay=50
function assertUnoptimized(fun) {
assertTrue(%GetOptimizationStatus(fun) != 1);
}
-function f(x) {
- var xx = x * x;
- var xxstr = xx.toString();
- return xxstr.length;
+function new_object() {
+ var o = {};
+ o.a = 1;
+ o.b = 2;
+ return o;
}
-function g(x) {
- var xxx = Math.sqrt(x) | 0;
- var xxxstr = xxx.toString();
- return xxxstr.length;
+function add_field(obj) {
+ obj.c = 3;
}
-function k(x) {
- return x * x;
-}
-
-f(g(1));
-assertUnoptimized(f);
-assertUnoptimized(g);
-
-%OptimizeFunctionOnNextCall(f, "parallel");
-%OptimizeFunctionOnNextCall(g, "parallel");
-f(g(2));
+add_field(new_object());
+add_field(new_object());
+%OptimizeFunctionOnNextCall(add_field, "parallel");
-assertUnoptimized(f);
-assertUnoptimized(g);
+var o = new_object();
+add_field(o); // Trigger optimization.
+assertUnoptimized(add_field); // Not yet optimized.
+o.c = 2.2; // Invalidate transition map.
+%CompleteOptimization(add_field); // Conclude optimization with...
+assertUnoptimized(add_field); // ... bailing out due to map dependency.
-%WaitUntilOptimized(f);
-%WaitUntilOptimized(g);
« no previous file with comments | « test/mjsunit/parallel-initial-prototype-change.js ('k') | test/mjsunit/parallel-optimize-disabled.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698