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

Side by Side Diff: src/parsing/preparser.cc

Issue 2423053002: Install the 'name' property in classes at runtime (Closed)
Patch Set: Rebase Created 4 years 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
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 "src/allocation.h" 7 #include "src/allocation.h"
8 #include "src/base/logging.h" 8 #include "src/base/logging.h"
9 #include "src/conversions-inl.h" 9 #include "src/conversions-inl.h"
10 #include "src/conversions.h" 10 #include "src/conversions.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 if (scanner->UnescapedLiteralMatches("eval", 4)) 60 if (scanner->UnescapedLiteralMatches("eval", 4))
61 return PreParserIdentifier::Eval(); 61 return PreParserIdentifier::Eval();
62 if (scanner->UnescapedLiteralMatches("arguments", 9)) 62 if (scanner->UnescapedLiteralMatches("arguments", 9))
63 return PreParserIdentifier::Arguments(); 63 return PreParserIdentifier::Arguments();
64 if (scanner->UnescapedLiteralMatches("undefined", 9)) 64 if (scanner->UnescapedLiteralMatches("undefined", 9))
65 return PreParserIdentifier::Undefined(); 65 return PreParserIdentifier::Undefined();
66 if (scanner->LiteralMatches("prototype", 9)) 66 if (scanner->LiteralMatches("prototype", 9))
67 return PreParserIdentifier::Prototype(); 67 return PreParserIdentifier::Prototype();
68 if (scanner->LiteralMatches("constructor", 11)) 68 if (scanner->LiteralMatches("constructor", 11))
69 return PreParserIdentifier::Constructor(); 69 return PreParserIdentifier::Constructor();
70 if (scanner->LiteralMatches("name", 4))
71 return PreParserIdentifier::Name();
70 return PreParserIdentifier::Default(); 72 return PreParserIdentifier::Default();
71 } 73 }
72 } 74 }
73 75
74 } // unnamed namespace 76 } // unnamed namespace
75 77
76 PreParserIdentifier PreParser::GetSymbol() const { 78 PreParserIdentifier PreParser::GetSymbol() const {
77 PreParserIdentifier symbol = GetSymbolHelper(scanner()); 79 PreParserIdentifier symbol = GetSymbolHelper(scanner());
78 if (track_unresolved_variables_) { 80 if (track_unresolved_variables_) {
79 const AstRawString* result = scanner()->CurrentSymbol(ast_value_factory()); 81 const AstRawString* result = scanner()->CurrentSymbol(ast_value_factory());
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 } 308 }
307 } 309 }
308 } 310 }
309 311
310 #undef CHECK_OK 312 #undef CHECK_OK
311 #undef CHECK_OK_CUSTOM 313 #undef CHECK_OK_CUSTOM
312 314
313 315
314 } // namespace internal 316 } // namespace internal
315 } // namespace v8 317 } // namespace v8
OLDNEW
« src/parsing/parser-base.h ('K') | « src/parsing/preparser.h ('k') | src/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698