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

Side by Side Diff: src/parser.h

Issue 1070633002: [strong] Implement static restrictions on binding/assignment to 'undefined' identifier. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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
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_PARSER_H_ 5 #ifndef V8_PARSER_H_
6 #define V8_PARSER_H_ 6 #define V8_PARSER_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/ast.h" 9 #include "src/ast.h"
10 #include "src/compiler.h" // TODO(titzer): remove this include dependency 10 #include "src/compiler.h" // TODO(titzer): remove this include dependency
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after
562 // For constructing objects returned by the traversing functions. 562 // For constructing objects returned by the traversing functions.
563 typedef AstNodeFactory Factory; 563 typedef AstNodeFactory Factory;
564 }; 564 };
565 565
566 explicit ParserTraits(Parser* parser) : parser_(parser) {} 566 explicit ParserTraits(Parser* parser) : parser_(parser) {}
567 567
568 // Helper functions for recursive descent. 568 // Helper functions for recursive descent.
569 bool IsEval(const AstRawString* identifier) const; 569 bool IsEval(const AstRawString* identifier) const;
570 bool IsArguments(const AstRawString* identifier) const; 570 bool IsArguments(const AstRawString* identifier) const;
571 bool IsEvalOrArguments(const AstRawString* identifier) const; 571 bool IsEvalOrArguments(const AstRawString* identifier) const;
572 bool IsUndefined(const AstRawString* identifier) const;
572 V8_INLINE bool IsFutureStrictReserved(const AstRawString* identifier) const; 573 V8_INLINE bool IsFutureStrictReserved(const AstRawString* identifier) const;
573 574
574 // Returns true if the expression is of type "this.foo". 575 // Returns true if the expression is of type "this.foo".
575 static bool IsThisProperty(Expression* expression); 576 static bool IsThisProperty(Expression* expression);
576 577
577 static bool IsIdentifier(Expression* expression); 578 static bool IsIdentifier(Expression* expression);
578 579
579 bool IsPrototype(const AstRawString* identifier) const; 580 bool IsPrototype(const AstRawString* identifier) const;
580 581
581 bool IsConstructor(const AstRawString* identifier) const; 582 bool IsConstructor(const AstRawString* identifier) const;
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after
1122 } 1123 }
1123 1124
1124 1125
1125 Expression* ParserTraits::CloseTemplateLiteral(TemplateLiteralState* state, 1126 Expression* ParserTraits::CloseTemplateLiteral(TemplateLiteralState* state,
1126 int start, Expression* tag) { 1127 int start, Expression* tag) {
1127 return parser_->CloseTemplateLiteral(state, start, tag); 1128 return parser_->CloseTemplateLiteral(state, start, tag);
1128 } 1129 }
1129 } } // namespace v8::internal 1130 } } // namespace v8::internal
1130 1131
1131 #endif // V8_PARSER_H_ 1132 #endif // V8_PARSER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698