Index: src/interpreter/bytecode-generator.cc |
diff --git a/src/interpreter/bytecode-generator.cc b/src/interpreter/bytecode-generator.cc |
index 630e247caf8863b2ffafd47cf91db22d370b91b3..afaf5555fd01a0a142326086227f28d9b5887d74 100644 |
--- a/src/interpreter/bytecode-generator.cc |
+++ b/src/interpreter/bytecode-generator.cc |
@@ -1505,7 +1505,15 @@ void BytecodeGenerator::VisitClassLiteralProperties(ClassLiteral* expr, |
if (property->NeedsSetFunctionName()) { |
flags |= DataPropertyInLiteralFlag::kSetFunctionName; |
} |
- builder()->StoreDataPropertyInLiteral(receiver, key, value, flags); |
+ |
+ FeedbackVectorSlot slot = property->GetSlot( |
+ FunctionLiteral::NeedsHomeObject(property->value()) ? 1 : 0); |
+ DCHECK(!slot.IsInvalid()); |
+ |
+ builder() |
+ ->LoadAccumulatorWithRegister(value) |
+ .StoreDataPropertyInLiteral(receiver, key, flags, |
+ feedback_index(slot)); |
break; |
} |
case ClassLiteral::Property::GETTER: { |
@@ -1747,8 +1755,14 @@ void BytecodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { |
data_property_flags |= DataPropertyInLiteralFlag::kSetFunctionName; |
} |
- builder()->StoreDataPropertyInLiteral(literal, key, value, |
- data_property_flags); |
+ FeedbackVectorSlot slot = property->GetSlot( |
+ FunctionLiteral::NeedsHomeObject(property->value()) ? 1 : 0); |
mvstanton
2017/01/04 14:21:47
nit: It occurs to me how sad it is to have to pepp
Franzi
2017/01/04 14:51:09
You're right. Hiding the offset in Set/GetStoreDat
|
+ DCHECK(!slot.IsInvalid()); |
+ |
+ builder() |
+ ->LoadAccumulatorWithRegister(value) |
+ .StoreDataPropertyInLiteral(literal, key, data_property_flags, |
+ feedback_index(slot)); |
break; |
} |
case ObjectLiteral::Property::GETTER: |