Removes unused FunctionInstance.LocalTypes (#925)
Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io>
This commit is contained in:
@@ -352,7 +352,7 @@ const (
|
||||
tableInstanceTableLenOffset = 8
|
||||
|
||||
// Offsets for wasm.FunctionInstance.
|
||||
functionInstanceTypeIDOffset = 88
|
||||
functionInstanceTypeIDOffset = 40
|
||||
|
||||
// Offsets for wasm.MemoryInstance.
|
||||
memoryInstanceBufferOffset = 0
|
||||
|
||||
@@ -621,8 +621,6 @@ func (m *ModuleInstance) BuildFunctions(mod *Module, importedFunctions []*Functi
|
||||
// reduces the number of heap objects which improves GC performance.
|
||||
fns[offset] = FunctionInstance{
|
||||
IsHostFunction: code.IsHostFunction,
|
||||
LocalTypes: code.LocalTypes,
|
||||
Body: code.Body,
|
||||
GoFunc: code.GoFunc,
|
||||
TypeID: m.TypeIDs[section],
|
||||
Module: m,
|
||||
|
||||
@@ -830,7 +830,6 @@ func TestModule_buildFunctions(t *testing.T) {
|
||||
instance.BuildFunctions(m, nil)
|
||||
for i, f := range instance.Functions[1:] {
|
||||
require.Equal(t, uint32(i+1), f.Definition.Index())
|
||||
require.Equal(t, nopCode.Body, f.Body)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -107,12 +107,6 @@ type (
|
||||
// Type is the signature of this function.
|
||||
Type *FunctionType
|
||||
|
||||
// LocalTypes holds types of locals, set when Kind == FunctionKindWasm
|
||||
LocalTypes []ValueType
|
||||
|
||||
// Body is the function body in WebAssembly Binary Format, set when Kind == FunctionKindWasm
|
||||
Body []byte
|
||||
|
||||
// GoFunc is non-nil when IsHostFunction and defined in go, either
|
||||
// api.GoFunction or api.GoModuleFunction.
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user