From d58b837ae41c6d8ce010c362e8f85bd938715900 Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Tue, 12 Apr 2016 18:51:43 +0100 Subject: Allocate code generators on the arena. Change-Id: If8cf0ee43711f6e13171443e3c057ff370ccfbaa --- compiler/optimizing/code_generator.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'compiler/optimizing/code_generator.h') 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 { 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 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. -- cgit v1.2.3-59-g8ed1b