File tree Expand file tree Collapse file tree 2 files changed +36
-0
lines changed
libraries-bytecode/src/test/resources/chicory Expand file tree Collapse file tree 2 files changed +36
-0
lines changed Original file line number Diff line number Diff line change 1+ // Render with Graphviz, https://dreampuf.github.io/GraphvizOnline/?engine=dot
12digraph WasmOnJVM {
23 rankdir =LR;
34 node [shape =box , style =rounded];
Original file line number Diff line number Diff line change 1+ // Render with Graphviz, https://dreampuf.github.io/GraphvizOnline/?engine=dot
2+ digraph ImportsFlow {
3+ rankdir =LR;
4+ node [shape =box , style =rounded];
5+
6+ subgraph cluster_host {
7+ label =" Host (JVM)" ;
8+ style =rounded;
9+
10+ junit [label =" JUnit test" ];
11+ store [label =" Store\n (registers imports)" ];
12+ doublef [label =" HostFunction\n host.double : (i32) -> i32" ];
13+ inst [label =" Chicory Instance" ];
14+ }
15+
16+ subgraph cluster_module {
17+ label =" Wasm module: imports.wasm" ;
18+ style =rounded;
19+
20+ importD [label =" Import required:\n host.double : (i32) -> i32" ];
21+ useD [label =" Exported function:\n useDouble(i32) -> i32" ];
22+ }
23+
24+ // Linking at instantiation
25+ store -> inst [label =" instantiate with Store" , style =dashed];
26+ importD -> doublef [label =" resolved to HostFunction" , style =dashed];
27+
28+ // Call flow at runtime
29+ junit -> inst [label =" invoke useDouble(21)" ];
30+ inst -> useD [label =" call export" ];
31+ useD -> importD[label =" import call" ];
32+ importD -> doublef [label =" dispatch" ];
33+ doublef -> inst [label =" return i32 42" ];
34+ inst -> junit [label =" result as long[]{42}" ];
35+ }
You can’t perform that action at this time.
0 commit comments