From cfe6249da2269c2fc4a72bd84cfe00497a24e9ae Mon Sep 17 00:00:00 2001 From: titzer Date: Tue, 21 Apr 2015 10:05:19 -0700 Subject: [PATCH] [turbofan] --turbo implies --turbo-type-feedback and disable fast properties. 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 | 6 ++++++ src/flag-definitions.h | 1 + 2 files changed, 7 insertions(+) diff --git a/src/compiler/js-type-feedback.cc b/src/compiler/js-type-feedback.cc index a9e0e22..69e3a2c 100644 --- a/src/compiler/js-type-feedback.cc +++ b/src/compiler/js-type-feedback.cc @@ -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(); diff --git a/src/flag-definitions.h b/src/flag-definitions.h index 3b6786a..ff3a481 100644 --- a/src/flag-definitions.h +++ b/src/flag-definitions.h @@ -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") -- 2.7.4