mirror of
https://github.com/corda/corda.git
synced 2025-01-01 02:36:44 +00:00
d5a5b5309a
These expressions are tricky because they rely on invokedynamic, which normally implies runtime code generation. However, since lambdas don't actually use the "dynamicness" of invokedynamic, we can convert them into static calls to synthetic classes at compile time. Since I had already written code to synthesize such classes in Java and I didn't want to rewrite it in C++, I needed to add support for running Java code to the bootimage generator. And since the primary VM used by the generator is purpose-built to generate AOT-compiled code for a specific target architecture and is not capable of generating or running JIT-compiled code for the host architecture, I added support for loading a second, independent, host-specific VM for running Java code. The rest of the patch handles the fact that each method compilation might cause new, synthetic classes to be created, so we need to make sure those classes and their methods are included in the final heap and code images. This required breaking some giant code blocks out of makeCodeImage into their own methods, which makes the diff look scarier than it really is. |
||
---|---|---|
.. | ||
android | ||
avian | ||
codegen | ||
heap | ||
lzma | ||
openjdk | ||
system | ||
tools | ||
util | ||
arm64.S | ||
arm.masm | ||
arm.S | ||
boot-javahome.cpp | ||
boot.cpp | ||
bootimage-fields.cpp | ||
bootimage-template.cpp | ||
builtin.cpp | ||
classpath-android.cpp | ||
classpath-avian.cpp | ||
classpath-openjdk.cpp | ||
CMakeLists.txt | ||
compile-arm64.S | ||
compile-arm.masm | ||
compile-arm.S | ||
compile-i386.masm | ||
compile-i386.S | ||
compile-x86_64.S | ||
compile.cpp | ||
continuations-x86.S | ||
debug-util.cpp | ||
debug-util.h | ||
embed.cpp | ||
embedded-loader.cpp | ||
finder.cpp | ||
heapdump.cpp | ||
heapwalk.cpp | ||
i386.masm | ||
i386.S | ||
interpret.cpp | ||
jnienv.cpp | ||
lzma-decode.cpp | ||
lzma-encode.cpp | ||
machine.cpp | ||
main.cpp | ||
powerpc-regs.S | ||
process.cpp | ||
thunks.cpp | ||
types.def | ||
util.cpp | ||
x86_64.S |