Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Xamarin.Android.Build.Tasks, monodroid] LLVM-IR Generator (#7163)
Context: e1af958 Commit e1af958 mentioned a TODO: > * Finish the LLVM code generator so that LLVM Marshal Methods are > emitted into `libxamarin-app.so`. Implement LLVM Marshal Methods LLVM-IR executable code generator: * LLVM-IR Generation Infrastructure: * function and instruction attributes * function parameter (declaration/definition) and argument (runtime) handling * function variable (including parameters) handling, including unnamed local variables * support for native function signatures and pointers to functions * The ret, store, load, icmp, br, call and phi instructions * LLVM-IR Marshal Method generator * managed to JNI signature and symbol name translations When `ENABLE_MARSHAL_METHODS` is defined, LLVM-IR code is generated, compiled, and linked. Generated code is minimally tested for runtime behavior, as not all the infrastructure on the Xamarin.Android side is implemented yet. This is on purpose, to keep commits smaller. Support for various LLVM IR instructions is limited only to those we actually use and only to elements of those constructions that we use. As such, it's not a general purpose code generator which allows us to make some assumptions and take some shortcuts, without compromising correctness and validity of the generated code. The native type handling system portion of this commit is to be treated as proof-of-concept: is is not as optimized (design wise) as it should be. The reason for this limitation is that it requires modifying the previous LLVM IR data generation code and it would contribute to this commits' already substantial size. ~~ TODO ~~ Update/rewrite infrastructure to focus on implementing the runtime side of marshal methods, making it possible to actually run applications which use marshal methods. Finish prototyping the infrastructure so that a MAUI app can be run with LLVm Marshal Methods enabled.
- Loading branch information