Index: src/full-codegen/x87/full-codegen-x87.cc |
diff --git a/src/full-codegen/x87/full-codegen-x87.cc b/src/full-codegen/x87/full-codegen-x87.cc |
index 11284e4f151b9eee09915395dc3ebf5484e4024e..3d634e3dcebb7100c54681da5e7fb44b67201d51 100644 |
--- a/src/full-codegen/x87/full-codegen-x87.cc |
+++ b/src/full-codegen/x87/full-codegen-x87.cc |
@@ -1325,17 +1325,6 @@ void FullCodeGenerator::VisitAssignment(Assignment* expr) { |
case VARIABLE: |
// Nothing to do here. |
break; |
- case NAMED_SUPER_PROPERTY: |
- VisitForStackValue( |
- property->obj()->AsSuperPropertyReference()->this_var()); |
- VisitForAccumulatorValue( |
- property->obj()->AsSuperPropertyReference()->home_object()); |
- PushOperand(result_register()); |
- if (expr->is_compound()) { |
- PushOperand(MemOperand(esp, kPointerSize)); |
- PushOperand(result_register()); |
- } |
- break; |
case NAMED_PROPERTY: |
if (expr->is_compound()) { |
// We need the receiver both on the stack and in the register. |
@@ -1345,19 +1334,6 @@ void FullCodeGenerator::VisitAssignment(Assignment* expr) { |
VisitForStackValue(property->obj()); |
} |
break; |
- case KEYED_SUPER_PROPERTY: |
- VisitForStackValue( |
- property->obj()->AsSuperPropertyReference()->this_var()); |
- VisitForStackValue( |
- property->obj()->AsSuperPropertyReference()->home_object()); |
- VisitForAccumulatorValue(property->key()); |
- PushOperand(result_register()); |
- if (expr->is_compound()) { |
- PushOperand(MemOperand(esp, 2 * kPointerSize)); |
- PushOperand(MemOperand(esp, 2 * kPointerSize)); |
- PushOperand(result_register()); |
- } |
- break; |
case KEYED_PROPERTY: { |
if (expr->is_compound()) { |
VisitForStackValue(property->obj()); |
@@ -1370,6 +1346,10 @@ void FullCodeGenerator::VisitAssignment(Assignment* expr) { |
} |
break; |
} |
+ case NAMED_SUPER_PROPERTY: |
+ case KEYED_SUPER_PROPERTY: |
+ UNREACHABLE(); |
+ break; |
} |
// For compound assignments we need another deoptimization point after the |
@@ -1382,26 +1362,20 @@ void FullCodeGenerator::VisitAssignment(Assignment* expr) { |
EmitVariableLoad(expr->target()->AsVariableProxy()); |
PrepareForBailout(expr->target(), BailoutState::TOS_REGISTER); |
break; |
- case NAMED_SUPER_PROPERTY: |
- EmitNamedSuperPropertyLoad(property); |
- PrepareForBailoutForId(property->LoadId(), |
- BailoutState::TOS_REGISTER); |
- break; |
case NAMED_PROPERTY: |
EmitNamedPropertyLoad(property); |
PrepareForBailoutForId(property->LoadId(), |
BailoutState::TOS_REGISTER); |
break; |
- case KEYED_SUPER_PROPERTY: |
- EmitKeyedSuperPropertyLoad(property); |
- PrepareForBailoutForId(property->LoadId(), |
- BailoutState::TOS_REGISTER); |
- break; |
case KEYED_PROPERTY: |
EmitKeyedPropertyLoad(property); |
PrepareForBailoutForId(property->LoadId(), |
BailoutState::TOS_REGISTER); |
break; |
+ case NAMED_SUPER_PROPERTY: |
+ case KEYED_SUPER_PROPERTY: |
+ UNREACHABLE(); |
+ break; |
} |
} |
@@ -1439,17 +1413,13 @@ void FullCodeGenerator::VisitAssignment(Assignment* expr) { |
case NAMED_PROPERTY: |
EmitNamedPropertyAssignment(expr); |
break; |
- case NAMED_SUPER_PROPERTY: |
- EmitNamedSuperPropertyStore(property); |
- context()->Plug(result_register()); |
- break; |
- case KEYED_SUPER_PROPERTY: |
- EmitKeyedSuperPropertyStore(property); |
- context()->Plug(result_register()); |
- break; |
case KEYED_PROPERTY: |
EmitKeyedPropertyAssignment(expr); |
break; |
+ case NAMED_SUPER_PROPERTY: |
+ case KEYED_SUPER_PROPERTY: |
+ UNREACHABLE(); |
+ break; |
} |
} |
@@ -1628,43 +1598,6 @@ void FullCodeGenerator::EmitAssignment(Expression* expr, |
CallStoreIC(slot, prop->key()->AsLiteral()->value()); |
break; |
} |
- case NAMED_SUPER_PROPERTY: { |
- PushOperand(eax); |
- VisitForStackValue(prop->obj()->AsSuperPropertyReference()->this_var()); |
- VisitForAccumulatorValue( |
- prop->obj()->AsSuperPropertyReference()->home_object()); |
- // stack: value, this; eax: home_object |
- Register scratch = ecx; |
- Register scratch2 = edx; |
- __ mov(scratch, result_register()); // home_object |
- __ mov(eax, MemOperand(esp, kPointerSize)); // value |
- __ mov(scratch2, MemOperand(esp, 0)); // this |
- __ mov(MemOperand(esp, kPointerSize), scratch2); // this |
- __ mov(MemOperand(esp, 0), scratch); // home_object |
- // stack: this, home_object. eax: value |
- EmitNamedSuperPropertyStore(prop); |
- break; |
- } |
- case KEYED_SUPER_PROPERTY: { |
- PushOperand(eax); |
- VisitForStackValue(prop->obj()->AsSuperPropertyReference()->this_var()); |
- VisitForStackValue( |
- prop->obj()->AsSuperPropertyReference()->home_object()); |
- VisitForAccumulatorValue(prop->key()); |
- Register scratch = ecx; |
- Register scratch2 = edx; |
- __ mov(scratch2, MemOperand(esp, 2 * kPointerSize)); // value |
- // stack: value, this, home_object; eax: key, edx: value |
- __ mov(scratch, MemOperand(esp, kPointerSize)); // this |
- __ mov(MemOperand(esp, 2 * kPointerSize), scratch); |
- __ mov(scratch, MemOperand(esp, 0)); // home_object |
- __ mov(MemOperand(esp, kPointerSize), scratch); |
- __ mov(MemOperand(esp, 0), eax); |
- __ mov(eax, scratch2); |
- // stack: this, home_object, key; eax: value. |
- EmitKeyedSuperPropertyStore(prop); |
- break; |
- } |
case KEYED_PROPERTY: { |
PushOperand(eax); // Preserve value. |
VisitForStackValue(prop->obj()); |
@@ -1675,6 +1608,10 @@ void FullCodeGenerator::EmitAssignment(Expression* expr, |
CallKeyedStoreIC(slot); |
break; |
} |
+ case NAMED_SUPER_PROPERTY: |
+ case KEYED_SUPER_PROPERTY: |
+ UNREACHABLE(); |
+ break; |
} |
context()->Plug(eax); |
} |
@@ -1766,34 +1703,6 @@ void FullCodeGenerator::EmitNamedPropertyAssignment(Assignment* expr) { |
} |
-void FullCodeGenerator::EmitNamedSuperPropertyStore(Property* prop) { |
- // Assignment to named property of super. |
- // eax : value |
- // stack : receiver ('this'), home_object |
- DCHECK(prop != NULL); |
- Literal* key = prop->key()->AsLiteral(); |
- DCHECK(key != NULL); |
- |
- PushOperand(key->value()); |
- PushOperand(eax); |
- CallRuntimeWithOperands(is_strict(language_mode()) |
- ? Runtime::kStoreToSuper_Strict |
- : Runtime::kStoreToSuper_Sloppy); |
-} |
- |
- |
-void FullCodeGenerator::EmitKeyedSuperPropertyStore(Property* prop) { |
- // Assignment to named property of super. |
- // eax : value |
- // stack : receiver ('this'), home_object, key |
- |
- PushOperand(eax); |
- CallRuntimeWithOperands(is_strict(language_mode()) |
- ? Runtime::kStoreKeyedToSuper_Strict |
- : Runtime::kStoreKeyedToSuper_Sloppy); |
-} |
- |
- |
void FullCodeGenerator::EmitKeyedPropertyAssignment(Assignment* expr) { |
// Assignment to a property, using a keyed store IC. |
// eax : value |
@@ -1841,42 +1750,6 @@ void FullCodeGenerator::EmitCallWithLoadIC(Call* expr) { |
} |
-void FullCodeGenerator::EmitSuperCallWithLoadIC(Call* expr) { |
- SetExpressionPosition(expr); |
- Expression* callee = expr->expression(); |
- DCHECK(callee->IsProperty()); |
- Property* prop = callee->AsProperty(); |
- DCHECK(prop->IsSuperAccess()); |
- |
- Literal* key = prop->key()->AsLiteral(); |
- DCHECK(!key->value()->IsSmi()); |
- // Load the function from the receiver. |
- SuperPropertyReference* super_ref = prop->obj()->AsSuperPropertyReference(); |
- VisitForStackValue(super_ref->home_object()); |
- VisitForAccumulatorValue(super_ref->this_var()); |
- PushOperand(eax); |
- PushOperand(eax); |
- PushOperand(Operand(esp, kPointerSize * 2)); |
- PushOperand(key->value()); |
- // Stack here: |
- // - home_object |
- // - this (receiver) |
- // - this (receiver) <-- LoadFromSuper will pop here and below. |
- // - home_object |
- // - key |
- CallRuntimeWithOperands(Runtime::kLoadFromSuper); |
- PrepareForBailoutForId(prop->LoadId(), BailoutState::TOS_REGISTER); |
- |
- // Replace home_object with target function. |
- __ mov(Operand(esp, kPointerSize), eax); |
- |
- // Stack here: |
- // - target function |
- // - this (receiver) |
- EmitCall(expr); |
-} |
- |
- |
// Code common for calls using the IC. |
void FullCodeGenerator::EmitKeyedCallWithLoadIC(Call* expr, |
Expression* key) { |
@@ -1901,40 +1774,6 @@ void FullCodeGenerator::EmitKeyedCallWithLoadIC(Call* expr, |
} |
-void FullCodeGenerator::EmitKeyedSuperCallWithLoadIC(Call* expr) { |
- Expression* callee = expr->expression(); |
- DCHECK(callee->IsProperty()); |
- Property* prop = callee->AsProperty(); |
- DCHECK(prop->IsSuperAccess()); |
- |
- SetExpressionPosition(prop); |
- // Load the function from the receiver. |
- SuperPropertyReference* super_ref = prop->obj()->AsSuperPropertyReference(); |
- VisitForStackValue(super_ref->home_object()); |
- VisitForAccumulatorValue(super_ref->this_var()); |
- PushOperand(eax); |
- PushOperand(eax); |
- PushOperand(Operand(esp, kPointerSize * 2)); |
- VisitForStackValue(prop->key()); |
- // Stack here: |
- // - home_object |
- // - this (receiver) |
- // - this (receiver) <-- LoadKeyedFromSuper will pop here and below. |
- // - home_object |
- // - key |
- CallRuntimeWithOperands(Runtime::kLoadKeyedFromSuper); |
- PrepareForBailoutForId(prop->LoadId(), BailoutState::TOS_REGISTER); |
- |
- // Replace home_object with target function. |
- __ mov(Operand(esp, kPointerSize), eax); |
- |
- // Stack here: |
- // - target function |
- // - this (receiver) |
- EmitCall(expr); |
-} |
- |
- |
void FullCodeGenerator::EmitCall(Call* expr, ConvertReceiverMode mode) { |
// Load the arguments. |
ZoneList<Expression*>* args = expr->arguments(); |
@@ -2465,30 +2304,6 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { |
break; |
} |
- case NAMED_SUPER_PROPERTY: { |
- VisitForStackValue(prop->obj()->AsSuperPropertyReference()->this_var()); |
- VisitForAccumulatorValue( |
- prop->obj()->AsSuperPropertyReference()->home_object()); |
- PushOperand(result_register()); |
- PushOperand(MemOperand(esp, kPointerSize)); |
- PushOperand(result_register()); |
- EmitNamedSuperPropertyLoad(prop); |
- break; |
- } |
- |
- case KEYED_SUPER_PROPERTY: { |
- VisitForStackValue(prop->obj()->AsSuperPropertyReference()->this_var()); |
- VisitForStackValue( |
- prop->obj()->AsSuperPropertyReference()->home_object()); |
- VisitForAccumulatorValue(prop->key()); |
- PushOperand(result_register()); |
- PushOperand(MemOperand(esp, 2 * kPointerSize)); |
- PushOperand(MemOperand(esp, 2 * kPointerSize)); |
- PushOperand(result_register()); |
- EmitKeyedSuperPropertyLoad(prop); |
- break; |
- } |
- |
case KEYED_PROPERTY: { |
VisitForStackValue(prop->obj()); |
VisitForStackValue(prop->key()); |
@@ -2499,6 +2314,8 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { |
break; |
} |
+ case NAMED_SUPER_PROPERTY: |
+ case KEYED_SUPER_PROPERTY: |
case VARIABLE: |
UNREACHABLE(); |
} |
@@ -2532,14 +2349,12 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { |
case NAMED_PROPERTY: |
__ mov(Operand(esp, kPointerSize), eax); |
break; |
- case NAMED_SUPER_PROPERTY: |
- __ mov(Operand(esp, 2 * kPointerSize), eax); |
- break; |
case KEYED_PROPERTY: |
__ mov(Operand(esp, 2 * kPointerSize), eax); |
break; |
+ case NAMED_SUPER_PROPERTY: |
case KEYED_SUPER_PROPERTY: |
- __ mov(Operand(esp, 3 * kPointerSize), eax); |
+ UNREACHABLE(); |
break; |
} |
} |
@@ -2579,14 +2394,12 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { |
case NAMED_PROPERTY: |
__ mov(Operand(esp, kPointerSize), eax); |
break; |
- case NAMED_SUPER_PROPERTY: |
- __ mov(Operand(esp, 2 * kPointerSize), eax); |
- break; |
case KEYED_PROPERTY: |
__ mov(Operand(esp, 2 * kPointerSize), eax); |
break; |
+ case NAMED_SUPER_PROPERTY: |
case KEYED_SUPER_PROPERTY: |
- __ mov(Operand(esp, 3 * kPointerSize), eax); |
+ UNREACHABLE(); |
break; |
} |
} |
@@ -2645,30 +2458,6 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { |
} |
break; |
} |
- case NAMED_SUPER_PROPERTY: { |
- EmitNamedSuperPropertyStore(prop); |
- PrepareForBailoutForId(expr->AssignmentId(), BailoutState::TOS_REGISTER); |
- if (expr->is_postfix()) { |
- if (!context()->IsEffect()) { |
- context()->PlugTOS(); |
- } |
- } else { |
- context()->Plug(eax); |
- } |
- break; |
- } |
- case KEYED_SUPER_PROPERTY: { |
- EmitKeyedSuperPropertyStore(prop); |
- PrepareForBailoutForId(expr->AssignmentId(), BailoutState::TOS_REGISTER); |
- if (expr->is_postfix()) { |
- if (!context()->IsEffect()) { |
- context()->PlugTOS(); |
- } |
- } else { |
- context()->Plug(eax); |
- } |
- break; |
- } |
case KEYED_PROPERTY: { |
PopOperand(StoreDescriptor::NameRegister()); |
PopOperand(StoreDescriptor::ReceiverRegister()); |
@@ -2684,6 +2473,10 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { |
} |
break; |
} |
+ case NAMED_SUPER_PROPERTY: |
+ case KEYED_SUPER_PROPERTY: |
+ UNREACHABLE(); |
+ break; |
} |
} |