Skip to content

Commit 58c4649

Browse files
committed
Add aload opcode
1 parent bfa9d84 commit 58c4649

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

jvm.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -577,6 +577,15 @@ stack_entry_t *execute(method_t *method,
577577
break;
578578
}
579579

580+
/* Load object from local variable */
581+
case i_aload: {
582+
int32_t param = code_buf[pc + 1];
583+
object_t *obj = locals[param].entry.ptr_value;
584+
585+
push_ref(op_stack, obj);
586+
pc += 2;
587+
} break;
588+
580589
/* Load object from local variable */
581590
case i_aload_0:
582591
case i_aload_1:

0 commit comments

Comments
 (0)