From cd6dffedf1bd8e6dfb3fb0c933551f9a90f7de3f Mon Sep 17 00:00:00 2001 From: Calin Juravle Date: Thu, 8 Jan 2015 17:35:35 +0000 Subject: Add implicit null checks for the optimizing compiler - for backends: arm, arm64, x86, x86_64 - fixed parameter passing for CodeGenerator - 003-omnibus-opcodes test verifies that NullPointerExceptions work as expected Change-Id: I1b302acd353342504716c9169a80706cf3aba2c8 --- compiler/optimizing/code_generator.cc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'compiler/optimizing/code_generator.cc') diff --git a/compiler/optimizing/code_generator.cc b/compiler/optimizing/code_generator.cc index 9e8907078b..08cbb20ecd 100644 --- a/compiler/optimizing/code_generator.cc +++ b/compiler/optimizing/code_generator.cc @@ -330,23 +330,25 @@ bool CodeGenerator::GoesToNextBlock(HBasicBlock* current, HBasicBlock* next) con CodeGenerator* CodeGenerator::Create(HGraph* graph, InstructionSet instruction_set, - const InstructionSetFeatures& isa_features) { + const InstructionSetFeatures& isa_features, + const CompilerOptions& compiler_options) { switch (instruction_set) { case kArm: case kThumb2: { return new arm::CodeGeneratorARM(graph, - isa_features.AsArmInstructionSetFeatures()); + *isa_features.AsArmInstructionSetFeatures(), + compiler_options); } case kArm64: { - return new arm64::CodeGeneratorARM64(graph); + return new arm64::CodeGeneratorARM64(graph, compiler_options); } case kMips: return nullptr; case kX86: { - return new x86::CodeGeneratorX86(graph); + return new x86::CodeGeneratorX86(graph, compiler_options); } case kX86_64: { - return new x86_64::CodeGeneratorX86_64(graph); + return new x86_64::CodeGeneratorX86_64(graph, compiler_options); } default: return nullptr; -- cgit v1.2.3-59-g8ed1b