Index: src/ast/ast.h |
diff --git a/src/ast/ast.h b/src/ast/ast.h |
index c2d9cc4c78ed616a3eb95f6506186ee01005ba86..244efb83177adc75d0435d9cd89662726ca59549 100644 |
--- a/src/ast/ast.h |
+++ b/src/ast/ast.h |
@@ -732,6 +732,7 @@ class ForInStatement final : public ForEachStatement { |
// Type feedback information. |
void AssignFeedbackVectorSlots(FeedbackVectorSpec* spec, |
+ LanguageMode language_mode, |
FeedbackVectorSlotCache* cache); |
FeedbackVectorSlot EachFeedbackSlot() const { return each_slot_; } |
FeedbackVectorSlot ForInFeedbackSlot() { |
@@ -954,6 +955,7 @@ class CaseClause final : public Expression { |
// TypeFeedbackId to record the type information. TypeFeedbackId is used by |
// full codegen and the feedback vector slot is used by interpreter. |
void AssignFeedbackVectorSlots(FeedbackVectorSpec* spec, |
+ LanguageMode language_mode, |
FeedbackVectorSlotCache* cache); |
FeedbackVectorSlot CompareOperationFeedbackSlot() { |
@@ -1234,6 +1236,7 @@ class MaterializedLiteral : public Expression { |
} |
void AssignFeedbackVectorSlots(FeedbackVectorSpec* spec, |
+ LanguageMode language_mode, |
FeedbackVectorSlotCache* cache) { |
literal_slot_ = spec->AddLiteralSlot(); |
} |
@@ -1451,6 +1454,7 @@ class ObjectLiteral final : public MaterializedLiteral { |
// Object literals need one feedback slot for each non-trivial value, as well |
// as some slots for home objects. |
void AssignFeedbackVectorSlots(FeedbackVectorSpec* spec, |
+ LanguageMode language_mode, |
FeedbackVectorSlotCache* cache); |
private: |
@@ -1596,6 +1600,7 @@ class ArrayLiteral final : public MaterializedLiteral { |
}; |
void AssignFeedbackVectorSlots(FeedbackVectorSpec* spec, |
+ LanguageMode language_mode, |
FeedbackVectorSlotCache* cache); |
FeedbackVectorSlot LiteralFeedbackSlot() const { return literal_slot_; } |
@@ -1674,6 +1679,7 @@ class VariableProxy final : public Expression { |
} |
void AssignFeedbackVectorSlots(FeedbackVectorSpec* spec, |
+ LanguageMode language_mode, |
FeedbackVectorSlotCache* cache); |
FeedbackVectorSlot VariableFeedbackSlot() { return variable_feedback_slot_; } |
@@ -1770,11 +1776,13 @@ class Property final : public Expression { |
bool IsSuperAccess() { return obj()->IsSuperPropertyReference(); } |
void AssignFeedbackVectorSlots(FeedbackVectorSpec* spec, |
+ LanguageMode language_mode, |
FeedbackVectorSlotCache* cache) { |
- FeedbackVectorSlotKind kind = key()->IsPropertyName() |
- ? FeedbackVectorSlotKind::LOAD_IC |
- : FeedbackVectorSlotKind::KEYED_LOAD_IC; |
- property_feedback_slot_ = spec->AddSlot(kind); |
+ if (key()->IsPropertyName()) { |
+ property_feedback_slot_ = spec->AddLoadICSlot(); |
+ } else { |
+ property_feedback_slot_ = spec->AddKeyedLoadICSlot(); |
+ } |
} |
FeedbackVectorSlot PropertyFeedbackSlot() const { |
@@ -1828,6 +1836,7 @@ class Call final : public Expression { |
// Type feedback information. |
void AssignFeedbackVectorSlots(FeedbackVectorSpec* spec, |
+ LanguageMode language_mode, |
FeedbackVectorSlotCache* cache); |
FeedbackVectorSlot CallFeedbackICSlot() const { return ic_slot_; } |
@@ -1950,6 +1959,7 @@ class CallNew final : public Expression { |
// Type feedback information. |
void AssignFeedbackVectorSlots(FeedbackVectorSpec* spec, |
+ LanguageMode language_mode, |
FeedbackVectorSlotCache* cache) { |
// CallNew stores feedback in the exact same way as Call. We can |
// piggyback on the type feedback infrastructure for calls. |
@@ -2125,6 +2135,7 @@ class BinaryOperation final : public Expression { |
// TypeFeedbackId to record the type information. TypeFeedbackId is used |
// by full codegen and the feedback vector slot is used by interpreter. |
void AssignFeedbackVectorSlots(FeedbackVectorSpec* spec, |
+ LanguageMode language_mode, |
FeedbackVectorSlotCache* cache); |
FeedbackVectorSlot BinaryOperationFeedbackSlot() const { |
@@ -2218,6 +2229,7 @@ class CountOperation final : public Expression { |
} |
void AssignFeedbackVectorSlots(FeedbackVectorSpec* spec, |
+ LanguageMode language_mode, |
FeedbackVectorSlotCache* cache); |
FeedbackVectorSlot CountSlot() const { return slot_; } |
@@ -2270,6 +2282,7 @@ class CompareOperation final : public Expression { |
// TypeFeedbackId to record the type information. TypeFeedbackId is used |
// by full codegen and the feedback vector slot is used by interpreter. |
void AssignFeedbackVectorSlots(FeedbackVectorSpec* spec, |
+ LanguageMode language_mode, |
FeedbackVectorSlotCache* cache); |
FeedbackVectorSlot CompareOperationFeedbackSlot() const { |
@@ -2416,6 +2429,7 @@ class Assignment final : public Expression { |
} |
void AssignFeedbackVectorSlots(FeedbackVectorSpec* spec, |
+ LanguageMode language_mode, |
FeedbackVectorSlotCache* cache); |
FeedbackVectorSlot AssignmentSlot() const { return slot_; } |
@@ -2583,6 +2597,7 @@ class FunctionLiteral final : public Expression { |
LanguageMode language_mode() const; |
void AssignFeedbackVectorSlots(FeedbackVectorSpec* spec, |
+ LanguageMode language_mode, |
FeedbackVectorSlotCache* cache) { |
literal_feedback_slot_ = spec->AddCreateClosureSlot(); |
} |
@@ -2799,6 +2814,7 @@ class ClassLiteral final : public Expression { |
// Object literals need one feedback slot for each non-trivial value, as well |
// as some slots for home objects. |
void AssignFeedbackVectorSlots(FeedbackVectorSpec* spec, |
+ LanguageMode language_mode, |
FeedbackVectorSlotCache* cache); |
bool NeedsProxySlot() const { |
@@ -2850,6 +2866,7 @@ class NativeFunctionLiteral final : public Expression { |
} |
void AssignFeedbackVectorSlots(FeedbackVectorSpec* spec, |
+ LanguageMode language_mode, |
FeedbackVectorSlotCache* cache) { |
// TODO(mvstanton): The FeedbackVectorSlotCache can be adapted |
// to always return the same slot for this case. |
@@ -2952,11 +2969,10 @@ class GetIterator final : public Expression { |
static int num_ids() { return parent_num_ids(); } |
void AssignFeedbackVectorSlots(FeedbackVectorSpec* spec, |
+ LanguageMode language_mode, |
FeedbackVectorSlotCache* cache) { |
- iterator_property_feedback_slot_ = |
- spec->AddSlot(FeedbackVectorSlotKind::LOAD_IC); |
- iterator_call_feedback_slot_ = |
- spec->AddSlot(FeedbackVectorSlotKind::CALL_IC); |
+ iterator_property_feedback_slot_ = spec->AddLoadICSlot(); |
+ iterator_call_feedback_slot_ = spec->AddCallICSlot(); |
} |
FeedbackVectorSlot IteratorPropertyFeedbackSlot() const { |