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 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 VisitVariableProxy(node->proxy()); | 261 VisitVariableProxy(node->proxy()); |
262 VisitFunctionLiteral(node->fun()); | 262 VisitFunctionLiteral(node->fun()); |
263 } | 263 } |
264 | 264 |
265 | 265 |
266 void AstNumberingVisitor::VisitCallRuntime(CallRuntime* node) { | 266 void AstNumberingVisitor::VisitCallRuntime(CallRuntime* node) { |
267 IncrementNodeCount(); | 267 IncrementNodeCount(); |
268 ReserveFeedbackSlots(node); | 268 ReserveFeedbackSlots(node); |
269 if (node->is_jsruntime()) { | 269 if (node->is_jsruntime()) { |
270 // Don't try to optimize JS runtime calls because we bailout on them. | 270 // Don't try to optimize JS runtime calls because we bailout on them. |
271 DisableOptimization(kCallToAJavaScriptRuntimeFunction); | 271 DisableCrankshaft(kCallToAJavaScriptRuntimeFunction); |
272 } | 272 } |
273 node->set_base_id(ReserveIdRange(CallRuntime::num_ids())); | 273 node->set_base_id(ReserveIdRange(CallRuntime::num_ids())); |
274 VisitArguments(node->arguments()); | 274 VisitArguments(node->arguments()); |
275 } | 275 } |
276 | 276 |
277 | 277 |
278 void AstNumberingVisitor::VisitWithStatement(WithStatement* node) { | 278 void AstNumberingVisitor::VisitWithStatement(WithStatement* node) { |
279 IncrementNodeCount(); | 279 IncrementNodeCount(); |
280 DisableCrankshaft(kWithStatement); | 280 DisableCrankshaft(kWithStatement); |
281 node->set_base_id(ReserveIdRange(WithStatement::num_ids())); | 281 node->set_base_id(ReserveIdRange(WithStatement::num_ids())); |
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
591 } | 591 } |
592 | 592 |
593 | 593 |
594 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone, | 594 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone, |
595 FunctionLiteral* function) { | 595 FunctionLiteral* function) { |
596 AstNumberingVisitor visitor(isolate, zone); | 596 AstNumberingVisitor visitor(isolate, zone); |
597 return visitor.Renumber(function); | 597 return visitor.Renumber(function); |
598 } | 598 } |
599 } // namespace internal | 599 } // namespace internal |
600 } // namespace v8 | 600 } // namespace v8 |
OLD | NEW |