Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1238)

Side by Side Diff: src/pkg/exp/ssa/interp/external_windows.go

Issue 7300078: code review 7300078: exp/ssa/interp: fix build for Plan 9 (Closed)
Patch Set: diff -r a44171137af8 https://code.google.com/p/go/ Created 11 years, 1 month ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/pkg/exp/ssa/interp/external_unix.go ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Go Authors. All rights reserved. 1 // Copyright 2013 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style 2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file. 3 // license that can be found in the LICENSE file.
4 4
5 // +build windows plan9 5 // +build windows
6 6
7 package interp 7 package interp
8 8
9 import ( 9 import (
10 "exp/ssa" 10 "exp/ssa"
11 "syscall"
11 ) 12 )
12 13
13 func ext۰syscall۰Kill(fn *ssa.Function, args []value, slots []value) value { 14 func ext۰syscall۰Kill(fn *ssa.Function, args []value, slots []value) value {
14 panic("syscall.Kill not yet implemented") 15 panic("syscall.Kill not yet implemented")
15 } 16 }
16 17
17 func ext۰syscall۰Write(fn *ssa.Function, args []value, slots []value) value { 18 func ext۰syscall۰Write(fn *ssa.Function, args []value, slots []value) value {
18 » panic("syscall.Write not yet implemented") 19 » // We could emulate syscall.Syscall but it's more effort.
20 » p := args[1].([]value)
21 » b := make([]byte, 0, len(p))
22 » for i := range p {
23 » » b = append(b, p[i].(byte))
24 » }
25 » n, _ := syscall.Write(args[0].(syscall.Handle), b)
adonovan 2013/02/10 05:23:40 The set of dynamic types that can appear inside a
26 » err := iface{} // TODO(adonovan): fix: adapt concrete err to interpreted iface.
27 » return tuple{n, err}
19 } 28 }
OLDNEW
« no previous file with comments | « src/pkg/exp/ssa/interp/external_unix.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b