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

Unified Diff: src/ast/ast.h

Issue 2614373002: [FeedbackVector] Infrastructure for literal arrays in the vector. (Closed)
Patch Set: Release compile fix. 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
« no previous file with comments | « src/arm64/interface-descriptors-arm64.cc ('k') | src/ast/ast-numbering.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast/ast.h
diff --git a/src/ast/ast.h b/src/ast/ast.h
index 299a94b9258f85f7bd53939d913bd40950082eb6..12e8de97158c3d44c8b6c28f469aec59b3642461 100644
--- a/src/ast/ast.h
+++ b/src/ast/ast.h
@@ -2567,6 +2567,18 @@ class FunctionLiteral final : public Expression {
}
LanguageMode language_mode() const;
+ void AssignFeedbackVectorSlots(Isolate* isolate, FeedbackVectorSpec* spec,
+ FeedbackVectorSlotCache* cache) {
+ // The + 1 is because we need an array with room for the literals
+ // as well as the feedback vector.
+ literal_feedback_slot_ =
+ spec->AddCreateClosureSlot(materialized_literal_count_ + 1);
+ }
+
+ FeedbackVectorSlot LiteralFeedbackSlot() const {
+ return literal_feedback_slot_;
+ }
+
static bool NeedsHomeObject(Expression* expr);
int materialized_literal_count() { return materialized_literal_count_; }
@@ -2734,6 +2746,7 @@ class FunctionLiteral final : public Expression {
Handle<String> inferred_name_;
AstProperties ast_properties_;
int function_literal_id_;
+ FeedbackVectorSlot literal_feedback_slot_;
};
// Property is used for passing information
@@ -2824,6 +2837,19 @@ class NativeFunctionLiteral final : public Expression {
public:
Handle<String> name() const { return name_->string(); }
v8::Extension* extension() const { return extension_; }
+ FeedbackVectorSlot LiteralFeedbackSlot() const {
+ return literal_feedback_slot_;
+ }
+
+ void AssignFeedbackVectorSlots(Isolate* isolate, FeedbackVectorSpec* spec,
+ FeedbackVectorSlotCache* cache) {
+ // 0 is a magic number here. It means we are holding the literals
+ // array for a native function literal, which needs to be
+ // the empty literals array.
+ // TODO(mvstanton): The FeedbackVectorSlotCache can be adapted
+ // to always return the same slot for this case.
+ literal_feedback_slot_ = spec->AddCreateClosureSlot(0);
+ }
private:
friend class AstNodeFactory;
@@ -2836,6 +2862,7 @@ class NativeFunctionLiteral final : public Expression {
const AstRawString* name_;
v8::Extension* extension_;
+ FeedbackVectorSlot literal_feedback_slot_;
};
« no previous file with comments | « src/arm64/interface-descriptors-arm64.cc ('k') | src/ast/ast-numbering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698