From 69eafaae2c910ea6f704a3867f9b78647174a0df Mon Sep 17 00:00:00 2001 From: TDYa127 Date: Tue, 17 Apr 2012 10:51:25 -0700 Subject: Fix jni compiler bug (Compiler_llvm). Must test suspend before return. Change-Id: I1885c24848b40858ed1b8facdaaec459f49dfcf7 --- src/compiler_llvm/jni_compiler.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/compiler_llvm/jni_compiler.cc') diff --git a/src/compiler_llvm/jni_compiler.cc b/src/compiler_llvm/jni_compiler.cc index b35d7929a3..7855be09d9 100644 --- a/src/compiler_llvm/jni_compiler.cc +++ b/src/compiler_llvm/jni_compiler.cc @@ -259,6 +259,9 @@ CompiledMethod* JniCompiler::Compile() { Thread::StateOffset().Int32Value(), irb_.getInt32(kRunnable)); + // Do a suspend check + irb_.CreateCall(irb_.GetRuntime(TestSuspend)); + if (return_shorty == 'L') { // If the return value is reference, it may point to SIRT, we should decode it. retval = irb_.CreateCall2(irb_.GetRuntime(DecodeJObjectInThread), -- cgit v1.2.3-59-g8ed1b