[turbofan] --turbo implies --turbo-type-feedback and disable fast properties.
authortitzer <titzer@chromium.org>
Tue, 21 Apr 2015 17:05:19 +0000 (10:05 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 21 Apr 2015 17:05:07 +0000 (17:05 +0000)
Note: can't be landed until LoadProperty => LoadNamed is fixed.

R=mstarzinger@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27979}

src/compiler/js-type-feedback.cc
src/flag-definitions.h

index a9e0e22203e1d982481a837efe67d780eccd4e01..69e3a2c3fc5d583d8c8dc3857109ea1b3cfc8677 100644 (file)
@@ -23,6 +23,8 @@ namespace compiler {
 
 enum LoadOrStore { LOAD, STORE };
 
+#define EAGER_DEOPT_LOCATIONS_FOR_PROPERTY_ACCESS_ARE_CORRECT false
+
 JSTypeFeedbackTable::JSTypeFeedbackTable(Zone* zone)
     : map_(TypeFeedbackIdMap::key_compare(),
            TypeFeedbackIdMap::allocator_type(zone)) {}
@@ -148,6 +150,8 @@ Reduction JSTypeFeedbackSpecializer::ReduceJSLoadNamed(Node* node) {
   DCHECK(node->opcode() == IrOpcode::kJSLoadNamed);
   // TODO(turbofan): type feedback currently requires deoptimization.
   if (!FLAG_turbo_deoptimization) return NoChange();
+  // TODO(titzer): deopt locations are wrong for property accesses
+  if (!EAGER_DEOPT_LOCATIONS_FOR_PROPERTY_ACCESS_ARE_CORRECT) return NoChange();
 
   // TODO(turbofan): handle vector-based type feedback.
   TypeFeedbackId id = js_type_feedback_->find(node);
@@ -200,6 +204,8 @@ Reduction JSTypeFeedbackSpecializer::ReduceJSStoreNamed(Node* node) {
   DCHECK(node->opcode() == IrOpcode::kJSStoreNamed);
   // TODO(turbofan): type feedback currently requires deoptimization.
   if (!FLAG_turbo_deoptimization) return NoChange();
+  // TODO(titzer): deopt locations are wrong for property accesses
+  if (!EAGER_DEOPT_LOCATIONS_FOR_PROPERTY_ACCESS_ARE_CORRECT) return NoChange();
 
   TypeFeedbackId id = js_type_feedback_->find(node);
   if (id.IsNone() || oracle()->StoreIsUninitialized(id)) return NoChange();
index 3b6786a075b0ddef3ec9f9a45aac919f3f6a8a57..ff3a481d8d7958a4901aee5c8bffceb8e7934e0a 100644 (file)
@@ -382,6 +382,7 @@ DEFINE_BOOL(omit_map_checks_for_leaf_maps, true,
 // Flags for TurboFan.
 DEFINE_BOOL(turbo, false, "enable TurboFan compiler")
 DEFINE_IMPLICATION(turbo, turbo_deoptimization)
+DEFINE_IMPLICATION(turbo, turbo_type_feedback)
 DEFINE_STRING(turbo_filter, "~~", "optimization filter for TurboFan compiler")
 DEFINE_BOOL(trace_turbo, false, "trace generated TurboFan IR")
 DEFINE_BOOL(trace_turbo_graph, false, "trace generated TurboFan graphs")