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

Side by Side Diff: src/parsing/parser.h

Issue 2423053002: Install the 'name' property in classes at runtime (Closed)
Patch Set: rebased 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
« no previous file with comments | « src/interpreter/bytecode-generator.cc ('k') | src/parsing/parser.cc » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 #ifndef V8_PARSING_PARSER_H_ 5 #ifndef V8_PARSING_PARSER_H_
6 #define V8_PARSING_PARSER_H_ 6 #define V8_PARSING_PARSER_H_
7 7
8 #include "src/ast/ast.h" 8 #include "src/ast/ast.h"
9 #include "src/ast/scopes.h" 9 #include "src/ast/scopes.h"
10 #include "src/base/compiler-specific.h" 10 #include "src/base/compiler-specific.h"
(...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after
715 } 715 }
716 716
717 V8_INLINE bool IsPrototype(const AstRawString* identifier) const { 717 V8_INLINE bool IsPrototype(const AstRawString* identifier) const {
718 return identifier == ast_value_factory()->prototype_string(); 718 return identifier == ast_value_factory()->prototype_string();
719 } 719 }
720 720
721 V8_INLINE bool IsConstructor(const AstRawString* identifier) const { 721 V8_INLINE bool IsConstructor(const AstRawString* identifier) const {
722 return identifier == ast_value_factory()->constructor_string(); 722 return identifier == ast_value_factory()->constructor_string();
723 } 723 }
724 724
725 V8_INLINE bool IsName(const AstRawString* identifier) const {
726 return identifier == ast_value_factory()->name_string();
727 }
728
725 V8_INLINE static bool IsBoilerplateProperty( 729 V8_INLINE static bool IsBoilerplateProperty(
726 ObjectLiteral::Property* property) { 730 ObjectLiteral::Property* property) {
727 return ObjectLiteral::IsBoilerplateProperty(property); 731 return ObjectLiteral::IsBoilerplateProperty(property);
728 } 732 }
729 733
730 V8_INLINE bool IsNative(Expression* expr) const { 734 V8_INLINE bool IsNative(Expression* expr) const {
731 DCHECK_NOT_NULL(expr); 735 DCHECK_NOT_NULL(expr);
732 return expr->IsVariableProxy() && 736 return expr->IsVariableProxy() &&
733 expr->AsVariableProxy()->raw_name() == 737 expr->AsVariableProxy()->raw_name() ==
734 ast_value_factory()->native_string(); 738 ast_value_factory()->native_string();
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
1186 1190
1187 private: 1191 private:
1188 ParserTarget** variable_; 1192 ParserTarget** variable_;
1189 ParserTarget* previous_; 1193 ParserTarget* previous_;
1190 }; 1194 };
1191 1195
1192 } // namespace internal 1196 } // namespace internal
1193 } // namespace v8 1197 } // namespace v8
1194 1198
1195 #endif // V8_PARSING_PARSER_H_ 1199 #endif // V8_PARSING_PARSER_H_
OLDNEW
« no previous file with comments | « src/interpreter/bytecode-generator.cc ('k') | src/parsing/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698