blob: 0d5a933c5b2efbb30ab08c2dbdf5572caf541178 [file] [log] [blame]
HANDLE_OPCODE(OP_ARRAY_LENGTH /*vA, vB*/)
{
ArrayObject* arrayObj;
vdst = INST_A(inst);
vsrc1 = INST_B(inst);
arrayObj = (ArrayObject*) GET_REGISTER(vsrc1);
ILOGV("|array-length v%d,v%d (%p)", vdst, vsrc1, arrayObj);
if (!checkForNullExportPC((Object*) arrayObj, fp, pc))
GOTO_exceptionThrown();
/* verifier guarantees this is an array reference */
SET_REGISTER(vdst, arrayObj->length);
}
FINISH(1);
OP_END