diff options
Diffstat (limited to 'deps/v8/src/crankshaft/ppc/lithium-ppc.cc')
-rw-r--r-- | deps/v8/src/crankshaft/ppc/lithium-ppc.cc | 75 |
1 files changed, 16 insertions, 59 deletions
diff --git a/deps/v8/src/crankshaft/ppc/lithium-ppc.cc b/deps/v8/src/crankshaft/ppc/lithium-ppc.cc index 958620c38a..738cf231ce 100644 --- a/deps/v8/src/crankshaft/ppc/lithium-ppc.cc +++ b/deps/v8/src/crankshaft/ppc/lithium-ppc.cc @@ -317,15 +317,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("["); @@ -358,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()); @@ -892,7 +874,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; @@ -1030,6 +1012,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()); @@ -1038,15 +1023,20 @@ LInstruction* LChunkBuilder::DoCallWithDescriptor(HCallWithDescriptor* instr) { // 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()); @@ -2150,26 +2140,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())) { @@ -2245,19 +2215,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(), r4); |