Fix bug in mjsunit/const-eval-init causing objects to be initialized to undefined.

In mjsunit/const-eval-init - testInitSlowCaseExtension a range of objects are initialized to undefined instead of a value because the variable i is within quotes (i.e., the source becommes "a1 = i" instead of "a1 = 1".

This should have no impact on the test, I just stumbled over this on
an unrelated matter.

Review URL: http://codereview.chromium.org/2758002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4817 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
ricow@chromium.org 2010-06-08 11:20:36 +00:00
parent c7ab2b6aa3
commit e0bbcf1e6e

View File

@ -91,7 +91,7 @@ function testInitSlowCaseExtension() {
var source = "";
// Introduce 100 properties on the context extension object to force
// it in slow case.
for (var i = 0; i < 100; i++) source += ("var a" + i + " = i;");
for (var i = 0; i < 100; i++) source += ("var a" + i + " = " + i + ";");
source += "const x = 10; assertEquals(10, x); x = 11; assertEquals(10, x)";
eval(source);
}