| 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/compiler.h" | 9 #include "src/compiler.h" | 
| 10 #include "src/scopes.h" | 10 #include "src/scopes.h" | 
| (...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 284     DisableOptimization(kCallToAJavaScriptRuntimeFunction); | 284     DisableOptimization(kCallToAJavaScriptRuntimeFunction); | 
| 285   } | 285   } | 
| 286   node->set_base_id(ReserveIdRange(CallRuntime::num_ids())); | 286   node->set_base_id(ReserveIdRange(CallRuntime::num_ids())); | 
| 287   VisitArguments(node->arguments()); | 287   VisitArguments(node->arguments()); | 
| 288 } | 288 } | 
| 289 | 289 | 
| 290 | 290 | 
| 291 void AstNumberingVisitor::VisitWithStatement(WithStatement* node) { | 291 void AstNumberingVisitor::VisitWithStatement(WithStatement* node) { | 
| 292   IncrementNodeCount(); | 292   IncrementNodeCount(); | 
| 293   DisableOptimization(kWithStatement); | 293   DisableOptimization(kWithStatement); | 
|  | 294   node->set_base_id(ReserveIdRange(WithStatement::num_ids())); | 
| 294   Visit(node->expression()); | 295   Visit(node->expression()); | 
| 295   Visit(node->statement()); | 296   Visit(node->statement()); | 
| 296 } | 297 } | 
| 297 | 298 | 
| 298 | 299 | 
| 299 void AstNumberingVisitor::VisitDoWhileStatement(DoWhileStatement* node) { | 300 void AstNumberingVisitor::VisitDoWhileStatement(DoWhileStatement* node) { | 
| 300   IncrementNodeCount(); | 301   IncrementNodeCount(); | 
| 301   DisableSelfOptimization(); | 302   DisableSelfOptimization(); | 
| 302   node->set_base_id(ReserveIdRange(DoWhileStatement::num_ids())); | 303   node->set_base_id(ReserveIdRange(DoWhileStatement::num_ids())); | 
| 303   Visit(node->body()); | 304   Visit(node->body()); | 
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 557   return Finish(node); | 558   return Finish(node); | 
| 558 } | 559 } | 
| 559 | 560 | 
| 560 | 561 | 
| 561 bool AstNumbering::Renumber(FunctionLiteral* function, Zone* zone) { | 562 bool AstNumbering::Renumber(FunctionLiteral* function, Zone* zone) { | 
| 562   AstNumberingVisitor visitor(zone); | 563   AstNumberingVisitor visitor(zone); | 
| 563   return visitor.Renumber(function); | 564   return visitor.Renumber(function); | 
| 564 } | 565 } | 
| 565 } | 566 } | 
| 566 }  // namespace v8::internal | 567 }  // namespace v8::internal | 
| OLD | NEW | 
|---|