From 0719b5b9b458cb3eb9f0823f0dacdfe1a71214dd Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Mon, 12 Sep 2016 22:05:33 +0000 Subject: Revert "Use implicit null checks inside try blocks." Fails gcstress tests. This reverts commit 7aa7560683626c7893011271c241b3265ded1dc3. Change-Id: I4f5c89048b9ffddbafa02f3001e329ff87058ca2 --- compiler/optimizing/code_generator.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'compiler/optimizing/code_generator.h') diff --git a/compiler/optimizing/code_generator.h b/compiler/optimizing/code_generator.h index b4d4b9b760..0c60a98139 100644 --- a/compiler/optimizing/code_generator.h +++ b/compiler/optimizing/code_generator.h @@ -313,7 +313,6 @@ class CodeGenerator : public DeletableArenaObject { bool CanMoveNullCheckToUser(HNullCheck* null_check); void MaybeRecordImplicitNullCheck(HInstruction* instruction); - LocationSummary* CreateNullCheckLocations(HNullCheck* null_check); void GenerateNullCheck(HNullCheck* null_check); virtual void GenerateImplicitNullCheck(HNullCheck* null_check) = 0; virtual void GenerateExplicitNullCheck(HNullCheck* null_check) = 0; @@ -323,6 +322,12 @@ class CodeGenerator : public DeletableArenaObject { // TODO: Replace with a catch-entering instruction that records the environment. void RecordCatchBlockInfo(); + // Returns true if implicit null checks are allowed in the compiler options + // and if the null check is not inside a try block. We currently cannot do + // implicit null checks in that case because we need the NullCheckSlowPath to + // save live registers, which may be needed by the runtime to set catch phis. + bool IsImplicitNullCheckAllowed(HNullCheck* null_check) const; + // TODO: Avoid creating the `std::unique_ptr` here. void AddSlowPath(SlowPathCode* slow_path) { slow_paths_.push_back(std::unique_ptr(slow_path)); @@ -708,8 +713,6 @@ class CodeGenerator : public DeletableArenaObject { bool is_leaf_; // Whether an instruction in the graph accesses the current method. - // TODO: Rename: this actually indicates that some instruction in the method - // needs the environment including a valid stack frame. bool requires_current_method_; friend class OptimizingCFITest; -- cgit v1.2.3-59-g8ed1b