예제 #1
0
        WasmNodeResult IWasmOpcodeVisitor <WasmNodeArg, WasmNodeResult> .Visit(ReturnOpcode opcode, WasmNodeArg arg)
        {
            var farg       = (WasmFunctionNodeArg)arg; //todo:
            var returnType = farg.Function.Signature.Return;

            switch (returnType)
            {
            case WasmType.I32:
            case WasmType.I64:
            case WasmType.F32:
            case WasmType.F64:
                var res = arg.Pop();
                arg.Push(new ReturnNode(res));
                break;

            default:
                arg.Push(new ReturnNode());
                break;
            }
            return(null);
        }
 WasmMSILResult IWasmOpcodeVisitor <WasmMSILArg, WasmMSILResult> .Visit(ReturnOpcode opcode, WasmMSILArg arg) => throw new NotImplementedException();
예제 #3
0
 public WasmOpcodeExecutor Visit(ReturnOpcode opcode, WasmFunctionState state) => throw new System.NotImplementedException();