Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(334)

Unified Diff: src/ast-numbering.cc

Issue 1155503002: [turbofan] Prepare mechanism to enable TF on language subset. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix think'o! Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ast.h ('k') | src/compiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
« no previous file with comments | « src/ast.h ('k') | src/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698