private void verifyGet(FrameSlot slot, FrameSlotKind accessKind) throws FrameSlotTypeException { int slotIndex = getSlotIndexChecked(slot); byte tag = tags[slotIndex]; if (accessKind == FrameSlotKind.Object ? tag != 0 : tag != accessKind.ordinal()) { throw new FrameSlotTypeException(); } }
private void verifyGet(FrameSlot slot, FrameSlotKind accessKind) throws FrameSlotTypeException { int slotIndex = getSlotIndexChecked(slot); byte tag = tags[slotIndex]; if (accessKind == FrameSlotKind.Object ? tag != 0 : tag != accessKind.ordinal()) { throw new FrameSlotTypeException(); } }
@Override public boolean getBoolean(FrameSlot slot) throws FrameSlotTypeException { Object result = getObject(slot); if (CompilerDirectives.inInterpreter() && !(result instanceof Boolean)) { throw new FrameSlotTypeException(); } return (Boolean) result; }
@Override public byte getByte(FrameSlot slot) throws FrameSlotTypeException { Object result = getObject(slot); if (CompilerDirectives.inInterpreter() && !(result instanceof Byte)) { throw new FrameSlotTypeException(); } return (Byte) result; }
@Override public long getLong(FrameSlot slot) throws FrameSlotTypeException { Object result = getObject(slot); if (CompilerDirectives.inInterpreter() && !(result instanceof Long)) { throw new FrameSlotTypeException(); } return (Long) result; }
@Override public float getFloat(FrameSlot slot) throws FrameSlotTypeException { Object result = getObject(slot); if (CompilerDirectives.inInterpreter() && !(result instanceof Float)) { throw new FrameSlotTypeException(); } return (Float) result; }
@Override public int getInt(FrameSlot slot) throws FrameSlotTypeException { Object result = getObject(slot); if (CompilerDirectives.inInterpreter() && !(result instanceof Integer)) { throw new FrameSlotTypeException(); } return (Integer) result; }
@Override public double getDouble(FrameSlot slot) throws FrameSlotTypeException { Object result = getObject(slot); if (CompilerDirectives.inInterpreter() && !(result instanceof Double)) { throw new FrameSlotTypeException(); } return (Double) result; }
private void verifyGet(FrameSlot slot, FrameSlotKind accessKind) throws FrameSlotTypeException { int slotIndex = getSlotIndexChecked(slot); byte tag = tags[slotIndex]; if (accessKind == FrameSlotKind.Object ? tag != 0 : tag != accessKind.ordinal()) { throw new FrameSlotTypeException(); } }
private boolean verifyGet(int slotIndex, byte tag) throws FrameSlotTypeException { checkSlotIndex(slotIndex); boolean condition = getTags()[slotIndex] == tag; if (!condition) { CompilerDirectives.transferToInterpreterAndInvalidate(); throw new FrameSlotTypeException(); } return condition; }