| 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_BASE_H | 5 #ifndef V8_PARSING_PARSER_BASE_H |
| 6 #define V8_PARSING_PARSER_BASE_H | 6 #define V8_PARSING_PARSER_BASE_H |
| 7 | 7 |
| 8 #include "src/ast/ast.h" | 8 #include "src/ast/ast.h" |
| 9 #include "src/ast/scopes.h" | 9 #include "src/ast/scopes.h" |
| 10 #include "src/bailout-reason.h" | 10 #include "src/bailout-reason.h" |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 ast_value_factory_(ast_value_factory), | 200 ast_value_factory_(ast_value_factory), |
| 201 ast_node_factory_(ast_value_factory), | 201 ast_node_factory_(ast_value_factory), |
| 202 runtime_call_stats_(runtime_call_stats), | 202 runtime_call_stats_(runtime_call_stats), |
| 203 parsing_module_(false), | 203 parsing_module_(false), |
| 204 stack_limit_(stack_limit), | 204 stack_limit_(stack_limit), |
| 205 zone_(zone), | 205 zone_(zone), |
| 206 classifier_(nullptr), | 206 classifier_(nullptr), |
| 207 scanner_(scanner), | 207 scanner_(scanner), |
| 208 stack_overflow_(false), | 208 stack_overflow_(false), |
| 209 default_eager_compile_hint_(FunctionLiteral::kShouldLazyCompile), | 209 default_eager_compile_hint_(FunctionLiteral::kShouldLazyCompile), |
| 210 allow_lazy_(false), | |
| 211 allow_natives_(false), | 210 allow_natives_(false), |
| 212 allow_tailcalls_(false), | 211 allow_tailcalls_(false), |
| 213 allow_harmony_do_expressions_(false), | 212 allow_harmony_do_expressions_(false), |
| 214 allow_harmony_function_sent_(false), | 213 allow_harmony_function_sent_(false), |
| 215 allow_harmony_async_await_(false), | 214 allow_harmony_async_await_(false), |
| 216 allow_harmony_restrictive_generators_(false), | 215 allow_harmony_restrictive_generators_(false), |
| 217 allow_harmony_trailing_commas_(false), | 216 allow_harmony_trailing_commas_(false), |
| 218 allow_harmony_class_fields_(false) {} | 217 allow_harmony_class_fields_(false) {} |
| 219 | 218 |
| 220 #define ALLOW_ACCESSORS(name) \ | 219 #define ALLOW_ACCESSORS(name) \ |
| 221 bool allow_##name() const { return allow_##name##_; } \ | 220 bool allow_##name() const { return allow_##name##_; } \ |
| 222 void set_allow_##name(bool allow) { allow_##name##_ = allow; } | 221 void set_allow_##name(bool allow) { allow_##name##_ = allow; } |
| 223 | 222 |
| 224 ALLOW_ACCESSORS(lazy); | |
| 225 ALLOW_ACCESSORS(natives); | 223 ALLOW_ACCESSORS(natives); |
| 226 ALLOW_ACCESSORS(tailcalls); | 224 ALLOW_ACCESSORS(tailcalls); |
| 227 ALLOW_ACCESSORS(harmony_do_expressions); | 225 ALLOW_ACCESSORS(harmony_do_expressions); |
| 228 ALLOW_ACCESSORS(harmony_function_sent); | 226 ALLOW_ACCESSORS(harmony_function_sent); |
| 229 ALLOW_ACCESSORS(harmony_async_await); | 227 ALLOW_ACCESSORS(harmony_async_await); |
| 230 ALLOW_ACCESSORS(harmony_restrictive_generators); | 228 ALLOW_ACCESSORS(harmony_restrictive_generators); |
| 231 ALLOW_ACCESSORS(harmony_trailing_commas); | 229 ALLOW_ACCESSORS(harmony_trailing_commas); |
| 232 ALLOW_ACCESSORS(harmony_class_fields); | 230 ALLOW_ACCESSORS(harmony_class_fields); |
| 233 | 231 |
| 234 #undef ALLOW_ACCESSORS | 232 #undef ALLOW_ACCESSORS |
| (...skipping 1195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1430 | 1428 |
| 1431 private: | 1429 private: |
| 1432 Zone* zone_; | 1430 Zone* zone_; |
| 1433 ExpressionClassifier* classifier_; | 1431 ExpressionClassifier* classifier_; |
| 1434 | 1432 |
| 1435 Scanner* scanner_; | 1433 Scanner* scanner_; |
| 1436 bool stack_overflow_; | 1434 bool stack_overflow_; |
| 1437 | 1435 |
| 1438 FunctionLiteral::EagerCompileHint default_eager_compile_hint_; | 1436 FunctionLiteral::EagerCompileHint default_eager_compile_hint_; |
| 1439 | 1437 |
| 1440 bool allow_lazy_; | |
| 1441 bool allow_natives_; | 1438 bool allow_natives_; |
| 1442 bool allow_tailcalls_; | 1439 bool allow_tailcalls_; |
| 1443 bool allow_harmony_do_expressions_; | 1440 bool allow_harmony_do_expressions_; |
| 1444 bool allow_harmony_function_sent_; | 1441 bool allow_harmony_function_sent_; |
| 1445 bool allow_harmony_async_await_; | 1442 bool allow_harmony_async_await_; |
| 1446 bool allow_harmony_restrictive_generators_; | 1443 bool allow_harmony_restrictive_generators_; |
| 1447 bool allow_harmony_trailing_commas_; | 1444 bool allow_harmony_trailing_commas_; |
| 1448 bool allow_harmony_class_fields_; | 1445 bool allow_harmony_class_fields_; |
| 1449 | 1446 |
| 1450 friend class DiscardableZoneScope; | 1447 friend class DiscardableZoneScope; |
| (...skipping 4003 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5454 has_seen_constructor_ = true; | 5451 has_seen_constructor_ = true; |
| 5455 return; | 5452 return; |
| 5456 } | 5453 } |
| 5457 } | 5454 } |
| 5458 | 5455 |
| 5459 | 5456 |
| 5460 } // namespace internal | 5457 } // namespace internal |
| 5461 } // namespace v8 | 5458 } // namespace v8 |
| 5462 | 5459 |
| 5463 #endif // V8_PARSING_PARSER_BASE_H | 5460 #endif // V8_PARSING_PARSER_BASE_H |
| OLD | NEW |