Commit bb20d7ae authored by bmeurer's avatar bmeurer Committed by Commit bot

[turbofan] Unify NamedAccess and PropertyAccess operator parameters.

Use a unified NamedAccess operator parameter for both JSLoadNamed and
JSStoreNamed, and similar use PropertyAccess for both JSLoadProperty and
JSStoreProperty.

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

Cr-Commit-Position: refs/heads/master@{#31456}
parent b7985aae
...@@ -3614,7 +3614,7 @@ static inline Node* Record(JSTypeFeedbackTable* js_type_feedback, Node* node, ...@@ -3614,7 +3614,7 @@ static inline Node* Record(JSTypeFeedbackTable* js_type_feedback, Node* node,
Node* AstGraphBuilder::BuildKeyedLoad(Node* object, Node* key, Node* AstGraphBuilder::BuildKeyedLoad(Node* object, Node* key,
const VectorSlotPair& feedback) { const VectorSlotPair& feedback) {
const Operator* op = javascript()->LoadProperty(feedback, language_mode()); const Operator* op = javascript()->LoadProperty(language_mode(), feedback);
Node* node = NewNode(op, object, key, BuildLoadFeedbackVector()); Node* node = NewNode(op, object, key, BuildLoadFeedbackVector());
return Record(js_type_feedback_, node, feedback.slot()); return Record(js_type_feedback_, node, feedback.slot());
} }
...@@ -3622,7 +3622,7 @@ Node* AstGraphBuilder::BuildKeyedLoad(Node* object, Node* key, ...@@ -3622,7 +3622,7 @@ Node* AstGraphBuilder::BuildKeyedLoad(Node* object, Node* key,
Node* AstGraphBuilder::BuildNamedLoad(Node* object, Handle<Name> name, Node* AstGraphBuilder::BuildNamedLoad(Node* object, Handle<Name> name,
const VectorSlotPair& feedback) { const VectorSlotPair& feedback) {
const Operator* op = javascript()->LoadNamed(name, feedback, language_mode()); const Operator* op = javascript()->LoadNamed(language_mode(), name, feedback);
Node* node = NewNode(op, object, BuildLoadFeedbackVector()); Node* node = NewNode(op, object, BuildLoadFeedbackVector());
return Record(js_type_feedback_, node, feedback.slot()); return Record(js_type_feedback_, node, feedback.slot());
} }
......
...@@ -286,7 +286,7 @@ void JSGenericLowering::LowerJSToObject(Node* node) { ...@@ -286,7 +286,7 @@ void JSGenericLowering::LowerJSToObject(Node* node) {
void JSGenericLowering::LowerJSLoadProperty(Node* node) { void JSGenericLowering::LowerJSLoadProperty(Node* node) {
CallDescriptor::Flags flags = AdjustFrameStatesForCall(node); CallDescriptor::Flags flags = AdjustFrameStatesForCall(node);
const LoadPropertyParameters& p = LoadPropertyParametersOf(node->op()); const PropertyAccess& p = PropertyAccessOf(node->op());
Callable callable = CodeFactory::KeyedLoadICInOptimizedCode( Callable callable = CodeFactory::KeyedLoadICInOptimizedCode(
isolate(), p.language_mode(), UNINITIALIZED); isolate(), p.language_mode(), UNINITIALIZED);
node->InsertInput(zone(), 2, jsgraph()->SmiConstant(p.feedback().index())); node->InsertInput(zone(), 2, jsgraph()->SmiConstant(p.feedback().index()));
...@@ -296,7 +296,7 @@ void JSGenericLowering::LowerJSLoadProperty(Node* node) { ...@@ -296,7 +296,7 @@ void JSGenericLowering::LowerJSLoadProperty(Node* node) {
void JSGenericLowering::LowerJSLoadNamed(Node* node) { void JSGenericLowering::LowerJSLoadNamed(Node* node) {
CallDescriptor::Flags flags = AdjustFrameStatesForCall(node); CallDescriptor::Flags flags = AdjustFrameStatesForCall(node);
const LoadNamedParameters& p = LoadNamedParametersOf(node->op()); NamedAccess const& p = NamedAccessOf(node->op());
Callable callable = CodeFactory::LoadICInOptimizedCode( Callable callable = CodeFactory::LoadICInOptimizedCode(
isolate(), NOT_INSIDE_TYPEOF, p.language_mode(), UNINITIALIZED); isolate(), NOT_INSIDE_TYPEOF, p.language_mode(), UNINITIALIZED);
node->InsertInput(zone(), 1, jsgraph()->HeapConstant(p.name())); node->InsertInput(zone(), 1, jsgraph()->HeapConstant(p.name()));
...@@ -330,7 +330,7 @@ void JSGenericLowering::LowerJSLoadGlobal(Node* node) { ...@@ -330,7 +330,7 @@ void JSGenericLowering::LowerJSLoadGlobal(Node* node) {
void JSGenericLowering::LowerJSStoreProperty(Node* node) { void JSGenericLowering::LowerJSStoreProperty(Node* node) {
CallDescriptor::Flags flags = AdjustFrameStatesForCall(node); CallDescriptor::Flags flags = AdjustFrameStatesForCall(node);
const StorePropertyParameters& p = StorePropertyParametersOf(node->op()); PropertyAccess const& p = PropertyAccessOf(node->op());
LanguageMode language_mode = p.language_mode(); LanguageMode language_mode = p.language_mode();
Callable callable = CodeFactory::KeyedStoreICInOptimizedCode( Callable callable = CodeFactory::KeyedStoreICInOptimizedCode(
isolate(), language_mode, UNINITIALIZED); isolate(), language_mode, UNINITIALIZED);
...@@ -347,7 +347,7 @@ void JSGenericLowering::LowerJSStoreProperty(Node* node) { ...@@ -347,7 +347,7 @@ void JSGenericLowering::LowerJSStoreProperty(Node* node) {
void JSGenericLowering::LowerJSStoreNamed(Node* node) { void JSGenericLowering::LowerJSStoreNamed(Node* node) {
CallDescriptor::Flags flags = AdjustFrameStatesForCall(node); CallDescriptor::Flags flags = AdjustFrameStatesForCall(node);
const StoreNamedParameters& p = StoreNamedParametersOf(node->op()); NamedAccess const& p = NamedAccessOf(node->op());
Callable callable = CodeFactory::StoreICInOptimizedCode( Callable callable = CodeFactory::StoreICInOptimizedCode(
isolate(), p.language_mode(), UNINITIALIZED); isolate(), p.language_mode(), UNINITIALIZED);
node->InsertInput(zone(), 1, jsgraph()->HeapConstant(p.name())); node->InsertInput(zone(), 1, jsgraph()->HeapConstant(p.name()));
......
...@@ -428,7 +428,7 @@ bool JSNativeContextSpecialization::ComputePropertyAccessInfos( ...@@ -428,7 +428,7 @@ bool JSNativeContextSpecialization::ComputePropertyAccessInfos(
Reduction JSNativeContextSpecialization::ReduceJSLoadNamed(Node* node) { Reduction JSNativeContextSpecialization::ReduceJSLoadNamed(Node* node) {
DCHECK_EQ(IrOpcode::kJSLoadNamed, node->opcode()); DCHECK_EQ(IrOpcode::kJSLoadNamed, node->opcode());
LoadNamedParameters const p = LoadNamedParametersOf(node->op()); NamedAccess const& p = NamedAccessOf(node->op());
Handle<Name> name = p.name(); Handle<Name> name = p.name();
Node* receiver = NodeProperties::GetValueInput(node, 0); Node* receiver = NodeProperties::GetValueInput(node, 0);
Node* frame_state = NodeProperties::GetFrameStateInput(node, 1); Node* frame_state = NodeProperties::GetFrameStateInput(node, 1);
......
...@@ -205,66 +205,64 @@ DynamicContextAccess const& DynamicContextAccessOf(Operator const* op) { ...@@ -205,66 +205,64 @@ DynamicContextAccess const& DynamicContextAccessOf(Operator const* op) {
} }
bool operator==(LoadNamedParameters const& lhs, bool operator==(NamedAccess const& lhs, NamedAccess const& rhs) {
LoadNamedParameters const& rhs) {
return lhs.name().location() == rhs.name().location() && return lhs.name().location() == rhs.name().location() &&
lhs.language_mode() == rhs.language_mode() && lhs.language_mode() == rhs.language_mode() &&
lhs.feedback() == rhs.feedback(); lhs.feedback() == rhs.feedback();
} }
bool operator!=(LoadNamedParameters const& lhs, bool operator!=(NamedAccess const& lhs, NamedAccess const& rhs) {
LoadNamedParameters const& rhs) {
return !(lhs == rhs); return !(lhs == rhs);
} }
size_t hash_value(LoadNamedParameters const& p) { size_t hash_value(NamedAccess const& p) {
return base::hash_combine(p.name().location(), p.language_mode(), return base::hash_combine(p.name().location(), p.language_mode(),
p.feedback()); p.feedback());
} }
std::ostream& operator<<(std::ostream& os, LoadNamedParameters const& p) { std::ostream& operator<<(std::ostream& os, NamedAccess const& p) {
return os << Brief(*p.name()) << ", " << p.language_mode(); return os << Brief(*p.name()) << ", " << p.language_mode();
} }
std::ostream& operator<<(std::ostream& os, LoadPropertyParameters const& p) { NamedAccess const& NamedAccessOf(const Operator* op) {
DCHECK(op->opcode() == IrOpcode::kJSLoadNamed ||
op->opcode() == IrOpcode::kJSStoreNamed);
return OpParameter<NamedAccess>(op);
}
std::ostream& operator<<(std::ostream& os, PropertyAccess const& p) {
return os << p.language_mode(); return os << p.language_mode();
} }
bool operator==(LoadPropertyParameters const& lhs, bool operator==(PropertyAccess const& lhs, PropertyAccess const& rhs) {
LoadPropertyParameters const& rhs) {
return lhs.language_mode() == rhs.language_mode() && return lhs.language_mode() == rhs.language_mode() &&
lhs.feedback() == rhs.feedback(); lhs.feedback() == rhs.feedback();
} }
bool operator!=(LoadPropertyParameters const& lhs, bool operator!=(PropertyAccess const& lhs, PropertyAccess const& rhs) {
LoadPropertyParameters const& rhs) {
return !(lhs == rhs); return !(lhs == rhs);
} }
const LoadPropertyParameters& LoadPropertyParametersOf(const Operator* op) { PropertyAccess const& PropertyAccessOf(const Operator* op) {
DCHECK_EQ(IrOpcode::kJSLoadProperty, op->opcode()); DCHECK(op->opcode() == IrOpcode::kJSLoadProperty ||
return OpParameter<LoadPropertyParameters>(op); op->opcode() == IrOpcode::kJSStoreProperty);
return OpParameter<PropertyAccess>(op);
} }
size_t hash_value(LoadPropertyParameters const& p) { size_t hash_value(PropertyAccess const& p) {
return base::hash_combine(p.language_mode(), p.feedback()); return base::hash_combine(p.language_mode(), p.feedback());
} }
const LoadNamedParameters& LoadNamedParametersOf(const Operator* op) {
DCHECK_EQ(IrOpcode::kJSLoadNamed, op->opcode());
return OpParameter<LoadNamedParameters>(op);
}
bool operator==(LoadGlobalParameters const& lhs, bool operator==(LoadGlobalParameters const& lhs,
LoadGlobalParameters const& rhs) { LoadGlobalParameters const& rhs) {
return lhs.name().location() == rhs.name().location() && return lhs.name().location() == rhs.name().location() &&
...@@ -331,66 +329,6 @@ const StoreGlobalParameters& StoreGlobalParametersOf(const Operator* op) { ...@@ -331,66 +329,6 @@ const StoreGlobalParameters& StoreGlobalParametersOf(const Operator* op) {
} }
bool operator==(StoreNamedParameters const& lhs,
StoreNamedParameters const& rhs) {
return lhs.language_mode() == rhs.language_mode() &&
lhs.name().location() == rhs.name().location() &&
lhs.feedback() == rhs.feedback();
}
bool operator!=(StoreNamedParameters const& lhs,
StoreNamedParameters const& rhs) {
return !(lhs == rhs);
}
size_t hash_value(StoreNamedParameters const& p) {
return base::hash_combine(p.language_mode(), p.name().location(),
p.feedback());
}
std::ostream& operator<<(std::ostream& os, StoreNamedParameters const& p) {
return os << p.language_mode() << ", " << Brief(*p.name());
}
const StoreNamedParameters& StoreNamedParametersOf(const Operator* op) {
DCHECK_EQ(IrOpcode::kJSStoreNamed, op->opcode());
return OpParameter<StoreNamedParameters>(op);
}
bool operator==(StorePropertyParameters const& lhs,
StorePropertyParameters const& rhs) {
return lhs.language_mode() == rhs.language_mode() &&
lhs.feedback() == rhs.feedback();
}
bool operator!=(StorePropertyParameters const& lhs,
StorePropertyParameters const& rhs) {
return !(lhs == rhs);
}
size_t hash_value(StorePropertyParameters const& p) {
return base::hash_combine(p.language_mode(), p.feedback());
}
std::ostream& operator<<(std::ostream& os, StorePropertyParameters const& p) {
return os << p.language_mode();
}
const StorePropertyParameters& StorePropertyParametersOf(const Operator* op) {
DCHECK_EQ(IrOpcode::kJSStoreProperty, op->opcode());
return OpParameter<StorePropertyParameters>(op);
}
bool operator==(CreateArgumentsParameters const& lhs, bool operator==(CreateArgumentsParameters const& lhs,
CreateArgumentsParameters const& rhs) { CreateArgumentsParameters const& rhs) {
return lhs.type() == rhs.type() && lhs.start_index() == rhs.start_index(); return lhs.type() == rhs.type() && lhs.start_index() == rhs.start_index();
...@@ -600,49 +538,49 @@ const Operator* JSOperatorBuilder::CallConstruct(int arguments) { ...@@ -600,49 +538,49 @@ const Operator* JSOperatorBuilder::CallConstruct(int arguments) {
} }
const Operator* JSOperatorBuilder::LoadNamed(const Handle<Name>& name, const Operator* JSOperatorBuilder::LoadNamed(LanguageMode language_mode,
const VectorSlotPair& feedback, Handle<Name> name,
LanguageMode language_mode) { const VectorSlotPair& feedback) {
LoadNamedParameters parameters(name, feedback, language_mode); NamedAccess access(language_mode, name, feedback);
return new (zone()) Operator1<LoadNamedParameters>( // -- return new (zone()) Operator1<NamedAccess>( // --
IrOpcode::kJSLoadNamed, Operator::kNoProperties, // opcode IrOpcode::kJSLoadNamed, Operator::kNoProperties, // opcode
"JSLoadNamed", // name "JSLoadNamed", // name
2, 1, 1, 1, 1, 2, // counts 2, 1, 1, 1, 1, 2, // counts
parameters); // parameter access); // parameter
} }
const Operator* JSOperatorBuilder::LoadProperty(const VectorSlotPair& feedback, const Operator* JSOperatorBuilder::LoadProperty(
LanguageMode language_mode) { LanguageMode language_mode, VectorSlotPair const& feedback) {
LoadPropertyParameters parameters(feedback, language_mode); PropertyAccess access(language_mode, feedback);
return new (zone()) Operator1<LoadPropertyParameters>( // -- return new (zone()) Operator1<PropertyAccess>( // --
IrOpcode::kJSLoadProperty, Operator::kNoProperties, // opcode IrOpcode::kJSLoadProperty, Operator::kNoProperties, // opcode
"JSLoadProperty", // name "JSLoadProperty", // name
3, 1, 1, 1, 1, 2, // counts 3, 1, 1, 1, 1, 2, // counts
parameters); // parameter access); // parameter
} }
const Operator* JSOperatorBuilder::StoreNamed(LanguageMode language_mode, const Operator* JSOperatorBuilder::StoreNamed(LanguageMode language_mode,
const Handle<Name>& name, Handle<Name> name,
const VectorSlotPair& feedback) { VectorSlotPair const& feedback) {
StoreNamedParameters parameters(language_mode, feedback, name); NamedAccess access(language_mode, name, feedback);
return new (zone()) Operator1<StoreNamedParameters>( // -- return new (zone()) Operator1<NamedAccess>( // --
IrOpcode::kJSStoreNamed, Operator::kNoProperties, // opcode IrOpcode::kJSStoreNamed, Operator::kNoProperties, // opcode
"JSStoreNamed", // name "JSStoreNamed", // name
3, 1, 1, 0, 1, 2, // counts 3, 1, 1, 0, 1, 2, // counts
parameters); // parameter access); // parameter
} }
const Operator* JSOperatorBuilder::StoreProperty( const Operator* JSOperatorBuilder::StoreProperty(
LanguageMode language_mode, const VectorSlotPair& feedback) { LanguageMode language_mode, VectorSlotPair const& feedback) {
StorePropertyParameters parameters(language_mode, feedback); PropertyAccess access(language_mode, feedback);
return new (zone()) Operator1<StorePropertyParameters>( // -- return new (zone()) Operator1<PropertyAccess>( // --
IrOpcode::kJSStoreProperty, Operator::kNoProperties, // opcode IrOpcode::kJSStoreProperty, Operator::kNoProperties, // opcode
"JSStoreProperty", // name "JSStoreProperty", // name
4, 1, 1, 0, 1, 2, // counts 4, 1, 1, 0, 1, 2, // counts
parameters); // parameter access); // parameter
} }
......
...@@ -228,33 +228,32 @@ std::ostream& operator<<(std::ostream&, DynamicContextAccess const&); ...@@ -228,33 +228,32 @@ std::ostream& operator<<(std::ostream&, DynamicContextAccess const&);
DynamicContextAccess const& DynamicContextAccessOf(Operator const*); DynamicContextAccess const& DynamicContextAccessOf(Operator const*);
// Defines the property being loaded from an object by a named load. This is // Defines the property of an object for a named access. This is
// used as a parameter by JSLoadNamed operators. // used as a parameter by the JSLoadNamed and JSStoreNamed operators.
class LoadNamedParameters final { class NamedAccess final {
public: public:
LoadNamedParameters(const Handle<Name>& name, const VectorSlotPair& feedback, NamedAccess(LanguageMode language_mode, Handle<Name> name,
LanguageMode language_mode) VectorSlotPair const& feedback)
: name_(name), feedback_(feedback), language_mode_(language_mode) {} : name_(name), feedback_(feedback), language_mode_(language_mode) {}
const Handle<Name>& name() const { return name_; } Handle<Name> name() const { return name_; }
LanguageMode language_mode() const { return language_mode_; } LanguageMode language_mode() const { return language_mode_; }
VectorSlotPair const& feedback() const { return feedback_; }
const VectorSlotPair& feedback() const { return feedback_; }
private: private:
const Handle<Name> name_; Handle<Name> const name_;
const VectorSlotPair feedback_; VectorSlotPair const feedback_;
const LanguageMode language_mode_; LanguageMode const language_mode_;
}; };
bool operator==(LoadNamedParameters const&, LoadNamedParameters const&); bool operator==(NamedAccess const&, NamedAccess const&);
bool operator!=(LoadNamedParameters const&, LoadNamedParameters const&); bool operator!=(NamedAccess const&, NamedAccess const&);
size_t hash_value(LoadNamedParameters const&); size_t hash_value(NamedAccess const&);
std::ostream& operator<<(std::ostream&, LoadNamedParameters const&); std::ostream& operator<<(std::ostream&, NamedAccess const&);
const LoadNamedParameters& LoadNamedParametersOf(const Operator* op); const NamedAccess& NamedAccessOf(const Operator* op);
// Defines the property being loaded from an object by a named load. This is // Defines the property being loaded from an object by a named load. This is
...@@ -326,85 +325,29 @@ std::ostream& operator<<(std::ostream&, StoreGlobalParameters const&); ...@@ -326,85 +325,29 @@ std::ostream& operator<<(std::ostream&, StoreGlobalParameters const&);
const StoreGlobalParameters& StoreGlobalParametersOf(const Operator* op); const StoreGlobalParameters& StoreGlobalParametersOf(const Operator* op);
// Defines the property being loaded from an object. This is // Defines the property of an object for a keyed access. This is used
// used as a parameter by JSLoadProperty operators. // as a parameter by the JSLoadProperty and JSStoreProperty operators.
class LoadPropertyParameters final { class PropertyAccess final {
public: public:
explicit LoadPropertyParameters(const VectorSlotPair& feedback, PropertyAccess(LanguageMode language_mode, VectorSlotPair const& feedback)
LanguageMode language_mode)
: feedback_(feedback), language_mode_(language_mode) {} : feedback_(feedback), language_mode_(language_mode) {}
const VectorSlotPair& feedback() const { return feedback_; }
LanguageMode language_mode() const { return language_mode_; }
private:
const VectorSlotPair feedback_;
const LanguageMode language_mode_;
};
bool operator==(LoadPropertyParameters const&, LoadPropertyParameters const&);
bool operator!=(LoadPropertyParameters const&, LoadPropertyParameters const&);
size_t hash_value(LoadPropertyParameters const&);
std::ostream& operator<<(std::ostream&, LoadPropertyParameters const&);
const LoadPropertyParameters& LoadPropertyParametersOf(const Operator* op);
// Defines the property being stored to an object by a named store. This is
// used as a parameter by JSStoreNamed operator.
class StoreNamedParameters final {
public:
StoreNamedParameters(LanguageMode language_mode,
const VectorSlotPair& feedback, const Handle<Name>& name)
: language_mode_(language_mode), name_(name), feedback_(feedback) {}
LanguageMode language_mode() const { return language_mode_; } LanguageMode language_mode() const { return language_mode_; }
const VectorSlotPair& feedback() const { return feedback_; } VectorSlotPair const& feedback() const { return feedback_; }
const Handle<Name>& name() const { return name_; }
private:
const LanguageMode language_mode_;
const Handle<Name> name_;
const VectorSlotPair feedback_;
};
bool operator==(StoreNamedParameters const&, StoreNamedParameters const&);
bool operator!=(StoreNamedParameters const&, StoreNamedParameters const&);
size_t hash_value(StoreNamedParameters const&);
std::ostream& operator<<(std::ostream&, StoreNamedParameters const&);
const StoreNamedParameters& StoreNamedParametersOf(const Operator* op);
// Defines the property being stored to an object. This is used as a parameter
// by JSStoreProperty operators.
class StorePropertyParameters final {
public:
StorePropertyParameters(LanguageMode language_mode,
const VectorSlotPair& feedback)
: language_mode_(language_mode), feedback_(feedback) {}
LanguageMode language_mode() const { return language_mode_; }
const VectorSlotPair& feedback() const { return feedback_; }
private: private:
const LanguageMode language_mode_; VectorSlotPair const feedback_;
const VectorSlotPair feedback_; LanguageMode const language_mode_;
}; };
bool operator==(StorePropertyParameters const&, StorePropertyParameters const&); bool operator==(PropertyAccess const&, PropertyAccess const&);
bool operator!=(StorePropertyParameters const&, StorePropertyParameters const&); bool operator!=(PropertyAccess const&, PropertyAccess const&);
size_t hash_value(StorePropertyParameters const&); size_t hash_value(PropertyAccess const&);
std::ostream& operator<<(std::ostream&, StorePropertyParameters const&); std::ostream& operator<<(std::ostream&, PropertyAccess const&);
const StorePropertyParameters& StorePropertyParametersOf(const Operator* op); PropertyAccess const& PropertyAccessOf(const Operator* op);
// Defines specifics about arguments object or rest parameter creation. This is // Defines specifics about arguments object or rest parameter creation. This is
...@@ -513,17 +456,15 @@ class JSOperatorBuilder final : public ZoneObject { ...@@ -513,17 +456,15 @@ class JSOperatorBuilder final : public ZoneObject {
const Operator* CallConstruct(int arguments); const Operator* CallConstruct(int arguments);
const Operator* LoadProperty(const VectorSlotPair& feedback, const Operator* LoadProperty(LanguageMode language_mode,
LanguageMode language_mode); VectorSlotPair const& feedback);
const Operator* LoadNamed(const Handle<Name>& name, const Operator* LoadNamed(LanguageMode language_mode, Handle<Name> name,
const VectorSlotPair& feedback, VectorSlotPair const& feedback);
LanguageMode language_mode);
const Operator* StoreProperty(LanguageMode language_mode, const Operator* StoreProperty(LanguageMode language_mode,
const VectorSlotPair& feedback); VectorSlotPair const& feedback);
const Operator* StoreNamed(LanguageMode language_mode, const Operator* StoreNamed(LanguageMode language_mode, Handle<Name> name,
const Handle<Name>& name, VectorSlotPair const& feedback);
const VectorSlotPair& feedback);
const Operator* DeleteProperty(LanguageMode language_mode); const Operator* DeleteProperty(LanguageMode language_mode);
......
...@@ -39,7 +39,7 @@ Reduction JSTypeFeedbackLowering::ReduceJSLoadNamed(Node* node) { ...@@ -39,7 +39,7 @@ Reduction JSTypeFeedbackLowering::ReduceJSLoadNamed(Node* node) {
Node* control = NodeProperties::GetControlInput(node); Node* control = NodeProperties::GetControlInput(node);
// We need to make optimistic assumptions to continue. // We need to make optimistic assumptions to continue.
if (!(flags() & kDeoptimizationEnabled)) return NoChange(); if (!(flags() & kDeoptimizationEnabled)) return NoChange();
LoadNamedParameters const& p = LoadNamedParametersOf(node->op()); NamedAccess const& p = NamedAccessOf(node->op());
if (!p.feedback().IsValid()) return NoChange(); // No feedback. if (!p.feedback().IsValid()) return NoChange(); // No feedback.
if (p.name().is_identical_to(factory()->length_string())) { if (p.name().is_identical_to(factory()->length_string())) {
LoadICNexus nexus(p.feedback().vector(), p.feedback().slot()); LoadICNexus nexus(p.feedback().vector(), p.feedback().slot());
......
...@@ -145,7 +145,7 @@ Reduction JSTypeFeedbackSpecializer::ReduceJSLoadNamed(Node* node) { ...@@ -145,7 +145,7 @@ Reduction JSTypeFeedbackSpecializer::ReduceJSLoadNamed(Node* node) {
Node* frame_state_before = GetFrameStateBefore(node); Node* frame_state_before = GetFrameStateBefore(node);
if (frame_state_before == nullptr) return NoChange(); if (frame_state_before == nullptr) return NoChange();
const LoadNamedParameters& p = LoadNamedParametersOf(node->op()); NamedAccess const& p = NamedAccessOf(node->op());
SmallMapList maps; SmallMapList maps;
FeedbackVectorSlot slot = js_type_feedback_->FindFeedbackVectorSlot(node); FeedbackVectorSlot slot = js_type_feedback_->FindFeedbackVectorSlot(node);
...@@ -255,7 +255,7 @@ Reduction JSTypeFeedbackSpecializer::ReduceJSStoreNamed(Node* node) { ...@@ -255,7 +255,7 @@ Reduction JSTypeFeedbackSpecializer::ReduceJSStoreNamed(Node* node) {
Node* frame_state_before = GetFrameStateBefore(node); Node* frame_state_before = GetFrameStateBefore(node);
if (frame_state_before == nullptr) return NoChange(); if (frame_state_before == nullptr) return NoChange();
const StoreNamedParameters& p = StoreNamedParametersOf(node->op()); NamedAccess const& p = NamedAccessOf(node->op());
SmallMapList maps; SmallMapList maps;
TypeFeedbackId id = js_type_feedback_->FindTypeFeedbackId(node); TypeFeedbackId id = js_type_feedback_->FindTypeFeedbackId(node);
if (id.IsNone() || oracle()->StoreIsUninitialized(id) == UNINITIALIZED) { if (id.IsNone() || oracle()->StoreIsUninitialized(id) == UNINITIALIZED) {
......
...@@ -826,7 +826,7 @@ Reduction JSTypedLowering::ReduceJSLoadNamed(Node* node) { ...@@ -826,7 +826,7 @@ Reduction JSTypedLowering::ReduceJSLoadNamed(Node* node) {
Type* receiver_type = NodeProperties::GetType(receiver); Type* receiver_type = NodeProperties::GetType(receiver);
Node* effect = NodeProperties::GetEffectInput(node); Node* effect = NodeProperties::GetEffectInput(node);
Node* control = NodeProperties::GetControlInput(node); Node* control = NodeProperties::GetControlInput(node);
Handle<Name> name = LoadNamedParametersOf(node->op()).name(); Handle<Name> name = NamedAccessOf(node->op()).name();
// Optimize "length" property of strings. // Optimize "length" property of strings.
if (name.is_identical_to(factory()->length_string()) && if (name.is_identical_to(factory()->length_string()) &&
receiver_type->Is(Type::String())) { receiver_type->Is(Type::String())) {
......
...@@ -661,7 +661,7 @@ TEST_F(JSTypedLoweringTest, JSLoadPropertyFromExternalTypedArray) { ...@@ -661,7 +661,7 @@ TEST_F(JSTypedLoweringTest, JSLoadPropertyFromExternalTypedArray) {
Node* effect = graph()->start(); Node* effect = graph()->start();
Node* control = graph()->start(); Node* control = graph()->start();
Reduction r = Reduce( Reduction r = Reduce(
graph()->NewNode(javascript()->LoadProperty(feedback, language_mode), graph()->NewNode(javascript()->LoadProperty(language_mode, feedback),
base, key, vector, context, EmptyFrameState(), base, key, vector, context, EmptyFrameState(),
EmptyFrameState(), effect, control)); EmptyFrameState(), effect, control));
...@@ -705,7 +705,7 @@ TEST_F(JSTypedLoweringTest, JSLoadPropertyFromExternalTypedArrayWithSafeKey) { ...@@ -705,7 +705,7 @@ TEST_F(JSTypedLoweringTest, JSLoadPropertyFromExternalTypedArrayWithSafeKey) {
Node* effect = graph()->start(); Node* effect = graph()->start();
Node* control = graph()->start(); Node* control = graph()->start();
Reduction r = Reduce( Reduction r = Reduce(
graph()->NewNode(javascript()->LoadProperty(feedback, language_mode), graph()->NewNode(javascript()->LoadProperty(language_mode, feedback),
base, key, vector, context, EmptyFrameState(), base, key, vector, context, EmptyFrameState(),
EmptyFrameState(), effect, control)); EmptyFrameState(), effect, control));
...@@ -877,7 +877,7 @@ TEST_F(JSTypedLoweringTest, JSLoadNamedStringLength) { ...@@ -877,7 +877,7 @@ TEST_F(JSTypedLoweringTest, JSLoadNamedStringLength) {
Node* const control = graph()->start(); Node* const control = graph()->start();
TRACED_FOREACH(LanguageMode, language_mode, kLanguageModes) { TRACED_FOREACH(LanguageMode, language_mode, kLanguageModes) {
Reduction const r = Reduce( Reduction const r = Reduce(
graph()->NewNode(javascript()->LoadNamed(name, feedback, language_mode), graph()->NewNode(javascript()->LoadNamed(language_mode, name, feedback),
receiver, vector, context, EmptyFrameState(), receiver, vector, context, EmptyFrameState(),
EmptyFrameState(), effect, control)); EmptyFrameState(), effect, control));
ASSERT_TRUE(r.Changed()); ASSERT_TRUE(r.Changed());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment