Index: src/full-codegen/full-codegen.cc |
diff --git a/src/full-codegen/full-codegen.cc b/src/full-codegen/full-codegen.cc |
index 4b32e96582dbe419ce1c3c2600295866792c9b8c..409895b2b31013fd118b5be67338e9b4809ecf78 100644 |
--- a/src/full-codegen/full-codegen.cc |
+++ b/src/full-codegen/full-codegen.cc |
@@ -1310,9 +1310,11 @@ void FullCodeGenerator::VisitClassLiteral(ClassLiteral* lit) { |
if (lit->scope() != NULL) { |
DCHECK_NOT_NULL(lit->class_variable_proxy()); |
- FeedbackVectorICSlot slot = FLAG_vector_stores |
- ? lit->GetNthSlot(store_slot_index++) |
- : FeedbackVectorICSlot::Invalid(); |
+ FeedbackVectorICSlot slot = |
+ FLAG_vector_stores && |
+ lit->class_variable_proxy()->var()->IsUnallocated() |
+ ? lit->GetNthSlot(store_slot_index++) |
+ : FeedbackVectorICSlot::Invalid(); |
EmitVariableAssignment(lit->class_variable_proxy()->var(), |
Token::INIT_CONST, slot); |
} |