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

Delta Between Two Patch Sets: src/pkg/runtime/stubs.go

Issue 134200044: code review 134200044: runtime: convert traceback*.c to Go (Closed)
Left Patch Set: Created 10 years, 6 months ago
Right Patch Set: diff -r df0572446e37549332e1d1154955409e2cff6008 https://code.google.com/p/go/ Created 10 years, 6 months 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:
Right: Side by side diff | Download
« no previous file with change/comment | « src/pkg/runtime/stack.c ('k') | src/pkg/runtime/traceback.go » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
1 // Copyright 2014 The Go Authors. All rights reserved. 1 // Copyright 2014 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 package runtime 5 package runtime
6 6
7 import "unsafe" 7 import "unsafe"
8 8
9 // Declarations for runtime services implemented in C or assembly. 9 // Declarations for runtime services implemented in C or assembly.
10 // C implementations of these functions are in stubs.goc. 10 // C implementations of these functions are in stubs.goc.
11 // Assembly implementations are in various files, see comments with 11 // Assembly implementations are in various files, see comments with
12 // each function. 12 // each function.
13 13
14 const ptrSize = 4 << (^uintptr(0) >> 63) // unsafe.Sizeof(uintptr(0)) but an ide al const 14 const ptrSize = 4 << (^uintptr(0) >> 63) // unsafe.Sizeof(uintptr(0)) but an ide al const
15 const regSize = 4 << (^uintreg(0) >> 63) // unsafe.Sizeof(uintreg(0)) but an ide al const
15 16
16 //go:noescape 17 //go:noescape
17 func racereadpc(addr unsafe.Pointer, callpc, pc uintptr) 18 func racereadpc(addr unsafe.Pointer, callpc, pc uintptr)
18 19
19 //go:noescape 20 //go:noescape
20 func racewritepc(addr unsafe.Pointer, callpc, pc uintptr) 21 func racewritepc(addr unsafe.Pointer, callpc, pc uintptr)
21 22
22 //go:noescape 23 //go:noescape
23 func racereadrangepc(addr unsafe.Pointer, len int, callpc, pc uintptr) 24 func racereadrangepc(addr unsafe.Pointer, len int, callpc, pc uintptr)
24 25
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 func noescape(p unsafe.Pointer) unsafe.Pointer { 135 func noescape(p unsafe.Pointer) unsafe.Pointer {
135 x := uintptr(p) 136 x := uintptr(p)
136 return unsafe.Pointer(x ^ 0) 137 return unsafe.Pointer(x ^ 0)
137 } 138 }
138 139
139 func entersyscall() 140 func entersyscall()
140 func entersyscallblock() 141 func entersyscallblock()
141 func exitsyscall() 142 func exitsyscall()
142 143
143 func goroutineheader(gp *g) 144 func goroutineheader(gp *g)
144 func traceback(pc, sp, lr uintptr, gp *g)
145 func tracebackothers(gp *g) 145 func tracebackothers(gp *g)
146 146
147 func cgocallback(fn, frame unsafe.Pointer, framesize uintptr) 147 func cgocallback(fn, frame unsafe.Pointer, framesize uintptr)
148 func gogo(buf *gobuf) 148 func gogo(buf *gobuf)
149 func gosave(buf *gobuf) 149 func gosave(buf *gobuf)
150 func read(fd int32, p unsafe.Pointer, n int32) int32 150 func read(fd int32, p unsafe.Pointer, n int32) int32
151 func close(fd int32) int32 151 func close(fd int32) int32
152 func mincore(addr unsafe.Pointer, n uintptr, dst *byte) int32 152 func mincore(addr unsafe.Pointer, n uintptr, dst *byte) int32
153 func jmpdefer(fv *funcval, argp unsafe.Pointer) 153 func jmpdefer(fv *funcval, argp unsafe.Pointer)
154 func exit1(code int32) 154 func exit1(code int32)
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 func getcallerpc(argp unsafe.Pointer) uintptr 239 func getcallerpc(argp unsafe.Pointer) uintptr
240 240
241 //go:noescape 241 //go:noescape
242 func getcallersp(argp unsafe.Pointer) uintptr 242 func getcallersp(argp unsafe.Pointer) uintptr
243 243
244 //go:noescape 244 //go:noescape
245 func asmcgocall(fn, arg unsafe.Pointer) 245 func asmcgocall(fn, arg unsafe.Pointer)
246 246
247 //go:noescape 247 //go:noescape
248 func open(name *byte, mode, perm int32) int32 248 func open(name *byte, mode, perm int32) int32
249
250 //go:noescape
251 func gotraceback(*bool) int32
252
253 func funcname(*_func) *byte
254
255 func gofuncname(f *_func) string {
256 return gostringnocopy(funcname(f))
257 }
258
259 const _NoArgs = ^uintptr(0)
260
261 var newproc, deferproc, lessstack struct{} // C/assembly functions
262
263 func funcspdelta(*_func, uintptr) int32 // symtab.c
264 func funcarglen(*_func, uintptr) int32 // symtab.c
265 const _ArgsSizeUnknown = -0x80000000 // funcdata.h
266 func topofstack(*_func) bool // proc.c
LEFTRIGHT

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