Index: src/full-codegen.h |
diff --git a/src/full-codegen.h b/src/full-codegen.h |
index fbb697924627935aa6536c2d27471219b8f80cc8..c6acac622b6a7b6c2d977109d17b7c8d6467d703 100644 |
--- a/src/full-codegen.h |
+++ b/src/full-codegen.h |
@@ -85,13 +85,15 @@ class FullCodeGenerator: public AstVisitor { |
loop_depth_(0), |
context_(NULL), |
bailout_entries_(0), |
- stack_checks_(2) { // There's always at least one. |
+ stack_checks_(2), // There's always at least one. |
+ type_feedback_cells_(0) { |
} |
static bool MakeCode(CompilationInfo* info); |
void Generate(CompilationInfo* info); |
void PopulateDeoptimizationData(Handle<Code> code); |
+ void PopulateTypeFeedbackCells(Handle<Code> code); |
Handle<FixedArray> handler_table() { return handler_table_; } |
@@ -392,6 +394,10 @@ class FullCodeGenerator: public AstVisitor { |
void PrepareForBailout(Expression* node, State state); |
void PrepareForBailoutForId(unsigned id, State state); |
+ // Cache cell support. This associates AST ids with global property cells |
+ // that will be cleared during GC and collected by the type-feedback oracle. |
+ void RecordTypeFeedbackCell(unsigned id, Handle<JSGlobalPropertyCell> cell); |
+ |
// Record a call's return site offset, used to rebuild the frame if the |
// called function was inlined at the site. |
void RecordJSReturnSite(Call* call); |
@@ -571,6 +577,11 @@ class FullCodeGenerator: public AstVisitor { |
unsigned pc_and_state; |
}; |
+ struct TypeFeedbackCellEntry { |
+ unsigned ast_id; |
+ Handle<JSGlobalPropertyCell> cell; |
+ }; |
+ |
class ExpressionContext BASE_EMBEDDED { |
public: |
@@ -757,6 +768,7 @@ class FullCodeGenerator: public AstVisitor { |
const ExpressionContext* context_; |
ZoneList<BailoutEntry> bailout_entries_; |
ZoneList<BailoutEntry> stack_checks_; |
+ ZoneList<TypeFeedbackCellEntry> type_feedback_cells_; |
Handle<FixedArray> handler_table_; |
friend class NestedStatement; |