 Chromium Code Reviews
 Chromium Code Reviews Issue 639243003:
  Support for super assignments in for..in.  (Closed) 
  Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
    
  
    Issue 639243003:
  Support for super assignments in for..in.  (Closed) 
  Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge| Index: src/arm64/full-codegen-arm64.cc | 
| diff --git a/src/arm64/full-codegen-arm64.cc b/src/arm64/full-codegen-arm64.cc | 
| index 15b053df8c9eb329ddd261b4bc82ac691d03ecd7..8a0d97ac7decb9d3452e3029a43f7242b26b12c5 100644 | 
| --- a/src/arm64/full-codegen-arm64.cc | 
| +++ b/src/arm64/full-codegen-arm64.cc | 
| @@ -2172,16 +2172,8 @@ void FullCodeGenerator::EmitBinaryOp(BinaryOperation* expr, | 
| void FullCodeGenerator::EmitAssignment(Expression* expr) { | 
| DCHECK(expr->IsValidReferenceExpression()); | 
| - // Left-hand side can only be a property, a global or a (parameter or local) | 
| - // slot. | 
| - enum LhsKind { VARIABLE, NAMED_PROPERTY, KEYED_PROPERTY }; | 
| - LhsKind assign_type = VARIABLE; | 
| Property* prop = expr->AsProperty(); | 
| - if (prop != NULL) { | 
| - assign_type = (prop->key()->IsPropertyName()) | 
| - ? NAMED_PROPERTY | 
| - : KEYED_PROPERTY; | 
| - } | 
| + LhsKind assign_type = GetAssignType(prop); | 
| switch (assign_type) { | 
| case VARIABLE: { | 
| @@ -2202,6 +2194,43 @@ void FullCodeGenerator::EmitAssignment(Expression* expr) { | 
| CallStoreIC(); | 
| break; | 
| } | 
| + case NAMED_SUPER_PROPERTY: { | 
| + __ Push(x0); | 
| + VisitForStackValue(prop->obj()->AsSuperReference()->this_var()); | 
| + EmitLoadHomeObject(prop->obj()->AsSuperReference()); | 
| + // stack: value, this; x0: home_object | 
| + Register scratch = x10; | 
| + Register scratch2 = x11; | 
| + __ mov(scratch, result_register()); // home_object | 
| + __ Peek(scratch2, kPointerSize); // value | 
| 
Igor Sheludko
2014/10/13 11:39:07
Same note here as for arm.
 
Dmitry Lomov (no reviews)
2014/10/13 12:39:51
Done.
 | 
| + __ Peek(x0, 0); // this | 
| + __ Poke(x0, kPointerSize); // this | 
| + __ Poke(scratch, 0); // home_object | 
| + __ Move(x0, scratch2); | 
| + // stack: this, home_object; x0: value | 
| + EmitNamedSuperPropertyStore(prop); | 
| + break; | 
| + } | 
| + case KEYED_SUPER_PROPERTY: { | 
| + __ Push(x0); | 
| + VisitForStackValue(prop->obj()->AsSuperReference()->this_var()); | 
| + EmitLoadHomeObject(prop->obj()->AsSuperReference()); | 
| + __ Push(result_register()); | 
| + VisitForAccumulatorValue(prop->key()); | 
| + Register scratch = x10; | 
| + Register scratch2 = x11; | 
| + __ Peek(scratch2, 2 * kPointerSize); // value | 
| + // stack: value, this, home_object; x0: key, x11: value | 
| + __ Peek(scratch, kPointerSize); // this | 
| + __ Poke(scratch, 2 * kPointerSize); | 
| + __ Peek(scratch, 0); // home_object | 
| + __ Poke(scratch, kPointerSize); | 
| + __ Poke(x0, 0); | 
| + __ Move(x0, scratch2); | 
| + // stack: this, home_object, key; x0: value. | 
| + EmitKeyedSuperPropertyStore(prop); | 
| + break; | 
| + } | 
| case KEYED_PROPERTY: { | 
| __ Push(x0); // Preserve value. | 
| VisitForStackValue(prop->obj()); |