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

Unified Diff: src/ast.cc

Issue 892113002: Super Constructor Calls need to use a vector slot, not an ic slot. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE. Created 5 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
« no previous file with comments | « src/ast.h ('k') | src/hydrogen.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast.cc
diff --git a/src/ast.cc b/src/ast.cc
index 4280a983649608aae812c1b9d260f83ca4581d49..bba49fe6340b71a7f405000acd6c6ab3094353c0 100644
--- a/src/ast.cc
+++ b/src/ast.cc
@@ -578,15 +578,28 @@ void Expression::RecordToBooleanTypeFeedback(TypeFeedbackOracle* oracle) {
}
-bool Call::IsUsingCallFeedbackSlot(Isolate* isolate) const {
+bool Call::IsUsingCallFeedbackICSlot(Isolate* isolate) const {
CallType call_type = GetCallType(isolate);
- return (call_type != POSSIBLY_EVAL_CALL);
+ if (IsUsingCallFeedbackSlot(isolate) || call_type == POSSIBLY_EVAL_CALL) {
+ return false;
+ }
+ return true;
+}
+
+
+bool Call::IsUsingCallFeedbackSlot(Isolate* isolate) const {
+ // SuperConstructorCall uses a CallConstructStub, which wants
+ // a Slot, not an IC slot.
+ return FLAG_experimental_classes && GetCallType(isolate) == SUPER_CALL;
}
FeedbackVectorRequirements Call::ComputeFeedbackRequirements(Isolate* isolate) {
- int ic_slots = IsUsingCallFeedbackSlot(isolate) ? 1 : 0;
- return FeedbackVectorRequirements(0, ic_slots);
+ int ic_slots = IsUsingCallFeedbackICSlot(isolate) ? 1 : 0;
+ int slots = IsUsingCallFeedbackSlot(isolate) ? 1 : 0;
+ // A Call uses either a slot or an IC slot.
+ DCHECK((ic_slots & slots) == 0);
+ return FeedbackVectorRequirements(slots, ic_slots);
}
« no previous file with comments | « src/ast.h ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698