2013-05-17 14:20:39 -06:00
|
|
|
|
// Copyright 2013 The Go Authors. All rights reserved.
|
|
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
|
|
|
|
|
package interp
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"code.google.com/p/go.tools/ssa"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
func ext۰syscall۰Close(fn *ssa.Function, args []value) value {
|
|
|
|
|
panic("syscall.Close not yet implemented")
|
|
|
|
|
}
|
|
|
|
|
func ext۰syscall۰Fstat(fn *ssa.Function, args []value) value {
|
|
|
|
|
panic("syscall.Fstat not yet implemented")
|
|
|
|
|
}
|
|
|
|
|
func ext۰syscall۰Kill(fn *ssa.Function, args []value) value {
|
|
|
|
|
panic("syscall.Kill not yet implemented")
|
|
|
|
|
}
|
|
|
|
|
func ext۰syscall۰Lstat(fn *ssa.Function, args []value) value {
|
|
|
|
|
panic("syscall.Lstat not yet implemented")
|
|
|
|
|
}
|
|
|
|
|
func ext۰syscall۰Open(fn *ssa.Function, args []value) value {
|
|
|
|
|
panic("syscall.Open not yet implemented")
|
|
|
|
|
}
|
|
|
|
|
func ext۰syscall۰ParseDirent(fn *ssa.Function, args []value) value {
|
|
|
|
|
panic("syscall.ParseDirent not yet implemented")
|
|
|
|
|
}
|
|
|
|
|
func ext۰syscall۰Read(fn *ssa.Function, args []value) value {
|
|
|
|
|
panic("syscall.Read not yet implemented")
|
|
|
|
|
}
|
|
|
|
|
func ext۰syscall۰ReadDirent(fn *ssa.Function, args []value) value {
|
|
|
|
|
panic("syscall.ReadDirent not yet implemented")
|
|
|
|
|
}
|
|
|
|
|
func ext۰syscall۰Stat(fn *ssa.Function, args []value) value {
|
|
|
|
|
panic("syscall.Stat not yet implemented")
|
|
|
|
|
}
|
|
|
|
|
func ext۰syscall۰Write(fn *ssa.Function, args []value) value {
|
2013-10-08 12:35:39 -06:00
|
|
|
|
// func Write(fd int, p []byte) (n int, err error)
|
|
|
|
|
n, err := write(args[0].(int), valueToBytes(args[1]))
|
2013-05-17 14:20:39 -06:00
|
|
|
|
return tuple{n, wrapError(err)}
|
|
|
|
|
}
|
2013-12-20 16:20:51 -07:00
|
|
|
|
func ext۰syscall۰RawSyscall(fn *ssa.Function, args []value) value {
|
|
|
|
|
return tuple{^uintptr(0), uintptr(0), uintptr(0)}
|
|
|
|
|
}
|