github.com/llvm-mirror/llgo@v0.0.0-20190322182713-bf6f0a60fce1/third_party/gotools/go/ssa/interp/external_plan9.go (about) 1 // Copyright 2013 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 package interp 6 7 import "syscall" 8 9 func ext۰syscall۰Close(fr *frame, args []value) value { 10 panic("syscall.Close not yet implemented") 11 } 12 func ext۰syscall۰Fstat(fr *frame, args []value) value { 13 panic("syscall.Fstat not yet implemented") 14 } 15 func ext۰syscall۰Kill(fr *frame, args []value) value { 16 panic("syscall.Kill not yet implemented") 17 } 18 func ext۰syscall۰Lstat(fr *frame, args []value) value { 19 panic("syscall.Lstat not yet implemented") 20 } 21 func ext۰syscall۰Open(fr *frame, args []value) value { 22 panic("syscall.Open not yet implemented") 23 } 24 func ext۰syscall۰ParseDirent(fr *frame, args []value) value { 25 panic("syscall.ParseDirent not yet implemented") 26 } 27 func ext۰syscall۰Read(fr *frame, args []value) value { 28 panic("syscall.Read not yet implemented") 29 } 30 func ext۰syscall۰ReadDirent(fr *frame, args []value) value { 31 panic("syscall.ReadDirent not yet implemented") 32 } 33 func ext۰syscall۰Stat(fr *frame, args []value) value { 34 panic("syscall.Stat not yet implemented") 35 } 36 func ext۰syscall۰Write(fr *frame, args []value) value { 37 // func Write(fd int, p []byte) (n int, err error) 38 n, err := write(args[0].(int), valueToBytes(args[1])) 39 return tuple{n, wrapError(err)} 40 } 41 func ext۰syscall۰RawSyscall(fr *frame, args []value) value { 42 return tuple{^uintptr(0), uintptr(0), uintptr(0)} 43 } 44 45 func syswrite(fd int, b []byte) (int, error) { 46 return syscall.Write(fd, b) 47 }