for (int i = 0; i < dimensions; i++) { final int ofs = (VmArray.DATA_OFFSET + i) * slotSize; final IntItem v = vstack.popInt(); v.release1(eContext); os.writePOP(dimsr, ofs); }
for (int i = 0; i < dimensions; i++) { final int ofs = arrayDataOffset + (i * slotSize); final IntItem v = vstack.popInt(); v.release1(eContext); os.writePOP(dimsr, ofs); }
    public final void visit_multianewarray(VmConstClass clazz, int dimensions) {        // flush all vstack items to the stack        // all registers are freed        vstack.push(eContext);        // Create the dimensions array        os.writePUSH(10); /* type=int */        os.writePUSH(dimensions); /* elements */        helper.invokeJavaMethod(context.getAllocPrimitiveArrayMethod());        final RefItem dims = vstack.popRef();        final Register dimsr = dims.getRegister();        // Dimension array is now in S1        // Pop all dimensions (note the reverse order that allocMultiArray        // expects)        for (int i = 0; i < dimensions; i++) {            final int ofs = (VmArray.DATA_OFFSET + i) * slotSize;            final IntItem v = vstack.popInt();            v.release1(eContext);            os.writePOP(dimsr, ofs);        }        // Allocate tmp register        final Register classr = requestRegister(JvmType.REFERENCE);        // Resolve the array class        writeResolveAndLoadClassToReg(clazz, classr);        // Now call the multianewarrayhelper        os.writePUSH(classr); // array-class        os.writePUSH(dimsr); // dimensions[]        helper.invokeJavaMethod(context.getAllocMultiArrayMethod());        // Result is now on the vstack        // Release        dims.release(eContext);        releaseRegister(classr);    }