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

Unified Diff: src/ast.h

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/arm64/full-codegen-arm64.cc ('k') | src/ast.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast.h
diff --git a/src/ast.h b/src/ast.h
index ba1875ca393c27b8e49938b8abbc3b781595ea08..4753c8fc0ec72cd42eef49a4d439f7070fc5537d 100644
--- a/src/ast.h
+++ b/src/ast.h
@@ -1813,14 +1813,21 @@ class Call FINAL : public Expression {
virtual FeedbackVectorRequirements ComputeFeedbackRequirements(
Isolate* isolate) OVERRIDE;
void SetFirstFeedbackICSlot(FeedbackVectorICSlot slot) OVERRIDE {
- call_feedback_slot_ = slot;
+ ic_slot_or_slot_ = slot.ToInt();
+ }
+ void SetFirstFeedbackSlot(FeedbackVectorSlot slot) OVERRIDE {
+ ic_slot_or_slot_ = slot.ToInt();
}
Code::Kind FeedbackICSlotKind(int index) OVERRIDE { return Code::CALL_IC; }
- bool HasCallFeedbackSlot() const { return !call_feedback_slot_.IsInvalid(); }
- FeedbackVectorICSlot CallFeedbackSlot() const {
- DCHECK(!call_feedback_slot_.IsInvalid());
- return call_feedback_slot_;
+ FeedbackVectorSlot CallFeedbackSlot() const {
+ DCHECK(ic_slot_or_slot_ != FeedbackVectorSlot::Invalid().ToInt());
+ return FeedbackVectorSlot(ic_slot_or_slot_);
+ }
+
+ FeedbackVectorICSlot CallFeedbackICSlot() const {
+ DCHECK(ic_slot_or_slot_ != FeedbackVectorICSlot::Invalid().ToInt());
+ return FeedbackVectorICSlot(ic_slot_or_slot_);
}
SmallMapList* GetReceiverTypes() OVERRIDE {
@@ -1881,6 +1888,7 @@ class Call FINAL : public Expression {
// Helpers to determine how to handle the call.
CallType GetCallType(Isolate* isolate) const;
bool IsUsingCallFeedbackSlot(Isolate* isolate) const;
+ bool IsUsingCallFeedbackICSlot(Isolate* isolate) const;
#ifdef DEBUG
// Used to assert that the FullCodeGenerator records the return site.
@@ -1891,7 +1899,7 @@ class Call FINAL : public Expression {
Call(Zone* zone, Expression* expression, ZoneList<Expression*>* arguments,
int pos)
: Expression(zone, pos),
- call_feedback_slot_(FeedbackVectorICSlot::Invalid()),
+ ic_slot_or_slot_(FeedbackVectorICSlot::Invalid().ToInt()),
expression_(expression),
arguments_(arguments),
bit_field_(IsUninitializedField::encode(false)) {
@@ -1904,7 +1912,9 @@ class Call FINAL : public Expression {
private:
int local_id(int n) const { return base_id() + parent_num_ids() + n; }
- FeedbackVectorICSlot call_feedback_slot_;
+ // We store this as an integer because we don't know if we have a slot or
+ // an ic slot until scoping time.
+ int ic_slot_or_slot_;
Expression* expression_;
ZoneList<Expression*>* arguments_;
Handle<JSFunction> target_;
« no previous file with comments | « src/arm64/full-codegen-arm64.cc ('k') | src/ast.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698