196 // j_rarg0: receiver
197
198 #ifdef ASSERT
199 if (DebugVtables) {
200 Label L2;
201 __ cmpptr(method, (int32_t)NULL_WORD);
202 __ jcc(Assembler::equal, L2);
203 __ cmpptr(Address(method, Method::from_compiled_offset()), (int32_t)NULL_WORD);
204 __ jcc(Assembler::notZero, L2);
205 __ stop("compiler entrypoint is null");
206 __ bind(L2);
207 }
208 #endif // ASSERT
209
210 // rbx: Method*
211 // j_rarg0: receiver
212 address ame_addr = __ pc();
213 __ jmp(Address(method, Method::from_compiled_offset()));
214
215 __ bind(L_no_such_interface);
216 __ jump(RuntimeAddress(StubRoutines::throw_IncompatibleClassChangeError_entry()));
217
218 __ flush();
219
220 if (PrintMiscellaneous && (WizardMode || Verbose)) {
221 tty->print_cr("itable #%d at " PTR_FORMAT "[%d] left over: %d",
222 itable_index, p2i(s->entry_point()),
223 (int)(s->code_end() - s->entry_point()),
224 (int)(s->code_end() - __ pc()));
225 }
226 guarantee(__ pc() <= s->code_end(), "overflowed buffer");
227 // shut the door on sizing bugs
228 int slop = 3; // 32-bit offset is this much larger than an 8-bit one
229 assert(itable_index > 10 || __ pc() + slop <= s->code_end(), "room for 32-bit offset");
230
231 s->set_exception_points(npe_addr, ame_addr);
232 return s;
233 }
234
235 int VtableStub::pd_code_size_limit(bool is_vtable_stub) {
236 if (is_vtable_stub) {
|
196 // j_rarg0: receiver
197
198 #ifdef ASSERT
199 if (DebugVtables) {
200 Label L2;
201 __ cmpptr(method, (int32_t)NULL_WORD);
202 __ jcc(Assembler::equal, L2);
203 __ cmpptr(Address(method, Method::from_compiled_offset()), (int32_t)NULL_WORD);
204 __ jcc(Assembler::notZero, L2);
205 __ stop("compiler entrypoint is null");
206 __ bind(L2);
207 }
208 #endif // ASSERT
209
210 // rbx: Method*
211 // j_rarg0: receiver
212 address ame_addr = __ pc();
213 __ jmp(Address(method, Method::from_compiled_offset()));
214
215 __ bind(L_no_such_interface);
216 // Handle IncompatibleClassChangeError in itable stubs.
217 // More detailed error message.
218 // We force resolving of the call site by jumping to the "handle
219 // wrong method" stub, and so let the interpreter runtime do all the
220 // dirty work.
221 __ jump(RuntimeAddress(SharedRuntime::get_handle_wrong_method_stub()));
222
223 __ flush();
224
225 if (PrintMiscellaneous && (WizardMode || Verbose)) {
226 tty->print_cr("itable #%d at " PTR_FORMAT "[%d] left over: %d",
227 itable_index, p2i(s->entry_point()),
228 (int)(s->code_end() - s->entry_point()),
229 (int)(s->code_end() - __ pc()));
230 }
231 guarantee(__ pc() <= s->code_end(), "overflowed buffer");
232 // shut the door on sizing bugs
233 int slop = 3; // 32-bit offset is this much larger than an 8-bit one
234 assert(itable_index > 10 || __ pc() + slop <= s->code_end(), "room for 32-bit offset");
235
236 s->set_exception_points(npe_addr, ame_addr);
237 return s;
238 }
239
240 int VtableStub::pd_code_size_limit(bool is_vtable_stub) {
241 if (is_vtable_stub) {
|