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

Unified Diff: src/preparser.h

Issue 493173003: Fix issue with numeric property names (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 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 | « src/parser.cc ('k') | src/preparser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/preparser.h
diff --git a/src/preparser.h b/src/preparser.h
index 2c8e405ceea9242d23417ceb632693e9105611ac..793903bf5b06abd27e7662328abc2b5dd9851026 100644
--- a/src/preparser.h
+++ b/src/preparser.h
@@ -1248,6 +1248,7 @@ class PreParserTraits {
// Producing data during the recursive descent.
PreParserIdentifier GetSymbol(Scanner* scanner);
+ PreParserIdentifier GetNumberAsSymbol(Scanner* scanner);
static PreParserIdentifier GetNextSymbol(Scanner* scanner) {
return PreParserIdentifier::Default();
@@ -1893,10 +1894,7 @@ typename ParserBase<Traits>::ObjectLiteralPropertyT ParserBase<
break;
case Token::NUMBER:
Consume(Token::NUMBER);
- // TODO(arv): Fix issue with numeric keys. get 1.0() should be
- // treated as if the key was '1'
- // https://code.google.com/p/v8/issues/detail?id=3507
- name = this->GetSymbol(scanner_);
+ name = this->GetNumberAsSymbol(scanner_);
break;
default:
name = ParseIdentifierName(
« no previous file with comments | « src/parser.cc ('k') | src/preparser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698