Created
May 16, 2018 22:48
-
-
Save chrisseaton/606ea22146ed91324d20ae70584517c8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public long readLong(VirtualFrame vframe) { | |
return readLongHelper(vframe.materialize()); | |
} | |
@TruffleBoundary | |
public long readLongHelper(MaterializedFrame vframe) { | |
try { | |
return vframe.getLong(getSlot()); | |
} catch (FrameSlotTypeException e) { } | |
MaterializedFrame frame = getLexicalScope(vframe); | |
while (true) { | |
try { | |
return frame.getLong(getSlot()); | |
} catch (FrameSlotTypeException e) { | |
frame = getLexicalScope(frame); | |
if (frame == null) { | |
throw new RuntimeException("Undefined variable " + getSlot().getIdentifier()); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment