Index: src/full-codegen.h |
diff --git a/src/full-codegen.h b/src/full-codegen.h |
index 2a6b7057c409c04f80348a5df504cb5f502c2e0e..e55d7cca17c131912cdb4a10d28cbfab192ae173 100644 |
--- a/src/full-codegen.h |
+++ b/src/full-codegen.h |
@@ -77,7 +77,8 @@ class FullCodeGenerator: public AstVisitor { |
TOS_REG |
}; |
- FullCodeGenerator(MacroAssembler* masm, CompilationInfo* info) |
+ FullCodeGenerator(MacroAssembler* masm, CompilationInfo* info, |
+ Zone* zone) |
: masm_(masm), |
info_(info), |
scope_(info->scope()), |
@@ -86,11 +87,12 @@ class FullCodeGenerator: public AstVisitor { |
globals_(NULL), |
context_(NULL), |
bailout_entries_(info->HasDeoptimizationSupport() |
- ? info->function()->ast_node_count() : 0), |
- stack_checks_(2), // There's always at least one. |
+ ? info->function()->ast_node_count() : 0, zone), |
+ stack_checks_(2, zone), // There's always at least one. |
type_feedback_cells_(info->HasDeoptimizationSupport() |
- ? info->function()->ast_node_count() : 0), |
- ic_total_count_(0) { } |
+ ? info->function()->ast_node_count() : 0, zone), |
+ ic_total_count_(0), |
+ zone_(zone) { } |
static bool MakeCode(CompilationInfo* info); |
@@ -108,6 +110,8 @@ class FullCodeGenerator: public AstVisitor { |
return NULL; |
} |
+ Zone* zone() const { return zone_; } |
+ |
private: |
class Breakable; |
class Iteration; |
@@ -786,6 +790,7 @@ class FullCodeGenerator: public AstVisitor { |
int ic_total_count_; |
Handle<FixedArray> handler_table_; |
Handle<JSGlobalPropertyCell> profiling_counter_; |
+ Zone* zone_; |
friend class NestedStatement; |
@@ -800,11 +805,12 @@ class AccessorTable: public TemplateHashMap<Literal, |
public: |
explicit AccessorTable(Zone* zone) : |
TemplateHashMap<Literal, ObjectLiteral::Accessors, |
- ZoneAllocationPolicy>(Literal::Match), |
+ ZoneAllocationPolicy>(Literal::Match, |
+ ZoneAllocationPolicy(zone)), |
zone_(zone) { } |
Iterator lookup(Literal* literal) { |
- Iterator it = find(literal, true); |
+ Iterator it = find(literal, true, ZoneAllocationPolicy(zone_)); |
if (it->second == NULL) it->second = new(zone_) ObjectLiteral::Accessors(); |
return it; |
} |