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

Unified Diff: test/mjsunit/regress/regress-70066.js

Issue 7348008: Merge up to 8597 to experimental/gc from the bleeding edge. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: '' Created 9 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 | « test/mjsunit/regress/regress-603.js ('k') | test/mjsunit/regress/regress-752.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/regress/regress-70066.js
===================================================================
--- test/mjsunit/regress/regress-70066.js (revision 8618)
+++ test/mjsunit/regress/regress-70066.js (working copy)
@@ -57,21 +57,18 @@
assertEquals(0, x, "test2"); // Global x is undisturbed.
-// Delete on an argument. This hits the same code paths as test5 because
-// 'with' forces all parameters to be indirected through the arguments
-// object.
+// Delete on a parameter.
function test3(value) {
var status;
with ({}) { status = delete value; }
return value + ":" + status;
}
-assertEquals("undefined:true", test3(3), "test3");
+assertEquals("3:false", test3(3), "test3");
assertEquals(0, x, "test3"); // Global x is undisturbed.
-// Delete on an argument from an outer context. This hits the same code
-// path as test2.
+// Delete on a parameter found in an outer context.
function test4(value) {
function f() {
with ({}) { return delete value; }
@@ -84,15 +81,14 @@
assertEquals(0, x, "test4"); // Global x is undisturbed.
-// Delete on an argument found in the arguments object. Such properties are
-// normally DONT_DELETE in JavaScript but deletion is allowed by V8.
+// Delete on a parameter, arguments object should be unaffected.
function test5(value) {
var status;
with ({}) { status = delete value; }
return arguments[0] + ":" + status;
}
-assertEquals("undefined:true", test5(5), "test5");
+assertEquals("5:false", test5(5), "test5");
assertEquals(0, x, "test5"); // Global x is undisturbed.
function test6(value) {
@@ -103,7 +99,7 @@
return arguments[0] + ":" + status;
}
-assertEquals("undefined:true", test6(6), "test6");
+assertEquals("6:false", test6(6), "test6");
assertEquals(0, x, "test6"); // Global x is undisturbed.
« no previous file with comments | « test/mjsunit/regress/regress-603.js ('k') | test/mjsunit/regress/regress-752.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698