2023-04-09 07:55:02 +03:00
|
|
|
module wasm
|
|
|
|
|
|
|
|
struct ImportCallPatch {
|
|
|
|
mod string
|
|
|
|
name string
|
|
|
|
pos int
|
|
|
|
}
|
|
|
|
|
|
|
|
struct FunctionCallPatch {
|
|
|
|
name string
|
|
|
|
pos int
|
|
|
|
}
|
|
|
|
|
|
|
|
type CallPatch = FunctionCallPatch | ImportCallPatch
|
|
|
|
|
2023-04-13 20:39:55 +03:00
|
|
|
struct FunctionGlobalPatch {
|
|
|
|
idx GlobalIndex
|
|
|
|
pos int
|
|
|
|
}
|
|
|
|
|
|
|
|
pub struct Function {
|
2023-04-09 07:55:02 +03:00
|
|
|
tidx int
|
|
|
|
idx int
|
|
|
|
mut:
|
2023-04-13 20:39:55 +03:00
|
|
|
call_patches []CallPatch
|
|
|
|
global_patches []FunctionGlobalPatch
|
|
|
|
label int
|
|
|
|
export bool
|
|
|
|
mod &Module = unsafe { nil }
|
|
|
|
code []u8
|
|
|
|
locals []ValType
|
2023-04-09 07:55:02 +03:00
|
|
|
pub:
|
|
|
|
name string
|
|
|
|
}
|