Chromium Code Reviews| 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 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 289 } | 289 } |
| 290 | 290 |
| 291 | 291 |
| 292 void AstNumberingVisitor::VisitCallRuntime(CallRuntime* node) { | 292 void AstNumberingVisitor::VisitCallRuntime(CallRuntime* node) { |
| 293 IncrementNodeCount(); | 293 IncrementNodeCount(); |
| 294 ReserveFeedbackSlots(node); | 294 ReserveFeedbackSlots(node); |
| 295 if (node->is_jsruntime()) { | 295 if (node->is_jsruntime()) { |
| 296 // Don't try to optimize JS runtime calls because we bailout on them. | 296 // Don't try to optimize JS runtime calls because we bailout on them. |
| 297 DisableCrankshaft(kCallToAJavaScriptRuntimeFunction); | 297 DisableCrankshaft(kCallToAJavaScriptRuntimeFunction); |
| 298 } | 298 } |
| 299 const Runtime::Function* function = node->function(); | |
| 300 if (function != NULL && function->intrinsic_type == Runtime::INLINE) { | |
|
Michael Starzinger (Google)
2015/01/14 20:42:22
OMG, pretty please don't. Is this known to fix the
| |
| 301 switch (function->function_id) { | |
| 302 case Runtime::kInlineGeneratorNext: | |
| 303 DisableCrankshaft(kInlinedRuntimeFunctionGeneratorNext); | |
| 304 break; | |
| 305 case Runtime::kInlineGeneratorThrow: | |
| 306 DisableCrankshaft(kInlinedRuntimeFunctionGeneratorThrow); | |
| 307 break; | |
| 308 default: | |
| 309 break; | |
| 310 } | |
| 311 } | |
| 299 node->set_base_id(ReserveIdRange(CallRuntime::num_ids())); | 312 node->set_base_id(ReserveIdRange(CallRuntime::num_ids())); |
| 300 VisitArguments(node->arguments()); | 313 VisitArguments(node->arguments()); |
| 301 } | 314 } |
| 302 | 315 |
| 303 | 316 |
| 304 void AstNumberingVisitor::VisitWithStatement(WithStatement* node) { | 317 void AstNumberingVisitor::VisitWithStatement(WithStatement* node) { |
| 305 IncrementNodeCount(); | 318 IncrementNodeCount(); |
| 306 DisableCrankshaft(kWithStatement); | 319 DisableCrankshaft(kWithStatement); |
| 307 Visit(node->expression()); | 320 Visit(node->expression()); |
| 308 Visit(node->statement()); | 321 Visit(node->statement()); |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 569 return Finish(node); | 582 return Finish(node); |
| 570 } | 583 } |
| 571 | 584 |
| 572 | 585 |
| 573 bool AstNumbering::Renumber(FunctionLiteral* function, Zone* zone) { | 586 bool AstNumbering::Renumber(FunctionLiteral* function, Zone* zone) { |
| 574 AstNumberingVisitor visitor(zone); | 587 AstNumberingVisitor visitor(zone); |
| 575 return visitor.Renumber(function); | 588 return visitor.Renumber(function); |
| 576 } | 589 } |
| 577 } | 590 } |
| 578 } // namespace v8::internal | 591 } // namespace v8::internal |
| OLD | NEW |