CrystalRobots::Compiler::WASM_Emitter
Constants
FunctionType = 96
http://webassembly.github.io/spec/core/binary/types.html#function-types
MagicModuleHeader = Bytes[0, 'a'.ord, 's'.ord, 'm'.ord]
https://webassembly.github.io/spec/core/binary/modules.html#binary-module
ModuleVersion = Bytes[1, 0, 0, 0]
Constructors
new(ast : Program)
SourceInstance methods
codeFromAst(ast : Program)
SourcecodeSection(ast : Program)
the code section contains vectors of functions https://webassembly.github.io/spec/core/binary/modules.html#binary-codesec
https://webassembly.github.io/spec/core/binary/values.html#names
https://webassembly.github.io/spec/core/binary/conventions.html#binary-vec Vectors are encoded with their length followed by their element sequence
funcSection
the function section is a vector of type indices that indicate the type of each function in the code section
importSection
SourcetypeSection
Function types are vectors of parameters and return types. Currently WebAssembly only supports single return values the type section is a vector of function types