Index: src/full-codegen/arm/full-codegen-arm.cc |
diff --git a/src/full-codegen/arm/full-codegen-arm.cc b/src/full-codegen/arm/full-codegen-arm.cc |
index 6019eeebf752f7ed6d70df159d0277213afb3f72..2408fe2cc27f8437edc7bc2a3930090a9c651764 100644 |
--- a/src/full-codegen/arm/full-codegen-arm.cc |
+++ b/src/full-codegen/arm/full-codegen-arm.cc |
@@ -1418,35 +1418,6 @@ void FullCodeGenerator::VisitAssignment(Assignment* expr) { |
VisitForStackValue(property->obj()); |
} |
break; |
- case NAMED_SUPER_PROPERTY: |
- VisitForStackValue( |
- property->obj()->AsSuperPropertyReference()->this_var()); |
- VisitForAccumulatorValue( |
- property->obj()->AsSuperPropertyReference()->home_object()); |
- PushOperand(result_register()); |
- if (expr->is_compound()) { |
- const Register scratch = r1; |
- __ ldr(scratch, MemOperand(sp, kPointerSize)); |
- PushOperand(scratch); |
- PushOperand(result_register()); |
- } |
- 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()) { |
- const Register scratch = r1; |
- __ ldr(scratch, MemOperand(sp, 2 * kPointerSize)); |
- PushOperand(scratch); |
- __ ldr(scratch, MemOperand(sp, 2 * kPointerSize)); |
- PushOperand(scratch); |
- PushOperand(result_register()); |
- } |
- break; |
case KEYED_PROPERTY: |
if (expr->is_compound()) { |
VisitForStackValue(property->obj()); |
@@ -1459,6 +1430,10 @@ void FullCodeGenerator::VisitAssignment(Assignment* expr) { |
VisitForStackValue(property->key()); |
} |
break; |
+ case NAMED_SUPER_PROPERTY: |
+ case KEYED_SUPER_PROPERTY: |
+ UNREACHABLE(); |
+ break; |
} |
// For compound assignments we need another deoptimization point after the |
@@ -1475,21 +1450,15 @@ void FullCodeGenerator::VisitAssignment(Assignment* expr) { |
PrepareForBailoutForId(property->LoadId(), |
BailoutState::TOS_REGISTER); |
break; |
- case NAMED_SUPER_PROPERTY: |
- EmitNamedSuperPropertyLoad(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; |
} |
} |
@@ -1528,17 +1497,13 @@ void FullCodeGenerator::VisitAssignment(Assignment* expr) { |
case NAMED_PROPERTY: |
EmitNamedPropertyAssignment(expr); |
break; |
- case NAMED_SUPER_PROPERTY: |
- EmitNamedSuperPropertyStore(property); |
- context()->Plug(r0); |
- break; |
- case KEYED_SUPER_PROPERTY: |
- EmitKeyedSuperPropertyStore(property); |
- context()->Plug(r0); |
- break; |
case KEYED_PROPERTY: |
EmitKeyedPropertyAssignment(expr); |
break; |
+ case NAMED_SUPER_PROPERTY: |
+ case KEYED_SUPER_PROPERTY: |
+ UNREACHABLE(); |
+ break; |
} |
} |
@@ -1718,43 +1683,6 @@ void FullCodeGenerator::EmitAssignment(Expression* expr, |
CallStoreIC(slot, prop->key()->AsLiteral()->value()); |
break; |
} |
- case NAMED_SUPER_PROPERTY: { |
- PushOperand(r0); |
- VisitForStackValue(prop->obj()->AsSuperPropertyReference()->this_var()); |
- VisitForAccumulatorValue( |
- prop->obj()->AsSuperPropertyReference()->home_object()); |
- // stack: value, this; r0: home_object |
- Register scratch = r2; |
- Register scratch2 = r3; |
- __ mov(scratch, result_register()); // home_object |
- __ ldr(r0, MemOperand(sp, kPointerSize)); // value |
- __ ldr(scratch2, MemOperand(sp, 0)); // this |
- __ str(scratch2, MemOperand(sp, kPointerSize)); // this |
- __ str(scratch, MemOperand(sp, 0)); // home_object |
- // stack: this, home_object; r0: value |
- EmitNamedSuperPropertyStore(prop); |
- break; |
- } |
- case KEYED_SUPER_PROPERTY: { |
- PushOperand(r0); |
- VisitForStackValue(prop->obj()->AsSuperPropertyReference()->this_var()); |
- VisitForStackValue( |
- prop->obj()->AsSuperPropertyReference()->home_object()); |
- VisitForAccumulatorValue(prop->key()); |
- Register scratch = r2; |
- Register scratch2 = r3; |
- __ ldr(scratch2, MemOperand(sp, 2 * kPointerSize)); // value |
- // stack: value, this, home_object; r0: key, r3: value |
- __ ldr(scratch, MemOperand(sp, kPointerSize)); // this |
- __ str(scratch, MemOperand(sp, 2 * kPointerSize)); |
- __ ldr(scratch, MemOperand(sp, 0)); // home_object |
- __ str(scratch, MemOperand(sp, kPointerSize)); |
- __ str(r0, MemOperand(sp, 0)); |
- __ Move(r0, scratch2); |
- // stack: this, home_object, key; r0: value. |
- EmitKeyedSuperPropertyStore(prop); |
- break; |
- } |
case KEYED_PROPERTY: { |
PushOperand(r0); // Preserve value. |
VisitForStackValue(prop->obj()); |
@@ -1765,6 +1693,10 @@ void FullCodeGenerator::EmitAssignment(Expression* expr, |
CallKeyedStoreIC(slot); |
break; |
} |
+ case NAMED_SUPER_PROPERTY: |
+ case KEYED_SUPER_PROPERTY: |
+ UNREACHABLE(); |
+ break; |
} |
context()->Plug(r0); |
} |
@@ -1856,35 +1788,6 @@ void FullCodeGenerator::EmitNamedPropertyAssignment(Assignment* expr) { |
} |
-void FullCodeGenerator::EmitNamedSuperPropertyStore(Property* prop) { |
- // Assignment to named property of super. |
- // r0 : value |
- // stack : receiver ('this'), home_object |
- DCHECK(prop != NULL); |
- Literal* key = prop->key()->AsLiteral(); |
- DCHECK(key != NULL); |
- |
- PushOperand(key->value()); |
- PushOperand(r0); |
- CallRuntimeWithOperands(is_strict(language_mode()) |
- ? Runtime::kStoreToSuper_Strict |
- : Runtime::kStoreToSuper_Sloppy); |
-} |
- |
- |
-void FullCodeGenerator::EmitKeyedSuperPropertyStore(Property* prop) { |
- // Assignment to named property of super. |
- // r0 : value |
- // stack : receiver ('this'), home_object, key |
- DCHECK(prop != NULL); |
- |
- PushOperand(r0); |
- 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. |
PopOperands(StoreDescriptor::ReceiverRegister(), |
@@ -1932,45 +1835,6 @@ void FullCodeGenerator::EmitCallWithLoadIC(Call* expr) { |
} |
-void FullCodeGenerator::EmitSuperCallWithLoadIC(Call* expr) { |
- Expression* callee = expr->expression(); |
- DCHECK(callee->IsProperty()); |
- Property* prop = callee->AsProperty(); |
- DCHECK(prop->IsSuperAccess()); |
- SetExpressionPosition(prop); |
- |
- Literal* key = prop->key()->AsLiteral(); |
- DCHECK(!key->value()->IsSmi()); |
- // Load the function from the receiver. |
- const Register scratch = r1; |
- SuperPropertyReference* super_ref = prop->obj()->AsSuperPropertyReference(); |
- VisitForStackValue(super_ref->home_object()); |
- VisitForAccumulatorValue(super_ref->this_var()); |
- PushOperand(r0); |
- PushOperand(r0); |
- __ ldr(scratch, MemOperand(sp, kPointerSize * 2)); |
- PushOperand(scratch); |
- 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. |
- __ str(r0, MemOperand(sp, kPointerSize)); |
- |
- // Stack here: |
- // - target function |
- // - this (receiver) |
- EmitCall(expr); |
-} |
- |
- |
// Code common for calls using the IC. |
void FullCodeGenerator::EmitKeyedCallWithLoadIC(Call* expr, |
Expression* key) { |
@@ -1996,43 +1860,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. |
- const Register scratch = r1; |
- SuperPropertyReference* super_ref = prop->obj()->AsSuperPropertyReference(); |
- VisitForStackValue(super_ref->home_object()); |
- VisitForAccumulatorValue(super_ref->this_var()); |
- PushOperand(r0); |
- PushOperand(r0); |
- __ ldr(scratch, MemOperand(sp, kPointerSize * 2)); |
- PushOperand(scratch); |
- 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. |
- __ str(r0, MemOperand(sp, kPointerSize)); |
- |
- // Stack here: |
- // - target function |
- // - this (receiver) |
- EmitCall(expr); |
-} |
- |
- |
void FullCodeGenerator::EmitCall(Call* expr, ConvertReceiverMode mode) { |
// Load the arguments. |
ZoneList<Expression*>* args = expr->arguments(); |
@@ -2560,35 +2387,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()); |
- const Register scratch = r1; |
- __ ldr(scratch, MemOperand(sp, kPointerSize)); |
- PushOperand(scratch); |
- 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()); |
- const Register scratch = r1; |
- __ ldr(scratch, MemOperand(sp, 2 * kPointerSize)); |
- PushOperand(scratch); |
- __ ldr(scratch, MemOperand(sp, 2 * kPointerSize)); |
- PushOperand(scratch); |
- PushOperand(result_register()); |
- EmitKeyedSuperPropertyLoad(prop); |
- break; |
- } |
- |
case KEYED_PROPERTY: { |
VisitForStackValue(prop->obj()); |
VisitForStackValue(prop->key()); |
@@ -2599,6 +2397,8 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { |
break; |
} |
+ case NAMED_SUPER_PROPERTY: |
+ case KEYED_SUPER_PROPERTY: |
case VARIABLE: |
UNREACHABLE(); |
} |
@@ -2634,14 +2434,12 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { |
case NAMED_PROPERTY: |
__ str(r0, MemOperand(sp, kPointerSize)); |
break; |
- case NAMED_SUPER_PROPERTY: |
- __ str(r0, MemOperand(sp, 2 * kPointerSize)); |
- break; |
case KEYED_PROPERTY: |
__ str(r0, MemOperand(sp, 2 * kPointerSize)); |
break; |
+ case NAMED_SUPER_PROPERTY: |
case KEYED_SUPER_PROPERTY: |
- __ str(r0, MemOperand(sp, 3 * kPointerSize)); |
+ UNREACHABLE(); |
break; |
} |
} |
@@ -2673,14 +2471,12 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { |
case NAMED_PROPERTY: |
__ str(r0, MemOperand(sp, kPointerSize)); |
break; |
- case NAMED_SUPER_PROPERTY: |
- __ str(r0, MemOperand(sp, 2 * kPointerSize)); |
- break; |
case KEYED_PROPERTY: |
__ str(r0, MemOperand(sp, 2 * kPointerSize)); |
break; |
+ case NAMED_SUPER_PROPERTY: |
case KEYED_SUPER_PROPERTY: |
- __ str(r0, MemOperand(sp, 3 * kPointerSize)); |
+ UNREACHABLE(); |
break; |
} |
} |
@@ -2737,30 +2533,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(r0); |
- } |
- 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(r0); |
- } |
- break; |
- } |
case KEYED_PROPERTY: { |
PopOperands(StoreDescriptor::ReceiverRegister(), |
StoreDescriptor::NameRegister()); |
@@ -2775,6 +2547,10 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { |
} |
break; |
} |
+ case NAMED_SUPER_PROPERTY: |
+ case KEYED_SUPER_PROPERTY: |
+ UNREACHABLE(); |
+ break; |
} |
} |