Index: src/full-codegen/full-codegen.cc |
diff --git a/src/full-codegen/full-codegen.cc b/src/full-codegen/full-codegen.cc |
index 0cdcc78a935c75822a8dc94e5d2dd8937d241cac..f214eaefc5264953865ba850e6d2e136f3beb8f1 100644 |
--- a/src/full-codegen/full-codegen.cc |
+++ b/src/full-codegen/full-codegen.cc |
@@ -820,6 +820,41 @@ void FullCodeGenerator::VisitArithmeticExpression(BinaryOperation* expr) { |
} |
} |
+void FullCodeGenerator::VisitProperty(Property* expr) { |
titzer
2016/05/09 14:15:33
Why would do this? :)
|
+ Comment cmnt(masm_, "[ Property"); |
+ SetExpressionPosition(expr); |
+ |
+ Expression* key = expr->key(); |
+ |
+ if (key->IsPropertyName()) { |
+ if (!expr->IsSuperAccess()) { |
+ VisitForAccumulatorValue(expr->obj()); |
+ __ Move(LoadDescriptor::ReceiverRegister(), result_register()); |
+ EmitNamedPropertyLoad(expr); |
+ } else { |
+ VisitForStackValue(expr->obj()->AsSuperPropertyReference()->this_var()); |
+ VisitForStackValue( |
+ expr->obj()->AsSuperPropertyReference()->home_object()); |
+ EmitNamedSuperPropertyLoad(expr); |
+ } |
+ } else { |
+ if (!expr->IsSuperAccess()) { |
+ VisitForStackValue(expr->obj()); |
+ VisitForAccumulatorValue(expr->key()); |
+ __ Move(LoadDescriptor::NameRegister(), result_register()); |
+ PopOperand(LoadDescriptor::ReceiverRegister()); |
+ EmitKeyedPropertyLoad(expr); |
+ } else { |
+ VisitForStackValue(expr->obj()->AsSuperPropertyReference()->this_var()); |
+ VisitForStackValue( |
+ expr->obj()->AsSuperPropertyReference()->home_object()); |
+ VisitForStackValue(expr->key()); |
+ EmitKeyedSuperPropertyLoad(expr); |
+ } |
+ } |
+ PrepareForBailoutForId(expr->LoadId(), TOS_REG); |
+ context()->Plug(result_register()); |
+} |
void FullCodeGenerator::VisitForTypeofValue(Expression* expr) { |
VariableProxy* proxy = expr->AsVariableProxy(); |