| 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 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 node->set_base_id(ReserveIdRange(WhileStatement::num_ids())); | 309 node->set_base_id(ReserveIdRange(WhileStatement::num_ids())); |
| 310 int old_yield_count = GetAndResetYieldCount(); | 310 int old_yield_count = GetAndResetYieldCount(); |
| 311 Visit(node->cond()); | 311 Visit(node->cond()); |
| 312 Visit(node->body()); | 312 Visit(node->body()); |
| 313 StoreAndUpdateYieldCount(node, old_yield_count); | 313 StoreAndUpdateYieldCount(node, old_yield_count); |
| 314 } | 314 } |
| 315 | 315 |
| 316 | 316 |
| 317 void AstNumberingVisitor::VisitTryCatchStatement(TryCatchStatement* node) { | 317 void AstNumberingVisitor::VisitTryCatchStatement(TryCatchStatement* node) { |
| 318 IncrementNodeCount(); | 318 IncrementNodeCount(); |
| 319 DisableCrankshaft(kTryCatchStatement); | 319 DisableOptimization(kTryCatchStatement); |
| 320 Visit(node->try_block()); | 320 Visit(node->try_block()); |
| 321 Visit(node->catch_block()); | 321 Visit(node->catch_block()); |
| 322 } | 322 } |
| 323 | 323 |
| 324 | 324 |
| 325 void AstNumberingVisitor::VisitTryFinallyStatement(TryFinallyStatement* node) { | 325 void AstNumberingVisitor::VisitTryFinallyStatement(TryFinallyStatement* node) { |
| 326 IncrementNodeCount(); | 326 IncrementNodeCount(); |
| 327 DisableCrankshaft(kTryFinallyStatement); | 327 DisableOptimization(kTryFinallyStatement); |
| 328 Visit(node->try_block()); | 328 Visit(node->try_block()); |
| 329 Visit(node->finally_block()); | 329 Visit(node->finally_block()); |
| 330 } | 330 } |
| 331 | 331 |
| 332 | 332 |
| 333 void AstNumberingVisitor::VisitPropertyReference(Property* node) { | 333 void AstNumberingVisitor::VisitPropertyReference(Property* node) { |
| 334 IncrementNodeCount(); | 334 IncrementNodeCount(); |
| 335 node->set_base_id(ReserveIdRange(Property::num_ids())); | 335 node->set_base_id(ReserveIdRange(Property::num_ids())); |
| 336 Visit(node->key()); | 336 Visit(node->key()); |
| 337 Visit(node->obj()); | 337 Visit(node->obj()); |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 599 } | 599 } |
| 600 | 600 |
| 601 | 601 |
| 602 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone, | 602 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone, |
| 603 FunctionLiteral* function) { | 603 FunctionLiteral* function) { |
| 604 AstNumberingVisitor visitor(isolate, zone); | 604 AstNumberingVisitor visitor(isolate, zone); |
| 605 return visitor.Renumber(function); | 605 return visitor.Renumber(function); |
| 606 } | 606 } |
| 607 } // namespace internal | 607 } // namespace internal |
| 608 } // namespace v8 | 608 } // namespace v8 |
| OLD | NEW |