| 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 #include "src/ast/ast-numbering.h" | 5 #include "src/ast/ast-numbering.h" |
| 6 | 6 |
| 7 #include "src/ast/ast.h" | 7 #include "src/ast/ast.h" |
| 8 #include "src/ast/scopes.h" | 8 #include "src/ast/scopes.h" |
| 9 | 9 |
| 10 namespace v8 { | 10 namespace v8 { |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 node->context_index() == Context::ASYNC_FUNCTION_AWAIT_CAUGHT_INDEX && | 277 node->context_index() == Context::ASYNC_FUNCTION_AWAIT_CAUGHT_INDEX && |
| 278 catch_prediction_ == HandlerTable::ASYNC_AWAIT) { | 278 catch_prediction_ == HandlerTable::ASYNC_AWAIT) { |
| 279 node->set_context_index(Context::ASYNC_FUNCTION_AWAIT_UNCAUGHT_INDEX); | 279 node->set_context_index(Context::ASYNC_FUNCTION_AWAIT_UNCAUGHT_INDEX); |
| 280 } | 280 } |
| 281 } | 281 } |
| 282 | 282 |
| 283 | 283 |
| 284 void AstNumberingVisitor::VisitWithStatement(WithStatement* node) { | 284 void AstNumberingVisitor::VisitWithStatement(WithStatement* node) { |
| 285 IncrementNodeCount(); | 285 IncrementNodeCount(); |
| 286 DisableFullCodegenAndCrankshaft(kWithStatement); | 286 DisableFullCodegenAndCrankshaft(kWithStatement); |
| 287 node->set_base_id(ReserveIdRange(WithStatement::num_ids())); | |
| 288 Visit(node->expression()); | 287 Visit(node->expression()); |
| 289 Visit(node->statement()); | 288 Visit(node->statement()); |
| 290 } | 289 } |
| 291 | 290 |
| 292 | 291 |
| 293 void AstNumberingVisitor::VisitDoWhileStatement(DoWhileStatement* node) { | 292 void AstNumberingVisitor::VisitDoWhileStatement(DoWhileStatement* node) { |
| 294 IncrementNodeCount(); | 293 IncrementNodeCount(); |
| 295 DisableSelfOptimization(); | 294 DisableSelfOptimization(); |
| 296 node->set_base_id(ReserveIdRange(DoWhileStatement::num_ids())); | 295 node->set_base_id(ReserveIdRange(DoWhileStatement::num_ids())); |
| 297 node->set_first_yield_id(yield_count_); | 296 node->set_first_yield_id(yield_count_); |
| (...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 621 } | 620 } |
| 622 | 621 |
| 623 | 622 |
| 624 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone, | 623 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone, |
| 625 FunctionLiteral* function) { | 624 FunctionLiteral* function) { |
| 626 AstNumberingVisitor visitor(isolate, zone); | 625 AstNumberingVisitor visitor(isolate, zone); |
| 627 return visitor.Renumber(function); | 626 return visitor.Renumber(function); |
| 628 } | 627 } |
| 629 } // namespace internal | 628 } // namespace internal |
| 630 } // namespace v8 | 629 } // namespace v8 |
| OLD | NEW |