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

Unified Diff: test/mjsunit/parallel-initial-prototype-change.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/manual-parallel-recompile.js ('k') | test/mjsunit/parallel-invalidate-transition-map.js » ('j') | 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-5.js b/test/mjsunit/parallel-initial-prototype-change.js
similarity index 77%
copy from test/mjsunit/elide-double-hole-check-5.js
copy to test/mjsunit/parallel-initial-prototype-change.js
index d0970c8fe1f5d13419798df1de7c30fced885855..5544bebc1d49256f50b00a42d71a06f740ed7aaa 100644
--- a/test/mjsunit/elide-double-hole-check-5.js
+++ b/test/mjsunit/parallel-initial-prototype-change.js
@@ -26,15 +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));
-Array.prototype[1] = 1.5;
-%OptimizeFunctionOnNextCall(f1);
-assertEquals(2, f1(arr, 1));
-assertEquals(2, f1(arr, 1));
+
+// Optimized code of f1 depends on initial object and array maps.
+%OptimizeFunctionOnNextCall(f1, "parallel");
assertEquals(0.5, f1(arr, 0));
+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 | « test/mjsunit/manual-parallel-recompile.js ('k') | test/mjsunit/parallel-invalidate-transition-map.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698