Reviewers: Mads Ager,

Message:
Fix of small bug in const-eval-init.js that has no real effect. The code is,
however, a bit misleading with the current version (at least I was surprised
about the content of source).

Description:
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.


Please review this at http://codereview.chromium.org/2758002/show

SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/

Affected files:
  M     test/mjsunit/const-eval-init.js


Index: test/mjsunit/const-eval-init.js
===================================================================
--- test/mjsunit/const-eval-init.js     (revision 4816)
+++ test/mjsunit/const-eval-init.js     (working copy)
@@ -91,7 +91,7 @@
   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);
 }


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to