Index: src/ast-numbering.cc |
diff --git a/src/ast-numbering.cc b/src/ast-numbering.cc |
index 13d8bf8a34f9f450a90a6a7ed02ea2c5aab7ef44..68dc65a79d35a4516796029d6293fc21d8f2fc87 100644 |
--- a/src/ast-numbering.cc |
+++ b/src/ast-numbering.cc |
@@ -52,6 +52,13 @@ class AstNumberingVisitor final : public AstVisitor { |
dont_optimize_reason_ = reason; |
DisableSelfOptimization(); |
} |
+ void DisableCrankshaft(BailoutReason reason) { |
+ if (FLAG_turbo_shipping) { |
+ return properties_.flags()->Add(kDontCrankshaft); |
+ } |
+ dont_optimize_reason_ = reason; |
+ DisableSelfOptimization(); |
+ } |
void DisableCaching(BailoutReason reason) { |
dont_optimize_reason_ = reason; |
DisableSelfOptimization(); |
@@ -148,7 +155,7 @@ void AstNumberingVisitor::VisitRegExpLiteral(RegExpLiteral* node) { |
void AstNumberingVisitor::VisitVariableProxy(VariableProxy* node) { |
IncrementNodeCount(); |
if (node->var()->IsLookupSlot()) { |
- DisableOptimization(kReferenceToAVariableWhichRequiresDynamicLookup); |
+ DisableCrankshaft(kReferenceToAVariableWhichRequiresDynamicLookup); |
} |
ReserveFeedbackSlots(node); |
node->set_base_id(ReserveIdRange(VariableProxy::num_ids())); |
@@ -249,7 +256,7 @@ void AstNumberingVisitor::VisitCallRuntime(CallRuntime* node) { |
void AstNumberingVisitor::VisitWithStatement(WithStatement* node) { |
IncrementNodeCount(); |
- DisableOptimization(kWithStatement); |
+ DisableCrankshaft(kWithStatement); |
node->set_base_id(ReserveIdRange(WithStatement::num_ids())); |
Visit(node->expression()); |
Visit(node->statement()); |
@@ -344,7 +351,7 @@ void AstNumberingVisitor::VisitForInStatement(ForInStatement* node) { |
void AstNumberingVisitor::VisitForOfStatement(ForOfStatement* node) { |
IncrementNodeCount(); |
- DisableOptimization(kForOfStatement); |
+ DisableCrankshaft(kForOfStatement); |
node->set_base_id(ReserveIdRange(ForOfStatement::num_ids())); |
Visit(node->assign_iterator()); |
Visit(node->next_result()); |
@@ -511,7 +518,7 @@ bool AstNumberingVisitor::Renumber(FunctionLiteral* node) { |
} |
if (scope->calls_eval()) DisableOptimization(kFunctionCallsEval); |
if (scope->arguments() != NULL && !scope->arguments()->IsStackAllocated()) { |
- DisableOptimization(kContextAllocatedArguments); |
+ DisableCrankshaft(kContextAllocatedArguments); |
} |
VisitDeclarations(scope->declarations()); |