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

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: rebase 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
« no previous file with comments | « src/messages.js ('k') | src/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_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 577 matching lines...) Expand 10 before | Expand all | Expand 10 after
1159 } 1160 }
1160 1161
1161 1162
1162 Expression* ParserTraits::SpreadCallNew( 1163 Expression* ParserTraits::SpreadCallNew(
1163 Expression* function, ZoneList<v8::internal::Expression*>* args, int pos) { 1164 Expression* function, ZoneList<v8::internal::Expression*>* args, int pos) {
1164 return parser_->SpreadCallNew(function, args, pos); 1165 return parser_->SpreadCallNew(function, args, pos);
1165 } 1166 }
1166 } } // namespace v8::internal 1167 } } // namespace v8::internal
1167 1168
1168 #endif // V8_PARSER_H_ 1169 #endif // V8_PARSER_H_
OLDNEW
« no previous file with comments | « src/messages.js ('k') | src/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698