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

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

Issue 2445333002: Ensure slow properties for simple {__proto__:null} literals. (Closed)
Patch Set: fixing compilation issue Created 3 years, 7 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
« no previous file with comments | « src/objects.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 732 matching lines...) Expand 10 before | Expand all | Expand 10 after
743 V8_INLINE bool IsConstructor(const AstRawString* identifier) const { 743 V8_INLINE bool IsConstructor(const AstRawString* identifier) const {
744 return identifier == ast_value_factory()->constructor_string(); 744 return identifier == ast_value_factory()->constructor_string();
745 } 745 }
746 746
747 V8_INLINE bool IsName(const AstRawString* identifier) const { 747 V8_INLINE bool IsName(const AstRawString* identifier) const {
748 return identifier == ast_value_factory()->name_string(); 748 return identifier == ast_value_factory()->name_string();
749 } 749 }
750 750
751 V8_INLINE static bool IsBoilerplateProperty( 751 V8_INLINE static bool IsBoilerplateProperty(
752 ObjectLiteral::Property* property) { 752 ObjectLiteral::Property* property) {
753 return ObjectLiteral::IsBoilerplateProperty(property); 753 return !property->IsPrototype();
754 } 754 }
755 755
756 V8_INLINE bool IsNative(Expression* expr) const { 756 V8_INLINE bool IsNative(Expression* expr) const {
757 DCHECK_NOT_NULL(expr); 757 DCHECK_NOT_NULL(expr);
758 return expr->IsVariableProxy() && 758 return expr->IsVariableProxy() &&
759 expr->AsVariableProxy()->raw_name() == 759 expr->AsVariableProxy()->raw_name() ==
760 ast_value_factory()->native_string(); 760 ast_value_factory()->native_string();
761 } 761 }
762 762
763 V8_INLINE static bool IsArrayIndex(const AstRawString* string, 763 V8_INLINE static bool IsArrayIndex(const AstRawString* string,
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
1214 1214
1215 private: 1215 private:
1216 ParserTarget** variable_; 1216 ParserTarget** variable_;
1217 ParserTarget* previous_; 1217 ParserTarget* previous_;
1218 }; 1218 };
1219 1219
1220 } // namespace internal 1220 } // namespace internal
1221 } // namespace v8 1221 } // namespace v8
1222 1222
1223 #endif // V8_PARSING_PARSER_H_ 1223 #endif // V8_PARSING_PARSER_H_
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/parsing/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698