News for hackers. Stuff that matters.
Re:Why are my Go executable files so large? by kjeetgill on Monday December 30, 2019 @08:19AM (#21913143)
Maybe my memory is a little rusty or I glossed over a bit too much, but I was thinking of how hotspot does lambdas from here[0]. It seems to use the Invokedyanmic Bootstrap method to spin an InnerClass at runtime. To be fair, it's a hotspot thing and not in the JVM spec.

[0]: https://github.com/frohoff/jdk8u-jdk/blob/master/src/share/c...

Re:Why are my Go executable files so large? by pjmlp on Monday December 30, 2019 @09:31AM (#21913528)
Better check out from Brian's talk.

Not really, because the class file with invokedynamic bytecodes is supposed to work across all JVM implementations.

Re:Why are my Go executable files so large? by kjeetgill on Monday December 30, 2019 @01:38PM (#21915596)
I think we agree? The bytecode is transferrable because the classfile only contains an invokedynamic that calls the LambdaMetaFactory for bootstrapping. The LambdaMetaFactory is provided by the runtime JVM itself so that linkage dosn't introduce an implementation dependence.

Hotspot's just happens to spin an inner class at runtime.

Re:Why are my Go executable files so large? by pjmlp on Monday December 30, 2019 @02:34PM (#21915996)
Yes we agree, I do conceed that I wasn't fully correct.