exc[i].start_pc.p = &insns[pc_mapping[exc[i].start_pc.i]];
exc[i].end_pc.p = &insns[pc_mapping[exc[i].end_pc.i]];
exc[i].handler_pc.p = &insns[pc_mapping[exc[i].handler_pc.i]];
+ // FIXME: resolve_pool_entry can throw - we shouldn't be doing this
+ // during compilation.
jclass handler
= (_Jv_Linker::resolve_pool_entry (defining_class,
exc[i].handler_type.i)).clazz;
insn_invokevirtual: // 0xb6
{
+ SAVE_PC();
int index = GET2U ();
/* _Jv_Linker::resolve_pool_entry returns immediately if the
if (rmeth->method->accflags & Modifier::FINAL)
{
// We can't rely on NULLCHECK working if the method is final.
- SAVE_PC();
if (! sp[0].o)
throw_null_pointer_exception ();
#ifdef DIRECT_THREADED
invokevirtual_resolved:
{
+ SAVE_PC();
rmeth = (_Jv_ResolvedMethod *) AVAL ();
sp -= rmeth->stack_item_count;
if (rmeth->method->accflags & Modifier::FINAL)
{
// We can't rely on NULLCHECK working if the method is final.
- SAVE_PC();
if (! sp[0].o)
throw_null_pointer_exception ();
perform_invoke:
{
- SAVE_PC();
-
/* here goes the magic again... */
ffi_cif *cif = &rmeth->cif;
ffi_raw *raw = (ffi_raw*) sp;
// For direct threaded we have a separate 'ldc class' operation.
insn_ldc_class:
{
+ SAVE_PC();
// We could rewrite the instruction at this point.
int index = INTVAL ();
jobject k = (_Jv_Linker::resolve_pool_entry (meth->defining_class,
insn_idiv:
{
+ SAVE_PC();
jint value2 = POPI();
jint value1 = POPI();
jint res = _Jv_divI (value1, value2);
insn_ldiv:
{
+ SAVE_PC();
jlong value2 = POPL();
jlong value1 = POPL();
jlong res = _Jv_divJ (value1, value2);
insn_fdiv:
{
+ SAVE_PC();
jfloat value2 = POPF();
jfloat value1 = POPF();
jfloat res = value1 / value2;
insn_irem:
{
+ SAVE_PC();
jint value2 = POPI();
jint value1 = POPI();
jint res = _Jv_remI (value1, value2);
insn_lrem:
{
+ SAVE_PC();
jlong value2 = POPL();
jlong value1 = POPL();
jlong res = _Jv_remJ (value1, value2);
insn_getfield:
{
+ SAVE_PC();
jint fieldref_index = GET2U ();
_Jv_Linker::resolve_pool_entry (meth->defining_class, fieldref_index);
_Jv_Field *field = pool_data[fieldref_index].field;
insn_putstatic:
{
+ SAVE_PC();
jint fieldref_index = GET2U ();
_Jv_Linker::resolve_pool_entry (meth->defining_class, fieldref_index);
_Jv_Field *field = pool_data[fieldref_index].field;
insn_putfield:
{
+ SAVE_PC();
jint fieldref_index = GET2U ();
_Jv_Linker::resolve_pool_entry (meth->defining_class, fieldref_index);
_Jv_Field *field = pool_data[fieldref_index].field;
insn_invokespecial:
{
+ SAVE_PC();
int index = GET2U ();
rmeth = (_Jv_Linker::resolve_pool_entry (meth->defining_class,
#ifdef DIRECT_THREADED
invokespecial_resolved:
{
+ SAVE_PC();
rmeth = (_Jv_ResolvedMethod *) AVAL ();
sp -= rmeth->stack_item_count;
// We don't use NULLCHECK here because we can't rely on that
// working for <init>. So instead we do an explicit test.
if (! sp[0].o)
{
- SAVE_PC();
throw_null_pointer_exception ();
}
fun = (void (*)()) rmeth->method->ncode;
insn_invokestatic:
{
+ SAVE_PC();
int index = GET2U ();
rmeth = (_Jv_Linker::resolve_pool_entry (meth->defining_class,
#ifdef DIRECT_THREADED
invokestatic_resolved:
{
+ SAVE_PC();
rmeth = (_Jv_ResolvedMethod *) AVAL ();
sp -= rmeth->stack_item_count;
fun = (void (*)()) rmeth->method->ncode;
insn_invokeinterface:
{
+ SAVE_PC();
int index = GET2U ();
rmeth = (_Jv_Linker::resolve_pool_entry (meth->defining_class,
#ifdef DIRECT_THREADED
invokeinterface_resolved:
{
+ SAVE_PC();
rmeth = (_Jv_ResolvedMethod *) AVAL ();
sp -= rmeth->stack_item_count;
jobject rcv = sp[0].o;
insn_new:
{
+ SAVE_PC();
int index = GET2U ();
jclass klass = (_Jv_Linker::resolve_pool_entry (meth->defining_class,
index)).clazz;
insn_anewarray:
{
+ SAVE_PC();
int index = GET2U ();
jclass klass = (_Jv_Linker::resolve_pool_entry (meth->defining_class,
index)).clazz;
insn_multianewarray:
{
+ SAVE_PC();
int kind_index = GET2U ();
int dim = GET1U ();