package wasm

import (
	
	
)

// constantGlobal wraps GlobalInstance to implement api.Global.
type constantGlobal struct {
	internalapi.WazeroOnlyType
	g *GlobalInstance
}

// Type implements api.Global.
func ( constantGlobal) () api.ValueType {
	return .g.Type.ValType
}

// Get implements api.Global.
func ( constantGlobal) () uint64 {
	,  := .g.Value()
	return 
}

// String implements api.Global.
func ( constantGlobal) () string {
	return .g.String()
}

// mutableGlobal extends constantGlobal to allow updates.
type mutableGlobal struct {
	internalapi.WazeroOnlyType
	g *GlobalInstance
}

// Type implements api.Global.
func ( mutableGlobal) () api.ValueType {
	return .g.Type.ValType
}

// Get implements api.Global.
func ( mutableGlobal) () uint64 {
	,  := .g.Value()
	return 
}

// String implements api.Global.
func ( mutableGlobal) () string {
	return .g.String()
}

// Set implements the same method as documented on api.MutableGlobal.
func ( mutableGlobal) ( uint64) {
	.g.SetValue(, 0)
}