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_AST_AST_H_ | 5 #ifndef V8_AST_AST_H_ |
6 #define V8_AST_AST_H_ | 6 #define V8_AST_AST_H_ |
7 | 7 |
8 #include "src/ast/ast-value-factory.h" | 8 #include "src/ast/ast-value-factory.h" |
9 #include "src/ast/modules.h" | 9 #include "src/ast/modules.h" |
10 #include "src/ast/variables.h" | 10 #include "src/ast/variables.h" |
(...skipping 3148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3159 TryCatchStatement* NewTryCatchStatementForPromiseReject(Block* try_block, | 3159 TryCatchStatement* NewTryCatchStatementForPromiseReject(Block* try_block, |
3160 Scope* scope, | 3160 Scope* scope, |
3161 Variable* variable, | 3161 Variable* variable, |
3162 Block* catch_block, | 3162 Block* catch_block, |
3163 int pos) { | 3163 int pos) { |
3164 return new (local_zone_) | 3164 return new (local_zone_) |
3165 TryCatchStatement(local_zone_, try_block, scope, variable, catch_block, | 3165 TryCatchStatement(local_zone_, try_block, scope, variable, catch_block, |
3166 HandlerTable::PROMISE, pos); | 3166 HandlerTable::PROMISE, pos); |
3167 } | 3167 } |
3168 | 3168 |
| 3169 TryCatchStatement* NewTryCatchStatementForDesugaring(Block* try_block, |
| 3170 Scope* scope, |
| 3171 Variable* variable, |
| 3172 Block* catch_block, |
| 3173 int pos) { |
| 3174 return new (local_zone_) |
| 3175 TryCatchStatement(local_zone_, try_block, scope, variable, catch_block, |
| 3176 HandlerTable::DESUGARING, pos); |
| 3177 } |
| 3178 |
3169 TryFinallyStatement* NewTryFinallyStatement(Block* try_block, | 3179 TryFinallyStatement* NewTryFinallyStatement(Block* try_block, |
3170 Block* finally_block, int pos) { | 3180 Block* finally_block, int pos) { |
3171 return new (local_zone_) | 3181 return new (local_zone_) |
3172 TryFinallyStatement(local_zone_, try_block, finally_block, pos); | 3182 TryFinallyStatement(local_zone_, try_block, finally_block, pos); |
3173 } | 3183 } |
3174 | 3184 |
3175 DebuggerStatement* NewDebuggerStatement(int pos) { | 3185 DebuggerStatement* NewDebuggerStatement(int pos) { |
3176 return new (local_zone_) DebuggerStatement(local_zone_, pos); | 3186 return new (local_zone_) DebuggerStatement(local_zone_, pos); |
3177 } | 3187 } |
3178 | 3188 |
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3538 : NULL; \ | 3548 : NULL; \ |
3539 } | 3549 } |
3540 AST_NODE_LIST(DECLARE_NODE_FUNCTIONS) | 3550 AST_NODE_LIST(DECLARE_NODE_FUNCTIONS) |
3541 #undef DECLARE_NODE_FUNCTIONS | 3551 #undef DECLARE_NODE_FUNCTIONS |
3542 | 3552 |
3543 | 3553 |
3544 } // namespace internal | 3554 } // namespace internal |
3545 } // namespace v8 | 3555 } // namespace v8 |
3546 | 3556 |
3547 #endif // V8_AST_AST_H_ | 3557 #endif // V8_AST_AST_H_ |
OLD | NEW |