[crankshaft] Remove HStoreKeyedGeneric and use HCallWithDescriptor instead to call KeyedStoreIC.
... because the latter automatically respects the desired calling convention. BUG=v8:5407 Review-Url: https://codereview.chromium.org/2350423002 Cr-Commit-Position: refs/heads/master@{#39543}
This commit is contained in:
parent
b2615904c2
commit
4286f2c0bd
@ -336,15 +336,6 @@ void LStoreKeyed::PrintDataTo(StringStream* stream) {
|
||||
}
|
||||
|
||||
|
||||
void LStoreKeyedGeneric::PrintDataTo(StringStream* stream) {
|
||||
object()->PrintTo(stream);
|
||||
stream->Add("[");
|
||||
key()->PrintTo(stream);
|
||||
stream->Add("] <- ");
|
||||
value()->PrintTo(stream);
|
||||
}
|
||||
|
||||
|
||||
void LTransitionElementsKind::PrintDataTo(StringStream* stream) {
|
||||
object()->PrintTo(stream);
|
||||
stream->Add(" %p -> %p", *original_map(), *transitioned_map());
|
||||
@ -2171,26 +2162,6 @@ LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) {
|
||||
}
|
||||
|
||||
|
||||
LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) {
|
||||
LOperand* context = UseFixed(instr->context(), cp);
|
||||
LOperand* obj =
|
||||
UseFixed(instr->object(), StoreDescriptor::ReceiverRegister());
|
||||
LOperand* key = UseFixed(instr->key(), StoreDescriptor::NameRegister());
|
||||
LOperand* val = UseFixed(instr->value(), StoreDescriptor::ValueRegister());
|
||||
|
||||
DCHECK(instr->object()->representation().IsTagged());
|
||||
DCHECK(instr->key()->representation().IsTagged());
|
||||
DCHECK(instr->value()->representation().IsTagged());
|
||||
|
||||
LOperand* slot = FixedTemp(StoreWithVectorDescriptor::SlotRegister());
|
||||
LOperand* vector = FixedTemp(StoreWithVectorDescriptor::VectorRegister());
|
||||
|
||||
LStoreKeyedGeneric* result =
|
||||
new (zone()) LStoreKeyedGeneric(context, obj, key, val, slot, vector);
|
||||
return MarkAsCall(result, instr);
|
||||
}
|
||||
|
||||
|
||||
LInstruction* LChunkBuilder::DoTransitionElementsKind(
|
||||
HTransitionElementsKind* instr) {
|
||||
if (IsSimpleMapChangeTransition(instr->from_kind(), instr->to_kind())) {
|
||||
|
@ -132,7 +132,6 @@ class LCodeGen;
|
||||
V(StoreCodeEntry) \
|
||||
V(StoreContextSlot) \
|
||||
V(StoreKeyed) \
|
||||
V(StoreKeyedGeneric) \
|
||||
V(StoreNamedField) \
|
||||
V(StringAdd) \
|
||||
V(StringCharCodeAt) \
|
||||
@ -2040,34 +2039,6 @@ class LStoreKeyed final : public LTemplateInstruction<0, 4, 0> {
|
||||
};
|
||||
|
||||
|
||||
class LStoreKeyedGeneric final : public LTemplateInstruction<0, 4, 2> {
|
||||
public:
|
||||
LStoreKeyedGeneric(LOperand* context, LOperand* object, LOperand* key,
|
||||
LOperand* value, LOperand* slot, LOperand* vector) {
|
||||
inputs_[0] = context;
|
||||
inputs_[1] = object;
|
||||
inputs_[2] = key;
|
||||
inputs_[3] = value;
|
||||
temps_[0] = slot;
|
||||
temps_[1] = vector;
|
||||
}
|
||||
|
||||
LOperand* context() { return inputs_[0]; }
|
||||
LOperand* object() { return inputs_[1]; }
|
||||
LOperand* key() { return inputs_[2]; }
|
||||
LOperand* value() { return inputs_[3]; }
|
||||
LOperand* temp_slot() { return temps_[0]; }
|
||||
LOperand* temp_vector() { return temps_[1]; }
|
||||
|
||||
DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic")
|
||||
DECLARE_HYDROGEN_ACCESSOR(StoreKeyedGeneric)
|
||||
|
||||
void PrintDataTo(StringStream* stream) override;
|
||||
|
||||
LanguageMode language_mode() { return hydrogen()->language_mode(); }
|
||||
};
|
||||
|
||||
|
||||
class LTransitionElementsKind final : public LTemplateInstruction<0, 2, 1> {
|
||||
public:
|
||||
LTransitionElementsKind(LOperand* object,
|
||||
|
@ -2596,20 +2596,6 @@ void LCodeGen::EmitVectorLoadICRegisters(T* instr) {
|
||||
}
|
||||
|
||||
|
||||
template <class T>
|
||||
void LCodeGen::EmitVectorStoreICRegisters(T* instr) {
|
||||
Register vector_register = ToRegister(instr->temp_vector());
|
||||
Register slot_register = ToRegister(instr->temp_slot());
|
||||
|
||||
AllowDeferredHandleDereference vector_structure_check;
|
||||
Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector();
|
||||
__ Move(vector_register, vector);
|
||||
FeedbackVectorSlot slot = instr->hydrogen()->slot();
|
||||
int index = vector->GetIndex(slot);
|
||||
__ mov(slot_register, Operand(Smi::FromInt(index)));
|
||||
}
|
||||
|
||||
|
||||
void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
|
||||
DCHECK(ToRegister(instr->context()).is(cp));
|
||||
DCHECK(ToRegister(instr->result()).is(r0));
|
||||
@ -4050,21 +4036,6 @@ void LCodeGen::DoStoreKeyed(LStoreKeyed* instr) {
|
||||
}
|
||||
|
||||
|
||||
void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) {
|
||||
DCHECK(ToRegister(instr->context()).is(cp));
|
||||
DCHECK(ToRegister(instr->object()).is(StoreDescriptor::ReceiverRegister()));
|
||||
DCHECK(ToRegister(instr->key()).is(StoreDescriptor::NameRegister()));
|
||||
DCHECK(ToRegister(instr->value()).is(StoreDescriptor::ValueRegister()));
|
||||
|
||||
EmitVectorStoreICRegisters<LStoreKeyedGeneric>(instr);
|
||||
|
||||
Handle<Code> ic = CodeFactory::KeyedStoreICInOptimizedCode(
|
||||
isolate(), instr->language_mode())
|
||||
.code();
|
||||
CallCode(ic, RelocInfo::CODE_TARGET, instr, NEVER_INLINE_TARGET_ADDRESS);
|
||||
}
|
||||
|
||||
|
||||
void LCodeGen::DoMaybeGrowElements(LMaybeGrowElements* instr) {
|
||||
class DeferredMaybeGrowElements final : public LDeferredCode {
|
||||
public:
|
||||
|
@ -311,8 +311,6 @@ class LCodeGen: public LCodeGenBase {
|
||||
|
||||
template <class T>
|
||||
void EmitVectorLoadICRegisters(T* instr);
|
||||
template <class T>
|
||||
void EmitVectorStoreICRegisters(T* instr);
|
||||
|
||||
ZoneList<Deoptimizer::JumpTableEntry> jump_table_;
|
||||
Scope* const scope_;
|
||||
|
@ -252,15 +252,6 @@ void LStoreContextSlot::PrintDataTo(StringStream* stream) {
|
||||
}
|
||||
|
||||
|
||||
void LStoreKeyedGeneric::PrintDataTo(StringStream* stream) {
|
||||
object()->PrintTo(stream);
|
||||
stream->Add("[");
|
||||
key()->PrintTo(stream);
|
||||
stream->Add("] <- ");
|
||||
value()->PrintTo(stream);
|
||||
}
|
||||
|
||||
|
||||
void LStoreNamedField::PrintDataTo(StringStream* stream) {
|
||||
object()->PrintTo(stream);
|
||||
std::ostringstream os;
|
||||
@ -2200,26 +2191,6 @@ LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) {
|
||||
}
|
||||
|
||||
|
||||
LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) {
|
||||
LOperand* context = UseFixed(instr->context(), cp);
|
||||
LOperand* object =
|
||||
UseFixed(instr->object(), StoreDescriptor::ReceiverRegister());
|
||||
LOperand* key = UseFixed(instr->key(), StoreDescriptor::NameRegister());
|
||||
LOperand* value = UseFixed(instr->value(), StoreDescriptor::ValueRegister());
|
||||
|
||||
DCHECK(instr->object()->representation().IsTagged());
|
||||
DCHECK(instr->key()->representation().IsTagged());
|
||||
DCHECK(instr->value()->representation().IsTagged());
|
||||
|
||||
LOperand* slot = FixedTemp(StoreWithVectorDescriptor::SlotRegister());
|
||||
LOperand* vector = FixedTemp(StoreWithVectorDescriptor::VectorRegister());
|
||||
|
||||
LStoreKeyedGeneric* result = new (zone())
|
||||
LStoreKeyedGeneric(context, object, key, value, slot, vector);
|
||||
return MarkAsCall(result, instr);
|
||||
}
|
||||
|
||||
|
||||
LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) {
|
||||
// TODO(jbramley): It might be beneficial to allow value to be a constant in
|
||||
// some cases. x64 makes use of this with FLAG_track_fields, for example.
|
||||
|
@ -143,7 +143,6 @@ class LCodeGen;
|
||||
V(StoreKeyedExternal) \
|
||||
V(StoreKeyedFixed) \
|
||||
V(StoreKeyedFixedDouble) \
|
||||
V(StoreKeyedGeneric) \
|
||||
V(StoreNamedField) \
|
||||
V(StringAdd) \
|
||||
V(StringCharCodeAt) \
|
||||
@ -2335,34 +2334,6 @@ class LStoreKeyedFixedDouble final : public LStoreKeyed<1> {
|
||||
};
|
||||
|
||||
|
||||
class LStoreKeyedGeneric final : public LTemplateInstruction<0, 4, 2> {
|
||||
public:
|
||||
LStoreKeyedGeneric(LOperand* context, LOperand* object, LOperand* key,
|
||||
LOperand* value, LOperand* slot, LOperand* vector) {
|
||||
inputs_[0] = context;
|
||||
inputs_[1] = object;
|
||||
inputs_[2] = key;
|
||||
inputs_[3] = value;
|
||||
temps_[0] = slot;
|
||||
temps_[1] = vector;
|
||||
}
|
||||
|
||||
LOperand* context() { return inputs_[0]; }
|
||||
LOperand* object() { return inputs_[1]; }
|
||||
LOperand* key() { return inputs_[2]; }
|
||||
LOperand* value() { return inputs_[3]; }
|
||||
LOperand* temp_slot() { return temps_[0]; }
|
||||
LOperand* temp_vector() { return temps_[1]; }
|
||||
|
||||
DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic")
|
||||
DECLARE_HYDROGEN_ACCESSOR(StoreKeyedGeneric)
|
||||
|
||||
void PrintDataTo(StringStream* stream) override;
|
||||
|
||||
LanguageMode language_mode() { return hydrogen()->language_mode(); }
|
||||
};
|
||||
|
||||
|
||||
class LStoreNamedField final : public LTemplateInstruction<0, 2, 2> {
|
||||
public:
|
||||
LStoreNamedField(LOperand* object, LOperand* value,
|
||||
|
@ -3016,20 +3016,6 @@ void LCodeGen::EmitVectorLoadICRegisters(T* instr) {
|
||||
}
|
||||
|
||||
|
||||
template <class T>
|
||||
void LCodeGen::EmitVectorStoreICRegisters(T* instr) {
|
||||
Register vector_register = ToRegister(instr->temp_vector());
|
||||
Register slot_register = ToRegister(instr->temp_slot());
|
||||
|
||||
AllowDeferredHandleDereference vector_structure_check;
|
||||
Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector();
|
||||
__ Mov(vector_register, vector);
|
||||
FeedbackVectorSlot slot = instr->hydrogen()->slot();
|
||||
int index = vector->GetIndex(slot);
|
||||
__ Mov(slot_register, Smi::FromInt(index));
|
||||
}
|
||||
|
||||
|
||||
void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
|
||||
DCHECK(ToRegister(instr->context()).is(cp));
|
||||
DCHECK(ToRegister(instr->result()).Is(x0));
|
||||
@ -4928,21 +4914,6 @@ void LCodeGen::DoStoreKeyedFixed(LStoreKeyedFixed* instr) {
|
||||
}
|
||||
|
||||
|
||||
void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) {
|
||||
DCHECK(ToRegister(instr->context()).is(cp));
|
||||
DCHECK(ToRegister(instr->object()).is(StoreDescriptor::ReceiverRegister()));
|
||||
DCHECK(ToRegister(instr->key()).is(StoreDescriptor::NameRegister()));
|
||||
DCHECK(ToRegister(instr->value()).is(StoreDescriptor::ValueRegister()));
|
||||
|
||||
EmitVectorStoreICRegisters<LStoreKeyedGeneric>(instr);
|
||||
|
||||
Handle<Code> ic = CodeFactory::KeyedStoreICInOptimizedCode(
|
||||
isolate(), instr->language_mode())
|
||||
.code();
|
||||
CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
||||
}
|
||||
|
||||
|
||||
void LCodeGen::DoMaybeGrowElements(LMaybeGrowElements* instr) {
|
||||
class DeferredMaybeGrowElements final : public LDeferredCode {
|
||||
public:
|
||||
|
@ -186,8 +186,6 @@ class LCodeGen: public LCodeGenBase {
|
||||
|
||||
template <class T>
|
||||
void EmitVectorLoadICRegisters(T* instr);
|
||||
template <class T>
|
||||
void EmitVectorStoreICRegisters(T* instr);
|
||||
|
||||
// Emits optimized code for %_IsString(x). Preserves input register.
|
||||
// Returns the condition on which a final split to
|
||||
|
@ -864,7 +864,6 @@ bool HInstruction::CanDeoptimize() {
|
||||
case HValue::kSimulate:
|
||||
case HValue::kStackCheck:
|
||||
case HValue::kStoreContextSlot:
|
||||
case HValue::kStoreKeyedGeneric:
|
||||
case HValue::kStringAdd:
|
||||
case HValue::kStringCompareAndBranch:
|
||||
case HValue::kSub:
|
||||
@ -3045,13 +3044,6 @@ std::ostream& HStoreKeyed::PrintDataTo(std::ostream& os) const { // NOLINT
|
||||
}
|
||||
|
||||
|
||||
std::ostream& HStoreKeyedGeneric::PrintDataTo(
|
||||
std::ostream& os) const { // NOLINT
|
||||
return os << NameOf(object()) << "[" << NameOf(key())
|
||||
<< "] = " << NameOf(value());
|
||||
}
|
||||
|
||||
|
||||
std::ostream& HTransitionElementsKind::PrintDataTo(
|
||||
std::ostream& os) const { // NOLINT
|
||||
os << NameOf(object());
|
||||
|
@ -133,7 +133,6 @@ class SmallMapList;
|
||||
V(StoreCodeEntry) \
|
||||
V(StoreContextSlot) \
|
||||
V(StoreKeyed) \
|
||||
V(StoreKeyedGeneric) \
|
||||
V(StoreNamedField) \
|
||||
V(StringAdd) \
|
||||
V(StringCharCodeAt) \
|
||||
@ -6509,50 +6508,6 @@ class HStoreKeyed final : public HTemplateInstruction<4>,
|
||||
HValue* dominator_;
|
||||
};
|
||||
|
||||
class HStoreKeyedGeneric final : public HTemplateInstruction<4> {
|
||||
public:
|
||||
DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P6(HStoreKeyedGeneric, HValue*,
|
||||
HValue*, HValue*, LanguageMode,
|
||||
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_; }
|
||||
|
||||
Representation RequiredInputRepresentation(int index) override {
|
||||
// tagged[tagged] = tagged
|
||||
return Representation::Tagged();
|
||||
}
|
||||
|
||||
FeedbackVectorSlot slot() const { return slot_; }
|
||||
Handle<TypeFeedbackVector> feedback_vector() const {
|
||||
return feedback_vector_;
|
||||
}
|
||||
|
||||
std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT
|
||||
|
||||
DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric)
|
||||
|
||||
private:
|
||||
HStoreKeyedGeneric(HValue* context, HValue* object, HValue* key,
|
||||
HValue* value, LanguageMode language_mode,
|
||||
Handle<TypeFeedbackVector> vector, FeedbackVectorSlot slot)
|
||||
: feedback_vector_(vector), slot_(slot), language_mode_(language_mode) {
|
||||
SetOperandAt(0, object);
|
||||
SetOperandAt(1, key);
|
||||
SetOperandAt(2, value);
|
||||
SetOperandAt(3, context);
|
||||
SetAllSideEffects();
|
||||
}
|
||||
|
||||
Handle<TypeFeedbackVector> feedback_vector_;
|
||||
FeedbackVectorSlot slot_;
|
||||
LanguageMode language_mode_;
|
||||
};
|
||||
|
||||
class HTransitionElementsKind final : public HTemplateInstruction<2> {
|
||||
public:
|
||||
inline static HTransitionElementsKind* New(Isolate* isolate, Zone* zone,
|
||||
|
@ -7200,26 +7200,28 @@ HInstruction* HOptimizedGraphBuilder::BuildNamedGeneric(
|
||||
Handle<TypeFeedbackVector> vector =
|
||||
handle(current_feedback_vector(), isolate());
|
||||
|
||||
HValue* key = Add<HConstant>(name);
|
||||
HValue* vector_value = Add<HConstant>(vector);
|
||||
HValue* slot_value = Add<HConstant>(vector->GetIndex(slot));
|
||||
HValue* values[] = {context(), object, key,
|
||||
value, slot_value, vector_value};
|
||||
|
||||
if (current_feedback_vector()->GetKind(slot) ==
|
||||
FeedbackVectorSlotKind::KEYED_STORE_IC) {
|
||||
// It's possible that a keyed store of a constant string was converted
|
||||
// to a named store. Here, at the last minute, we need to make sure to
|
||||
// use a generic Keyed Store if we are using the type vector, because
|
||||
// it has to share information with full code.
|
||||
HConstant* key = Add<HConstant>(name);
|
||||
HStoreKeyedGeneric* result = New<HStoreKeyedGeneric>(
|
||||
object, key, value, function_language_mode(), vector, slot);
|
||||
Callable callable = CodeFactory::KeyedStoreICInOptimizedCode(
|
||||
isolate(), function_language_mode());
|
||||
HValue* stub = Add<HConstant>(callable.code());
|
||||
HCallWithDescriptor* result = New<HCallWithDescriptor>(
|
||||
stub, 0, callable.descriptor(), ArrayVector(values));
|
||||
return result;
|
||||
}
|
||||
|
||||
HValue* name_value = Add<HConstant>(name);
|
||||
HValue* vector_value = Add<HConstant>(vector);
|
||||
HValue* slot_value = Add<HConstant>(vector->GetIndex(slot));
|
||||
Callable callable = CodeFactory::StoreICInOptimizedCode(
|
||||
isolate(), function_language_mode());
|
||||
HValue* stub = Add<HConstant>(callable.code());
|
||||
HValue* values[] = {context(), object, name_value,
|
||||
value, slot_value, vector_value};
|
||||
HCallWithDescriptor* result = New<HCallWithDescriptor>(
|
||||
stub, 0, callable.descriptor(), ArrayVector(values));
|
||||
return result;
|
||||
@ -7237,8 +7239,16 @@ HInstruction* HOptimizedGraphBuilder::BuildKeyedGeneric(
|
||||
New<HLoadKeyedGeneric>(object, key, vector, slot);
|
||||
return result;
|
||||
} else {
|
||||
HStoreKeyedGeneric* result = New<HStoreKeyedGeneric>(
|
||||
object, key, value, function_language_mode(), vector, slot);
|
||||
HValue* vector_value = Add<HConstant>(vector);
|
||||
HValue* slot_value = Add<HConstant>(vector->GetIndex(slot));
|
||||
HValue* values[] = {context(), object, key,
|
||||
value, slot_value, vector_value};
|
||||
|
||||
Callable callable = CodeFactory::KeyedStoreICInOptimizedCode(
|
||||
isolate(), function_language_mode());
|
||||
HValue* stub = Add<HConstant>(callable.code());
|
||||
HCallWithDescriptor* result = New<HCallWithDescriptor>(
|
||||
stub, 0, callable.descriptor(), ArrayVector(values));
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
@ -2392,20 +2392,6 @@ void LCodeGen::EmitVectorLoadICRegisters(T* instr) {
|
||||
}
|
||||
|
||||
|
||||
template <class T>
|
||||
void LCodeGen::EmitVectorStoreICRegisters(T* instr) {
|
||||
Register vector_register = ToRegister(instr->temp_vector());
|
||||
Register slot_register = ToRegister(instr->temp_slot());
|
||||
|
||||
AllowDeferredHandleDereference vector_structure_check;
|
||||
Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector();
|
||||
__ mov(vector_register, vector);
|
||||
FeedbackVectorSlot slot = instr->hydrogen()->slot();
|
||||
int index = vector->GetIndex(slot);
|
||||
__ mov(slot_register, Immediate(Smi::FromInt(index)));
|
||||
}
|
||||
|
||||
|
||||
void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
|
||||
DCHECK(ToRegister(instr->context()).is(esi));
|
||||
DCHECK(ToRegister(instr->result()).is(eax));
|
||||
@ -3857,21 +3843,6 @@ void LCodeGen::DoStoreKeyed(LStoreKeyed* instr) {
|
||||
}
|
||||
|
||||
|
||||
void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) {
|
||||
DCHECK(ToRegister(instr->context()).is(esi));
|
||||
DCHECK(ToRegister(instr->object()).is(StoreDescriptor::ReceiverRegister()));
|
||||
DCHECK(ToRegister(instr->key()).is(StoreDescriptor::NameRegister()));
|
||||
DCHECK(ToRegister(instr->value()).is(StoreDescriptor::ValueRegister()));
|
||||
|
||||
EmitVectorStoreICRegisters<LStoreKeyedGeneric>(instr);
|
||||
|
||||
Handle<Code> ic = CodeFactory::KeyedStoreICInOptimizedCode(
|
||||
isolate(), instr->language_mode())
|
||||
.code();
|
||||
CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
||||
}
|
||||
|
||||
|
||||
void LCodeGen::DoTrapAllocationMemento(LTrapAllocationMemento* instr) {
|
||||
Register object = ToRegister(instr->object());
|
||||
Register temp = ToRegister(instr->temp());
|
||||
|
@ -294,8 +294,6 @@ class LCodeGen: public LCodeGenBase {
|
||||
|
||||
template <class T>
|
||||
void EmitVectorLoadICRegisters(T* instr);
|
||||
template <class T>
|
||||
void EmitVectorStoreICRegisters(T* instr);
|
||||
|
||||
void EmitReturn(LReturn* instr);
|
||||
|
||||
|
@ -383,15 +383,6 @@ void LStoreKeyed::PrintDataTo(StringStream* stream) {
|
||||
}
|
||||
|
||||
|
||||
void LStoreKeyedGeneric::PrintDataTo(StringStream* stream) {
|
||||
object()->PrintTo(stream);
|
||||
stream->Add("[");
|
||||
key()->PrintTo(stream);
|
||||
stream->Add("] <- ");
|
||||
value()->PrintTo(stream);
|
||||
}
|
||||
|
||||
|
||||
void LTransitionElementsKind::PrintDataTo(StringStream* stream) {
|
||||
object()->PrintTo(stream);
|
||||
stream->Add(" %p -> %p", *original_map(), *transitioned_map());
|
||||
@ -2202,26 +2193,6 @@ LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) {
|
||||
}
|
||||
|
||||
|
||||
LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) {
|
||||
LOperand* context = UseFixed(instr->context(), esi);
|
||||
LOperand* object =
|
||||
UseFixed(instr->object(), StoreDescriptor::ReceiverRegister());
|
||||
LOperand* key = UseFixed(instr->key(), StoreDescriptor::NameRegister());
|
||||
LOperand* value = UseFixed(instr->value(), StoreDescriptor::ValueRegister());
|
||||
|
||||
DCHECK(instr->object()->representation().IsTagged());
|
||||
DCHECK(instr->key()->representation().IsTagged());
|
||||
DCHECK(instr->value()->representation().IsTagged());
|
||||
|
||||
LOperand* slot = FixedTemp(StoreWithVectorDescriptor::SlotRegister());
|
||||
LOperand* vector = FixedTemp(StoreWithVectorDescriptor::VectorRegister());
|
||||
|
||||
LStoreKeyedGeneric* result = new (zone())
|
||||
LStoreKeyedGeneric(context, object, key, value, slot, vector);
|
||||
return MarkAsCall(result, instr);
|
||||
}
|
||||
|
||||
|
||||
LInstruction* LChunkBuilder::DoTransitionElementsKind(
|
||||
HTransitionElementsKind* instr) {
|
||||
if (IsSimpleMapChangeTransition(instr->from_kind(), instr->to_kind())) {
|
||||
|
@ -136,7 +136,6 @@ class LCodeGen;
|
||||
V(StoreCodeEntry) \
|
||||
V(StoreContextSlot) \
|
||||
V(StoreKeyed) \
|
||||
V(StoreKeyedGeneric) \
|
||||
V(StoreNamedField) \
|
||||
V(StringAdd) \
|
||||
V(StringCharCodeAt) \
|
||||
@ -2051,34 +2050,6 @@ class LStoreKeyed final : public LTemplateInstruction<0, 4, 0> {
|
||||
};
|
||||
|
||||
|
||||
class LStoreKeyedGeneric final : public LTemplateInstruction<0, 4, 2> {
|
||||
public:
|
||||
LStoreKeyedGeneric(LOperand* context, LOperand* object, LOperand* key,
|
||||
LOperand* value, LOperand* slot, LOperand* vector) {
|
||||
inputs_[0] = context;
|
||||
inputs_[1] = object;
|
||||
inputs_[2] = key;
|
||||
inputs_[3] = value;
|
||||
temps_[0] = slot;
|
||||
temps_[1] = vector;
|
||||
}
|
||||
|
||||
LOperand* context() { return inputs_[0]; }
|
||||
LOperand* object() { return inputs_[1]; }
|
||||
LOperand* key() { return inputs_[2]; }
|
||||
LOperand* value() { return inputs_[3]; }
|
||||
LOperand* temp_slot() { return temps_[0]; }
|
||||
LOperand* temp_vector() { return temps_[1]; }
|
||||
|
||||
DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic")
|
||||
DECLARE_HYDROGEN_ACCESSOR(StoreKeyedGeneric)
|
||||
|
||||
void PrintDataTo(StringStream* stream) override;
|
||||
|
||||
LanguageMode language_mode() { return hydrogen()->language_mode(); }
|
||||
};
|
||||
|
||||
|
||||
class LTransitionElementsKind final : public LTemplateInstruction<0, 2, 2> {
|
||||
public:
|
||||
LTransitionElementsKind(LOperand* object,
|
||||
|
@ -2493,20 +2493,6 @@ void LCodeGen::EmitVectorLoadICRegisters(T* instr) {
|
||||
}
|
||||
|
||||
|
||||
template <class T>
|
||||
void LCodeGen::EmitVectorStoreICRegisters(T* instr) {
|
||||
Register vector_register = ToRegister(instr->temp_vector());
|
||||
Register slot_register = ToRegister(instr->temp_slot());
|
||||
|
||||
AllowDeferredHandleDereference vector_structure_check;
|
||||
Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector();
|
||||
__ li(vector_register, vector);
|
||||
FeedbackVectorSlot slot = instr->hydrogen()->slot();
|
||||
int index = vector->GetIndex(slot);
|
||||
__ li(slot_register, Operand(Smi::FromInt(index)));
|
||||
}
|
||||
|
||||
|
||||
void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
|
||||
DCHECK(ToRegister(instr->context()).is(cp));
|
||||
DCHECK(ToRegister(instr->result()).is(v0));
|
||||
@ -4006,21 +3992,6 @@ void LCodeGen::DoStoreKeyed(LStoreKeyed* instr) {
|
||||
}
|
||||
|
||||
|
||||
void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) {
|
||||
DCHECK(ToRegister(instr->context()).is(cp));
|
||||
DCHECK(ToRegister(instr->object()).is(StoreDescriptor::ReceiverRegister()));
|
||||
DCHECK(ToRegister(instr->key()).is(StoreDescriptor::NameRegister()));
|
||||
DCHECK(ToRegister(instr->value()).is(StoreDescriptor::ValueRegister()));
|
||||
|
||||
EmitVectorStoreICRegisters<LStoreKeyedGeneric>(instr);
|
||||
|
||||
Handle<Code> ic = CodeFactory::KeyedStoreICInOptimizedCode(
|
||||
isolate(), instr->language_mode())
|
||||
.code();
|
||||
CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
||||
}
|
||||
|
||||
|
||||
void LCodeGen::DoMaybeGrowElements(LMaybeGrowElements* instr) {
|
||||
class DeferredMaybeGrowElements final : public LDeferredCode {
|
||||
public:
|
||||
|
@ -340,8 +340,6 @@ class LCodeGen: public LCodeGenBase {
|
||||
|
||||
template <class T>
|
||||
void EmitVectorLoadICRegisters(T* instr);
|
||||
template <class T>
|
||||
void EmitVectorStoreICRegisters(T* instr);
|
||||
|
||||
ZoneList<Deoptimizer::JumpTableEntry> jump_table_;
|
||||
Scope* const scope_;
|
||||
|
@ -343,15 +343,6 @@ void LStoreKeyed::PrintDataTo(StringStream* stream) {
|
||||
}
|
||||
|
||||
|
||||
void LStoreKeyedGeneric::PrintDataTo(StringStream* stream) {
|
||||
object()->PrintTo(stream);
|
||||
stream->Add("[");
|
||||
key()->PrintTo(stream);
|
||||
stream->Add("] <- ");
|
||||
value()->PrintTo(stream);
|
||||
}
|
||||
|
||||
|
||||
void LTransitionElementsKind::PrintDataTo(StringStream* stream) {
|
||||
object()->PrintTo(stream);
|
||||
stream->Add(" %p -> %p", *original_map(), *transitioned_map());
|
||||
@ -2118,26 +2109,6 @@ LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) {
|
||||
}
|
||||
|
||||
|
||||
LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) {
|
||||
LOperand* context = UseFixed(instr->context(), cp);
|
||||
LOperand* obj =
|
||||
UseFixed(instr->object(), StoreDescriptor::ReceiverRegister());
|
||||
LOperand* key = UseFixed(instr->key(), StoreDescriptor::NameRegister());
|
||||
LOperand* val = UseFixed(instr->value(), StoreDescriptor::ValueRegister());
|
||||
|
||||
DCHECK(instr->object()->representation().IsTagged());
|
||||
DCHECK(instr->key()->representation().IsTagged());
|
||||
DCHECK(instr->value()->representation().IsTagged());
|
||||
|
||||
LOperand* slot = FixedTemp(StoreWithVectorDescriptor::SlotRegister());
|
||||
LOperand* vector = FixedTemp(StoreWithVectorDescriptor::VectorRegister());
|
||||
|
||||
LStoreKeyedGeneric* result =
|
||||
new (zone()) LStoreKeyedGeneric(context, obj, key, val, slot, vector);
|
||||
return MarkAsCall(result, instr);
|
||||
}
|
||||
|
||||
|
||||
LInstruction* LChunkBuilder::DoTransitionElementsKind(
|
||||
HTransitionElementsKind* instr) {
|
||||
if (IsSimpleMapChangeTransition(instr->from_kind(), instr->to_kind())) {
|
||||
|
@ -131,7 +131,6 @@ class LCodeGen;
|
||||
V(StoreCodeEntry) \
|
||||
V(StoreContextSlot) \
|
||||
V(StoreKeyed) \
|
||||
V(StoreKeyedGeneric) \
|
||||
V(StoreNamedField) \
|
||||
V(StringAdd) \
|
||||
V(StringCharCodeAt) \
|
||||
@ -1998,34 +1997,6 @@ class LStoreKeyed final : public LTemplateInstruction<0, 4, 0> {
|
||||
};
|
||||
|
||||
|
||||
class LStoreKeyedGeneric final : public LTemplateInstruction<0, 4, 2> {
|
||||
public:
|
||||
LStoreKeyedGeneric(LOperand* context, LOperand* object, LOperand* key,
|
||||
LOperand* value, LOperand* slot, LOperand* vector) {
|
||||
inputs_[0] = context;
|
||||
inputs_[1] = object;
|
||||
inputs_[2] = key;
|
||||
inputs_[3] = value;
|
||||
temps_[0] = slot;
|
||||
temps_[1] = vector;
|
||||
}
|
||||
|
||||
LOperand* context() { return inputs_[0]; }
|
||||
LOperand* object() { return inputs_[1]; }
|
||||
LOperand* key() { return inputs_[2]; }
|
||||
LOperand* value() { return inputs_[3]; }
|
||||
LOperand* temp_slot() { return temps_[0]; }
|
||||
LOperand* temp_vector() { return temps_[1]; }
|
||||
|
||||
DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic")
|
||||
DECLARE_HYDROGEN_ACCESSOR(StoreKeyedGeneric)
|
||||
|
||||
void PrintDataTo(StringStream* stream) override;
|
||||
|
||||
LanguageMode language_mode() { return hydrogen()->language_mode(); }
|
||||
};
|
||||
|
||||
|
||||
class LTransitionElementsKind final : public LTemplateInstruction<0, 2, 1> {
|
||||
public:
|
||||
LTransitionElementsKind(LOperand* object,
|
||||
|
@ -2617,20 +2617,6 @@ void LCodeGen::EmitVectorLoadICRegisters(T* instr) {
|
||||
}
|
||||
|
||||
|
||||
template <class T>
|
||||
void LCodeGen::EmitVectorStoreICRegisters(T* instr) {
|
||||
Register vector_register = ToRegister(instr->temp_vector());
|
||||
Register slot_register = ToRegister(instr->temp_slot());
|
||||
|
||||
AllowDeferredHandleDereference vector_structure_check;
|
||||
Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector();
|
||||
__ li(vector_register, vector);
|
||||
FeedbackVectorSlot slot = instr->hydrogen()->slot();
|
||||
int index = vector->GetIndex(slot);
|
||||
__ li(slot_register, Operand(Smi::FromInt(index)));
|
||||
}
|
||||
|
||||
|
||||
void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
|
||||
DCHECK(ToRegister(instr->context()).is(cp));
|
||||
DCHECK(ToRegister(instr->result()).is(v0));
|
||||
@ -4241,21 +4227,6 @@ void LCodeGen::DoStoreKeyed(LStoreKeyed* instr) {
|
||||
}
|
||||
|
||||
|
||||
void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) {
|
||||
DCHECK(ToRegister(instr->context()).is(cp));
|
||||
DCHECK(ToRegister(instr->object()).is(StoreDescriptor::ReceiverRegister()));
|
||||
DCHECK(ToRegister(instr->key()).is(StoreDescriptor::NameRegister()));
|
||||
DCHECK(ToRegister(instr->value()).is(StoreDescriptor::ValueRegister()));
|
||||
|
||||
EmitVectorStoreICRegisters<LStoreKeyedGeneric>(instr);
|
||||
|
||||
Handle<Code> ic = CodeFactory::KeyedStoreICInOptimizedCode(
|
||||
isolate(), instr->language_mode())
|
||||
.code();
|
||||
CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
||||
}
|
||||
|
||||
|
||||
void LCodeGen::DoMaybeGrowElements(LMaybeGrowElements* instr) {
|
||||
class DeferredMaybeGrowElements final : public LDeferredCode {
|
||||
public:
|
||||
|
@ -343,8 +343,6 @@ class LCodeGen: public LCodeGenBase {
|
||||
|
||||
template <class T>
|
||||
void EmitVectorLoadICRegisters(T* instr);
|
||||
template <class T>
|
||||
void EmitVectorStoreICRegisters(T* instr);
|
||||
|
||||
ZoneList<Deoptimizer::JumpTableEntry*> jump_table_;
|
||||
Scope* const scope_;
|
||||
|
@ -343,15 +343,6 @@ void LStoreKeyed::PrintDataTo(StringStream* stream) {
|
||||
}
|
||||
|
||||
|
||||
void LStoreKeyedGeneric::PrintDataTo(StringStream* stream) {
|
||||
object()->PrintTo(stream);
|
||||
stream->Add("[");
|
||||
key()->PrintTo(stream);
|
||||
stream->Add("] <- ");
|
||||
value()->PrintTo(stream);
|
||||
}
|
||||
|
||||
|
||||
void LTransitionElementsKind::PrintDataTo(StringStream* stream) {
|
||||
object()->PrintTo(stream);
|
||||
stream->Add(" %p -> %p", *original_map(), *transitioned_map());
|
||||
@ -2123,26 +2114,6 @@ LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) {
|
||||
}
|
||||
|
||||
|
||||
LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) {
|
||||
LOperand* context = UseFixed(instr->context(), cp);
|
||||
LOperand* obj =
|
||||
UseFixed(instr->object(), StoreDescriptor::ReceiverRegister());
|
||||
LOperand* key = UseFixed(instr->key(), StoreDescriptor::NameRegister());
|
||||
LOperand* val = UseFixed(instr->value(), StoreDescriptor::ValueRegister());
|
||||
|
||||
DCHECK(instr->object()->representation().IsTagged());
|
||||
DCHECK(instr->key()->representation().IsTagged());
|
||||
DCHECK(instr->value()->representation().IsTagged());
|
||||
|
||||
LOperand* slot = FixedTemp(StoreWithVectorDescriptor::SlotRegister());
|
||||
LOperand* vector = FixedTemp(StoreWithVectorDescriptor::VectorRegister());
|
||||
|
||||
LStoreKeyedGeneric* result =
|
||||
new (zone()) LStoreKeyedGeneric(context, obj, key, val, slot, vector);
|
||||
return MarkAsCall(result, instr);
|
||||
}
|
||||
|
||||
|
||||
LInstruction* LChunkBuilder::DoTransitionElementsKind(
|
||||
HTransitionElementsKind* instr) {
|
||||
if (IsSimpleMapChangeTransition(instr->from_kind(), instr->to_kind())) {
|
||||
|
@ -133,7 +133,6 @@ class LCodeGen;
|
||||
V(StoreCodeEntry) \
|
||||
V(StoreContextSlot) \
|
||||
V(StoreKeyed) \
|
||||
V(StoreKeyedGeneric) \
|
||||
V(StoreNamedField) \
|
||||
V(StringAdd) \
|
||||
V(StringCharCodeAt) \
|
||||
@ -2044,34 +2043,6 @@ class LStoreKeyed final : public LTemplateInstruction<0, 4, 0> {
|
||||
};
|
||||
|
||||
|
||||
class LStoreKeyedGeneric final : public LTemplateInstruction<0, 4, 2> {
|
||||
public:
|
||||
LStoreKeyedGeneric(LOperand* context, LOperand* object, LOperand* key,
|
||||
LOperand* value, LOperand* slot, LOperand* vector) {
|
||||
inputs_[0] = context;
|
||||
inputs_[1] = object;
|
||||
inputs_[2] = key;
|
||||
inputs_[3] = value;
|
||||
temps_[0] = slot;
|
||||
temps_[1] = vector;
|
||||
}
|
||||
|
||||
LOperand* context() { return inputs_[0]; }
|
||||
LOperand* object() { return inputs_[1]; }
|
||||
LOperand* key() { return inputs_[2]; }
|
||||
LOperand* value() { return inputs_[3]; }
|
||||
LOperand* temp_slot() { return temps_[0]; }
|
||||
LOperand* temp_vector() { return temps_[1]; }
|
||||
|
||||
DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic")
|
||||
DECLARE_HYDROGEN_ACCESSOR(StoreKeyedGeneric)
|
||||
|
||||
void PrintDataTo(StringStream* stream) override;
|
||||
|
||||
LanguageMode language_mode() { return hydrogen()->language_mode(); }
|
||||
};
|
||||
|
||||
|
||||
class LTransitionElementsKind final : public LTemplateInstruction<0, 2, 1> {
|
||||
public:
|
||||
LTransitionElementsKind(LOperand* object,
|
||||
|
@ -2671,20 +2671,6 @@ void LCodeGen::EmitVectorLoadICRegisters(T* instr) {
|
||||
}
|
||||
|
||||
|
||||
template <class T>
|
||||
void LCodeGen::EmitVectorStoreICRegisters(T* instr) {
|
||||
Register vector_register = ToRegister(instr->temp_vector());
|
||||
Register slot_register = ToRegister(instr->temp_slot());
|
||||
|
||||
AllowDeferredHandleDereference vector_structure_check;
|
||||
Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector();
|
||||
__ Move(vector_register, vector);
|
||||
FeedbackVectorSlot slot = instr->hydrogen()->slot();
|
||||
int index = vector->GetIndex(slot);
|
||||
__ LoadSmiLiteral(slot_register, Smi::FromInt(index));
|
||||
}
|
||||
|
||||
|
||||
void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
|
||||
DCHECK(ToRegister(instr->context()).is(cp));
|
||||
DCHECK(ToRegister(instr->result()).is(r3));
|
||||
@ -4323,21 +4309,6 @@ void LCodeGen::DoStoreKeyed(LStoreKeyed* instr) {
|
||||
}
|
||||
|
||||
|
||||
void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) {
|
||||
DCHECK(ToRegister(instr->context()).is(cp));
|
||||
DCHECK(ToRegister(instr->object()).is(StoreDescriptor::ReceiverRegister()));
|
||||
DCHECK(ToRegister(instr->key()).is(StoreDescriptor::NameRegister()));
|
||||
DCHECK(ToRegister(instr->value()).is(StoreDescriptor::ValueRegister()));
|
||||
|
||||
EmitVectorStoreICRegisters<LStoreKeyedGeneric>(instr);
|
||||
|
||||
Handle<Code> ic = CodeFactory::KeyedStoreICInOptimizedCode(
|
||||
isolate(), instr->language_mode())
|
||||
.code();
|
||||
CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
||||
}
|
||||
|
||||
|
||||
void LCodeGen::DoMaybeGrowElements(LMaybeGrowElements* instr) {
|
||||
class DeferredMaybeGrowElements final : public LDeferredCode {
|
||||
public:
|
||||
|
@ -277,8 +277,6 @@ class LCodeGen : public LCodeGenBase {
|
||||
|
||||
template <class T>
|
||||
void EmitVectorLoadICRegisters(T* instr);
|
||||
template <class T>
|
||||
void EmitVectorStoreICRegisters(T* instr);
|
||||
|
||||
ZoneList<Deoptimizer::JumpTableEntry> jump_table_;
|
||||
Scope* const scope_;
|
||||
|
@ -349,15 +349,6 @@ void LStoreKeyed::PrintDataTo(StringStream* stream) {
|
||||
}
|
||||
|
||||
|
||||
void LStoreKeyedGeneric::PrintDataTo(StringStream* stream) {
|
||||
object()->PrintTo(stream);
|
||||
stream->Add("[");
|
||||
key()->PrintTo(stream);
|
||||
stream->Add("] <- ");
|
||||
value()->PrintTo(stream);
|
||||
}
|
||||
|
||||
|
||||
void LTransitionElementsKind::PrintDataTo(StringStream* stream) {
|
||||
object()->PrintTo(stream);
|
||||
stream->Add(" %p -> %p", *original_map(), *transitioned_map());
|
||||
@ -2141,26 +2132,6 @@ LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) {
|
||||
}
|
||||
|
||||
|
||||
LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) {
|
||||
LOperand* context = UseFixed(instr->context(), cp);
|
||||
LOperand* obj =
|
||||
UseFixed(instr->object(), StoreDescriptor::ReceiverRegister());
|
||||
LOperand* key = UseFixed(instr->key(), StoreDescriptor::NameRegister());
|
||||
LOperand* val = UseFixed(instr->value(), StoreDescriptor::ValueRegister());
|
||||
|
||||
DCHECK(instr->object()->representation().IsTagged());
|
||||
DCHECK(instr->key()->representation().IsTagged());
|
||||
DCHECK(instr->value()->representation().IsTagged());
|
||||
|
||||
LOperand* slot = FixedTemp(StoreWithVectorDescriptor::SlotRegister());
|
||||
LOperand* vector = FixedTemp(StoreWithVectorDescriptor::VectorRegister());
|
||||
|
||||
LStoreKeyedGeneric* result =
|
||||
new (zone()) LStoreKeyedGeneric(context, obj, key, val, slot, vector);
|
||||
return MarkAsCall(result, instr);
|
||||
}
|
||||
|
||||
|
||||
LInstruction* LChunkBuilder::DoTransitionElementsKind(
|
||||
HTransitionElementsKind* instr) {
|
||||
if (IsSimpleMapChangeTransition(instr->from_kind(), instr->to_kind())) {
|
||||
|
@ -134,7 +134,6 @@ class LCodeGen;
|
||||
V(StoreCodeEntry) \
|
||||
V(StoreContextSlot) \
|
||||
V(StoreKeyed) \
|
||||
V(StoreKeyedGeneric) \
|
||||
V(StoreNamedField) \
|
||||
V(StringAdd) \
|
||||
V(StringCharCodeAt) \
|
||||
@ -1987,34 +1986,6 @@ class LStoreKeyed final : public LTemplateInstruction<0, 4, 0> {
|
||||
};
|
||||
|
||||
|
||||
class LStoreKeyedGeneric final : public LTemplateInstruction<0, 4, 2> {
|
||||
public:
|
||||
LStoreKeyedGeneric(LOperand* context, LOperand* object, LOperand* key,
|
||||
LOperand* value, LOperand* slot, LOperand* vector) {
|
||||
inputs_[0] = context;
|
||||
inputs_[1] = object;
|
||||
inputs_[2] = key;
|
||||
inputs_[3] = value;
|
||||
temps_[0] = slot;
|
||||
temps_[1] = vector;
|
||||
}
|
||||
|
||||
LOperand* context() { return inputs_[0]; }
|
||||
LOperand* object() { return inputs_[1]; }
|
||||
LOperand* key() { return inputs_[2]; }
|
||||
LOperand* value() { return inputs_[3]; }
|
||||
LOperand* temp_slot() { return temps_[0]; }
|
||||
LOperand* temp_vector() { return temps_[1]; }
|
||||
|
||||
DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic")
|
||||
DECLARE_HYDROGEN_ACCESSOR(StoreKeyedGeneric)
|
||||
|
||||
void PrintDataTo(StringStream* stream) override;
|
||||
|
||||
LanguageMode language_mode() { return hydrogen()->language_mode(); }
|
||||
};
|
||||
|
||||
|
||||
class LTransitionElementsKind final : public LTemplateInstruction<0, 2, 1> {
|
||||
public:
|
||||
LTransitionElementsKind(LOperand* object, LOperand* context,
|
||||
|
@ -2646,19 +2646,6 @@ void LCodeGen::EmitVectorLoadICRegisters(T* instr) {
|
||||
__ LoadSmiLiteral(slot_register, Smi::FromInt(index));
|
||||
}
|
||||
|
||||
template <class T>
|
||||
void LCodeGen::EmitVectorStoreICRegisters(T* instr) {
|
||||
Register vector_register = ToRegister(instr->temp_vector());
|
||||
Register slot_register = ToRegister(instr->temp_slot());
|
||||
|
||||
AllowDeferredHandleDereference vector_structure_check;
|
||||
Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector();
|
||||
__ Move(vector_register, vector);
|
||||
FeedbackVectorSlot slot = instr->hydrogen()->slot();
|
||||
int index = vector->GetIndex(slot);
|
||||
__ LoadSmiLiteral(slot_register, Smi::FromInt(index));
|
||||
}
|
||||
|
||||
void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
|
||||
DCHECK(ToRegister(instr->context()).is(cp));
|
||||
DCHECK(ToRegister(instr->result()).is(r2));
|
||||
@ -4266,20 +4253,6 @@ void LCodeGen::DoStoreKeyed(LStoreKeyed* instr) {
|
||||
}
|
||||
}
|
||||
|
||||
void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) {
|
||||
DCHECK(ToRegister(instr->context()).is(cp));
|
||||
DCHECK(ToRegister(instr->object()).is(StoreDescriptor::ReceiverRegister()));
|
||||
DCHECK(ToRegister(instr->key()).is(StoreDescriptor::NameRegister()));
|
||||
DCHECK(ToRegister(instr->value()).is(StoreDescriptor::ValueRegister()));
|
||||
|
||||
EmitVectorStoreICRegisters<LStoreKeyedGeneric>(instr);
|
||||
|
||||
Handle<Code> ic = CodeFactory::KeyedStoreICInOptimizedCode(
|
||||
isolate(), instr->language_mode())
|
||||
.code();
|
||||
CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
||||
}
|
||||
|
||||
void LCodeGen::DoMaybeGrowElements(LMaybeGrowElements* instr) {
|
||||
class DeferredMaybeGrowElements final : public LDeferredCode {
|
||||
public:
|
||||
|
@ -276,8 +276,6 @@ class LCodeGen : public LCodeGenBase {
|
||||
|
||||
template <class T>
|
||||
void EmitVectorLoadICRegisters(T* instr);
|
||||
template <class T>
|
||||
void EmitVectorStoreICRegisters(T* instr);
|
||||
|
||||
ZoneList<Deoptimizer::JumpTableEntry> jump_table_;
|
||||
Scope* const scope_;
|
||||
|
@ -317,14 +317,6 @@ void LStoreKeyed::PrintDataTo(StringStream* stream) {
|
||||
}
|
||||
}
|
||||
|
||||
void LStoreKeyedGeneric::PrintDataTo(StringStream* stream) {
|
||||
object()->PrintTo(stream);
|
||||
stream->Add("[");
|
||||
key()->PrintTo(stream);
|
||||
stream->Add("] <- ");
|
||||
value()->PrintTo(stream);
|
||||
}
|
||||
|
||||
void LTransitionElementsKind::PrintDataTo(StringStream* stream) {
|
||||
object()->PrintTo(stream);
|
||||
stream->Add(" %p -> %p", *original_map(), *transitioned_map());
|
||||
@ -1960,25 +1952,6 @@ LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) {
|
||||
return new (zone()) LStoreKeyed(backing_store, key, val, backing_store_owner);
|
||||
}
|
||||
|
||||
LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) {
|
||||
LOperand* context = UseFixed(instr->context(), cp);
|
||||
LOperand* obj =
|
||||
UseFixed(instr->object(), StoreDescriptor::ReceiverRegister());
|
||||
LOperand* key = UseFixed(instr->key(), StoreDescriptor::NameRegister());
|
||||
LOperand* val = UseFixed(instr->value(), StoreDescriptor::ValueRegister());
|
||||
|
||||
DCHECK(instr->object()->representation().IsTagged());
|
||||
DCHECK(instr->key()->representation().IsTagged());
|
||||
DCHECK(instr->value()->representation().IsTagged());
|
||||
|
||||
LOperand* slot = FixedTemp(StoreWithVectorDescriptor::SlotRegister());
|
||||
LOperand* vector = FixedTemp(StoreWithVectorDescriptor::VectorRegister());
|
||||
|
||||
LStoreKeyedGeneric* result =
|
||||
new (zone()) LStoreKeyedGeneric(context, obj, key, val, slot, vector);
|
||||
return MarkAsCall(result, instr);
|
||||
}
|
||||
|
||||
LInstruction* LChunkBuilder::DoTransitionElementsKind(
|
||||
HTransitionElementsKind* instr) {
|
||||
if (IsSimpleMapChangeTransition(instr->from_kind(), instr->to_kind())) {
|
||||
|
@ -132,7 +132,6 @@ class LCodeGen;
|
||||
V(StoreCodeEntry) \
|
||||
V(StoreContextSlot) \
|
||||
V(StoreKeyed) \
|
||||
V(StoreKeyedGeneric) \
|
||||
V(StoreNamedField) \
|
||||
V(StringAdd) \
|
||||
V(StringCharCodeAt) \
|
||||
@ -1854,33 +1853,6 @@ class LStoreKeyed final : public LTemplateInstruction<0, 4, 0> {
|
||||
uint32_t base_offset() const { return hydrogen()->base_offset(); }
|
||||
};
|
||||
|
||||
class LStoreKeyedGeneric final : public LTemplateInstruction<0, 4, 2> {
|
||||
public:
|
||||
LStoreKeyedGeneric(LOperand* context, LOperand* object, LOperand* key,
|
||||
LOperand* value, LOperand* slot, LOperand* vector) {
|
||||
inputs_[0] = context;
|
||||
inputs_[1] = object;
|
||||
inputs_[2] = key;
|
||||
inputs_[3] = value;
|
||||
temps_[0] = slot;
|
||||
temps_[1] = vector;
|
||||
}
|
||||
|
||||
LOperand* context() { return inputs_[0]; }
|
||||
LOperand* object() { return inputs_[1]; }
|
||||
LOperand* key() { return inputs_[2]; }
|
||||
LOperand* value() { return inputs_[3]; }
|
||||
LOperand* temp_slot() { return temps_[0]; }
|
||||
LOperand* temp_vector() { return temps_[1]; }
|
||||
|
||||
DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic")
|
||||
DECLARE_HYDROGEN_ACCESSOR(StoreKeyedGeneric)
|
||||
|
||||
void PrintDataTo(StringStream* stream) override;
|
||||
|
||||
LanguageMode language_mode() { return hydrogen()->language_mode(); }
|
||||
};
|
||||
|
||||
class LTransitionElementsKind final : public LTemplateInstruction<0, 2, 1> {
|
||||
public:
|
||||
LTransitionElementsKind(LOperand* object, LOperand* context,
|
||||
|
@ -2534,20 +2534,6 @@ void LCodeGen::EmitVectorLoadICRegisters(T* instr) {
|
||||
}
|
||||
|
||||
|
||||
template <class T>
|
||||
void LCodeGen::EmitVectorStoreICRegisters(T* instr) {
|
||||
Register vector_register = ToRegister(instr->temp_vector());
|
||||
Register slot_register = ToRegister(instr->temp_slot());
|
||||
|
||||
AllowDeferredHandleDereference vector_structure_check;
|
||||
Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector();
|
||||
__ Move(vector_register, vector);
|
||||
FeedbackVectorSlot slot = instr->hydrogen()->slot();
|
||||
int index = vector->GetIndex(slot);
|
||||
__ Move(slot_register, Smi::FromInt(index));
|
||||
}
|
||||
|
||||
|
||||
void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
|
||||
DCHECK(ToRegister(instr->context()).is(rsi));
|
||||
DCHECK(ToRegister(instr->result()).is(rax));
|
||||
@ -4138,21 +4124,6 @@ void LCodeGen::DoStoreKeyed(LStoreKeyed* instr) {
|
||||
}
|
||||
|
||||
|
||||
void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) {
|
||||
DCHECK(ToRegister(instr->context()).is(rsi));
|
||||
DCHECK(ToRegister(instr->object()).is(StoreDescriptor::ReceiverRegister()));
|
||||
DCHECK(ToRegister(instr->key()).is(StoreDescriptor::NameRegister()));
|
||||
DCHECK(ToRegister(instr->value()).is(StoreDescriptor::ValueRegister()));
|
||||
|
||||
EmitVectorStoreICRegisters<LStoreKeyedGeneric>(instr);
|
||||
|
||||
Handle<Code> ic = CodeFactory::KeyedStoreICInOptimizedCode(
|
||||
isolate(), instr->language_mode())
|
||||
.code();
|
||||
CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
||||
}
|
||||
|
||||
|
||||
void LCodeGen::DoMaybeGrowElements(LMaybeGrowElements* instr) {
|
||||
class DeferredMaybeGrowElements final : public LDeferredCode {
|
||||
public:
|
||||
|
@ -297,8 +297,6 @@ class LCodeGen: public LCodeGenBase {
|
||||
|
||||
template <class T>
|
||||
void EmitVectorLoadICRegisters(T* instr);
|
||||
template <class T>
|
||||
void EmitVectorStoreICRegisters(T* instr);
|
||||
|
||||
#ifdef _MSC_VER
|
||||
// On windows, you may not access the stack more than one page below
|
||||
|
@ -380,15 +380,6 @@ void LStoreKeyed::PrintDataTo(StringStream* stream) {
|
||||
}
|
||||
|
||||
|
||||
void LStoreKeyedGeneric::PrintDataTo(StringStream* stream) {
|
||||
object()->PrintTo(stream);
|
||||
stream->Add("[");
|
||||
key()->PrintTo(stream);
|
||||
stream->Add("] <- ");
|
||||
value()->PrintTo(stream);
|
||||
}
|
||||
|
||||
|
||||
void LTransitionElementsKind::PrintDataTo(StringStream* stream) {
|
||||
object()->PrintTo(stream);
|
||||
stream->Add(" %p -> %p", *original_map(), *transitioned_map());
|
||||
@ -2214,26 +2205,6 @@ LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) {
|
||||
}
|
||||
|
||||
|
||||
LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) {
|
||||
LOperand* context = UseFixed(instr->context(), rsi);
|
||||
LOperand* object =
|
||||
UseFixed(instr->object(), StoreDescriptor::ReceiverRegister());
|
||||
LOperand* key = UseFixed(instr->key(), StoreDescriptor::NameRegister());
|
||||
LOperand* value = UseFixed(instr->value(), StoreDescriptor::ValueRegister());
|
||||
|
||||
DCHECK(instr->object()->representation().IsTagged());
|
||||
DCHECK(instr->key()->representation().IsTagged());
|
||||
DCHECK(instr->value()->representation().IsTagged());
|
||||
|
||||
LOperand* slot = FixedTemp(StoreWithVectorDescriptor::SlotRegister());
|
||||
LOperand* vector = FixedTemp(StoreWithVectorDescriptor::VectorRegister());
|
||||
|
||||
LStoreKeyedGeneric* result = new (zone())
|
||||
LStoreKeyedGeneric(context, object, key, value, slot, vector);
|
||||
return MarkAsCall(result, instr);
|
||||
}
|
||||
|
||||
|
||||
LInstruction* LChunkBuilder::DoTransitionElementsKind(
|
||||
HTransitionElementsKind* instr) {
|
||||
if (IsSimpleMapChangeTransition(instr->from_kind(), instr->to_kind())) {
|
||||
|
@ -132,7 +132,6 @@ class LCodeGen;
|
||||
V(StoreCodeEntry) \
|
||||
V(StoreContextSlot) \
|
||||
V(StoreKeyed) \
|
||||
V(StoreKeyedGeneric) \
|
||||
V(StoreNamedField) \
|
||||
V(StringAdd) \
|
||||
V(StringCharCodeAt) \
|
||||
@ -2040,34 +2039,6 @@ class LStoreKeyed final : public LTemplateInstruction<0, 4, 0> {
|
||||
};
|
||||
|
||||
|
||||
class LStoreKeyedGeneric final : public LTemplateInstruction<0, 4, 2> {
|
||||
public:
|
||||
LStoreKeyedGeneric(LOperand* context, LOperand* object, LOperand* key,
|
||||
LOperand* value, LOperand* slot, LOperand* vector) {
|
||||
inputs_[0] = context;
|
||||
inputs_[1] = object;
|
||||
inputs_[2] = key;
|
||||
inputs_[3] = value;
|
||||
temps_[0] = slot;
|
||||
temps_[1] = vector;
|
||||
}
|
||||
|
||||
LOperand* context() { return inputs_[0]; }
|
||||
LOperand* object() { return inputs_[1]; }
|
||||
LOperand* key() { return inputs_[2]; }
|
||||
LOperand* value() { return inputs_[3]; }
|
||||
LOperand* temp_slot() { return temps_[0]; }
|
||||
LOperand* temp_vector() { return temps_[1]; }
|
||||
|
||||
DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic")
|
||||
DECLARE_HYDROGEN_ACCESSOR(StoreKeyedGeneric)
|
||||
|
||||
void PrintDataTo(StringStream* stream) override;
|
||||
|
||||
LanguageMode language_mode() { return hydrogen()->language_mode(); }
|
||||
};
|
||||
|
||||
|
||||
class LTransitionElementsKind final : public LTemplateInstruction<0, 2, 2> {
|
||||
public:
|
||||
LTransitionElementsKind(LOperand* object,
|
||||
|
@ -2676,20 +2676,6 @@ void LCodeGen::EmitVectorLoadICRegisters(T* instr) {
|
||||
}
|
||||
|
||||
|
||||
template <class T>
|
||||
void LCodeGen::EmitVectorStoreICRegisters(T* instr) {
|
||||
Register vector_register = ToRegister(instr->temp_vector());
|
||||
Register slot_register = ToRegister(instr->temp_slot());
|
||||
|
||||
AllowDeferredHandleDereference vector_structure_check;
|
||||
Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector();
|
||||
__ mov(vector_register, vector);
|
||||
FeedbackVectorSlot slot = instr->hydrogen()->slot();
|
||||
int index = vector->GetIndex(slot);
|
||||
__ mov(slot_register, Immediate(Smi::FromInt(index)));
|
||||
}
|
||||
|
||||
|
||||
void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
|
||||
DCHECK(ToRegister(instr->context()).is(esi));
|
||||
DCHECK(ToRegister(instr->result()).is(eax));
|
||||
@ -4179,21 +4165,6 @@ void LCodeGen::DoStoreKeyed(LStoreKeyed* instr) {
|
||||
}
|
||||
|
||||
|
||||
void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) {
|
||||
DCHECK(ToRegister(instr->context()).is(esi));
|
||||
DCHECK(ToRegister(instr->object()).is(StoreDescriptor::ReceiverRegister()));
|
||||
DCHECK(ToRegister(instr->key()).is(StoreDescriptor::NameRegister()));
|
||||
DCHECK(ToRegister(instr->value()).is(StoreDescriptor::ValueRegister()));
|
||||
|
||||
EmitVectorStoreICRegisters<LStoreKeyedGeneric>(instr);
|
||||
|
||||
Handle<Code> ic = CodeFactory::KeyedStoreICInOptimizedCode(
|
||||
isolate(), instr->language_mode())
|
||||
.code();
|
||||
CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
||||
}
|
||||
|
||||
|
||||
void LCodeGen::DoTrapAllocationMemento(LTrapAllocationMemento* instr) {
|
||||
Register object = ToRegister(instr->object());
|
||||
Register temp = ToRegister(instr->temp());
|
||||
|
@ -323,8 +323,6 @@ class LCodeGen: public LCodeGenBase {
|
||||
|
||||
template <class T>
|
||||
void EmitVectorLoadICRegisters(T* instr);
|
||||
template <class T>
|
||||
void EmitVectorStoreICRegisters(T* instr);
|
||||
|
||||
void EmitReturn(LReturn* instr);
|
||||
|
||||
|
@ -394,15 +394,6 @@ void LStoreKeyed::PrintDataTo(StringStream* stream) {
|
||||
}
|
||||
|
||||
|
||||
void LStoreKeyedGeneric::PrintDataTo(StringStream* stream) {
|
||||
object()->PrintTo(stream);
|
||||
stream->Add("[");
|
||||
key()->PrintTo(stream);
|
||||
stream->Add("] <- ");
|
||||
value()->PrintTo(stream);
|
||||
}
|
||||
|
||||
|
||||
void LTransitionElementsKind::PrintDataTo(StringStream* stream) {
|
||||
object()->PrintTo(stream);
|
||||
stream->Add(" %p -> %p", *original_map(), *transitioned_map());
|
||||
@ -2204,26 +2195,6 @@ LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) {
|
||||
}
|
||||
|
||||
|
||||
LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) {
|
||||
LOperand* context = UseFixed(instr->context(), esi);
|
||||
LOperand* object =
|
||||
UseFixed(instr->object(), StoreDescriptor::ReceiverRegister());
|
||||
LOperand* key = UseFixed(instr->key(), StoreDescriptor::NameRegister());
|
||||
LOperand* value = UseFixed(instr->value(), StoreDescriptor::ValueRegister());
|
||||
|
||||
DCHECK(instr->object()->representation().IsTagged());
|
||||
DCHECK(instr->key()->representation().IsTagged());
|
||||
DCHECK(instr->value()->representation().IsTagged());
|
||||
|
||||
LOperand* slot = FixedTemp(StoreWithVectorDescriptor::SlotRegister());
|
||||
LOperand* vector = FixedTemp(StoreWithVectorDescriptor::VectorRegister());
|
||||
|
||||
LStoreKeyedGeneric* result = new (zone())
|
||||
LStoreKeyedGeneric(context, object, key, value, slot, vector);
|
||||
return MarkAsCall(result, instr);
|
||||
}
|
||||
|
||||
|
||||
LInstruction* LChunkBuilder::DoTransitionElementsKind(
|
||||
HTransitionElementsKind* instr) {
|
||||
if (IsSimpleMapChangeTransition(instr->from_kind(), instr->to_kind())) {
|
||||
|
@ -135,7 +135,6 @@ class LCodeGen;
|
||||
V(StoreCodeEntry) \
|
||||
V(StoreContextSlot) \
|
||||
V(StoreKeyed) \
|
||||
V(StoreKeyedGeneric) \
|
||||
V(StoreNamedField) \
|
||||
V(StringAdd) \
|
||||
V(StringCharCodeAt) \
|
||||
@ -2037,34 +2036,6 @@ class LStoreKeyed final : public LTemplateInstruction<0, 4, 0> {
|
||||
};
|
||||
|
||||
|
||||
class LStoreKeyedGeneric final : public LTemplateInstruction<0, 4, 2> {
|
||||
public:
|
||||
LStoreKeyedGeneric(LOperand* context, LOperand* object, LOperand* key,
|
||||
LOperand* value, LOperand* slot, LOperand* vector) {
|
||||
inputs_[0] = context;
|
||||
inputs_[1] = object;
|
||||
inputs_[2] = key;
|
||||
inputs_[3] = value;
|
||||
temps_[0] = slot;
|
||||
temps_[1] = vector;
|
||||
}
|
||||
|
||||
LOperand* context() { return inputs_[0]; }
|
||||
LOperand* object() { return inputs_[1]; }
|
||||
LOperand* key() { return inputs_[2]; }
|
||||
LOperand* value() { return inputs_[3]; }
|
||||
LOperand* temp_slot() { return temps_[0]; }
|
||||
LOperand* temp_vector() { return temps_[1]; }
|
||||
|
||||
DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic")
|
||||
DECLARE_HYDROGEN_ACCESSOR(StoreKeyedGeneric)
|
||||
|
||||
void PrintDataTo(StringStream* stream) override;
|
||||
|
||||
LanguageMode language_mode() { return hydrogen()->language_mode(); }
|
||||
};
|
||||
|
||||
|
||||
class LTransitionElementsKind final : public LTemplateInstruction<0, 2, 2> {
|
||||
public:
|
||||
LTransitionElementsKind(LOperand* object,
|
||||
|
Loading…
Reference in New Issue
Block a user