Created
April 19, 2016 12:00
-
-
Save peschwa/386df8991a91852c31db9a9e664b379e to your computer and use it in GitHub Desktop.
This file contains 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 static SixModelObject getattr(SixModelObject obj, SixModelObject ch, String name, ThreadContext tc) { | |
SixModelObject Str = tc.curFrame.codeRef.staticInfo.compUnit.hllConfig.strBoxType; | |
SixModelObject Num = tc.curFrame.codeRef.staticInfo.compUnit.hllConfig.numBoxType; | |
SixModelObject Int = tc.curFrame.codeRef.staticInfo.compUnit.hllConfig.intBoxType; | |
try { | |
return obj.get_attribute_boxed(tc, decont(ch, tc), name, STable.NO_HINT); | |
} | |
catch (RuntimeException rte) { | |
try { | |
return box_i(getattr_i(obj, ch, name, tc), Int, tc); | |
} | |
catch (RuntimeException rte1) { | |
try { | |
return box_n(getattr_n(obj, ch, name, tc), Num, tc); | |
} | |
catch (RuntimeException rte2) { | |
try { | |
return box_s(getattr_s(obj, ch, name, tc), Str, tc); | |
} | |
catch (RuntimeException rte3) { | |
throw new StupidRTE("Attribute '" + name + "' is weird and this is stupid anyway"); | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment