Thanks, I addressed all the feedback.
Martin
http://codereview.chromium.org/6335010/diff/6002/src/ast.cc
File src/ast.cc (right):
http://codereview.chromium.org/6335010/diff/6002/src/ast.cc#newcode245
src/ast.cc:245: if (handle->ToArrayIndex(&index)) {
On 2011/01/25 11:19:03, Lasse Reichstein wrote:
I already committed a patch for this case.
During that I checked what happens, and this change isn't even
sufficient. The
ToArrayIndex function only works on numbers (Smi and HeapNumber), not
strings.
You need a second case inside the IsSymbol case to account for a
string that
represents an array index.
Thanks, I reverted this part of my change.
http://codereview.chromium.org/6335010/diff/6002/src/parser.cc
File src/parser.cc (right):
http://codereview.chromium.org/6335010/diff/6002/src/parser.cc#newcode3077
src/parser.cc:3077: if (handle->ToArrayIndex(&hash)) {
On 2011/01/25 11:19:03, Lasse Reichstein wrote:
This still needs to handle array-index symbols.
You can see the code in my change for ast.cc:
http://codereview.chromium.org/6304016/
Done.
http://codereview.chromium.org/6335010/diff/6002/test/mjsunit/strict-mode.js
File test/mjsunit/strict-mode.js (right):
http://codereview.chromium.org/6335010/diff/6002/test/mjsunit/strict-mode.js#newcode125
test/mjsunit/strict-mode.js:125:
On 2011/01/25 11:19:03, Lasse Reichstein wrote:
For good measure, try with
var x = {123: 1, "0123": 2};
var x = {123: 1,
123.00000000000000000000000000000000000000000000000000000000000000000001
: 2}
and
var x = {123: 1,
"123.00000000000000000000000000000000000000000000000000000000000000000001"
: 2}
The first shouldn't throw, the second should (it's the same number),
and the
third shouldn't.
Done.
http://codereview.chromium.org/6335010/diff/6002/test/mjsunit/strict-mode.js#newcode125
test/mjsunit/strict-mode.js:125:
On 2011/01/25 11:19:03, Lasse Reichstein wrote:
Also try get/set properties using strings and numbers, e.g.:
var x = {get 12(){}, get "12"(){}};
var x = {get foo(){}, get "foo"(){}};
Done.
http://codereview.chromium.org/6335010/
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev