4665 address addr = (address)$meth$$method; |
4665 address addr = (address)$meth$$method; |
4666 address call; |
4666 address call; |
4667 if (!_method) { |
4667 if (!_method) { |
4668 // A call to a runtime wrapper, e.g. new, new_typeArray_Java, uncommon_trap. |
4668 // A call to a runtime wrapper, e.g. new, new_typeArray_Java, uncommon_trap. |
4669 call = __ trampoline_call(Address(addr, relocInfo::runtime_call_type), &cbuf); |
4669 call = __ trampoline_call(Address(addr, relocInfo::runtime_call_type), &cbuf); |
4670 } else if (_optimized_virtual) { |
|
4671 call = __ trampoline_call(Address(addr, relocInfo::opt_virtual_call_type), &cbuf); |
|
4672 } else { |
4670 } else { |
4673 call = __ trampoline_call(Address(addr, relocInfo::static_call_type), &cbuf); |
4671 int method_index = resolved_method_index(cbuf); |
4674 } |
4672 RelocationHolder rspec = _optimized_virtual ? opt_virtual_call_Relocation::spec(method_index) |
4675 if (call == NULL) { |
4673 : static_call_Relocation::spec(method_index); |
4676 ciEnv::current()->record_failure("CodeCache is full"); |
4674 call = __ trampoline_call(Address(addr, rspec), &cbuf); |
4677 return; |
4675 |
4678 } |
|
4679 |
|
4680 if (_method) { |
|
4681 // Emit stub for static call |
4676 // Emit stub for static call |
4682 address stub = CompiledStaticCall::emit_to_interp_stub(cbuf); |
4677 address stub = CompiledStaticCall::emit_to_interp_stub(cbuf); |
4683 if (stub == NULL) { |
4678 if (stub == NULL) { |
4684 ciEnv::current()->record_failure("CodeCache is full"); |
4679 ciEnv::current()->record_failure("CodeCache is full"); |
4685 return; |
4680 return; |
4686 } |
4681 } |
4687 } |
4682 } |
|
4683 if (call == NULL) { |
|
4684 ciEnv::current()->record_failure("CodeCache is full"); |
|
4685 return; |
|
4686 } |
4688 %} |
4687 %} |
4689 |
4688 |
4690 enc_class aarch64_enc_java_dynamic_call(method meth) %{ |
4689 enc_class aarch64_enc_java_dynamic_call(method meth) %{ |
4691 MacroAssembler _masm(&cbuf); |
4690 MacroAssembler _masm(&cbuf); |
4692 address call = __ ic_call((address)$meth$$method); |
4691 int method_index = resolved_method_index(cbuf); |
|
4692 address call = __ ic_call((address)$meth$$method, method_index); |
4693 if (call == NULL) { |
4693 if (call == NULL) { |
4694 ciEnv::current()->record_failure("CodeCache is full"); |
4694 ciEnv::current()->record_failure("CodeCache is full"); |
4695 return; |
4695 return; |
4696 } |
4696 } |
4697 %} |
4697 %} |