src/share/vm/interpreter/interpreterRuntime.hpp

changeset 548
ba764ed4b6f2
parent 435
a61af66fc99e
child 631
d1605aabd0a1
equal deleted inserted replaced
545:a49a647afe9a 548:ba764ed4b6f2
33 // Helper functions to access current interpreter state 33 // Helper functions to access current interpreter state
34 static frame last_frame(JavaThread *thread) { return thread->last_frame(); } 34 static frame last_frame(JavaThread *thread) { return thread->last_frame(); }
35 static methodOop method(JavaThread *thread) { return last_frame(thread).interpreter_frame_method(); } 35 static methodOop method(JavaThread *thread) { return last_frame(thread).interpreter_frame_method(); }
36 static address bcp(JavaThread *thread) { return last_frame(thread).interpreter_frame_bcp(); } 36 static address bcp(JavaThread *thread) { return last_frame(thread).interpreter_frame_bcp(); }
37 static void set_bcp_and_mdp(address bcp, JavaThread*thread); 37 static void set_bcp_and_mdp(address bcp, JavaThread*thread);
38 static Bytecodes::Code code(JavaThread *thread) { return Bytecodes::code_at(bcp(thread)); } 38 static Bytecodes::Code code(JavaThread *thread) {
39 // pass method to avoid calling unsafe bcp_to_method (partial fix 4926272)
40 return Bytecodes::code_at(bcp(thread), method(thread));
41 }
39 static bool already_resolved(JavaThread *thread) { return cache_entry(thread)->is_resolved(code(thread)); } 42 static bool already_resolved(JavaThread *thread) { return cache_entry(thread)->is_resolved(code(thread)); }
40 static int one_byte_index(JavaThread *thread) { return bcp(thread)[1]; } 43 static int one_byte_index(JavaThread *thread) { return bcp(thread)[1]; }
41 static int two_byte_index(JavaThread *thread) { return Bytes::get_Java_u2(bcp(thread) + 1); } 44 static int two_byte_index(JavaThread *thread) { return Bytes::get_Java_u2(bcp(thread) + 1); }
42 static int number_of_dimensions(JavaThread *thread) { return bcp(thread)[3]; } 45 static int number_of_dimensions(JavaThread *thread) { return bcp(thread)[3]; }
43 static ConstantPoolCacheEntry* cache_entry(JavaThread *thread) { return method(thread)->constants()->cache()->entry_at(Bytes::get_native_u2(bcp(thread) + 1)); } 46 static ConstantPoolCacheEntry* cache_entry(JavaThread *thread) { return method(thread)->constants()->cache()->entry_at(Bytes::get_native_u2(bcp(thread) + 1)); }

mercurial