summaryrefslogtreecommitdiff
path: root/compiler/optimizing/graph_checker.cc
diff options
context:
space:
mode:
author David Brazdil <dbrazdil@google.com> 2015-12-14 13:38:20 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2015-12-14 13:38:20 +0000
commit795accfff05abfb69f54003ee3f096ef3ff6f1e4 (patch)
tree9f4e4ffb5fae25c4f14059fd1d772726e9d96170 /compiler/optimizing/graph_checker.cc
parentceec5a3c81925cf80a18954b2e585316450c575c (diff)
parentd9510dfc32349eeb4f2145c801f7ba1d5bccfb12 (diff)
Merge "ART: Refactor SsaBuilder for more precise typing info"
Diffstat (limited to 'compiler/optimizing/graph_checker.cc')
-rw-r--r--compiler/optimizing/graph_checker.cc12
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) {