Skip to content

Commit

Permalink
[turbofan] --turbo implies --turbo-type-feedback and disable fast pro…
Browse files Browse the repository at this point in the history
…perties.

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}
  • Loading branch information
titzer authored and Commit bot committed Apr 21, 2015
1 parent 79a0e73 commit cfe6249
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/compiler/js-type-feedback.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {}
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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();
Expand Down
1 change: 1 addition & 0 deletions src/flag-definitions.h
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit cfe6249

Please sign in to comment.