Chromium Code Reviews| Index: src/full-codegen.h |
| diff --git a/src/full-codegen.h b/src/full-codegen.h |
| index fbb697924627935aa6536c2d27471219b8f80cc8..bf0e4d67cfde9c9b4653dbf32b8fd36757a4dce9 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. |
| + cache_cells_(0) { |
| } |
| static bool MakeCode(CompilationInfo* info); |
| void Generate(CompilationInfo* info); |
| void PopulateDeoptimizationData(Handle<Code> code); |
| + void PopulateCacheCells(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 RecordCacheCell(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 CacheCellEntry { |
| + unsigned id; |
|
Vyacheslav Egorov (Chromium)
2012/01/25 15:51:55
id -> ast_id ?
Michael Starzinger
2012/01/27 13:03:51
Done.
|
| + 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<CacheCellEntry> cache_cells_; |
| Handle<FixedArray> handler_table_; |
| friend class NestedStatement; |