Class GlobalsSection
- java.lang.Object
-
- de.mirkosertic.bytecoder.core.backend.wasm.ast.ModuleSection
-
- de.mirkosertic.bytecoder.core.backend.wasm.ast.GlobalsSection
-
public class GlobalsSection extends ModuleSection
-
-
Constructor Summary
Constructors Constructor Description GlobalsSection(Module aModule)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GlobalsIndex
globalsIndex()
Global
newConstantGlobal(java.lang.String name, WasmType type, WasmValue initializer)
Global
newMutableGlobal(java.lang.String name, WasmType type, WasmValue initializer)
void
writeTo(BinaryWriter binaryWriter, WasmValue.ExportContext context)
void
writeTo(TextWriter textWriter)
-
Methods inherited from class de.mirkosertic.bytecoder.core.backend.wasm.ast.ModuleSection
getModule
-
-
-
-
Field Detail
-
globals
private final java.util.List<Global> globals
-
-
Constructor Detail
-
GlobalsSection
GlobalsSection(Module aModule)
-
-
Method Detail
-
newMutableGlobal
public Global newMutableGlobal(java.lang.String name, WasmType type, WasmValue initializer)
-
newConstantGlobal
public Global newConstantGlobal(java.lang.String name, WasmType type, WasmValue initializer)
-
writeTo
public void writeTo(TextWriter textWriter) throws java.io.IOException
- Throws:
java.io.IOException
-
writeTo
public void writeTo(BinaryWriter binaryWriter, WasmValue.ExportContext context) throws java.io.IOException
- Throws:
java.io.IOException
-
globalsIndex
public GlobalsIndex globalsIndex()
-
-