Package com.dylibso.chicory.wasm.types
Class GlobalSection
- java.lang.Object
-
- com.dylibso.chicory.wasm.types.Section
-
- com.dylibso.chicory.wasm.types.GlobalSection
-
public class GlobalSection extends Section
-
-
Constructor Summary
Constructors Constructor Description GlobalSection()Construct a new, empty section instance.GlobalSection(int estimatedSize)Construct a new, empty section instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intaddGlobal(Global global)Add a global variable definition to this section.GlobalgetGlobal(int idx)intglobalCount()Global[]globals()
-
-
-
Method Detail
-
globals
public Global[] globals()
-
globalCount
public int globalCount()
-
getGlobal
public Global getGlobal(int idx)
-
addGlobal
public int addGlobal(Global global)
Add a global variable definition to this section.- Parameters:
global- the global to add to this section (must not benull)- Returns:
- the index of the newly-added global
-
-