Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Unified Diff: src/ast/ast.cc

Issue 2610683003: [ignition] Only initialize [[HomeObject]] for class constructors if needed (Closed)
Patch Set: Fix bytecode expectations Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/ast/ast.cc
diff --git a/src/ast/ast.cc b/src/ast/ast.cc
index 18abd5a756a44f04eb58dde88e41a9373e7fa488..bfc721b937409b6cdda17719b599822858982ca0 100644
--- a/src/ast/ast.cc
+++ b/src/ast/ast.cc
@@ -367,8 +367,11 @@ void ClassLiteral::AssignFeedbackVectorSlots(Isolate* isolate,
FeedbackVectorSpec* spec,
FeedbackVectorSlotCache* cache) {
// This logic that computes the number of slots needed for vector store
- // ICs must mirror FullCodeGenerator::VisitClassLiteral.
- prototype_slot_ = spec->AddLoadICSlot();
+ // ICs must mirror BytecodeGenerator::VisitClassLiteral.
+ if (FunctionLiteral::NeedsHomeObject(constructor())) {
+ home_object_slot_ = spec->AddStoreICSlot();
+ }
+
if (NeedsProxySlot()) {
proxy_slot_ = spec->AddStoreICSlot();
}

Powered by Google App Engine
This is Rietveld 408576698