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

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

Issue 1150723005: [turbofan] Optimized lowering of DYNAMIC_GLOBAL lookup slot loads. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased. Created 5 years, 7 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 9a8bdd690afbf7cbe3952a32b2dfa88d191d5b43..1ba035456203bce2d9f0c1cbec5704da33477e93 100644
--- a/src/compiler/js-operator.h
+++ b/src/compiler/js-operator.h
@@ -112,16 +112,36 @@ std::ostream& operator<<(std::ostream&, ContextAccess const&);
ContextAccess const& ContextAccessOf(Operator const*);
+class VectorSlotPair {
+ public:
+ VectorSlotPair(Handle<TypeFeedbackVector> vector, FeedbackVectorICSlot slot)
+ : vector_(vector), slot_(slot) {}
+
+ Handle<TypeFeedbackVector> vector() const { return vector_; }
+ FeedbackVectorICSlot slot() const { return slot_; }
+
+ int index() const { return vector_->GetIndex(slot_); }
+
+ private:
+ const Handle<TypeFeedbackVector> vector_;
+ const FeedbackVectorICSlot slot_;
+};
+
+
+bool operator==(VectorSlotPair const& lhs, VectorSlotPair const& rhs);
+
+
// Defines the name for a dynamic variable lookup. The {check_bitset} allows to
// inline checks whether the lookup yields in a global variable. This is used as
// a parameter by JSLoadDynamicGlobal and JSStoreDynamicGlobal operators.
class DynamicGlobalAccess final {
public:
DynamicGlobalAccess(const Handle<String>& name, uint32_t check_bitset,
- ContextualMode mode);
+ const VectorSlotPair& feedback, ContextualMode mode);
const Handle<String>& name() const { return name_; }
uint32_t check_bitset() const { return check_bitset_; }
+ const VectorSlotPair& feedback() const { return feedback_; }
ContextualMode mode() const { return mode_; }
// Indicates that an inline check is disabled.
@@ -138,6 +158,7 @@ class DynamicGlobalAccess final {
private:
const Handle<String> name_;
const uint32_t check_bitset_;
+ const VectorSlotPair feedback_;
const ContextualMode mode_;
};
@@ -190,25 +211,6 @@ std::ostream& operator<<(std::ostream&, DynamicContextAccess const&);
DynamicContextAccess const& DynamicContextAccessOf(Operator const*);
-class VectorSlotPair {
- public:
- VectorSlotPair(Handle<TypeFeedbackVector> vector, FeedbackVectorICSlot slot)
- : vector_(vector), slot_(slot) {}
-
- Handle<TypeFeedbackVector> vector() const { return vector_; }
- FeedbackVectorICSlot slot() const { return slot_; }
-
- int index() const { return vector_->GetIndex(slot_); }
-
- private:
- const Handle<TypeFeedbackVector> vector_;
- const FeedbackVectorICSlot slot_;
-};
-
-
-bool operator==(VectorSlotPair const& lhs, VectorSlotPair const& rhs);
-
-
// Defines the property being loaded from an object by a named load. This is
// used as a parameter by JSLoadNamed operators.
class LoadNamedParameters final {
@@ -376,7 +378,9 @@ class JSOperatorBuilder final : public ZoneObject {
const Operator* StoreContext(size_t depth, size_t index);
const Operator* LoadDynamicGlobal(const Handle<String>& name,
- uint32_t check_bitset, ContextualMode mode);
+ uint32_t check_bitset,
+ const VectorSlotPair& feedback,
+ ContextualMode mode);
const Operator* LoadDynamicContext(const Handle<String>& name,
uint32_t check_bitset, size_t depth,
size_t index);
« 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