/// <summary> /// Creates a function table from the given resizable limits. /// The table's initial contents are trap values. /// </summary> /// <param name="limits">The table's limits.</param> public FunctionTable(ResizableLimits limits) { this.Limits = limits; this.contents = new List <FunctionDefinition>((int)limits.Initial); var funcDef = new ThrowFunctionDefinition( new WasmValueType[0], new WasmValueType[0], new TrapException("Indirect call target not initialized yet.", TrapException.SpecMessages.UninitializedElement)); for (int i = 0; i < limits.Initial; i++) { contents.Add(funcDef); } }
/// <summary> /// Creates a function table from the given resizable limits. /// The table's initial contents are trap values. /// </summary> /// <param name="Limits">The table's limits.</param> public FunctionTable(ResizableLimits Limits) { this.Limits = Limits; this.contents = new List <FunctionDefinition>((int)Limits.Initial); var funcDef = new ThrowFunctionDefinition( new WasmValueType[0], new WasmValueType[0], new WasmException("Indirect call target not initialized yet.")); for (int i = 0; i < Limits.Initial; i++) { contents.Add(funcDef); } }