Change RETURN_VOID_BARRIER to RETURN_VOID_NO_BARRIER
We want to default to having a barrier for the case where we don't
dex to dex.
Bug: 19762303
Change-Id: I60348d89eaf0b9e1e480298afcecbb5f52e8661b
diff --git a/runtime/interpreter/interpreter_switch_impl.cc b/runtime/interpreter/interpreter_switch_impl.cc
index 9313c75..609faf5 100644
--- a/runtime/interpreter/interpreter_switch_impl.cc
+++ b/runtime/interpreter/interpreter_switch_impl.cc
@@ -170,14 +170,8 @@
inst = inst->Next_1xx();
break;
}
- case Instruction::RETURN_VOID: {
+ case Instruction::RETURN_VOID_NO_BARRIER: {
JValue result;
- if (do_access_check) {
- // If access checks are required then the dex-to-dex compiler and analysis of
- // whether the class has final fields hasn't been performed. Conservatively
- // perform the memory barrier now.
- QuasiAtomic::ThreadFenceForConstructor();
- }
self->AllowThreadSuspension();
if (UNLIKELY(instrumentation->HasMethodExitListeners())) {
instrumentation->MethodExitEvent(self, shadow_frame.GetThisObject(code_item->ins_size_),
@@ -189,7 +183,7 @@
}
return result;
}
- case Instruction::RETURN_VOID_BARRIER: {
+ case Instruction::RETURN_VOID: {
QuasiAtomic::ThreadFenceForConstructor();
JValue result;
self->AllowThreadSuspension();