Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(131)

Unified Diff: src/compiler/js-operator.h

Issue 1095313002: [turbofan] Fix reduction of LoadProperty/StoreProperty to LoadNamed/StoreNamed. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/js-generic-lowering.cc ('k') | src/compiler/js-operator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-operator.h
diff --git a/src/compiler/js-operator.h b/src/compiler/js-operator.h
index c4103381fd46c059d1e77e4e2daf67e83bc7be19..401f1f0b30e3e4629529c3d30de65d28c3b1c003 100644
--- a/src/compiler/js-operator.h
+++ b/src/compiler/js-operator.h
@@ -115,23 +115,34 @@ class VectorSlotPair {
bool operator==(VectorSlotPair const& lhs, VectorSlotPair const& rhs);
+// For (Load|Store)Named operators, the mode of the IC that needs
+// to be called. This is needed because (Load|Store)Property nodes can be
+// reduced to named versions, but still need to call the correct original
+// IC mode because of the layout of feedback vectors.
+enum PropertyICMode { NAMED, KEYED };
+
// Defines the property being loaded from an object by a named load. This is
// used as a parameter by JSLoadNamed operators.
class LoadNamedParameters final {
public:
LoadNamedParameters(const Unique<Name>& name, const VectorSlotPair& feedback,
- ContextualMode contextual_mode)
- : name_(name), contextual_mode_(contextual_mode), feedback_(feedback) {}
+ ContextualMode contextual_mode, PropertyICMode load_ic)
+ : name_(name),
+ feedback_(feedback),
+ contextual_mode_(contextual_mode),
+ load_ic_(load_ic) {}
const Unique<Name>& name() const { return name_; }
ContextualMode contextual_mode() const { return contextual_mode_; }
+ PropertyICMode load_ic() const { return load_ic_; }
const VectorSlotPair& feedback() const { return feedback_; }
private:
const Unique<Name> name_;
- const ContextualMode contextual_mode_;
const VectorSlotPair feedback_;
+ const ContextualMode contextual_mode_;
+ const PropertyICMode load_ic_;
};
bool operator==(LoadNamedParameters const&, LoadNamedParameters const&);
@@ -171,15 +182,18 @@ const LoadPropertyParameters& LoadPropertyParametersOf(const Operator* op);
// used as a parameter by JSStoreNamed operators.
class StoreNamedParameters final {
public:
- StoreNamedParameters(LanguageMode language_mode, const Unique<Name>& name)
- : language_mode_(language_mode), name_(name) {}
+ StoreNamedParameters(LanguageMode language_mode, const Unique<Name>& name,
+ PropertyICMode store_ic)
+ : language_mode_(language_mode), name_(name), store_ic_(store_ic) {}
LanguageMode language_mode() const { return language_mode_; }
const Unique<Name>& name() const { return name_; }
+ PropertyICMode store_ic() const { return store_ic_; }
private:
const LanguageMode language_mode_;
const Unique<Name> name_;
+ const PropertyICMode store_ic_;
};
bool operator==(StoreNamedParameters const&, StoreNamedParameters const&);
@@ -237,11 +251,13 @@ class JSOperatorBuilder final : public ZoneObject {
const Operator* LoadProperty(const VectorSlotPair& feedback);
const Operator* LoadNamed(const Unique<Name>& name,
const VectorSlotPair& feedback,
- ContextualMode contextual_mode = NOT_CONTEXTUAL);
+ ContextualMode contextual_mode = NOT_CONTEXTUAL,
+ PropertyICMode load_ic = NAMED);
const Operator* StoreProperty(LanguageMode language_mode);
const Operator* StoreNamed(LanguageMode language_mode,
- const Unique<Name>& name);
+ const Unique<Name>& name,
+ PropertyICMode store_ic = NAMED);
const Operator* DeleteProperty(LanguageMode language_mode);
« no previous file with comments | « src/compiler/js-generic-lowering.cc ('k') | src/compiler/js-operator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698