1.1 --- a/src/cpu/sparc/vm/cppInterpreter_sparc.cpp Fri Aug 31 16:39:35 2012 -0700 1.2 +++ b/src/cpu/sparc/vm/cppInterpreter_sparc.cpp Sat Sep 01 13:25:18 2012 -0400 1.3 @@ -30,8 +30,8 @@ 1.4 #include "interpreter/interpreterGenerator.hpp" 1.5 #include "interpreter/interpreterRuntime.hpp" 1.6 #include "oops/arrayOop.hpp" 1.7 -#include "oops/methodDataOop.hpp" 1.8 -#include "oops/methodOop.hpp" 1.9 +#include "oops/methodData.hpp" 1.10 +#include "oops/method.hpp" 1.11 #include "oops/oop.inline.hpp" 1.12 #include "prims/jvmtiExport.hpp" 1.13 #include "prims/jvmtiThreadState.hpp" 1.14 @@ -405,9 +405,9 @@ 1.15 void InterpreterGenerator::generate_counter_incr(Label* overflow, Label* profile_method, Label* profile_method_continue) { 1.16 // Update standard invocation counters 1.17 __ increment_invocation_counter(O0, G3_scratch); 1.18 - if (ProfileInterpreter) { // %%% Merge this into methodDataOop 1.19 + if (ProfileInterpreter) { // %%% Merge this into MethodData* 1.20 __ ld_ptr(STATE(_method), G3_scratch); 1.21 - Address interpreter_invocation_counter(G3_scratch, 0, in_bytes(methodOopDesc::interpreter_invocation_counter_offset())); 1.22 + Address interpreter_invocation_counter(G3_scratch, 0, in_bytes(Method::interpreter_invocation_counter_offset())); 1.23 __ ld(interpreter_invocation_counter, G3_scratch); 1.24 __ inc(G3_scratch); 1.25 __ st(G3_scratch, interpreter_invocation_counter); 1.26 @@ -429,8 +429,6 @@ 1.27 address entry = __ pc(); 1.28 Label slow_path; 1.29 1.30 - __ verify_oop(G5_method); 1.31 - 1.32 // do nothing for empty methods (do not even increment invocation counter) 1.33 if ( UseFastEmptyMethods) { 1.34 // If we need a safepoint check, generate full interpreter entry. 1.35 @@ -481,8 +479,8 @@ 1.36 1.37 // read first instruction word and extract bytecode @ 1 and index @ 2 1.38 // get first 4 bytes of the bytecodes (big endian!) 1.39 - __ ld_ptr(Address(G5_method, 0, in_bytes(methodOopDesc::const_offset())), G1_scratch); 1.40 - __ ld(Address(G1_scratch, 0, in_bytes(constMethodOopDesc::codes_offset())), G1_scratch); 1.41 + __ ld_ptr(Address(G5_method, 0, in_bytes(Method::const_offset())), G1_scratch); 1.42 + __ ld(Address(G1_scratch, 0, in_bytes(ConstMethod::codes_offset())), G1_scratch); 1.43 1.44 // move index @ 2 far left then to the right most two bytes. 1.45 __ sll(G1_scratch, 2*BitsPerByte, G1_scratch); 1.46 @@ -490,16 +488,16 @@ 1.47 ConstantPoolCacheEntry::size()) * BytesPerWord), G1_scratch); 1.48 1.49 // get constant pool cache 1.50 - __ ld_ptr(G5_method, in_bytes(methodOopDesc::const_offset()), G3_scratch); 1.51 - __ ld_ptr(G3_scratch, in_bytes(constMethodOopDesc::constants_offset()), G3_scratch); 1.52 - __ ld_ptr(G3_scratch, constantPoolOopDesc::cache_offset_in_bytes(), G3_scratch); 1.53 + __ ld_ptr(G5_method, in_bytes(Method::const_offset()), G3_scratch); 1.54 + __ ld_ptr(G3_scratch, in_bytes(ConstMethod::constants_offset()), G3_scratch); 1.55 + __ ld_ptr(G3_scratch, ConstantPool::cache_offset_in_bytes(), G3_scratch); 1.56 1.57 // get specific constant pool cache entry 1.58 __ add(G3_scratch, G1_scratch, G3_scratch); 1.59 1.60 // Check the constant Pool cache entry to see if it has been resolved. 1.61 // If not, need the slow path. 1.62 - ByteSize cp_base_offset = constantPoolCacheOopDesc::base_offset(); 1.63 + ByteSize cp_base_offset = ConstantPoolCache::base_offset(); 1.64 __ ld_ptr(G3_scratch, in_bytes(cp_base_offset + ConstantPoolCacheEntry::indices_offset()), G1_scratch); 1.65 __ srl(G1_scratch, 2*BitsPerByte, G1_scratch); 1.66 __ and3(G1_scratch, 0xFF, G1_scratch); 1.67 @@ -584,20 +582,18 @@ 1.68 // the following temporary registers are used during frame creation 1.69 const Register Gtmp1 = G3_scratch ; 1.70 const Register Gtmp2 = G1_scratch; 1.71 - const Address size_of_parameters(G5_method, 0, in_bytes(methodOopDesc::size_of_parameters_offset())); 1.72 + const Address size_of_parameters(G5_method, 0, in_bytes(Method::size_of_parameters_offset())); 1.73 1.74 bool inc_counter = UseCompiler || CountCompiledCalls; 1.75 1.76 // make sure registers are different! 1.77 assert_different_registers(G2_thread, G5_method, Gargs, Gtmp1, Gtmp2); 1.78 1.79 - const Address access_flags (G5_method, 0, in_bytes(methodOopDesc::access_flags_offset())); 1.80 + const Address access_flags (G5_method, 0, in_bytes(Method::access_flags_offset())); 1.81 1.82 Label Lentry; 1.83 __ bind(Lentry); 1.84 1.85 - __ verify_oop(G5_method); 1.86 - 1.87 const Register Glocals_size = G3; 1.88 assert_different_registers(Glocals_size, G4_scratch, Gframe_size); 1.89 1.90 @@ -711,7 +707,7 @@ 1.91 1.92 { Label L; 1.93 __ ld_ptr(STATE(_method), G5_method); 1.94 - __ ld_ptr(Address(G5_method, 0, in_bytes(methodOopDesc::signature_handler_offset())), G3_scratch); 1.95 + __ ld_ptr(Address(G5_method, 0, in_bytes(Method::signature_handler_offset())), G3_scratch); 1.96 __ tst(G3_scratch); 1.97 __ brx(Assembler::notZero, false, Assembler::pt, L); 1.98 __ delayed()->nop(); 1.99 @@ -721,7 +717,7 @@ 1.100 Address exception_addr(G2_thread, 0, in_bytes(Thread::pending_exception_offset())); 1.101 __ ld_ptr(exception_addr, G3_scratch); 1.102 __ br_notnull_short(G3_scratch, Assembler::pn, pending_exception_present); 1.103 - __ ld_ptr(Address(G5_method, 0, in_bytes(methodOopDesc::signature_handler_offset())), G3_scratch); 1.104 + __ ld_ptr(Address(G5_method, 0, in_bytes(Method::signature_handler_offset())), G3_scratch); 1.105 __ bind(L); 1.106 } 1.107 1.108 @@ -765,13 +761,13 @@ 1.109 __ br( Assembler::zero, false, Assembler::pt, not_static); 1.110 __ delayed()-> 1.111 // get native function entry point(O0 is a good temp until the very end) 1.112 - ld_ptr(Address(G5_method, 0, in_bytes(methodOopDesc::native_function_offset())), O0); 1.113 + ld_ptr(Address(G5_method, 0, in_bytes(Method::native_function_offset())), O0); 1.114 // for static methods insert the mirror argument 1.115 const int mirror_offset = in_bytes(Klass::java_mirror_offset()); 1.116 1.117 - __ ld_ptr(Address(G5_method, 0, in_bytes(methodOopDesc:: const_offset())), O1); 1.118 - __ ld_ptr(Address(O1, 0, in_bytes(constMethodOopDesc::constants_offset())), O1); 1.119 - __ ld_ptr(Address(O1, 0, constantPoolOopDesc::pool_holder_offset_in_bytes()), O1); 1.120 + __ ld_ptr(Address(G5_method, 0, in_bytes(Method:: const_offset())), O1); 1.121 + __ ld_ptr(Address(O1, 0, in_bytes(ConstMethod::constants_offset())), O1); 1.122 + __ ld_ptr(Address(O1, 0, ConstantPool::pool_holder_offset_in_bytes()), O1); 1.123 __ ld_ptr(O1, mirror_offset, O1); 1.124 // where the mirror handle body is allocated: 1.125 #ifdef ASSERT 1.126 @@ -1049,11 +1045,11 @@ 1.127 assert_different_registers(state, prev_state); 1.128 assert_different_registers(prev_state, G3_scratch); 1.129 const Register Gtmp = G3_scratch; 1.130 - const Address constMethod (G5_method, 0, in_bytes(methodOopDesc::const_offset())); 1.131 - const Address access_flags (G5_method, 0, in_bytes(methodOopDesc::access_flags_offset())); 1.132 - const Address size_of_parameters(G5_method, 0, in_bytes(methodOopDesc::size_of_parameters_offset())); 1.133 - const Address max_stack (G5_method, 0, in_bytes(methodOopDesc::max_stack_offset())); 1.134 - const Address size_of_locals (G5_method, 0, in_bytes(methodOopDesc::size_of_locals_offset())); 1.135 + const Address constMethod (G5_method, 0, in_bytes(Method::const_offset())); 1.136 + const Address access_flags (G5_method, 0, in_bytes(Method::access_flags_offset())); 1.137 + const Address size_of_parameters(G5_method, 0, in_bytes(Method::size_of_parameters_offset())); 1.138 + const Address max_stack (G5_method, 0, in_bytes(Method::max_stack_offset())); 1.139 + const Address size_of_locals (G5_method, 0, in_bytes(Method::size_of_locals_offset())); 1.140 1.141 // slop factor is two extra slots on the expression stack so that 1.142 // we always have room to store a result when returning from a call without parameters 1.143 @@ -1062,7 +1058,7 @@ 1.144 const int slop_factor = 2*wordSize; 1.145 1.146 const int fixed_size = ((sizeof(BytecodeInterpreter) + slop_factor) >> LogBytesPerWord) + // what is the slop factor? 1.147 - //6815692//methodOopDesc::extra_stack_words() + // extra push slots for MH adapters 1.148 + //6815692//Method::extra_stack_words() + // extra push slots for MH adapters 1.149 frame::memory_parameter_word_sp_offset + // register save area + param window 1.150 (native ? frame::interpreter_frame_extra_outgoing_argument_words : 0); // JNI, class 1.151 1.152 @@ -1146,8 +1142,8 @@ 1.153 if (native) { 1.154 __ st_ptr(G0, XXX_STATE(_bcp)); 1.155 } else { 1.156 - __ ld_ptr(G5_method, in_bytes(methodOopDesc::const_offset()), O2); // get constMethodOop 1.157 - __ add(O2, in_bytes(constMethodOopDesc::codes_offset()), O2); // get bcp 1.158 + __ ld_ptr(G5_method, in_bytes(Method::const_offset()), O2); // get ConstMethod* 1.159 + __ add(O2, in_bytes(ConstMethod::codes_offset()), O2); // get bcp 1.160 __ st_ptr(O2, XXX_STATE(_bcp)); 1.161 } 1.162 1.163 @@ -1158,8 +1154,8 @@ 1.164 __ st(O1, XXX_STATE(_msg)); 1.165 1.166 __ ld_ptr(constMethod, O3); 1.167 - __ ld_ptr(O3, in_bytes(constMethodOopDesc::constants_offset()), O3); 1.168 - __ ld_ptr(O3, constantPoolOopDesc::cache_offset_in_bytes(), O2); 1.169 + __ ld_ptr(O3, in_bytes(ConstMethod::constants_offset()), O3); 1.170 + __ ld_ptr(O3, ConstantPool::cache_offset_in_bytes(), O2); 1.171 __ st_ptr(O2, XXX_STATE(_constants)); 1.172 1.173 __ st_ptr(G0, XXX_STATE(_result._to_call._callee)); 1.174 @@ -1182,9 +1178,9 @@ 1.175 __ br( Assembler::zero, true, Assembler::pt, got_obj); 1.176 __ delayed()->ld_ptr(O1, 0, O1); // get receiver for not-static case 1.177 __ ld_ptr(constMethod, O1); 1.178 - __ ld_ptr( O1, in_bytes(constMethodOopDesc::constants_offset()), O1); 1.179 - __ ld_ptr( O1, constantPoolOopDesc::pool_holder_offset_in_bytes(), O1); 1.180 - // lock the mirror, not the klassOop 1.181 + __ ld_ptr( O1, in_bytes(ConstMethod::constants_offset()), O1); 1.182 + __ ld_ptr( O1, ConstantPool::pool_holder_offset_in_bytes(), O1); 1.183 + // lock the mirror, not the Klass* 1.184 __ ld_ptr( O1, mirror_offset, O1); 1.185 1.186 __ bind(got_obj); 1.187 @@ -1213,7 +1209,7 @@ 1.188 __ lduh(max_stack, O3); // Full size expression stack 1.189 guarantee(!EnableInvokeDynamic, "no support yet for java.lang.invoke.MethodHandle"); //6815692 1.190 //6815692//if (EnableInvokeDynamic) 1.191 - //6815692// __ inc(O3, methodOopDesc::extra_stack_entries()); 1.192 + //6815692// __ inc(O3, Method::extra_stack_entries()); 1.193 __ sll(O3, LogBytesPerWord, O3); 1.194 __ sub(O2, O3, O3); 1.195 // __ sub(O3, wordSize, O3); // so prepush doesn't look out of bounds 1.196 @@ -1267,7 +1263,7 @@ 1.197 1.198 #ifdef ASSERT 1.199 __ ld_ptr(STATE(_method), L2_scratch); 1.200 - __ ld(L2_scratch, in_bytes(methodOopDesc::access_flags_offset()), O0); 1.201 + __ ld(L2_scratch, in_bytes(Method::access_flags_offset()), O0); 1.202 1.203 { Label ok; 1.204 __ btst(JVM_ACC_SYNCHRONIZED, O0); 1.205 @@ -1436,7 +1432,7 @@ 1.206 // 1.207 // Arguments: 1.208 // 1.209 -// ebx: methodOop 1.210 +// ebx: Method* 1.211 // ecx: receiver - unused (retrieved from stack as needed) 1.212 // esi: previous frame manager state (NULL from the call_stub/c1/c2) 1.213 // 1.214 @@ -1485,8 +1481,8 @@ 1.215 // assert_different_registers(state, prev_state); 1.216 const Register Gtmp = G3_scratch; 1.217 const Register tmp = O2; 1.218 - const Address size_of_parameters(G5_method, 0, in_bytes(methodOopDesc::size_of_parameters_offset())); 1.219 - const Address size_of_locals (G5_method, 0, in_bytes(methodOopDesc::size_of_locals_offset())); 1.220 + const Address size_of_parameters(G5_method, 0, in_bytes(Method::size_of_parameters_offset())); 1.221 + const Address size_of_locals (G5_method, 0, in_bytes(Method::size_of_locals_offset())); 1.222 1.223 __ lduh(size_of_parameters, tmp); 1.224 __ sll(tmp, LogBytesPerWord, Gtmp); // parameter size in bytes 1.225 @@ -1520,7 +1516,7 @@ 1.226 1.227 address InterpreterGenerator::generate_normal_entry(bool synchronized) { 1.228 1.229 - // G5_method: methodOop 1.230 + // G5_method: Method* 1.231 // G2_thread: thread (unused) 1.232 // Gargs: bottom of args (sender_sp) 1.233 // O5: sender's sp 1.234 @@ -1540,11 +1536,11 @@ 1.235 const Register Gtmp1 = G3_scratch; 1.236 // const Register Lmirror = L1; // native mirror (native calls only) 1.237 1.238 - const Address constMethod (G5_method, 0, in_bytes(methodOopDesc::const_offset())); 1.239 - const Address access_flags (G5_method, 0, in_bytes(methodOopDesc::access_flags_offset())); 1.240 - const Address size_of_parameters(G5_method, 0, in_bytes(methodOopDesc::size_of_parameters_offset())); 1.241 - const Address max_stack (G5_method, 0, in_bytes(methodOopDesc::max_stack_offset())); 1.242 - const Address size_of_locals (G5_method, 0, in_bytes(methodOopDesc::size_of_locals_offset())); 1.243 + const Address constMethod (G5_method, 0, in_bytes(Method::const_offset())); 1.244 + const Address access_flags (G5_method, 0, in_bytes(Method::access_flags_offset())); 1.245 + const Address size_of_parameters(G5_method, 0, in_bytes(Method::size_of_parameters_offset())); 1.246 + const Address max_stack (G5_method, 0, in_bytes(Method::max_stack_offset())); 1.247 + const Address size_of_locals (G5_method, 0, in_bytes(Method::size_of_locals_offset())); 1.248 1.249 address entry_point = __ pc(); 1.250 __ mov(G0, prevState); // no current activation 1.251 @@ -1701,7 +1697,7 @@ 1.252 __ verify_thread(); 1.253 __ st_ptr(O0, exception_addr); 1.254 1.255 - // get the methodOop 1.256 + // get the Method* 1.257 __ ld_ptr(STATE(_method), G5_method); 1.258 1.259 // if this current frame vanilla or native? 1.260 @@ -1752,10 +1748,10 @@ 1.261 1.262 __ ld_ptr(STATE(_result._to_call._callee), L4_scratch); // called method 1.263 __ ld_ptr(STATE(_stack), L1_scratch); // get top of java expr stack 1.264 - __ lduh(L4_scratch, in_bytes(methodOopDesc::size_of_parameters_offset()), L2_scratch); // get parameter size 1.265 + __ lduh(L4_scratch, in_bytes(Method::size_of_parameters_offset()), L2_scratch); // get parameter size 1.266 __ sll(L2_scratch, LogBytesPerWord, L2_scratch ); // parameter size in bytes 1.267 __ add(L1_scratch, L2_scratch, L1_scratch); // stack destination for result 1.268 - __ ld(L4_scratch, in_bytes(methodOopDesc::result_index_offset()), L3_scratch); // called method result type index 1.269 + __ ld(L4_scratch, in_bytes(Method::result_index_offset()), L3_scratch); // called method result type index 1.270 1.271 // tosca is really just native abi 1.272 __ set((intptr_t)CppInterpreter::_tosca_to_stack, L4_scratch); 1.273 @@ -1799,7 +1795,7 @@ 1.274 1.275 __ ld_ptr(STATE(_prev_link), L1_scratch); 1.276 __ ld_ptr(STATE(_method), L2_scratch); // get method just executed 1.277 - __ ld(L2_scratch, in_bytes(methodOopDesc::result_index_offset()), L2_scratch); 1.278 + __ ld(L2_scratch, in_bytes(Method::result_index_offset()), L2_scratch); 1.279 __ tst(L1_scratch); 1.280 __ brx(Assembler::zero, false, Assembler::pt, return_to_initial_caller); 1.281 __ delayed()->sll(L2_scratch, LogBytesPerWord, L2_scratch); 1.282 @@ -2068,17 +2064,17 @@ 1.283 1.284 const int fixed_size = sizeof(BytecodeInterpreter)/wordSize + // interpreter state object 1.285 frame::memory_parameter_word_sp_offset; // register save area + param window 1.286 - const int extra_stack = 0; //6815692//methodOopDesc::extra_stack_entries(); 1.287 + const int extra_stack = 0; //6815692//Method::extra_stack_entries(); 1.288 return (round_to(max_stack + 1.289 extra_stack + 1.290 slop_factor + 1.291 fixed_size + 1.292 monitor_size + 1.293 - (callee_extra_locals * Interpreter::stackElementWords()), WordsPerLong)); 1.294 + (callee_extra_locals * Interpreter::stackElementWords), WordsPerLong)); 1.295 1.296 } 1.297 1.298 -int AbstractInterpreter::size_top_interpreter_activation(methodOop method) { 1.299 +int AbstractInterpreter::size_top_interpreter_activation(Method* method) { 1.300 1.301 // See call_stub code 1.302 int call_stub_size = round_to(7 + frame::memory_parameter_word_sp_offset, 1.303 @@ -2095,7 +2091,7 @@ 1.304 void BytecodeInterpreter::layout_interpreterState(interpreterState to_fill, 1.305 frame* caller, 1.306 frame* current, 1.307 - methodOop method, 1.308 + Method* method, 1.309 intptr_t* locals, 1.310 intptr_t* stack, 1.311 intptr_t* stack_base, 1.312 @@ -2157,7 +2153,7 @@ 1.313 // Need +1 here because stack_base points to the word just above the first expr stack entry 1.314 // and stack_limit is supposed to point to the word just below the last expr stack entry. 1.315 // See generate_compute_interpreter_state. 1.316 - int extra_stack = 0; //6815692//methodOopDesc::extra_stack_entries(); 1.317 + int extra_stack = 0; //6815692//Method::extra_stack_entries(); 1.318 to_fill->_stack_limit = stack_base - (method->max_stack() + 1 + extra_stack); 1.319 to_fill->_monitor_base = (BasicObjectLock*) monitor_base; 1.320 1.321 @@ -2175,7 +2171,7 @@ 1.322 } 1.323 1.324 1.325 -int AbstractInterpreter::layout_activation(methodOop method, 1.326 +int AbstractInterpreter::layout_activation(Method* method, 1.327 int tempcount, // Number of slots on java expression stack in use 1.328 int popframe_extra_args, 1.329 int moncount, // Number of active monitors 1.330 @@ -2255,7 +2251,7 @@ 1.331 // statement is needed. 1.332 // 1.333 intptr_t* fp = interpreter_frame->fp(); 1.334 - int local_words = method->max_locals() * Interpreter::stackElementWords(); 1.335 + int local_words = method->max_locals() * Interpreter::stackElementWords; 1.336 1.337 if (caller->is_compiled_frame()) { 1.338 locals = fp + frame::register_save_words + local_words - 1;