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

Unified Diff: test/mjsunit/compiler/parallel-proto-change.js

Issue 11864013: Make HCheckPrototypeMaps compatible with parallel recompilation. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comment Created 7 years, 11 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-x64.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/compiler/parallel-proto-change.js
diff --git a/test/mjsunit/regress/regress-2489.js b/test/mjsunit/compiler/parallel-proto-change.js
similarity index 79%
copy from test/mjsunit/regress/regress-2489.js
copy to test/mjsunit/compiler/parallel-proto-change.js
index 882c4f794a88e24d1d64e86a466b27c39f51e625..1aa135a26d4e85b2f7088ffcb5a8ecf3847dc93b 100644
--- a/test/mjsunit/regress/regress-2489.js
+++ b/test/mjsunit/compiler/parallel-proto-change.js
@@ -26,25 +26,19 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax
+// Flags: --parallel-recompilation --manual-parallel-recompilation
-"use strict";
+function f(foo) { return foo.bar(); }
-function f(a, b) {
- return g("c", "d");
-}
+var o = {};
+o.__proto__ = { __proto__: { bar: function() { return 1; } } };
-function g(a, b) {
- g.constructor.apply(this, arguments);
-}
+assertEquals(1, f(o));
+assertEquals(1, f(o));
-g.constructor = function(a, b) {
- assertEquals("c", a);
- assertEquals("d", b);
-}
+%ForceParallelRecompile(f);
+// Change the prototype chain during optimization.
+o.__proto__.__proto__ = { bar: function() { return 2; } };
+%InstallRecompiledCode(f);
-f("a", "b");
-f("a", "b");
-%OptimizeFunctionOnNextCall(f);
-f("a", "b");
-g.x = "deopt";
-f("a", "b");
+assertEquals(2, f(o));
« no previous file with comments | « src/x64/lithium-x64.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698