summaryrefslogtreecommitdiff
path: root/deps/v8/src/crankshaft/x87/lithium-x87.cc
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/crankshaft/x87/lithium-x87.cc')
-rw-r--r--deps/v8/src/crankshaft/x87/lithium-x87.cc77
1 files changed, 17 insertions, 60 deletions
diff --git a/deps/v8/src/crankshaft/x87/lithium-x87.cc b/deps/v8/src/crankshaft/x87/lithium-x87.cc
index f614b93c9c..a319c0c718 100644
--- a/deps/v8/src/crankshaft/x87/lithium-x87.cc
+++ b/deps/v8/src/crankshaft/x87/lithium-x87.cc
@@ -362,15 +362,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("[");
@@ -403,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());
@@ -925,7 +907,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;
@@ -1071,6 +1053,10 @@ 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());
// Target
@@ -1078,15 +1064,20 @@ LInstruction* LChunkBuilder::DoCallWithDescriptor(
// Context
LOperand* op = UseFixed(instr->OperandAt(1), esi);
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());
@@ -2213,26 +2204,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())) {
@@ -2334,20 +2305,6 @@ LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) {
}
-LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) {
- LOperand* context = UseFixed(instr->context(), esi);
- LOperand* object =
- UseFixed(instr->object(), StoreDescriptor::ReceiverRegister());
- LOperand* value = UseFixed(instr->value(), StoreDescriptor::ValueRegister());
- LOperand* slot = FixedTemp(StoreWithVectorDescriptor::SlotRegister());
- LOperand* vector = FixedTemp(StoreWithVectorDescriptor::VectorRegister());
-
- LStoreNamedGeneric* result =
- new (zone()) LStoreNamedGeneric(context, object, value, slot, vector);
- return MarkAsCall(result, instr);
-}
-
-
LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) {
LOperand* context = UseFixed(instr->context(), esi);
LOperand* left = UseFixed(instr->left(), edx);