Revision: 6466
Author: [email protected]
Date: Tue Jan 25 05:32:36 2011
Log: Update regression test.
With SVN r6465 (reverting changes to scopes), a regression test for
deleting parameter variables has to change to reflect a semantic
change. It is now again possible to delete parameters from a function
that uses 'with' or 'try...catch'.
Review URL: http://codereview.chromium.org/6307014
http://code.google.com/p/v8/source/detail?r=6466
Modified:
/branches/bleeding_edge/test/mjsunit/regress/regress-70066.js
=======================================
--- /branches/bleeding_edge/test/mjsunit/regress/regress-70066.js Mon Jan
24 06:03:30 2011
+++ /branches/bleeding_edge/test/mjsunit/regress/regress-70066.js Tue Jan
25 05:32:36 2011
@@ -57,16 +57,21 @@
assertEquals(0, x, "test2"); // Global x is undisturbed.
-// Delete on an argument (should be the same code paths as test1 and
test2).
+// Delete on an argument. This hits the same code paths as test5 because
+// 'with' forces all parameters to be indirected through the arguments
+// object.
function test3(value) {
var status;
with ({}) { status = delete value; }
return value + ":" + status;
}
-assertEquals("3:false", test3(3), "test3");
+assertEquals("undefined:true", 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.
function test4(value) {
function f() {
with ({}) { return delete value; }
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev