summaryrefslogtreecommitdiff
path: root/compiler/optimizing
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/optimizing')
-rw-r--r--compiler/optimizing/critical_native_abi_fixup_arm.cc1
-rw-r--r--compiler/optimizing/graph_checker.cc7
2 files changed, 7 insertions, 1 deletions
diff --git a/compiler/optimizing/critical_native_abi_fixup_arm.cc b/compiler/optimizing/critical_native_abi_fixup_arm.cc
index 11d42a41ee..3c4db4bca7 100644
--- a/compiler/optimizing/critical_native_abi_fixup_arm.cc
+++ b/compiler/optimizing/critical_native_abi_fixup_arm.cc
@@ -49,6 +49,7 @@ static void FixUpArguments(HInvokeStaticOrDirect* invoke) {
: WellKnownClasses::java_lang_Float_floatToRawIntBits;
ArtMethod* resolved_method = jni::DecodeArtMethod(known_method);
DCHECK(resolved_method != nullptr);
+ DCHECK(resolved_method->IsIntrinsic());
MethodReference target_method(nullptr, 0);
{
ScopedObjectAccess soa(Thread::Current());
diff --git a/compiler/optimizing/graph_checker.cc b/compiler/optimizing/graph_checker.cc
index 44de54eccf..d1769cea0d 100644
--- a/compiler/optimizing/graph_checker.cc
+++ b/compiler/optimizing/graph_checker.cc
@@ -507,7 +507,12 @@ void GraphChecker::VisitInstruction(HInstruction* instruction) {
}
}
- if (instruction->CanThrowIntoCatchBlock()) {
+ if (instruction->CanThrow() && !instruction->HasEnvironment()) {
+ AddError(StringPrintf("Throwing instruction %s:%d in block %d does not have an environment.",
+ instruction->DebugName(),
+ instruction->GetId(),
+ current_block_->GetBlockId()));
+ } else if (instruction->CanThrowIntoCatchBlock()) {
// Find the top-level environment. This corresponds to the environment of
// the catch block since we do not inline methods with try/catch.
HEnvironment* environment = instruction->GetEnvironment();