Created
March 31, 2020 15:41
-
-
Save ShikaSD/1b79bff540951e46eee5e8c1302b33b9 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
private fun ImplementationBodyCodegen.addReadResolveFunction( | |
block: InstructionAdapter.() -> Unit | |
) { | |
val visitor = v.newMethod( | |
NO_ORIGIN, | |
ACC_PUBLIC or ACC_SYNTHETIC, | |
SERIALIZABLE_READ.identifier, | |
"()Ljava/lang/Object;", | |
null, | |
EMPTY_STRING_ARRAY | |
) | |
visitor.visitCode() | |
val iv = InstructionAdapter(visitor) | |
iv.apply(block) | |
FunctionCodegen.endVisit(iv, "JVM serialization bindings") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment