| 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_PREPARSER_H | 5 #ifndef V8_PREPARSER_H |
| 6 #define V8_PREPARSER_H | 6 #define V8_PREPARSER_H |
| 7 | 7 |
| 8 #include "src/v8.h" | 8 #include "src/v8.h" |
| 9 | 9 |
| 10 #include "src/func-name-inferrer.h" | 10 #include "src/func-name-inferrer.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 ParserRecorder* log, typename Traits::Type::Zone* zone, | 68 ParserRecorder* log, typename Traits::Type::Zone* zone, |
| 69 typename Traits::Type::Parser this_object) | 69 typename Traits::Type::Parser this_object) |
| 70 : Traits(this_object), | 70 : Traits(this_object), |
| 71 parenthesized_function_(false), | 71 parenthesized_function_(false), |
| 72 scope_(NULL), | 72 scope_(NULL), |
| 73 function_state_(NULL), | 73 function_state_(NULL), |
| 74 extension_(extension), | 74 extension_(extension), |
| 75 fni_(NULL), | 75 fni_(NULL), |
| 76 log_(log), | 76 log_(log), |
| 77 mode_(PARSE_EAGERLY), // Lazy mode must be set explicitly. | 77 mode_(PARSE_EAGERLY), // Lazy mode must be set explicitly. |
| 78 stack_limit_(stack_limit), |
| 78 scanner_(scanner), | 79 scanner_(scanner), |
| 79 stack_limit_(stack_limit), | |
| 80 stack_overflow_(false), | 80 stack_overflow_(false), |
| 81 allow_lazy_(false), | 81 allow_lazy_(false), |
| 82 allow_natives_syntax_(false), | 82 allow_natives_syntax_(false), |
| 83 allow_generators_(false), | 83 allow_generators_(false), |
| 84 allow_arrow_functions_(false), | 84 allow_arrow_functions_(false), |
| 85 zone_(zone) {} | 85 zone_(zone) {} |
| 86 | 86 |
| 87 // Getters that indicate whether certain syntactical constructs are | 87 // Getters that indicate whether certain syntactical constructs are |
| 88 // allowed to be parsed by this instance of the parser. | 88 // allowed to be parsed by this instance of the parser. |
| 89 bool allow_lazy() const { return allow_lazy_; } | 89 bool allow_lazy() const { return allow_lazy_; } |
| (...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 551 // Heuristically that means that the function will be called immediately, | 551 // Heuristically that means that the function will be called immediately, |
| 552 // so never lazily compile it. | 552 // so never lazily compile it. |
| 553 bool parenthesized_function_; | 553 bool parenthesized_function_; |
| 554 | 554 |
| 555 typename Traits::Type::Scope* scope_; // Scope stack. | 555 typename Traits::Type::Scope* scope_; // Scope stack. |
| 556 FunctionState* function_state_; // Function state stack. | 556 FunctionState* function_state_; // Function state stack. |
| 557 v8::Extension* extension_; | 557 v8::Extension* extension_; |
| 558 FuncNameInferrer* fni_; | 558 FuncNameInferrer* fni_; |
| 559 ParserRecorder* log_; | 559 ParserRecorder* log_; |
| 560 Mode mode_; | 560 Mode mode_; |
| 561 uintptr_t stack_limit_; |
| 561 | 562 |
| 562 private: | 563 private: |
| 563 Scanner* scanner_; | 564 Scanner* scanner_; |
| 564 uintptr_t stack_limit_; | |
| 565 bool stack_overflow_; | 565 bool stack_overflow_; |
| 566 | 566 |
| 567 bool allow_lazy_; | 567 bool allow_lazy_; |
| 568 bool allow_natives_syntax_; | 568 bool allow_natives_syntax_; |
| 569 bool allow_generators_; | 569 bool allow_generators_; |
| 570 bool allow_arrow_functions_; | 570 bool allow_arrow_functions_; |
| 571 | 571 |
| 572 typename Traits::Type::Zone* zone_; // Only used by Parser. | 572 typename Traits::Type::Zone* zone_; // Only used by Parser. |
| 573 }; | 573 }; |
| 574 | 574 |
| (...skipping 2079 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2654 parser()->ReportMessage("accessor_get_set"); | 2654 parser()->ReportMessage("accessor_get_set"); |
| 2655 } | 2655 } |
| 2656 *ok = false; | 2656 *ok = false; |
| 2657 } | 2657 } |
| 2658 } | 2658 } |
| 2659 | 2659 |
| 2660 | 2660 |
| 2661 } } // v8::internal | 2661 } } // v8::internal |
| 2662 | 2662 |
| 2663 #endif // V8_PREPARSER_H | 2663 #endif // V8_PREPARSER_H |
| OLD | NEW |