Chromium Code Reviews| Index: src/ast.cc |
| diff --git a/src/ast.cc b/src/ast.cc |
| index c61c29bf524ba300573958b13b96b1921e3fc1cd..19747d8b767be294e3a819db95f7beb14a3c68b2 100644 |
| --- a/src/ast.cc |
| +++ b/src/ast.cc |
| @@ -343,12 +343,14 @@ FeedbackVectorRequirements ObjectLiteral::ComputeFeedbackRequirements( |
| // This logic that computes the number of slots needed for vector store |
| // ics must mirror FullCodeGenerator::VisitObjectLiteral. |
| int ic_slots = 0; |
| + bool saw_computed_name = false; |
| for (int i = 0; i < properties()->length(); i++) { |
| ObjectLiteral::Property* property = properties()->at(i); |
| if (property->IsCompileTimeValue()) continue; |
| + saw_computed_name |= property->is_computed_name(); |
| Expression* value = property->value(); |
| - if (property->is_computed_name() && |
| + if (saw_computed_name && |
|
Jakob Kummerow
2015/09/03 11:27:39
This is surprising: having seen a computed name pr
mvstanton
2015/09/03 15:25:27
You are totally right. It is true though. As we di
|
| property->kind() != ObjectLiteral::Property::PROTOTYPE) { |
| if (FunctionLiteral::NeedsHomeObject(value)) ic_slots++; |
| } else if (property->emit_store()) { |