2118 // determine who we intended to call. |
2118 // determine who we intended to call. |
2119 cbuf.set_insts_mark(); |
2119 cbuf.set_insts_mark(); |
2120 $$$emit8$primary; |
2120 $$$emit8$primary; |
2121 |
2121 |
2122 if (!_method) { |
2122 if (!_method) { |
2123 emit_d32_reloc(cbuf, |
2123 emit_d32_reloc(cbuf, (int) ($meth$$method - ((intptr_t) cbuf.insts_end()) - 4), |
2124 (int) ($meth$$method - ((intptr_t) cbuf.insts_end()) - 4), |
|
2125 runtime_call_Relocation::spec(), |
2124 runtime_call_Relocation::spec(), |
2126 RELOC_DISP32); |
2125 RELOC_DISP32); |
2127 } else if (_optimized_virtual) { |
|
2128 emit_d32_reloc(cbuf, |
|
2129 (int) ($meth$$method - ((intptr_t) cbuf.insts_end()) - 4), |
|
2130 opt_virtual_call_Relocation::spec(), |
|
2131 RELOC_DISP32); |
|
2132 } else { |
2126 } else { |
2133 emit_d32_reloc(cbuf, |
2127 int method_index = resolved_method_index(cbuf); |
2134 (int) ($meth$$method - ((intptr_t) cbuf.insts_end()) - 4), |
2128 RelocationHolder rspec = _optimized_virtual ? opt_virtual_call_Relocation::spec(method_index) |
2135 static_call_Relocation::spec(), |
2129 : static_call_Relocation::spec(method_index); |
2136 RELOC_DISP32); |
2130 emit_d32_reloc(cbuf, (int) ($meth$$method - ((intptr_t) cbuf.insts_end()) - 4), |
2137 } |
2131 rspec, RELOC_DISP32); |
2138 if (_method) { |
|
2139 // Emit stubs for static call. |
2132 // Emit stubs for static call. |
2140 address mark = cbuf.insts_mark(); |
2133 address mark = cbuf.insts_mark(); |
2141 address stub = CompiledStaticCall::emit_to_interp_stub(cbuf, mark); |
2134 address stub = CompiledStaticCall::emit_to_interp_stub(cbuf, mark); |
2142 if (stub == NULL) { |
2135 if (stub == NULL) { |
2143 ciEnv::current()->record_failure("CodeCache is full"); |
2136 ciEnv::current()->record_failure("CodeCache is full"); |
2146 } |
2139 } |
2147 %} |
2140 %} |
2148 |
2141 |
2149 enc_class Java_Dynamic_Call(method meth) %{ |
2142 enc_class Java_Dynamic_Call(method meth) %{ |
2150 MacroAssembler _masm(&cbuf); |
2143 MacroAssembler _masm(&cbuf); |
2151 __ ic_call((address)$meth$$method); |
2144 __ ic_call((address)$meth$$method, resolved_method_index(cbuf)); |
2152 %} |
2145 %} |
2153 |
2146 |
2154 enc_class Java_Compiled_Call(method meth) |
2147 enc_class Java_Compiled_Call(method meth) |
2155 %{ |
2148 %{ |
2156 // JAVA COMPILED CALL |
2149 // JAVA COMPILED CALL |