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

Unified Diff: test/mjsunit/regress/regress-omit-checks.js

Issue 21095005: Mark maps as unstable if their instances potentially transition away. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 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/objects-inl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/regress/regress-omit-checks.js
diff --git a/test/mjsunit/compiler/phi-representations.js b/test/mjsunit/regress/regress-omit-checks.js
similarity index 79%
copy from test/mjsunit/compiler/phi-representations.js
copy to test/mjsunit/regress/regress-omit-checks.js
index 6d11bb0d8ea714daae5e5942b750fa9d3601439b..e5d50749888078e77259863534964da50bd2abab 100644
--- a/test/mjsunit/compiler/phi-representations.js
+++ b/test/mjsunit/regress/regress-omit-checks.js
@@ -27,30 +27,29 @@
// Flags: --allow-natives-syntax
-function ar() {
- var r = undefined;
- var f = 1;
- while (f--) {
- r = (typeof r === 'undefined') ? 0.1 : r;
- };
- return (r - r);
+var a = {x:1};
+var a_deprecate = {x:1};
+a_deprecate.x = 1.5;
+function create() {
+ return {__proto__:a, y:1};
}
+var b1 = create();
+var b2 = create();
+var b3 = create();
+var b4 = create();
-assertEquals(0, ar());
-assertEquals(0, ar());
-%OptimizeFunctionOnNextCall(ar);
-assertEquals(0, ar());
-
-function ar2() {
- var r = undefined;
- var f = 1;
- while (f--) {
- r = r === undefined ? 0.1 : r;
- };
- return (r - r);
+function set(b) {
+ b.x = 5;
+ b.z = 10;
}
-assertEquals(0, ar2());
-assertEquals(0, ar2());
-%OptimizeFunctionOnNextCall(ar2);
-assertEquals(0, ar2());
+set(b1);
+set(b2);
+%OptimizeFunctionOnNextCall(set);
+set(b3);
+var called = false;
+a.x = 1.5;
+Object.defineProperty(a, "z", {set:function(v) { called = true; }});
+set(b4);
+assertTrue(called);
+assertEquals(undefined, b4.z);
« no previous file with comments | « src/objects-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698