diff options
author | Vladimir Marko <vmarko@google.com> | 2016-04-12 18:51:43 +0100 |
---|---|---|
committer | Vladimir Marko <vmarko@google.com> | 2016-04-12 21:04:13 +0100 |
commit | d58b837ae41c6d8ce010c362e8f85bd938715900 (patch) | |
tree | a7c8e90ff825838bb27707d14487c0333f2cc5f6 /compiler/optimizing/code_generator.h | |
parent | ec9a828fa4a4638d2d17124c4fa835f15c7c5589 (diff) |
Allocate code generators on the arena.
Change-Id: If8cf0ee43711f6e13171443e3c057ff370ccfbaa
Diffstat (limited to 'compiler/optimizing/code_generator.h')
-rw-r--r-- | compiler/optimizing/code_generator.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/compiler/optimizing/code_generator.h b/compiler/optimizing/code_generator.h index 1a060b1f58..87832a2d9f 100644 --- a/compiler/optimizing/code_generator.h +++ b/compiler/optimizing/code_generator.h @@ -166,15 +166,15 @@ class FieldAccessCallingConvention { DISALLOW_COPY_AND_ASSIGN(FieldAccessCallingConvention); }; -class CodeGenerator { +class CodeGenerator : public DeletableArenaObject<kArenaAllocCodeGenerator> { public: // Compiles the graph to executable instructions. void Compile(CodeAllocator* allocator); - static CodeGenerator* Create(HGraph* graph, - InstructionSet instruction_set, - const InstructionSetFeatures& isa_features, - const CompilerOptions& compiler_options, - OptimizingCompilerStats* stats = nullptr); + static std::unique_ptr<CodeGenerator> Create(HGraph* graph, + InstructionSet instruction_set, + const InstructionSetFeatures& isa_features, + const CompilerOptions& compiler_options, + OptimizingCompilerStats* stats = nullptr); virtual ~CodeGenerator() {} // Get the graph. This is the outermost graph, never the graph of a method being inlined. |