Exact black-list of AST nodes for TurboFan.
authormstarzinger@chromium.org <mstarzinger@chromium.org>
Mon, 15 Sep 2014 15:06:05 +0000 (15:06 +0000)
committermstarzinger@chromium.org <mstarzinger@chromium.org>
Mon, 15 Sep 2014 15:06:05 +0000 (15:06 +0000)
R=rossberg@chromium.org

Review URL: https://codereview.chromium.org/564203003

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23953 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/ast.cc
src/ast.h
test/cctest/cctest.status
test/mjsunit/mjsunit.status
test/mozilla/mozilla.status
test/webkit/webkit.status

index ab9050d..66d02e5 100644 (file)
@@ -997,45 +997,52 @@ CaseClause::CaseClause(Zone* zone, Expression* label,
       entry_id_(id_gen->GetNextId()) {}
 
 
-#define REGULAR_NODE(NodeType) \
+#define REGULAR_NODE(NodeType)                                   \
   void AstConstructionVisitor::Visit##NodeType(NodeType* node) { \
-    increase_node_count(); \
+    increase_node_count();                                       \
   }
-#define REGULAR_NODE_WITH_FEEDBACK_SLOTS(NodeType) \
+#define REGULAR_NODE_WITH_FEEDBACK_SLOTS(NodeType)               \
   void AstConstructionVisitor::Visit##NodeType(NodeType* node) { \
-    increase_node_count(); \
-    add_slot_node(node); \
+    increase_node_count();                                       \
+    add_slot_node(node);                                         \
   }
-#define DONT_OPTIMIZE_NODE(NodeType) \
+#define DONT_OPTIMIZE_NODE(NodeType)                             \
   void AstConstructionVisitor::Visit##NodeType(NodeType* node) { \
-    increase_node_count(); \
-    set_dont_optimize_reason(k##NodeType); \
-    add_flag(kDontSelfOptimize); \
+    increase_node_count();                                       \
+    set_dont_crankshaft_reason(k##NodeType);                     \
+    add_flag(kDontSelfOptimize);                                 \
   }
-#define DONT_OPTIMIZE_NODE_WITH_FEEDBACK_SLOTS(NodeType) \
+#define DONT_OPTIMIZE_NODE_WITH_FEEDBACK_SLOTS(NodeType)         \
   void AstConstructionVisitor::Visit##NodeType(NodeType* node) { \
-    increase_node_count(); \
-    add_slot_node(node); \
-    set_dont_optimize_reason(k##NodeType); \
-    add_flag(kDontSelfOptimize); \
+    increase_node_count();                                       \
+    add_slot_node(node);                                         \
+    set_dont_crankshaft_reason(k##NodeType);                     \
+    add_flag(kDontSelfOptimize);                                 \
+  }
+#define DONT_TURBOFAN_NODE(NodeType)                             \
+  void AstConstructionVisitor::Visit##NodeType(NodeType* node) { \
+    increase_node_count();                                       \
+    set_dont_crankshaft_reason(k##NodeType);                     \
+    set_dont_turbofan_reason(k##NodeType);                       \
+    add_flag(kDontSelfOptimize);                                 \
   }
 #define DONT_SELFOPTIMIZE_NODE(NodeType)                         \
   void AstConstructionVisitor::Visit##NodeType(NodeType* node) { \
-    increase_node_count(); \
-    add_flag(kDontSelfOptimize); \
+    increase_node_count();                                       \
+    add_flag(kDontSelfOptimize);                                 \
   }
-#define DONT_SELFOPTIMIZE_NODE_WITH_FEEDBACK_SLOTS(NodeType) \
+#define DONT_SELFOPTIMIZE_NODE_WITH_FEEDBACK_SLOTS(NodeType)     \
   void AstConstructionVisitor::Visit##NodeType(NodeType* node) { \
-    increase_node_count(); \
-    add_slot_node(node); \
-    add_flag(kDontSelfOptimize); \
+    increase_node_count();                                       \
+    add_slot_node(node);                                         \
+    add_flag(kDontSelfOptimize);                                 \
   }
-#define DONT_CACHE_NODE(NodeType) \
+#define DONT_CACHE_NODE(NodeType)                                \
   void AstConstructionVisitor::Visit##NodeType(NodeType* node) { \
-    increase_node_count(); \
-    set_dont_optimize_reason(k##NodeType); \
-    add_flag(kDontSelfOptimize); \
-    add_flag(kDontCache); \
+    increase_node_count();                                       \
+    set_dont_crankshaft_reason(k##NodeType);                     \
+    add_flag(kDontSelfOptimize);                                 \
+    add_flag(kDontCache);                                        \
   }
 
 REGULAR_NODE(VariableDeclaration)
@@ -1082,15 +1089,17 @@ DONT_OPTIMIZE_NODE(ModulePath)
 DONT_OPTIMIZE_NODE(ModuleUrl)
 DONT_OPTIMIZE_NODE(ModuleStatement)
 DONT_OPTIMIZE_NODE(WithStatement)
-DONT_OPTIMIZE_NODE(ForOfStatement)
-DONT_OPTIMIZE_NODE(TryCatchStatement)
-DONT_OPTIMIZE_NODE(TryFinallyStatement)
 DONT_OPTIMIZE_NODE(DebuggerStatement)
 DONT_OPTIMIZE_NODE(NativeFunctionLiteral)
 DONT_OPTIMIZE_NODE(SuperReference)
 
 DONT_OPTIMIZE_NODE_WITH_FEEDBACK_SLOTS(Yield)
 
+// TODO(turbofan): Remove the dont_turbofan_reason once this list is empty.
+DONT_TURBOFAN_NODE(ForOfStatement)
+DONT_TURBOFAN_NODE(TryCatchStatement)
+DONT_TURBOFAN_NODE(TryFinallyStatement)
+
 DONT_SELFOPTIMIZE_NODE(DoWhileStatement)
 DONT_SELFOPTIMIZE_NODE(WhileStatement)
 DONT_SELFOPTIMIZE_NODE(ForStatement)
@@ -1105,7 +1114,7 @@ void AstConstructionVisitor::VisitCallRuntime(CallRuntime* node) {
   add_slot_node(node);
   if (node->is_jsruntime()) {
     // Don't try to optimize JS runtime calls because we bailout on them.
-    set_dont_optimize_reason(kCallToAJavaScriptRuntimeFunction);
+    set_dont_crankshaft_reason(kCallToAJavaScriptRuntimeFunction);
   }
 }
 
index c5a924c..2e3b360 100644 (file)
--- a/src/ast.h
+++ b/src/ast.h
@@ -2973,10 +2973,17 @@ private:                                                            \
 
 class AstConstructionVisitor BASE_EMBEDDED {
  public:
-  AstConstructionVisitor() : dont_optimize_reason_(kNoReason) { }
+  AstConstructionVisitor()
+      : dont_crankshaft_reason_(kNoReason), dont_turbofan_reason_(kNoReason) {}
 
   AstProperties* ast_properties() { return &properties_; }
-  BailoutReason dont_optimize_reason() { return dont_optimize_reason_; }
+  BailoutReason dont_optimize_reason() {
+    if (dont_turbofan_reason_ != kNoReason) {
+      return dont_turbofan_reason_;
+    } else {
+      return dont_crankshaft_reason_;
+    }
+  }
 
  private:
   template<class> friend class AstNodeFactory;
@@ -2989,8 +2996,11 @@ class AstConstructionVisitor BASE_EMBEDDED {
 
   void increase_node_count() { properties_.add_node_count(1); }
   void add_flag(AstPropertiesFlag flag) { properties_.flags()->Add(flag); }
-  void set_dont_optimize_reason(BailoutReason reason) {
-      dont_optimize_reason_ = reason;
+  void set_dont_crankshaft_reason(BailoutReason reason) {
+    dont_crankshaft_reason_ = reason;
+  }
+  void set_dont_turbofan_reason(BailoutReason reason) {
+    dont_turbofan_reason_ = reason;
   }
 
   void add_slot_node(FeedbackSlotInterface* slot_node) {
@@ -3002,7 +3012,8 @@ class AstConstructionVisitor BASE_EMBEDDED {
   }
 
   AstProperties properties_;
-  BailoutReason dont_optimize_reason_;
+  BailoutReason dont_crankshaft_reason_;
+  BailoutReason dont_turbofan_reason_;
 };
 
 
index 634bcbb..45c8976 100644 (file)
   # Scheduler cannot handle free-floating loops yet
   'test-run-inlining/InlineLoop': [SKIP],
 
-  # TODO(mstarzinger): Sometimes the try-catch blacklist fails.
-  'test-debug/DebugEvaluateWithoutStack': [PASS, NO_VARIANTS],
-  'test-debug/MessageQueues': [PASS, NO_VARIANTS],
-  'test-debug/NestedBreakEventContextData': [PASS, NO_VARIANTS],
-  'test-debug/SendClientDataToHandler': [PASS, NO_VARIANTS],
-
   # TODO(dcarney): C calls are broken all over the place.
   'test-run-machops/RunCall*': [SKIP],
   'test-run-machops/RunLoadImmIndex': [SKIP],
index d131298..8013fd2 100644 (file)
   # from the deoptimizer to do that.
   'arguments-indirect': [PASS, NO_VARIANTS],
 
-  # TODO(mstarzinger): Sometimes the try-catch blacklist fails.
-  'debug-references': [PASS, NO_VARIANTS],
-  'regress/regress-263': [PASS, NO_VARIANTS],
-
   # TODO(rossberg): Typer doesn't like contexts very much.
   'harmony/block-conflicts': [PASS, NO_VARIANTS],
   'harmony/block-for': [PASS, NO_VARIANTS],
index 592f762..e9f58c6 100644 (file)
@@ -56,7 +56,6 @@
   # TODO(turbofan): These are all covered by mjsunit as well. Enable them once
   # we pass 'mjsunit' and 'webkit' with TurboFan.
   'js1_4/Functions/function-001': [PASS, NO_VARIANTS],
-  'js1_5/Regress/regress-104077': [PASS, NO_VARIANTS],
   'js1_5/Regress/regress-396684': [PASS, NO_VARIANTS],
   'js1_5/Regress/regress-80981': [PASS, NO_VARIANTS],
 
index c14d5c1..3bb6574 100644 (file)
@@ -33,8 +33,6 @@
   'dfg-inline-arguments-become-int32': [PASS, FAIL],
   'dfg-inline-arguments-reset': [PASS, FAIL],
   'dfg-inline-arguments-reset-changetype': [PASS, FAIL],
-  # TODO(turbofan): Sometimes the try-catch blacklist fails.
-  'exception-with-handler-inside-eval-with-dynamic-scope': [PASS, NO_VARIANTS],
   # TODO(turbofan): We run out of stack earlier on 64-bit for now.
   'fast/js/deep-recursion-test': [PASS, NO_VARIANTS],
   # TODO(bmeurer,svenpanne): Investigate test failure.