OLD | NEW |
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" // For CachedDataMode | 10 #include "src/compiler.h" // For CachedDataMode |
(...skipping 839 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
850 // Parser support | 850 // Parser support |
851 VariableProxy* NewUnresolved(const AstRawString* name, | 851 VariableProxy* NewUnresolved(const AstRawString* name, |
852 VariableMode mode, | 852 VariableMode mode, |
853 Interface* interface); | 853 Interface* interface); |
854 void Declare(Declaration* declaration, bool resolve, bool* ok); | 854 void Declare(Declaration* declaration, bool resolve, bool* ok); |
855 | 855 |
856 bool TargetStackContainsLabel(const AstRawString* label); | 856 bool TargetStackContainsLabel(const AstRawString* label); |
857 BreakableStatement* LookupBreakTarget(const AstRawString* label, bool* ok); | 857 BreakableStatement* LookupBreakTarget(const AstRawString* label, bool* ok); |
858 IterationStatement* LookupContinueTarget(const AstRawString* label, bool* ok); | 858 IterationStatement* LookupContinueTarget(const AstRawString* label, bool* ok); |
859 | 859 |
860 void RegisterTargetUse(Label* target, Target* stop); | |
861 | |
862 // Factory methods. | 860 // Factory methods. |
863 | 861 |
864 Scope* NewScope(Scope* parent, ScopeType type); | 862 Scope* NewScope(Scope* parent, ScopeType type); |
865 | 863 |
866 FunctionLiteral* DefaultConstructor(bool call_super, Scope* scope, int pos, | 864 FunctionLiteral* DefaultConstructor(bool call_super, Scope* scope, int pos, |
867 int end_pos); | 865 int end_pos); |
868 | 866 |
869 // Skip over a lazy function, either using cached data if we have it, or | 867 // Skip over a lazy function, either using cached data if we have it, or |
870 // by parsing the function with PreParser. Consumes the ending }. | 868 // by parsing the function with PreParser. Consumes the ending }. |
871 void SkipLazyFunctionBody(const AstRawString* function_name, | 869 void SkipLazyFunctionBody(const AstRawString* function_name, |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1003 } | 1001 } |
1004 | 1002 |
1005 | 1003 |
1006 Expression* ParserTraits::CloseTemplateLiteral(TemplateLiteralState* state, | 1004 Expression* ParserTraits::CloseTemplateLiteral(TemplateLiteralState* state, |
1007 int start, Expression* tag) { | 1005 int start, Expression* tag) { |
1008 return parser_->CloseTemplateLiteral(state, start, tag); | 1006 return parser_->CloseTemplateLiteral(state, start, tag); |
1009 } | 1007 } |
1010 } } // namespace v8::internal | 1008 } } // namespace v8::internal |
1011 | 1009 |
1012 #endif // V8_PARSER_H_ | 1010 #endif // V8_PARSER_H_ |
OLD | NEW |