296 #ifndef SHARK 297 if (method() != NULL && !method()->is_native()) { 298 address pc = fr.pc(); 299 SimpleScopeDesc ssd(this, pc); 300 Bytecode_invoke call(ssd.method(), ssd.bci()); 301 bool has_receiver = call.has_receiver(); 302 bool has_appendix = call.has_appendix(); 303 Symbol* signature = call.signature(); 304 305 // The method attached by JIT-compilers should be used, if present. 306 // Bytecode can be inaccurate in such case. 307 Method* callee = attached_method_before_pc(pc); 308 if (callee != NULL) { 309 has_receiver = !(callee->access_flags().is_static()); 310 has_appendix = false; 311 signature = callee->signature(); 312 } 313 314 // If value types are passed as fields, use the extended signature 315 // which contains the types of all (oop) fields of the value type. 316 if (ValueTypePassFieldsAsArgs) { 317 // Check if receiver or one of the arguments is a value type 318 bool has_value_receiver = (has_receiver && callee != NULL && callee->method_holder()->is_value()); 319 bool has_value_argument = has_value_receiver; 320 for (SignatureStream ss(signature); !has_value_argument && !ss.at_return_type(); ss.next()) { 321 if (ss.type() == T_VALUETYPE) { 322 has_value_argument = true; 323 } 324 } 325 if (has_value_argument) { 326 // Get the extended signature from the callee's adapter through the attached method 327 assert(callee != NULL, "must have attached method"); 328 signature = callee->adapter()->get_sig_extended(); 329 assert(signature != NULL, "signature is null"); 330 has_receiver = false; // The extended signature contains the receiver type 331 } 332 } 333 334 fr.oops_compiled_arguments_do(signature, has_receiver, has_appendix, reg_map, f); 335 } 336 #endif // !SHARK 337 } 338 339 // ----------------------------------------------------------------------------- 340 // CompiledMethod::get_deopt_original_pc 341 // 342 // Return the original PC for the given PC if: 343 // (a) the given PC belongs to a nmethod and 344 // (b) it is a deopt PC 345 address CompiledMethod::get_deopt_original_pc(const frame* fr) { 346 if (fr->cb() == NULL) return NULL; 347 | 296 #ifndef SHARK 297 if (method() != NULL && !method()->is_native()) { 298 address pc = fr.pc(); 299 SimpleScopeDesc ssd(this, pc); 300 Bytecode_invoke call(ssd.method(), ssd.bci()); 301 bool has_receiver = call.has_receiver(); 302 bool has_appendix = call.has_appendix(); 303 Symbol* signature = call.signature(); 304 305 // The method attached by JIT-compilers should be used, if present. 306 // Bytecode can be inaccurate in such case. 307 Method* callee = attached_method_before_pc(pc); 308 if (callee != NULL) { 309 has_receiver = !(callee->access_flags().is_static()); 310 has_appendix = false; 311 signature = callee->signature(); 312 } 313 314 // If value types are passed as fields, use the extended signature 315 // which contains the types of all (oop) fields of the value type. 316 if (ValueTypePassFieldsAsArgs && callee != NULL) { 317 // Check if receiver or one of the arguments is a value type 318 bool has_value_receiver = has_receiver && callee->method_holder()->is_value(); 319 bool has_value_argument = has_value_receiver; 320 for (SignatureStream ss(signature); !has_value_argument && !ss.at_return_type(); ss.next()) { 321 if (ss.type() == T_VALUETYPE) { 322 has_value_argument = true; 323 } 324 } 325 if (has_value_argument) { 326 // Get the extended signature from the callee's adapter through the attached method 327 signature = callee->adapter()->get_sig_extended(); 328 assert(signature != NULL, "signature is null"); 329 has_receiver = false; // The extended signature contains the receiver type 330 } 331 } 332 333 fr.oops_compiled_arguments_do(signature, has_receiver, has_appendix, reg_map, f); 334 } 335 #endif // !SHARK 336 } 337 338 // ----------------------------------------------------------------------------- 339 // CompiledMethod::get_deopt_original_pc 340 // 341 // Return the original PC for the given PC if: 342 // (a) the given PC belongs to a nmethod and 343 // (b) it is a deopt PC 344 address CompiledMethod::get_deopt_original_pc(const frame* fr) { 345 if (fr->cb() == NULL) return NULL; 346 |