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

Unified Diff: src/crankshaft/hydrogen-instructions.h

Issue 2019313003: IC: Eliminate initialization_state as a factor in IC installation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixed compile error. Created 4 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/crankshaft/hydrogen.cc ('k') | src/crankshaft/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/crankshaft/hydrogen-instructions.h
diff --git a/src/crankshaft/hydrogen-instructions.h b/src/crankshaft/hydrogen-instructions.h
index fdb1fd6d46c5cea8a8f77458d8297f5e8980b51d..898539b21d59d5925292d50bd9e1b9fa5f580e47 100644
--- a/src/crankshaft/hydrogen-instructions.h
+++ b/src/crankshaft/hydrogen-instructions.h
@@ -4875,8 +4875,10 @@ class HUnknownOSRValue final : public HTemplateInstruction<0> {
class HLoadGlobalGeneric final : public HTemplateInstruction<2> {
public:
- DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P3(HLoadGlobalGeneric, HValue*,
- Handle<String>, TypeofMode);
+ DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P5(HLoadGlobalGeneric, HValue*,
+ Handle<String>, TypeofMode,
+ Handle<TypeFeedbackVector>,
+ FeedbackVectorSlot);
HValue* context() { return OperandAt(0); }
HValue* global_object() { return OperandAt(1); }
@@ -4886,12 +4888,6 @@ class HLoadGlobalGeneric final : public HTemplateInstruction<2> {
Handle<TypeFeedbackVector> feedback_vector() const {
return feedback_vector_;
}
- bool HasVectorAndSlot() const { return true; }
- void SetVectorAndSlot(Handle<TypeFeedbackVector> vector,
- FeedbackVectorSlot slot) {
- feedback_vector_ = vector;
- slot_ = slot;
- }
std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT
@@ -4903,8 +4899,12 @@ class HLoadGlobalGeneric final : public HTemplateInstruction<2> {
private:
HLoadGlobalGeneric(HValue* context, HValue* global_object,
- Handle<String> name, TypeofMode typeof_mode)
- : name_(name), typeof_mode_(typeof_mode) {
+ Handle<String> name, TypeofMode typeof_mode,
+ Handle<TypeFeedbackVector> vector, FeedbackVectorSlot slot)
+ : name_(name),
+ typeof_mode_(typeof_mode),
+ feedback_vector_(vector),
+ slot_(slot) {
SetOperandAt(0, context);
SetOperandAt(1, global_object);
set_representation(Representation::Tagged());
@@ -5887,26 +5887,19 @@ class HLoadNamedField final : public HTemplateInstruction<2> {
class HLoadNamedGeneric final : public HTemplateInstruction<2> {
public:
- DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P3(HLoadNamedGeneric, HValue*,
- Handle<Name>, InlineCacheState);
+ DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P4(HLoadNamedGeneric, HValue*,
+ Handle<Name>,
+ Handle<TypeFeedbackVector>,
+ FeedbackVectorSlot);
HValue* context() const { return OperandAt(0); }
HValue* object() const { return OperandAt(1); }
Handle<Name> name() const { return name_; }
- InlineCacheState initialization_state() const {
- return initialization_state_;
- }
FeedbackVectorSlot slot() const { return slot_; }
Handle<TypeFeedbackVector> feedback_vector() const {
return feedback_vector_;
}
- bool HasVectorAndSlot() const { return true; }
- void SetVectorAndSlot(Handle<TypeFeedbackVector> vector,
- FeedbackVectorSlot slot) {
- feedback_vector_ = vector;
- slot_ = slot;
- }
Representation RequiredInputRepresentation(int index) override {
return Representation::Tagged();
@@ -5918,9 +5911,8 @@ class HLoadNamedGeneric final : public HTemplateInstruction<2> {
private:
HLoadNamedGeneric(HValue* context, HValue* object, Handle<Name> name,
- InlineCacheState initialization_state)
- : name_(name),
- initialization_state_(initialization_state) {
+ Handle<TypeFeedbackVector> vector, FeedbackVectorSlot slot)
+ : name_(name), feedback_vector_(vector), slot_(slot) {
SetOperandAt(0, context);
SetOperandAt(1, object);
set_representation(Representation::Tagged());
@@ -5930,7 +5922,6 @@ class HLoadNamedGeneric final : public HTemplateInstruction<2> {
Handle<Name> name_;
Handle<TypeFeedbackVector> feedback_vector_;
FeedbackVectorSlot slot_;
- InlineCacheState initialization_state_;
};
@@ -6172,27 +6163,17 @@ class HLoadKeyed final : public HTemplateInstruction<4>,
class HLoadKeyedGeneric final : public HTemplateInstruction<3> {
public:
- DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P3(HLoadKeyedGeneric, HValue*,
- HValue*, InlineCacheState);
+ DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P4(HLoadKeyedGeneric, HValue*,
+ HValue*,
+ Handle<TypeFeedbackVector>,
+ FeedbackVectorSlot);
HValue* object() const { return OperandAt(0); }
HValue* key() const { return OperandAt(1); }
HValue* context() const { return OperandAt(2); }
- InlineCacheState initialization_state() const {
- return initialization_state_;
- }
FeedbackVectorSlot slot() const { return slot_; }
Handle<TypeFeedbackVector> feedback_vector() const {
return feedback_vector_;
}
- bool HasVectorAndSlot() const {
- DCHECK(initialization_state_ == MEGAMORPHIC || !feedback_vector_.is_null());
- return !feedback_vector_.is_null();
- }
- void SetVectorAndSlot(Handle<TypeFeedbackVector> vector,
- FeedbackVectorSlot slot) {
- feedback_vector_ = vector;
- slot_ = slot;
- }
std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT
@@ -6207,8 +6188,8 @@ class HLoadKeyedGeneric final : public HTemplateInstruction<3> {
private:
HLoadKeyedGeneric(HValue* context, HValue* obj, HValue* key,
- InlineCacheState initialization_state)
- : initialization_state_(initialization_state) {
+ Handle<TypeFeedbackVector> vector, FeedbackVectorSlot slot)
+ : feedback_vector_(vector), slot_(slot) {
set_representation(Representation::Tagged());
SetOperandAt(0, obj);
SetOperandAt(1, key);
@@ -6218,7 +6199,6 @@ class HLoadKeyedGeneric final : public HTemplateInstruction<3> {
Handle<TypeFeedbackVector> feedback_vector_;
FeedbackVectorSlot slot_;
- InlineCacheState initialization_state_;
};
@@ -6380,20 +6360,18 @@ class HStoreNamedField final : public HTemplateInstruction<3> {
uint32_t bit_field_;
};
-
class HStoreNamedGeneric final : public HTemplateInstruction<3> {
public:
- DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P5(HStoreNamedGeneric, HValue*,
+ DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P6(HStoreNamedGeneric, HValue*,
Handle<Name>, HValue*,
- LanguageMode, InlineCacheState);
+ LanguageMode,
+ Handle<TypeFeedbackVector>,
+ FeedbackVectorSlot);
HValue* object() const { return OperandAt(0); }
HValue* value() const { return OperandAt(1); }
HValue* context() const { return OperandAt(2); }
Handle<Name> name() const { return name_; }
LanguageMode language_mode() const { return language_mode_; }
- InlineCacheState initialization_state() const {
- return initialization_state_;
- }
std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT
@@ -6405,22 +6383,17 @@ class HStoreNamedGeneric final : public HTemplateInstruction<3> {
Handle<TypeFeedbackVector> feedback_vector() const {
return feedback_vector_;
}
- bool HasVectorAndSlot() const { return true; }
- void SetVectorAndSlot(Handle<TypeFeedbackVector> vector,
- FeedbackVectorSlot slot) {
- feedback_vector_ = vector;
- slot_ = slot;
- }
DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric)
private:
HStoreNamedGeneric(HValue* context, HValue* object, Handle<Name> name,
HValue* value, LanguageMode language_mode,
- InlineCacheState initialization_state)
+ Handle<TypeFeedbackVector> vector, FeedbackVectorSlot slot)
: name_(name),
- language_mode_(language_mode),
- initialization_state_(initialization_state) {
+ feedback_vector_(vector),
+ slot_(slot),
+ language_mode_(language_mode) {
SetOperandAt(0, object);
SetOperandAt(1, value);
SetOperandAt(2, context);
@@ -6431,10 +6404,8 @@ class HStoreNamedGeneric final : public HTemplateInstruction<3> {
Handle<TypeFeedbackVector> feedback_vector_;
FeedbackVectorSlot slot_;
LanguageMode language_mode_;
- InlineCacheState initialization_state_;
};
-
class HStoreKeyed final : public HTemplateInstruction<4>,
public ArrayInstructionInterface {
public:
@@ -6617,21 +6588,18 @@ class HStoreKeyed final : public HTemplateInstruction<4>,
HValue* dominator_;
};
-
class HStoreKeyedGeneric final : public HTemplateInstruction<4> {
public:
- DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P5(HStoreKeyedGeneric, HValue*,
+ DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P6(HStoreKeyedGeneric, HValue*,
HValue*, HValue*, LanguageMode,
- InlineCacheState);
+ Handle<TypeFeedbackVector>,
+ FeedbackVectorSlot);
HValue* object() const { return OperandAt(0); }
HValue* key() const { return OperandAt(1); }
HValue* value() const { return OperandAt(2); }
HValue* context() const { return OperandAt(3); }
LanguageMode language_mode() const { return language_mode_; }
- InlineCacheState initialization_state() const {
- return initialization_state_;
- }
Representation RequiredInputRepresentation(int index) override {
// tagged[tagged] = tagged
@@ -6642,14 +6610,6 @@ class HStoreKeyedGeneric final : public HTemplateInstruction<4> {
Handle<TypeFeedbackVector> feedback_vector() const {
return feedback_vector_;
}
- bool HasVectorAndSlot() const {
- return !feedback_vector_.is_null();
- }
- void SetVectorAndSlot(Handle<TypeFeedbackVector> vector,
- FeedbackVectorSlot slot) {
- feedback_vector_ = vector;
- slot_ = slot;
- }
std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT
@@ -6658,9 +6618,8 @@ class HStoreKeyedGeneric final : public HTemplateInstruction<4> {
private:
HStoreKeyedGeneric(HValue* context, HValue* object, HValue* key,
HValue* value, LanguageMode language_mode,
- InlineCacheState initialization_state)
- : language_mode_(language_mode),
- initialization_state_(initialization_state) {
+ Handle<TypeFeedbackVector> vector, FeedbackVectorSlot slot)
+ : feedback_vector_(vector), slot_(slot), language_mode_(language_mode) {
SetOperandAt(0, object);
SetOperandAt(1, key);
SetOperandAt(2, value);
@@ -6671,10 +6630,8 @@ class HStoreKeyedGeneric final : public HTemplateInstruction<4> {
Handle<TypeFeedbackVector> feedback_vector_;
FeedbackVectorSlot slot_;
LanguageMode language_mode_;
- InlineCacheState initialization_state_;
};
-
class HTransitionElementsKind final : public HTemplateInstruction<2> {
public:
inline static HTransitionElementsKind* New(Isolate* isolate, Zone* zone,
« no previous file with comments | « src/crankshaft/hydrogen.cc ('k') | src/crankshaft/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698