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" // TODO(titzer): remove this include dependency | 10 #include "src/compiler.h" // TODO(titzer): remove this include dependency |
(...skipping 866 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
877 static const int kMaxNumFunctionLocals = 4194303; // 2^22-1 | 877 static const int kMaxNumFunctionLocals = 4194303; // 2^22-1 |
878 | 878 |
879 // Returns NULL if parsing failed. | 879 // Returns NULL if parsing failed. |
880 FunctionLiteral* ParseProgram(Isolate* isolate, ParseInfo* info); | 880 FunctionLiteral* ParseProgram(Isolate* isolate, ParseInfo* info); |
881 | 881 |
882 FunctionLiteral* ParseLazy(Isolate* isolate, ParseInfo* info); | 882 FunctionLiteral* ParseLazy(Isolate* isolate, ParseInfo* info); |
883 FunctionLiteral* ParseLazy(Isolate* isolate, ParseInfo* info, | 883 FunctionLiteral* ParseLazy(Isolate* isolate, ParseInfo* info, |
884 Utf16CharacterStream* source); | 884 Utf16CharacterStream* source); |
885 | 885 |
886 // Called by ParseProgram after setting up the scanner. | 886 // Called by ParseProgram after setting up the scanner. |
887 FunctionLiteral* DoParseProgram(ParseInfo* info); | 887 FunctionLiteral* DoParseProgram(ParseInfo* info, Scope** scope, |
| 888 Scope** ad_hoc_eval_scope); |
888 | 889 |
889 void SetCachedData(ParseInfo* info); | 890 void SetCachedData(ParseInfo* info); |
890 | 891 |
891 bool inside_with() const { return scope_->inside_with(); } | 892 bool inside_with() const { return scope_->inside_with(); } |
892 ScriptCompiler::CompileOptions compile_options() const { | 893 ScriptCompiler::CompileOptions compile_options() const { |
893 return compile_options_; | 894 return compile_options_; |
894 } | 895 } |
895 bool consume_cached_parse_data() const { | 896 bool consume_cached_parse_data() const { |
896 return compile_options_ == ScriptCompiler::kConsumeParserCache && | 897 return compile_options_ == ScriptCompiler::kConsumeParserCache && |
897 cached_parse_data_ != NULL; | 898 cached_parse_data_ != NULL; |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1172 } | 1173 } |
1173 | 1174 |
1174 | 1175 |
1175 Expression* ParserTraits::SpreadCallNew( | 1176 Expression* ParserTraits::SpreadCallNew( |
1176 Expression* function, ZoneList<v8::internal::Expression*>* args, int pos) { | 1177 Expression* function, ZoneList<v8::internal::Expression*>* args, int pos) { |
1177 return parser_->SpreadCallNew(function, args, pos); | 1178 return parser_->SpreadCallNew(function, args, pos); |
1178 } | 1179 } |
1179 } } // namespace v8::internal | 1180 } } // namespace v8::internal |
1180 | 1181 |
1181 #endif // V8_PARSER_H_ | 1182 #endif // V8_PARSER_H_ |
OLD | NEW |