/** * Ensure that the frame state is formatted as expected by the JVM, with null or Illegal in the * slot following a double word item. This should really be checked in FrameState itself but * because of Word type rewriting and alternative backends that can't be done. */ public boolean validateFormat() { if (caller() != null) { caller().validateFormat(); } for (int i = 0; i < numLocals + numStack; i++) { if (values[i] != null) { Kind kind = values[i].getKind(); if (kind.needsTwoSlots()) { assert values.length > i + 1 : String.format("missing second word %s", this); assert values[i + 1] == null || values[i + 1].getKind() == Kind.Illegal : this; } } } return true; }