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

Side by Side Diff: src/preparser.cc

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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/preparser.h ('k') | test/mjsunit/object-literal.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <cmath> 5 #include <cmath>
6 6
7 #include "include/v8stdint.h" 7 #include "include/v8stdint.h"
8 8
9 #include "src/allocation.h" 9 #include "src/allocation.h"
10 #include "src/base/logging.h" 10 #include "src/base/logging.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 if (scanner->UnescapedLiteralMatches("eval", 4)) { 75 if (scanner->UnescapedLiteralMatches("eval", 4)) {
76 return PreParserIdentifier::Eval(); 76 return PreParserIdentifier::Eval();
77 } 77 }
78 if (scanner->UnescapedLiteralMatches("arguments", 9)) { 78 if (scanner->UnescapedLiteralMatches("arguments", 9)) {
79 return PreParserIdentifier::Arguments(); 79 return PreParserIdentifier::Arguments();
80 } 80 }
81 return PreParserIdentifier::Default(); 81 return PreParserIdentifier::Default();
82 } 82 }
83 83
84 84
85 PreParserIdentifier PreParserTraits::GetNumberAsSymbol(Scanner* scanner) {
86 return PreParserIdentifier::Default();
87 }
88
89
85 PreParserExpression PreParserTraits::ExpressionFromString( 90 PreParserExpression PreParserTraits::ExpressionFromString(
86 int pos, Scanner* scanner, PreParserFactory* factory) { 91 int pos, Scanner* scanner, PreParserFactory* factory) {
87 if (scanner->UnescapedLiteralMatches("use strict", 10)) { 92 if (scanner->UnescapedLiteralMatches("use strict", 10)) {
88 return PreParserExpression::UseStrictStringLiteral(); 93 return PreParserExpression::UseStrictStringLiteral();
89 } 94 }
90 return PreParserExpression::StringLiteral(); 95 return PreParserExpression::StringLiteral();
91 } 96 }
92 97
93 98
94 PreParserExpression PreParserTraits::ParseV8Intrinsic(bool* ok) { 99 PreParserExpression PreParserTraits::ParseV8Intrinsic(bool* ok) {
(...skipping 838 matching lines...) Expand 10 before | Expand all | Expand 10 after
933 ParseIdentifier(kAllowEvalOrArguments, CHECK_OK); 938 ParseIdentifier(kAllowEvalOrArguments, CHECK_OK);
934 ParseArguments(ok); 939 ParseArguments(ok);
935 940
936 return Expression::Default(); 941 return Expression::Default();
937 } 942 }
938 943
939 #undef CHECK_OK 944 #undef CHECK_OK
940 945
941 946
942 } } // v8::internal 947 } } // v8::internal
OLDNEW
« no previous file with comments | « src/preparser.h ('k') | test/mjsunit/object-literal.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698