diff options
author | 2015-10-07 18:55:43 +0100 | |
---|---|---|
committer | 2015-10-08 14:18:39 +0100 | |
commit | 386062d13ce20d036555a9e24b73a67b4156b5cb (patch) | |
tree | 6003846384f7aa5a8f6d8819926482034b70efb5 /compiler/optimizing | |
parent | e53fb5582f8f6ece5d0ce3b9c0d5b1cdb654b254 (diff) |
Make sure classes with different access checks are not GVN-ed
Change-Id: I89f72fef3be35a4dd9585d97d03a3150386e0891
Diffstat (limited to 'compiler/optimizing')
-rw-r--r-- | compiler/optimizing/graph_visualizer.cc | 2 | ||||
-rw-r--r-- | compiler/optimizing/nodes.h | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/compiler/optimizing/graph_visualizer.cc b/compiler/optimizing/graph_visualizer.cc index d38f4c862f..922c46a114 100644 --- a/compiler/optimizing/graph_visualizer.cc +++ b/compiler/optimizing/graph_visualizer.cc @@ -362,6 +362,8 @@ class HGraphVisualizerPrinter : public HGraphDelegateVisitor { void VisitLoadClass(HLoadClass* load_class) OVERRIDE { StartAttributeStream("gen_clinit_check") << std::boolalpha << load_class->MustGenerateClinitCheck() << std::noboolalpha; + StartAttributeStream("needs_access_check") << std::boolalpha + << load_class->NeedsAccessCheck() << std::noboolalpha; } void VisitCheckCast(HCheckCast* check_cast) OVERRIDE { diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h index 95dd03970d..f009c410f4 100644 --- a/compiler/optimizing/nodes.h +++ b/compiler/optimizing/nodes.h @@ -4534,7 +4534,8 @@ class HLoadClass : public HExpression<1> { bool CanBeMoved() const OVERRIDE { return true; } bool InstructionDataEquals(HInstruction* other) const OVERRIDE { - return other->AsLoadClass()->type_index_ == type_index_; + return other->AsLoadClass()->type_index_ == type_index_ && + other->AsLoadClass()->needs_access_check_ == needs_access_check_; } size_t ComputeHashCode() const OVERRIDE { return type_index_; } |