summaryrefslogtreecommitdiff
path: root/deps/v8/src/crankshaft/mips/lithium-mips.cc
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/crankshaft/mips/lithium-mips.cc')
-rw-r--r--deps/v8/src/crankshaft/mips/lithium-mips.cc76
1 files changed, 16 insertions, 60 deletions
diff --git a/deps/v8/src/crankshaft/mips/lithium-mips.cc b/deps/v8/src/crankshaft/mips/lithium-mips.cc
index a7880eee87..5533b8f59d 100644
--- a/deps/v8/src/crankshaft/mips/lithium-mips.cc
+++ b/deps/v8/src/crankshaft/mips/lithium-mips.cc
@@ -311,15 +311,6 @@ void LStoreNamedField::PrintDataTo(StringStream* stream) {
}
-void LStoreNamedGeneric::PrintDataTo(StringStream* stream) {
- object()->PrintTo(stream);
- stream->Add(".");
- stream->Add(String::cast(*name())->ToCString().get());
- stream->Add(" <- ");
- value()->PrintTo(stream);
-}
-
-
void LLoadKeyed::PrintDataTo(StringStream* stream) {
elements()->PrintTo(stream);
stream->Add("[");
@@ -352,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());
@@ -887,7 +869,7 @@ void LChunkBuilder::AddInstruction(LInstruction* instr,
LInstruction* LChunkBuilder::DoPrologue(HPrologue* instr) {
LInstruction* result = new (zone()) LPrologue();
- if (info_->scope()->num_heap_slots() > 0) {
+ if (info_->scope()->NeedsContext()) {
result = MarkAsCall(result, instr);
}
return result;
@@ -1024,6 +1006,9 @@ LInstruction* LChunkBuilder::DoDeclareGlobals(HDeclareGlobals* instr) {
LInstruction* LChunkBuilder::DoCallWithDescriptor(
HCallWithDescriptor* instr) {
CallInterfaceDescriptor descriptor = instr->descriptor();
+ DCHECK_EQ(descriptor.GetParameterCount() +
+ LCallWithDescriptor::kImplicitRegisterParameterCount,
+ instr->OperandCount());
LOperand* target = UseRegisterOrConstantAtStart(instr->target());
ZoneList<LOperand*> ops(instr->OperandCount(), zone());
@@ -1032,15 +1017,20 @@ LInstruction* LChunkBuilder::DoCallWithDescriptor(
// Context
LOperand* op = UseFixed(instr->OperandAt(1), cp);
ops.Add(op, zone());
- // Other register parameters
- for (int i = LCallWithDescriptor::kImplicitRegisterParameterCount;
- i < instr->OperandCount(); i++) {
- op =
- UseFixed(instr->OperandAt(i),
- descriptor.GetRegisterParameter(
- i - LCallWithDescriptor::kImplicitRegisterParameterCount));
+ // Load register parameters.
+ int i = 0;
+ for (; i < descriptor.GetRegisterParameterCount(); i++) {
+ op = UseFixed(instr->OperandAt(
+ i + LCallWithDescriptor::kImplicitRegisterParameterCount),
+ descriptor.GetRegisterParameter(i));
ops.Add(op, zone());
}
+ // Push stack parameters.
+ for (; i < descriptor.GetParameterCount(); i++) {
+ op = UseAny(instr->OperandAt(
+ i + LCallWithDescriptor::kImplicitRegisterParameterCount));
+ AddInstruction(new (zone()) LPushArgument(op), instr);
+ }
LCallWithDescriptor* result = new(zone()) LCallWithDescriptor(
descriptor, ops, zone());
@@ -2127,26 +2117,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())) {
@@ -2223,20 +2193,6 @@ LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) {
}
-LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) {
- LOperand* context = UseFixed(instr->context(), cp);
- LOperand* obj =
- UseFixed(instr->object(), StoreDescriptor::ReceiverRegister());
- LOperand* val = UseFixed(instr->value(), StoreDescriptor::ValueRegister());
- LOperand* slot = FixedTemp(StoreWithVectorDescriptor::SlotRegister());
- LOperand* vector = FixedTemp(StoreWithVectorDescriptor::VectorRegister());
-
- LStoreNamedGeneric* result =
- new (zone()) LStoreNamedGeneric(context, obj, val, slot, vector);
- return MarkAsCall(result, instr);
-}
-
-
LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) {
LOperand* context = UseFixed(instr->context(), cp);
LOperand* left = UseFixed(instr->left(), a1);