Summary
- Black line represents compile path
- Blue line represents runtime call-path
Compile Path
- Compile interface symbol from source (*.jar for Java, *.dll for C#, etc...)
- Generate bridge from interface symbol
Call Path
- Host calls bridge
- Bridge calls wrapper stub
- Wrapper calls language-specific runtime
- Runtime calls source
Exempli gratia
For example (Use C# on C++):
However, Native languages (such as C++) doesn't have language-specific runtime:
Compilation Process
- Additional attributes describing Object-Oriented information (such as 'which class owns this function') required
- That's because LLVM IR does not support OOP model
Bidirectional Linkage
- Black line represents compile path
- Blue/Green line represents runtime call-path
- Red line represents runtime load-path(such as
dlopen
or LoadLibrary
)
With this model, each language can be linked on one process(Init Process
in this diagram).