summaryrefslogtreecommitdiffstats
path: root/runtime/interpreter
diff options
context:
space:
mode:
authorMathieu Chartier <mathieuc@google.com>2015-03-19 12:43:20 -0700
committerMathieu Chartier <mathieuc@google.com>2015-03-19 20:00:50 -0700
commitd7cbf8a6629942e7bd315ffae7e1c77b082f3e11 (patch)
treefc8c3371ed4ddac96bbe90a2f94ef5fb5c5472ee /runtime/interpreter
parentf5988cf0c47ff935bb19c89ed0398be5fbe44bb6 (diff)
downloadart-d7cbf8a6629942e7bd315ffae7e1c77b082f3e11.tar.gz
art-d7cbf8a6629942e7bd315ffae7e1c77b082f3e11.tar.bz2
art-d7cbf8a6629942e7bd315ffae7e1c77b082f3e11.zip
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
Diffstat (limited to 'runtime/interpreter')
-rw-r--r--runtime/interpreter/interpreter_goto_table_impl.cc12
-rw-r--r--runtime/interpreter/interpreter_switch_impl.cc10
2 files changed, 5 insertions, 17 deletions
diff --git a/runtime/interpreter/interpreter_goto_table_impl.cc b/runtime/interpreter/interpreter_goto_table_impl.cc
index af0a530688..9c48df6cdb 100644
--- a/runtime/interpreter/interpreter_goto_table_impl.cc
+++ b/runtime/interpreter/interpreter_goto_table_impl.cc
@@ -255,14 +255,8 @@ JValue ExecuteGotoImpl(Thread* self, const DexFile::CodeItem* code_item, ShadowF
}
HANDLE_INSTRUCTION_END();
- HANDLE_INSTRUCTION_START(RETURN_VOID) {
+ HANDLE_INSTRUCTION_START(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();
instrumentation::Instrumentation* instrumentation = Runtime::Current()->GetInstrumentation();
if (UNLIKELY(instrumentation->HasMethodExitListeners())) {
@@ -277,7 +271,7 @@ JValue ExecuteGotoImpl(Thread* self, const DexFile::CodeItem* code_item, ShadowF
}
HANDLE_INSTRUCTION_END();
- HANDLE_INSTRUCTION_START(RETURN_VOID_BARRIER) {
+ HANDLE_INSTRUCTION_START(RETURN_VOID) {
QuasiAtomic::ThreadFenceForConstructor();
JValue result;
self->AllowThreadSuspension();
@@ -2440,7 +2434,7 @@ JValue ExecuteGotoImpl(Thread* self, const DexFile::CodeItem* code_item, ShadowF
#define INSTRUMENTATION_INSTRUCTION_HANDLER(o, code, n, f, r, i, a, v) \
alt_op_##code: { \
if (Instruction::code != Instruction::RETURN_VOID && \
- Instruction::code != Instruction::RETURN_VOID_BARRIER && \
+ Instruction::code != Instruction::RETURN_VOID_NO_BARRIER && \
Instruction::code != Instruction::RETURN && \
Instruction::code != Instruction::RETURN_WIDE && \
Instruction::code != Instruction::RETURN_OBJECT) { \
diff --git a/runtime/interpreter/interpreter_switch_impl.cc b/runtime/interpreter/interpreter_switch_impl.cc
index 9313c750eb..609faf5b5d 100644
--- a/runtime/interpreter/interpreter_switch_impl.cc
+++ b/runtime/interpreter/interpreter_switch_impl.cc
@@ -170,14 +170,8 @@ JValue ExecuteSwitchImpl(Thread* self, const DexFile::CodeItem* code_item,
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 @@ JValue ExecuteSwitchImpl(Thread* self, const DexFile::CodeItem* code_item,
}
return result;
}
- case Instruction::RETURN_VOID_BARRIER: {
+ case Instruction::RETURN_VOID: {
QuasiAtomic::ThreadFenceForConstructor();
JValue result;
self->AllowThreadSuspension();