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/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/ast.h" | 7 #include "src/ast.h" |
8 #include "src/ast-numbering.h" | 8 #include "src/ast-numbering.h" |
9 #include "src/scopes.h" | 9 #include "src/scopes.h" |
10 | 10 |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 IncrementNodeCount(); | 283 IncrementNodeCount(); |
284 DisableSelfOptimization(); | 284 DisableSelfOptimization(); |
285 node->set_base_id(ReserveIdRange(WhileStatement::num_ids())); | 285 node->set_base_id(ReserveIdRange(WhileStatement::num_ids())); |
286 Visit(node->cond()); | 286 Visit(node->cond()); |
287 Visit(node->body()); | 287 Visit(node->body()); |
288 } | 288 } |
289 | 289 |
290 | 290 |
291 void AstNumberingVisitor::VisitTryCatchStatement(TryCatchStatement* node) { | 291 void AstNumberingVisitor::VisitTryCatchStatement(TryCatchStatement* node) { |
292 IncrementNodeCount(); | 292 IncrementNodeCount(); |
293 DisableCrankshaft(kTryCatchStatement); | 293 DisableOptimization(kTryCatchStatement); |
294 node->set_base_id(ReserveIdRange(TryCatchStatement::num_ids())); | 294 node->set_base_id(ReserveIdRange(TryCatchStatement::num_ids())); |
295 Visit(node->try_block()); | 295 Visit(node->try_block()); |
296 Visit(node->catch_block()); | 296 Visit(node->catch_block()); |
297 } | 297 } |
298 | 298 |
299 | 299 |
300 void AstNumberingVisitor::VisitTryFinallyStatement(TryFinallyStatement* node) { | 300 void AstNumberingVisitor::VisitTryFinallyStatement(TryFinallyStatement* node) { |
301 IncrementNodeCount(); | 301 IncrementNodeCount(); |
302 DisableOptimization(kTryFinallyStatement); | 302 DisableOptimization(kTryFinallyStatement); |
303 node->set_base_id(ReserveIdRange(TryFinallyStatement::num_ids())); | 303 node->set_base_id(ReserveIdRange(TryFinallyStatement::num_ids())); |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
550 } | 550 } |
551 | 551 |
552 | 552 |
553 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone, | 553 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone, |
554 FunctionLiteral* function) { | 554 FunctionLiteral* function) { |
555 AstNumberingVisitor visitor(isolate, zone); | 555 AstNumberingVisitor visitor(isolate, zone); |
556 return visitor.Renumber(function); | 556 return visitor.Renumber(function); |
557 } | 557 } |
558 } // namespace internal | 558 } // namespace internal |
559 } // namespace v8 | 559 } // namespace v8 |
OLD | NEW |