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

Unified Diff: test/mjsunit/delete.js

Issue 2330003: Change the interface of LoadIC on the x64 platform to take its arguments in r... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 7 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/virtual-frame-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/delete.js
===================================================================
--- test/mjsunit/delete.js (revision 4757)
+++ test/mjsunit/delete.js (working copy)
@@ -44,16 +44,11 @@
assertTrue(delete x);
assertTrue(typeof x === 'undefined', "x is gone");
-/****
- * This test relies on DontDelete attributes. This is not
- * working yet.
-
var y = 87; // should have DontDelete attribute
assertEquals(87, y);
assertFalse(delete y, "don't delete");
assertFalse(typeof y === 'undefined');
assertEquals(87, y);
-*/
var o = { x: 42, y: 87 };
assertTrue(has(o, 'x'));
@@ -161,3 +156,25 @@
assertFalse(has(a, Math.pow(2,30)-1), "delete 2^30-1");
assertFalse(has(a, Math.pow(2,31)-1), "delete 2^31-1");
assertEquals(Math.pow(2,31), a.length);
+
+// Check that a LoadIC for a dictionary field works, even
+// when the dictionary probe misses.
+function load_deleted_property_using_IC() {
+ var x = new Object();
+ x.a = 3;
+ x.b = 4;
+ x.c = 5;
+
+ delete x.c;
+ assertEquals(3, load_a(x));
+ assertEquals(3, load_a(x));
+ delete x.a;
+ assertTrue(typeof load_a(x) === 'undefined', "x.a is gone");
+ assertTrue(typeof load_a(x) === 'undefined', "x.a is gone");
+}
+
+function load_a(x) {
+ return x.a;
+}
+
+load_deleted_property_using_IC();
« no previous file with comments | « src/x64/virtual-frame-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698