| Index: src/full-codegen/ia32/full-codegen-ia32.cc
|
| diff --git a/src/full-codegen/ia32/full-codegen-ia32.cc b/src/full-codegen/ia32/full-codegen-ia32.cc
|
| index 0b42538fd352cb970fe00c04c95aa631420ceb7b..cad7c570eba1a1b542bfda4254bf2e057bc9fadb 100644
|
| --- a/src/full-codegen/ia32/full-codegen-ia32.cc
|
| +++ b/src/full-codegen/ia32/full-codegen-ia32.cc
|
| @@ -1333,17 +1333,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.
|
| @@ -1353,19 +1342,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());
|
| @@ -1378,6 +1354,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
|
| @@ -1390,26 +1370,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;
|
| }
|
| }
|
|
|
| @@ -1447,17 +1421,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;
|
| }
|
| }
|
|
|
| @@ -1636,43 +1606,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());
|
| @@ -1683,6 +1616,10 @@ void FullCodeGenerator::EmitAssignment(Expression* expr,
|
| CallKeyedStoreIC(slot);
|
| break;
|
| }
|
| + case NAMED_SUPER_PROPERTY:
|
| + case KEYED_SUPER_PROPERTY:
|
| + UNREACHABLE();
|
| + break;
|
| }
|
| context()->Plug(eax);
|
| }
|
| @@ -1774,34 +1711,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
|
| @@ -1849,42 +1758,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) {
|
| @@ -1909,40 +1782,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();
|
| @@ -2473,30 +2312,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());
|
| @@ -2507,6 +2322,8 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
|
| break;
|
| }
|
|
|
| + case NAMED_SUPER_PROPERTY:
|
| + case KEYED_SUPER_PROPERTY:
|
| case VARIABLE:
|
| UNREACHABLE();
|
| }
|
| @@ -2540,14 +2357,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;
|
| }
|
| }
|
| @@ -2587,14 +2402,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;
|
| }
|
| }
|
| @@ -2653,30 +2466,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());
|
| @@ -2692,6 +2481,10 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
|
| }
|
| break;
|
| }
|
| + case NAMED_SUPER_PROPERTY:
|
| + case KEYED_SUPER_PROPERTY:
|
| + UNREACHABLE();
|
| + break;
|
| }
|
| }
|
|
|
|
|