private static ExecutionState Runtime_CreatePlatform(RuntimeVM Runtime) { ExpectStackSize(Runtime, 3); VMObject temp; var source = PopAddress(Runtime); temp = Runtime.Stack.Pop(); Runtime.Expect(temp.Type == VMType.String, "expected string for name"); var name = temp.AsString(); temp = Runtime.Stack.Pop(); Runtime.Expect(temp.Type == VMType.String, "expected string for pubaddress"); var externalAddress = temp.AsString(); var interopAddress = PopAddress(Runtime); temp = Runtime.Stack.Pop(); Runtime.Expect(temp.Type == VMType.String, "expected string for symbol"); var symbol = temp.AsString(); var target = Runtime.CreatePlatform(source, name, externalAddress, interopAddress, symbol); var result = new VMObject(); result.SetValue(target); Runtime.Stack.Push(result); return(ExecutionState.Running); }
private static ExecutionState Nexus_CreatePlatform(RuntimeVM vm) { vm.ExpectStackSize(5); var source = vm.PopAddress(); var name = vm.PopString("name"); var externalAddress = vm.PopString("external address"); var interopAddress = vm.PopAddress(); var symbol = vm.PopString("symbol"); var target = vm.CreatePlatform(source, name, externalAddress, interopAddress, symbol); var result = new VMObject(); result.SetValue(target); vm.Stack.Push(result); return(ExecutionState.Running); }