| 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_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/allocation.h" | 8 #include "src/allocation.h" |
| 9 #include "src/ast/ast.h" | 9 #include "src/ast/ast.h" |
| 10 #include "src/ast/scopes.h" | 10 #include "src/ast/scopes.h" |
| (...skipping 728 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 739 // local variables creates user-controlled constants in the generated code, | 739 // local variables creates user-controlled constants in the generated code, |
| 740 // and we don't want too much user-controlled memory inside the code (this was | 740 // and we don't want too much user-controlled memory inside the code (this was |
| 741 // the reason why this limit was introduced in the first place; see | 741 // the reason why this limit was introduced in the first place; see |
| 742 // https://codereview.chromium.org/7003030/ ). | 742 // https://codereview.chromium.org/7003030/ ). |
| 743 static const int kMaxNumFunctionLocals = 4194303; // 2^22-1 | 743 static const int kMaxNumFunctionLocals = 4194303; // 2^22-1 |
| 744 | 744 |
| 745 // Returns NULL if parsing failed. | 745 // Returns NULL if parsing failed. |
| 746 FunctionLiteral* ParseProgram(Isolate* isolate, ParseInfo* info); | 746 FunctionLiteral* ParseProgram(Isolate* isolate, ParseInfo* info); |
| 747 | 747 |
| 748 FunctionLiteral* ParseLazy(Isolate* isolate, ParseInfo* info); | 748 FunctionLiteral* ParseLazy(Isolate* isolate, ParseInfo* info); |
| 749 FunctionLiteral* ParseLazy(Isolate* isolate, ParseInfo* info, | 749 FunctionLiteral* DoParseLazy(Isolate* isolate, ParseInfo* info, |
| 750 Utf16CharacterStream* source); | 750 Utf16CharacterStream* source); |
| 751 | 751 |
| 752 // Called by ParseProgram after setting up the scanner. | 752 // Called by ParseProgram after setting up the scanner. |
| 753 FunctionLiteral* DoParseProgram(ParseInfo* info); | 753 FunctionLiteral* DoParseProgram(ParseInfo* info); |
| 754 | 754 |
| 755 void SetCachedData(ParseInfo* info); | 755 void SetCachedData(ParseInfo* info); |
| 756 | 756 |
| 757 ScriptCompiler::CompileOptions compile_options() const { | 757 ScriptCompiler::CompileOptions compile_options() const { |
| 758 return compile_options_; | 758 return compile_options_; |
| 759 } | 759 } |
| 760 bool consume_cached_parse_data() const { | 760 bool consume_cached_parse_data() const { |
| (...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1323 | 1323 |
| 1324 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { | 1324 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { |
| 1325 return parser_->ParseDoExpression(ok); | 1325 return parser_->ParseDoExpression(ok); |
| 1326 } | 1326 } |
| 1327 | 1327 |
| 1328 | 1328 |
| 1329 } // namespace internal | 1329 } // namespace internal |
| 1330 } // namespace v8 | 1330 } // namespace v8 |
| 1331 | 1331 |
| 1332 #endif // V8_PARSING_PARSER_H_ | 1332 #endif // V8_PARSING_PARSER_H_ |
| OLD | NEW |