diff options
| author | 2015-12-14 05:47:32 -0800 | |
|---|---|---|
| committer | 2015-12-14 05:47:32 -0800 | |
| commit | ecfedf8a62d700cff3decc9bc30472f3cac38b43 (patch) | |
| tree | 55e2c4da6176348d8e20107eb7772bf9ec28a572 /compiler/optimizing/graph_checker.cc | |
| parent | f6082992319d3d71ff64411fb3083e4da8dd60cc (diff) | |
| parent | c57108d49e99f5da452b8356d491222a0fe539c8 (diff) | |
Merge "ART: Refactor SsaBuilder for more precise typing info" am: 795accfff0
am: c57108d49e
* commit 'c57108d49e99f5da452b8356d491222a0fe539c8':
ART: Refactor SsaBuilder for more precise typing info
Diffstat (limited to 'compiler/optimizing/graph_checker.cc')
| -rw-r--r-- | compiler/optimizing/graph_checker.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/compiler/optimizing/graph_checker.cc b/compiler/optimizing/graph_checker.cc index dfc363f9fd..f3c1dbe3f5 100644 --- a/compiler/optimizing/graph_checker.cc +++ b/compiler/optimizing/graph_checker.cc @@ -24,6 +24,7 @@ #include "base/arena_containers.h" #include "base/bit_vector-inl.h" #include "base/stringprintf.h" +#include "handle_scope-inl.h" namespace art { @@ -594,6 +595,17 @@ void SSAChecker::VisitInstruction(HInstruction* instruction) { } } } + + // Ensure that reference type instructions have reference type info. + if (instruction->GetType() == Primitive::kPrimNot) { + ScopedObjectAccess soa(Thread::Current()); + if (!instruction->GetReferenceTypeInfo().IsValid()) { + AddError(StringPrintf("Reference type instruction %s:%d does not have " + "valid reference type information.", + instruction->DebugName(), + instruction->GetId())); + } + } } static Primitive::Type PrimitiveKind(Primitive::Type type) { |