mirror of
https://github.com/golang/go.git
synced 2025-11-01 01:00:56 +00:00
build: merge the great pkg/ rename into dev.power64
This also removes pkg/runtime/traceback_lr.c, which was ported to Go in an earlier commit and then moved to runtime/traceback.go. Reviewer: rsc@golang.org rsc: LGTM
This commit is contained in:
commit
2bd616b1a7
2208 changed files with 400 additions and 852 deletions
12
.hgignore
12
.hgignore
|
|
@ -42,12 +42,12 @@ src/cmd/gc/mkbuiltin1
|
||||||
src/cmd/gc/opnames.h
|
src/cmd/gc/opnames.h
|
||||||
src/cmd/gc/y.output
|
src/cmd/gc/y.output
|
||||||
src/cmd/go/zdefaultcc.go
|
src/cmd/go/zdefaultcc.go
|
||||||
src/pkg/go/doc/headscan
|
src/go/doc/headscan
|
||||||
src/pkg/runtime/goc2c
|
src/runtime/goc2c
|
||||||
src/pkg/runtime/mkversion
|
src/runtime/mkversion
|
||||||
src/pkg/runtime/z*
|
src/runtime/z*
|
||||||
src/pkg/unicode/maketables
|
src/unicode/maketables
|
||||||
src/pkg/*.*/
|
src/*.*/
|
||||||
test/pass.out
|
test/pass.out
|
||||||
test/run.out
|
test/run.out
|
||||||
test/times.out
|
test/times.out
|
||||||
|
|
|
||||||
|
|
@ -99,7 +99,7 @@ deduce where to obtain the source code.</p>
|
||||||
in a known way from the import path. Specifically, the first choice
|
in a known way from the import path. Specifically, the first choice
|
||||||
is <code>$GOPATH/src/<import-path></code>. If <code>$GOPATH</code> is
|
is <code>$GOPATH/src/<import-path></code>. If <code>$GOPATH</code> is
|
||||||
unset, the go command will fall back to storing source code alongside the
|
unset, the go command will fall back to storing source code alongside the
|
||||||
standard Go packages, in <code>$GOROOT/src/pkg/<import-path></code>.
|
standard Go packages, in <code>$GOROOT/src/<import-path></code>.
|
||||||
If <code>$GOPATH</code> is set to a list of paths, the go command tries
|
If <code>$GOPATH</code> is set to a list of paths, the go command tries
|
||||||
<code><dir>/src/<import-path></code> for each of the directories in
|
<code><dir>/src/<import-path></code> for each of the directories in
|
||||||
that list.</p>
|
that list.</p>
|
||||||
|
|
|
||||||
|
|
@ -57,35 +57,35 @@ Here is an example:
|
||||||
WARNING: DATA RACE
|
WARNING: DATA RACE
|
||||||
Read by goroutine 185:
|
Read by goroutine 185:
|
||||||
net.(*pollServer).AddFD()
|
net.(*pollServer).AddFD()
|
||||||
src/pkg/net/fd_unix.go:89 +0x398
|
src/net/fd_unix.go:89 +0x398
|
||||||
net.(*pollServer).WaitWrite()
|
net.(*pollServer).WaitWrite()
|
||||||
src/pkg/net/fd_unix.go:247 +0x45
|
src/net/fd_unix.go:247 +0x45
|
||||||
net.(*netFD).Write()
|
net.(*netFD).Write()
|
||||||
src/pkg/net/fd_unix.go:540 +0x4d4
|
src/net/fd_unix.go:540 +0x4d4
|
||||||
net.(*conn).Write()
|
net.(*conn).Write()
|
||||||
src/pkg/net/net.go:129 +0x101
|
src/net/net.go:129 +0x101
|
||||||
net.func·060()
|
net.func·060()
|
||||||
src/pkg/net/timeout_test.go:603 +0xaf
|
src/net/timeout_test.go:603 +0xaf
|
||||||
|
|
||||||
Previous write by goroutine 184:
|
Previous write by goroutine 184:
|
||||||
net.setWriteDeadline()
|
net.setWriteDeadline()
|
||||||
src/pkg/net/sockopt_posix.go:135 +0xdf
|
src/net/sockopt_posix.go:135 +0xdf
|
||||||
net.setDeadline()
|
net.setDeadline()
|
||||||
src/pkg/net/sockopt_posix.go:144 +0x9c
|
src/net/sockopt_posix.go:144 +0x9c
|
||||||
net.(*conn).SetDeadline()
|
net.(*conn).SetDeadline()
|
||||||
src/pkg/net/net.go:161 +0xe3
|
src/net/net.go:161 +0xe3
|
||||||
net.func·061()
|
net.func·061()
|
||||||
src/pkg/net/timeout_test.go:616 +0x3ed
|
src/net/timeout_test.go:616 +0x3ed
|
||||||
|
|
||||||
Goroutine 185 (running) created at:
|
Goroutine 185 (running) created at:
|
||||||
net.func·061()
|
net.func·061()
|
||||||
src/pkg/net/timeout_test.go:609 +0x288
|
src/net/timeout_test.go:609 +0x288
|
||||||
|
|
||||||
Goroutine 184 (running) created at:
|
Goroutine 184 (running) created at:
|
||||||
net.TestProlongTimeout()
|
net.TestProlongTimeout()
|
||||||
src/pkg/net/timeout_test.go:618 +0x298
|
src/net/timeout_test.go:618 +0x298
|
||||||
testing.tRunner()
|
testing.tRunner()
|
||||||
src/pkg/testing/testing.go:301 +0xe8
|
src/testing/testing.go:301 +0xe8
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<h2 id="Options">Options</h2>
|
<h2 id="Options">Options</h2>
|
||||||
|
|
|
||||||
|
|
@ -234,9 +234,9 @@ Description:
|
||||||
<enter description here>
|
<enter description here>
|
||||||
|
|
||||||
Files:
|
Files:
|
||||||
src/pkg/math/sin.go
|
src/math/sin.go
|
||||||
src/pkg/math/tan.go
|
src/math/tan.go
|
||||||
src/pkg/regexp/regexp.go
|
src/regexp/regexp.go
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
|
@ -287,8 +287,8 @@ Description:
|
||||||
Fixes issue 159.
|
Fixes issue 159.
|
||||||
|
|
||||||
Files:
|
Files:
|
||||||
src/pkg/math/sin.go
|
src/math/sin.go
|
||||||
src/pkg/math/tan.go
|
src/math/tan.go
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
|
@ -457,11 +457,11 @@ adding changesets
|
||||||
adding manifests
|
adding manifests
|
||||||
adding file changes
|
adding file changes
|
||||||
added 1 changeset with 2 changes to 2 files
|
added 1 changeset with 2 changes to 2 files
|
||||||
getting src/pkg/flag/flag.go
|
getting src/flag/flag.go
|
||||||
couldn't find merge tool hgmerge
|
couldn't find merge tool hgmerge
|
||||||
merging src/pkg/flag/flag_test.go
|
merging src/flag/flag_test.go
|
||||||
warning: conflicts during merge.
|
warning: conflicts during merge.
|
||||||
<i>merging src/pkg/flag/flag_test.go failed!</i>
|
<i>merging src/flag/flag_test.go failed!</i>
|
||||||
1 file updated, 0 files merged, 0 files removed, 1 file unresolved
|
1 file updated, 0 files merged, 0 files removed, 1 file unresolved
|
||||||
use 'hg resolve' to retry unresolved file merges
|
use 'hg resolve' to retry unresolved file merges
|
||||||
$
|
$
|
||||||
|
|
|
||||||
|
|
@ -120,7 +120,7 @@ For example:
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
If you'd like to see how this works, or want to extend it, take a look at <a
|
If you'd like to see how this works, or want to extend it, take a look at <a
|
||||||
href="/src/pkg/runtime/runtime-gdb.py">src/pkg/runtime/runtime-gdb.py</a> in
|
href="/src/runtime/runtime-gdb.py">src/runtime/runtime-gdb.py</a> in
|
||||||
the Go source distribution. It depends on some special magic types
|
the Go source distribution. It depends on some special magic types
|
||||||
(<code>hash<T,U></code>) and variables (<code>runtime.m</code> and
|
(<code>hash<T,U></code>) and variables (<code>runtime.m</code> and
|
||||||
<code>runtime.g</code>) that the linker
|
<code>runtime.g</code>) that the linker
|
||||||
|
|
@ -153,7 +153,7 @@ the form <code>pkg.(*MyType).Meth</code>.
|
||||||
<p>
|
<p>
|
||||||
In this tutorial we will inspect the binary of the
|
In this tutorial we will inspect the binary of the
|
||||||
<a href="/pkg/regexp/">regexp</a> package's unit tests. To build the binary,
|
<a href="/pkg/regexp/">regexp</a> package's unit tests. To build the binary,
|
||||||
change to <code>$GOROOT/src/pkg/regexp</code> and run <code>go test -c</code>.
|
change to <code>$GOROOT/src/regexp</code> and run <code>go test -c</code>.
|
||||||
This should produce an executable file named <code>regexp.test</code>.
|
This should produce an executable file named <code>regexp.test</code>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
@ -172,7 +172,7 @@ License GPLv 3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.htm
|
||||||
Type "show copying" and "show warranty" for licensing/warranty details.
|
Type "show copying" and "show warranty" for licensing/warranty details.
|
||||||
This GDB was configured as "x86_64-linux".
|
This GDB was configured as "x86_64-linux".
|
||||||
|
|
||||||
Reading symbols from /home/user/go/src/pkg/regexp/regexp.test...
|
Reading symbols from /home/user/go/src/regexp/regexp.test...
|
||||||
done.
|
done.
|
||||||
Loading Go Runtime support.
|
Loading Go Runtime support.
|
||||||
(gdb)
|
(gdb)
|
||||||
|
|
@ -180,7 +180,7 @@ Loading Go Runtime support.
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The message <code>"Loading Go Runtime support"</code> means that GDB loaded the
|
The message <code>"Loading Go Runtime support"</code> means that GDB loaded the
|
||||||
extension from <code>$GOROOT/src/pkg/runtime/runtime-gdb.py</code>.
|
extension from <code>$GOROOT/src/runtime/runtime-gdb.py</code>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
|
@ -199,7 +199,7 @@ it by hand by telling gdb (assuming you have the go sources in
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
(gdb) <b>source ~/go/src/pkg/runtime/runtime-gdb.py</b>
|
(gdb) <b>source ~/go/src/runtime/runtime-gdb.py</b>
|
||||||
Loading Go Runtime support.
|
Loading Go Runtime support.
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
|
@ -259,7 +259,7 @@ Set a breakpoint at the <code>TestFind</code> function:
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
(gdb) <b>b 'regexp.TestFind'</b>
|
(gdb) <b>b 'regexp.TestFind'</b>
|
||||||
Breakpoint 1 at 0x424908: file /home/user/go/src/pkg/regexp/find_test.go, line 148.
|
Breakpoint 1 at 0x424908: file /home/user/go/src/regexp/find_test.go, line 148.
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
|
@ -268,9 +268,9 @@ Run the program:
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
(gdb) <b>run</b>
|
(gdb) <b>run</b>
|
||||||
Starting program: /home/user/go/src/pkg/regexp/regexp.test
|
Starting program: /home/user/go/src/regexp/regexp.test
|
||||||
|
|
||||||
Breakpoint 1, regexp.TestFind (t=0xf8404a89c0) at /home/user/go/src/pkg/regexp/find_test.go:148
|
Breakpoint 1, regexp.TestFind (t=0xf8404a89c0) at /home/user/go/src/regexp/find_test.go:148
|
||||||
148 func TestFind(t *testing.T) {
|
148 func TestFind(t *testing.T) {
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
|
@ -297,9 +297,9 @@ Look at the stack trace for where we’ve paused the program:
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
(gdb) <b>bt</b> <i># backtrace</i>
|
(gdb) <b>bt</b> <i># backtrace</i>
|
||||||
#0 regexp.TestFind (t=0xf8404a89c0) at /home/user/go/src/pkg/regexp/find_test.go:148
|
#0 regexp.TestFind (t=0xf8404a89c0) at /home/user/go/src/regexp/find_test.go:148
|
||||||
#1 0x000000000042f60b in testing.tRunner (t=0xf8404a89c0, test=0x573720) at /home/user/go/src/pkg/testing/testing.go:156
|
#1 0x000000000042f60b in testing.tRunner (t=0xf8404a89c0, test=0x573720) at /home/user/go/src/testing/testing.go:156
|
||||||
#2 0x000000000040df64 in runtime.initdone () at /home/user/go/src/pkg/runtime/proc.c:242
|
#2 0x000000000040df64 in runtime.initdone () at /home/user/go/src/runtime/proc.c:242
|
||||||
#3 0x000000f8404a89c0 in ?? ()
|
#3 0x000000f8404a89c0 in ?? ()
|
||||||
#4 0x0000000000573720 in ?? ()
|
#4 0x0000000000573720 in ?? ()
|
||||||
#5 0x0000000000000000 in ?? ()
|
#5 0x0000000000000000 in ?? ()
|
||||||
|
|
@ -311,18 +311,18 @@ The other goroutine, number 1, is stuck in <code>runtime.gosched</code>, blocked
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
(gdb) <b>goroutine 1 bt</b>
|
(gdb) <b>goroutine 1 bt</b>
|
||||||
#0 0x000000000040facb in runtime.gosched () at /home/user/go/src/pkg/runtime/proc.c:873
|
#0 0x000000000040facb in runtime.gosched () at /home/user/go/src/runtime/proc.c:873
|
||||||
#1 0x00000000004031c9 in runtime.chanrecv (c=void, ep=void, selected=void, received=void)
|
#1 0x00000000004031c9 in runtime.chanrecv (c=void, ep=void, selected=void, received=void)
|
||||||
at /home/user/go/src/pkg/runtime/chan.c:342
|
at /home/user/go/src/runtime/chan.c:342
|
||||||
#2 0x0000000000403299 in runtime.chanrecv1 (t=void, c=void) at/home/user/go/src/pkg/runtime/chan.c:423
|
#2 0x0000000000403299 in runtime.chanrecv1 (t=void, c=void) at/home/user/go/src/runtime/chan.c:423
|
||||||
#3 0x000000000043075b in testing.RunTests (matchString={void (struct string, struct string, bool *, error *)}
|
#3 0x000000000043075b in testing.RunTests (matchString={void (struct string, struct string, bool *, error *)}
|
||||||
0x7ffff7f9ef60, tests= []testing.InternalTest = {...}) at /home/user/go/src/pkg/testing/testing.go:201
|
0x7ffff7f9ef60, tests= []testing.InternalTest = {...}) at /home/user/go/src/testing/testing.go:201
|
||||||
#4 0x00000000004302b1 in testing.Main (matchString={void (struct string, struct string, bool *, error *)}
|
#4 0x00000000004302b1 in testing.Main (matchString={void (struct string, struct string, bool *, error *)}
|
||||||
0x7ffff7f9ef80, tests= []testing.InternalTest = {...}, benchmarks= []testing.InternalBenchmark = {...})
|
0x7ffff7f9ef80, tests= []testing.InternalTest = {...}, benchmarks= []testing.InternalBenchmark = {...})
|
||||||
at /home/user/go/src/pkg/testing/testing.go:168
|
at /home/user/go/src/testing/testing.go:168
|
||||||
#5 0x0000000000400dc1 in main.main () at /home/user/go/src/pkg/regexp/_testmain.go:98
|
#5 0x0000000000400dc1 in main.main () at /home/user/go/src/regexp/_testmain.go:98
|
||||||
#6 0x00000000004022e7 in runtime.mainstart () at /home/user/go/src/pkg/runtime/amd64/asm.s:78
|
#6 0x00000000004022e7 in runtime.mainstart () at /home/user/go/src/runtime/amd64/asm.s:78
|
||||||
#7 0x000000000040ea6f in runtime.initdone () at /home/user/go/src/pkg/runtime/proc.c:243
|
#7 0x000000000040ea6f in runtime.initdone () at /home/user/go/src/runtime/proc.c:243
|
||||||
#8 0x0000000000000000 in ?? ()
|
#8 0x0000000000000000 in ?? ()
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
|
@ -333,7 +333,7 @@ The stack frame shows we’re currently executing the <code>regexp.TestFind</cod
|
||||||
<pre>
|
<pre>
|
||||||
(gdb) <b>info frame</b>
|
(gdb) <b>info frame</b>
|
||||||
Stack level 0, frame at 0x7ffff7f9ff88:
|
Stack level 0, frame at 0x7ffff7f9ff88:
|
||||||
rip = 0x425530 in regexp.TestFind (/home/user/go/src/pkg/regexp/find_test.go:148);
|
rip = 0x425530 in regexp.TestFind (/home/user/go/src/regexp/find_test.go:148);
|
||||||
saved rip 0x430233
|
saved rip 0x430233
|
||||||
called by frame at 0x7ffff7f9ffa8
|
called by frame at 0x7ffff7f9ffa8
|
||||||
source language minimal.
|
source language minimal.
|
||||||
|
|
@ -410,7 +410,7 @@ We can step into the <code>String</code>function call with <code>"s"</code>:
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
(gdb) <b>s</b>
|
(gdb) <b>s</b>
|
||||||
regexp.(*Regexp).String (re=0xf84068d070, noname=void) at /home/user/go/src/pkg/regexp/regexp.go:97
|
regexp.(*Regexp).String (re=0xf84068d070, noname=void) at /home/user/go/src/regexp/regexp.go:97
|
||||||
97 func (re *Regexp) String() string {
|
97 func (re *Regexp) String() string {
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
|
@ -421,12 +421,12 @@ Get a stack trace to see where we are:
|
||||||
<pre>
|
<pre>
|
||||||
(gdb) <b>bt</b>
|
(gdb) <b>bt</b>
|
||||||
#0 regexp.(*Regexp).String (re=0xf84068d070, noname=void)
|
#0 regexp.(*Regexp).String (re=0xf84068d070, noname=void)
|
||||||
at /home/user/go/src/pkg/regexp/regexp.go:97
|
at /home/user/go/src/regexp/regexp.go:97
|
||||||
#1 0x0000000000425615 in regexp.TestFind (t=0xf840688b60)
|
#1 0x0000000000425615 in regexp.TestFind (t=0xf840688b60)
|
||||||
at /home/user/go/src/pkg/regexp/find_test.go:151
|
at /home/user/go/src/regexp/find_test.go:151
|
||||||
#2 0x0000000000430233 in testing.tRunner (t=0xf840688b60, test=0x5747b8)
|
#2 0x0000000000430233 in testing.tRunner (t=0xf840688b60, test=0x5747b8)
|
||||||
at /home/user/go/src/pkg/testing/testing.go:156
|
at /home/user/go/src/testing/testing.go:156
|
||||||
#3 0x000000000040ea6f in runtime.initdone () at /home/user/go/src/pkg/runtime/proc.c:243
|
#3 0x000000000040ea6f in runtime.initdone () at /home/user/go/src/runtime/proc.c:243
|
||||||
....
|
....
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ should read first.
|
||||||
<h3 id="examples">Examples</h3>
|
<h3 id="examples">Examples</h3>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The <a href="/src/pkg/">Go package sources</a>
|
The <a href="/src/">Go package sources</a>
|
||||||
are intended to serve not
|
are intended to serve not
|
||||||
only as the core library but also as examples of how to
|
only as the core library but also as examples of how to
|
||||||
use the language.
|
use the language.
|
||||||
|
|
@ -344,7 +344,7 @@ determines just which package is being used.
|
||||||
<p>
|
<p>
|
||||||
Another convention is that the package name is the base name of
|
Another convention is that the package name is the base name of
|
||||||
its source directory;
|
its source directory;
|
||||||
the package in <code>src/pkg/encoding/base64</code>
|
the package in <code>src/encoding/base64</code>
|
||||||
is imported as <code>"encoding/base64"</code> but has name <code>base64</code>,
|
is imported as <code>"encoding/base64"</code> but has name <code>base64</code>,
|
||||||
not <code>encoding_base64</code> and not <code>encodingBase64</code>.
|
not <code>encoding_base64</code> and not <code>encodingBase64</code>.
|
||||||
</p>
|
</p>
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@ script <code>libgo/merge.sh</code>. Accordingly, most library changes
|
||||||
should be made in the main Go repository. The files outside
|
should be made in the main Go repository. The files outside
|
||||||
of <code>libgo/go</code> are gccgo-specific; that said, some of the
|
of <code>libgo/go</code> are gccgo-specific; that said, some of the
|
||||||
files in <code>libgo/runtime</code> are based on files
|
files in <code>libgo/runtime</code> are based on files
|
||||||
in <code>src/pkg/runtime</code> in the main Go repository.
|
in <code>src/runtime</code> in the main Go repository.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h2>Testing</h2>
|
<h2>Testing</h2>
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,8 @@ Please keep the list sorted (as in sort.Strings of the lines).
|
||||||
|
|
||||||
spec: permit for range x (CL 104680043)
|
spec: permit for range x (CL 104680043)
|
||||||
|
|
||||||
|
the directory src/pkg has been deleted, for instance src/pkg/fmt is now just src/fmt (CL 134570043)
|
||||||
|
|
||||||
cmd/6l, liblink: use pc-relative addressing for all memory references, so that linking Go binaries at high addresses works (CL 125140043). This cuts the maximum size of a Go binary's text+data+bss from 4GB to 2GB.
|
cmd/6l, liblink: use pc-relative addressing for all memory references, so that linking Go binaries at high addresses works (CL 125140043). This cuts the maximum size of a Go binary's text+data+bss from 4GB to 2GB.
|
||||||
cmd/go: import comments (CL 124940043)
|
cmd/go: import comments (CL 124940043)
|
||||||
cmd/go: implement "internal" (CL 120600043)
|
cmd/go: implement "internal" (CL 120600043)
|
||||||
|
|
|
||||||
|
|
@ -971,7 +971,7 @@ It is a handy reference for people doing code reviews for Go projects.
|
||||||
How do I submit patches to the Go libraries?</h3>
|
How do I submit patches to the Go libraries?</h3>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The library sources are in <code>go/src/pkg</code>.
|
The library sources are in <code>go/src</code>.
|
||||||
If you want to make a significant change, please discuss on the mailing list before embarking.
|
If you want to make a significant change, please discuss on the mailing list before embarking.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
@ -1571,7 +1571,7 @@ table-driven, iterating over a list of inputs and outputs defined
|
||||||
in a data structure (Go has excellent support for data structure literals).
|
in a data structure (Go has excellent support for data structure literals).
|
||||||
The work to write a good test and good error messages will then be amortized over many
|
The work to write a good test and good error messages will then be amortized over many
|
||||||
test cases. The standard Go library is full of illustrative examples, such as in
|
test cases. The standard Go library is full of illustrative examples, such as in
|
||||||
<a href="/src/pkg/fmt/fmt_test.go">the formatting tests for the <code>fmt</code> package</a>.
|
<a href="/src/fmt/fmt_test.go">the formatting tests for the <code>fmt</code> package</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ func main() {
|
||||||
|
|
||||||
// Determine thepackage by examining the current working
|
// Determine thepackage by examining the current working
|
||||||
// directory, which will look something like
|
// directory, which will look something like
|
||||||
// "$GOROOT/src/pkg/mime/multipart". We extract everything
|
// "$GOROOT/src/mime/multipart". We extract everything
|
||||||
// after the $GOROOT to run on the same relative directory
|
// after the $GOROOT to run on the same relative directory
|
||||||
// on the target device.
|
// on the target device.
|
||||||
//
|
//
|
||||||
|
|
|
||||||
|
|
@ -74,8 +74,8 @@ var preBuildCleanFiles = []string{
|
||||||
"misc/dashboard/godashboard",
|
"misc/dashboard/godashboard",
|
||||||
"src/cmd/cov",
|
"src/cmd/cov",
|
||||||
"src/cmd/prof",
|
"src/cmd/prof",
|
||||||
"src/pkg/exp",
|
"src/exp",
|
||||||
"src/pkg/old",
|
"src/old",
|
||||||
}
|
}
|
||||||
|
|
||||||
var cleanFiles = []string{
|
var cleanFiles = []string{
|
||||||
|
|
|
||||||
|
|
@ -21,98 +21,97 @@ go src=..
|
||||||
link
|
link
|
||||||
testdata
|
testdata
|
||||||
+
|
+
|
||||||
pkg
|
archive
|
||||||
archive
|
tar
|
||||||
tar
|
|
||||||
testdata
|
|
||||||
+
|
|
||||||
zip
|
|
||||||
testdata
|
|
||||||
+
|
|
||||||
compress
|
|
||||||
bzip2
|
|
||||||
testdata
|
|
||||||
+
|
|
||||||
flate
|
|
||||||
gzip
|
|
||||||
testdata
|
|
||||||
+
|
|
||||||
lzw
|
|
||||||
testdata
|
testdata
|
||||||
+
|
+
|
||||||
zlib
|
zip
|
||||||
crypto
|
|
||||||
rsa
|
|
||||||
testdata
|
|
||||||
+
|
|
||||||
tls
|
|
||||||
testdata
|
|
||||||
+
|
|
||||||
debug
|
|
||||||
dwarf
|
|
||||||
testdata
|
|
||||||
+
|
|
||||||
elf
|
|
||||||
testdata
|
|
||||||
+
|
|
||||||
macho
|
|
||||||
testdata
|
|
||||||
+
|
|
||||||
pe
|
|
||||||
testdata
|
|
||||||
+
|
|
||||||
plan9obj
|
|
||||||
testdata
|
|
||||||
+
|
|
||||||
go
|
|
||||||
build
|
|
||||||
+
|
|
||||||
doc
|
|
||||||
testdata
|
|
||||||
+
|
|
||||||
format
|
|
||||||
+
|
|
||||||
parser
|
|
||||||
+
|
|
||||||
printer
|
|
||||||
+
|
|
||||||
image
|
|
||||||
testdata
|
testdata
|
||||||
+
|
+
|
||||||
draw
|
compress
|
||||||
gif
|
bzip2
|
||||||
jpeg
|
testdata
|
||||||
png
|
+
|
||||||
testdata
|
flate
|
||||||
+
|
gzip
|
||||||
io
|
testdata
|
||||||
|
+
|
||||||
|
lzw
|
||||||
|
testdata
|
||||||
+
|
+
|
||||||
mime
|
zlib
|
||||||
|
crypto
|
||||||
|
rsa
|
||||||
testdata
|
testdata
|
||||||
+
|
+
|
||||||
multipart
|
tls
|
||||||
testdata
|
|
||||||
+
|
|
||||||
net
|
|
||||||
http
|
|
||||||
+
|
|
||||||
testdata
|
testdata
|
||||||
+
|
+
|
||||||
os
|
debug
|
||||||
|
dwarf
|
||||||
|
testdata
|
||||||
|
+
|
||||||
|
elf
|
||||||
|
testdata
|
||||||
|
+
|
||||||
|
macho
|
||||||
|
testdata
|
||||||
|
+
|
||||||
|
pe
|
||||||
|
testdata
|
||||||
|
+
|
||||||
|
plan9obj
|
||||||
|
testdata
|
||||||
|
+
|
||||||
|
go
|
||||||
|
build
|
||||||
+
|
+
|
||||||
path
|
doc
|
||||||
filepath
|
|
||||||
+
|
|
||||||
regexp
|
|
||||||
testdata
|
testdata
|
||||||
+
|
+
|
||||||
strconv
|
format
|
||||||
|
+
|
||||||
|
parser
|
||||||
|
+
|
||||||
|
printer
|
||||||
|
+
|
||||||
|
image
|
||||||
|
testdata
|
||||||
|
+
|
||||||
|
draw
|
||||||
|
gif
|
||||||
|
jpeg
|
||||||
|
png
|
||||||
|
testdata
|
||||||
|
+
|
||||||
|
io
|
||||||
|
+
|
||||||
|
mime
|
||||||
|
testdata
|
||||||
|
+
|
||||||
|
multipart
|
||||||
|
testdata
|
||||||
|
+
|
||||||
|
net
|
||||||
|
http
|
||||||
|
+
|
||||||
|
testdata
|
||||||
|
+
|
||||||
|
os
|
||||||
|
+
|
||||||
|
path
|
||||||
|
filepath
|
||||||
|
+
|
||||||
|
regexp
|
||||||
|
testdata
|
||||||
|
+
|
||||||
|
strconv
|
||||||
|
testdata
|
||||||
|
+
|
||||||
|
text
|
||||||
|
template
|
||||||
testdata
|
testdata
|
||||||
+
|
+
|
||||||
text
|
|
||||||
template
|
|
||||||
testdata
|
|
||||||
+
|
|
||||||
lib
|
lib
|
||||||
time
|
time
|
||||||
zoneinfo.zip
|
zoneinfo.zip
|
||||||
|
|
|
||||||
|
|
@ -43,8 +43,7 @@ GOOS=$GOHOSTOS GOARCH=$GOHOSTARCH go build \
|
||||||
export ANDROID_PRODUCT_OUT=/tmp/androidtest-$$
|
export ANDROID_PRODUCT_OUT=/tmp/androidtest-$$
|
||||||
FAKE_GOROOT=$ANDROID_PRODUCT_OUT/data/local/tmp/goroot
|
FAKE_GOROOT=$ANDROID_PRODUCT_OUT/data/local/tmp/goroot
|
||||||
mkdir -p $FAKE_GOROOT/src
|
mkdir -p $FAKE_GOROOT/src
|
||||||
ln -s $GOROOT/src/cmd $FAKE_GOROOT/src/cmd
|
ln -s $GOROOT/src $FAKE_GOROOT/src
|
||||||
ln -s $GOROOT/src/pkg $FAKE_GOROOT/src/pkg
|
|
||||||
ln -s $GOROOT/test $FAKE_GOROOT/test
|
ln -s $GOROOT/test $FAKE_GOROOT/test
|
||||||
ln -s $GOROOT/lib $FAKE_GOROOT/lib
|
ln -s $GOROOT/lib $FAKE_GOROOT/lib
|
||||||
echo '# Syncing test files to android device'
|
echo '# Syncing test files to android device'
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 785 B After Width: | Height: | Size: 785 B |
|
|
@ -33,7 +33,7 @@
|
||||||
#include <stdio.h> /* if we don't, bison will, and a.h re-#defines getc */
|
#include <stdio.h> /* if we don't, bison will, and a.h re-#defines getc */
|
||||||
#include <libc.h>
|
#include <libc.h>
|
||||||
#include "a.h"
|
#include "a.h"
|
||||||
#include "../../pkg/runtime/funcdata.h"
|
#include "../../runtime/funcdata.h"
|
||||||
%}
|
%}
|
||||||
%union
|
%union
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@
|
||||||
#include <stdio.h> /* if we don't, bison will, and a.h re-#defines getc */
|
#include <stdio.h> /* if we don't, bison will, and a.h re-#defines getc */
|
||||||
#include <libc.h>
|
#include <libc.h>
|
||||||
#include "a.h"
|
#include "a.h"
|
||||||
#include "../../pkg/runtime/funcdata.h"
|
#include "../../runtime/funcdata.h"
|
||||||
|
|
||||||
/* Line 371 of yacc.c */
|
/* Line 371 of yacc.c */
|
||||||
#line 76 "y.tab.c"
|
#line 76 "y.tab.c"
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@
|
||||||
// THE SOFTWARE.
|
// THE SOFTWARE.
|
||||||
|
|
||||||
#include "gc.h"
|
#include "gc.h"
|
||||||
#include "../../pkg/runtime/funcdata.h"
|
#include "../../runtime/funcdata.h"
|
||||||
|
|
||||||
void
|
void
|
||||||
_cgen(Node *n, Node *nn, int inrel)
|
_cgen(Node *n, Node *nn, int inrel)
|
||||||
|
|
|
||||||
|
|
@ -1522,7 +1522,7 @@ sgen(Node *n, Node *res, int64 w)
|
||||||
f = sysfunc("duffcopy");
|
f = sysfunc("duffcopy");
|
||||||
p = gins(ADUFFCOPY, N, f);
|
p = gins(ADUFFCOPY, N, f);
|
||||||
afunclit(&p->to, f);
|
afunclit(&p->to, f);
|
||||||
// 8 and 128 = magic constants: see ../../pkg/runtime/asm_arm.s
|
// 8 and 128 = magic constants: see ../../runtime/asm_arm.s
|
||||||
p->to.offset = 8*(128-c);
|
p->to.offset = 8*(128-c);
|
||||||
|
|
||||||
regfree(&tmp);
|
regfree(&tmp);
|
||||||
|
|
|
||||||
|
|
@ -910,7 +910,7 @@ clearfat(Node *nl)
|
||||||
f = sysfunc("duffzero");
|
f = sysfunc("duffzero");
|
||||||
p = gins(ADUFFZERO, N, f);
|
p = gins(ADUFFZERO, N, f);
|
||||||
afunclit(&p->to, f);
|
afunclit(&p->to, f);
|
||||||
// 4 and 128 = magic constants: see ../../pkg/runtime/asm_arm.s
|
// 4 and 128 = magic constants: see ../../runtime/asm_arm.s
|
||||||
p->to.offset = 4*(128-q);
|
p->to.offset = 4*(128-q);
|
||||||
} else
|
} else
|
||||||
while(q > 0) {
|
while(q > 0) {
|
||||||
|
|
|
||||||
|
|
@ -31,11 +31,11 @@
|
||||||
#include <u.h>
|
#include <u.h>
|
||||||
#include <libc.h>
|
#include <libc.h>
|
||||||
#include "gg.h"
|
#include "gg.h"
|
||||||
#include "../../pkg/runtime/funcdata.h"
|
#include "../../runtime/funcdata.h"
|
||||||
|
|
||||||
// TODO(rsc): Can make this bigger if we move
|
// TODO(rsc): Can make this bigger if we move
|
||||||
// the text segment up higher in 5l for all GOOS.
|
// the text segment up higher in 5l for all GOOS.
|
||||||
// At the same time, can raise StackBig in ../../pkg/runtime/stack.h.
|
// At the same time, can raise StackBig in ../../runtime/stack.h.
|
||||||
long unmappedzero = 4096;
|
long unmappedzero = 4096;
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@
|
||||||
#include <stdio.h> /* if we don't, bison will, and a.h re-#defines getc */
|
#include <stdio.h> /* if we don't, bison will, and a.h re-#defines getc */
|
||||||
#include <libc.h>
|
#include <libc.h>
|
||||||
#include "a.h"
|
#include "a.h"
|
||||||
#include "../../pkg/runtime/funcdata.h"
|
#include "../../runtime/funcdata.h"
|
||||||
%}
|
%}
|
||||||
%union {
|
%union {
|
||||||
Sym *sym;
|
Sym *sym;
|
||||||
|
|
|
||||||
|
|
@ -150,7 +150,7 @@
|
||||||
#include <stdio.h> /* if we don't, bison will, and a.h re-#defines getc */
|
#include <stdio.h> /* if we don't, bison will, and a.h re-#defines getc */
|
||||||
#include <libc.h>
|
#include <libc.h>
|
||||||
#include "a.h"
|
#include "a.h"
|
||||||
#include "../../pkg/runtime/funcdata.h"
|
#include "../../runtime/funcdata.h"
|
||||||
|
|
||||||
|
|
||||||
/* Enabling traces. */
|
/* Enabling traces. */
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@
|
||||||
// THE SOFTWARE.
|
// THE SOFTWARE.
|
||||||
|
|
||||||
#include "gc.h"
|
#include "gc.h"
|
||||||
#include "../../pkg/runtime/funcdata.h"
|
#include "../../runtime/funcdata.h"
|
||||||
|
|
||||||
/* ,x/^(print|prtree)\(/i/\/\/ */
|
/* ,x/^(print|prtree)\(/i/\/\/ */
|
||||||
int castup(Type*, Type*);
|
int castup(Type*, Type*);
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@
|
||||||
// THE SOFTWARE.
|
// THE SOFTWARE.
|
||||||
|
|
||||||
#include "gc.h"
|
#include "gc.h"
|
||||||
#include "../../pkg/runtime/funcdata.h"
|
#include "../../runtime/funcdata.h"
|
||||||
|
|
||||||
Prog*
|
Prog*
|
||||||
gtext(Sym *s, int32 stkoff)
|
gtext(Sym *s, int32 stkoff)
|
||||||
|
|
|
||||||
|
|
@ -1451,7 +1451,7 @@ sgen(Node *n, Node *ns, int64 w)
|
||||||
p = gins(ADUFFCOPY, N, N);
|
p = gins(ADUFFCOPY, N, N);
|
||||||
p->to.type = D_ADDR;
|
p->to.type = D_ADDR;
|
||||||
p->to.sym = linksym(pkglookup("duffcopy", runtimepkg));
|
p->to.sym = linksym(pkglookup("duffcopy", runtimepkg));
|
||||||
// 14 and 128 = magic constants: see ../../pkg/runtime/asm_amd64.s
|
// 14 and 128 = magic constants: see ../../runtime/asm_amd64.s
|
||||||
p->to.offset = 14*(128-q);
|
p->to.offset = 14*(128-q);
|
||||||
} else
|
} else
|
||||||
while(q > 0) {
|
while(q > 0) {
|
||||||
|
|
|
||||||
|
|
@ -1135,7 +1135,7 @@ clearfat(Node *nl)
|
||||||
p = gins(ADUFFZERO, N, N);
|
p = gins(ADUFFZERO, N, N);
|
||||||
p->to.type = D_ADDR;
|
p->to.type = D_ADDR;
|
||||||
p->to.sym = linksym(pkglookup("duffzero", runtimepkg));
|
p->to.sym = linksym(pkglookup("duffzero", runtimepkg));
|
||||||
// 2 and 128 = magic constants: see ../../pkg/runtime/asm_amd64.s
|
// 2 and 128 = magic constants: see ../../runtime/asm_amd64.s
|
||||||
p->to.offset = 2*(128-q);
|
p->to.offset = 2*(128-q);
|
||||||
} else
|
} else
|
||||||
while(q > 0) {
|
while(q > 0) {
|
||||||
|
|
|
||||||
|
|
@ -31,11 +31,11 @@
|
||||||
#include <u.h>
|
#include <u.h>
|
||||||
#include <libc.h>
|
#include <libc.h>
|
||||||
#include "gg.h"
|
#include "gg.h"
|
||||||
#include "../../pkg/runtime/funcdata.h"
|
#include "../../runtime/funcdata.h"
|
||||||
|
|
||||||
// TODO(rsc): Can make this bigger if we move
|
// TODO(rsc): Can make this bigger if we move
|
||||||
// the text segment up higher in 6l for all GOOS.
|
// the text segment up higher in 6l for all GOOS.
|
||||||
// At the same time, can raise StackBig in ../../pkg/runtime/stack.h.
|
// At the same time, can raise StackBig in ../../runtime/stack.h.
|
||||||
vlong unmappedzero = 4096;
|
vlong unmappedzero = 4096;
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@
|
||||||
#include <stdio.h> /* if we don't, bison will, and a.h re-#defines getc */
|
#include <stdio.h> /* if we don't, bison will, and a.h re-#defines getc */
|
||||||
#include <libc.h>
|
#include <libc.h>
|
||||||
#include "a.h"
|
#include "a.h"
|
||||||
#include "../../pkg/runtime/funcdata.h"
|
#include "../../runtime/funcdata.h"
|
||||||
%}
|
%}
|
||||||
%union {
|
%union {
|
||||||
Sym *sym;
|
Sym *sym;
|
||||||
|
|
|
||||||
|
|
@ -146,7 +146,7 @@
|
||||||
#include <stdio.h> /* if we don't, bison will, and a.h re-#defines getc */
|
#include <stdio.h> /* if we don't, bison will, and a.h re-#defines getc */
|
||||||
#include <libc.h>
|
#include <libc.h>
|
||||||
#include "a.h"
|
#include "a.h"
|
||||||
#include "../../pkg/runtime/funcdata.h"
|
#include "../../runtime/funcdata.h"
|
||||||
|
|
||||||
|
|
||||||
/* Enabling traces. */
|
/* Enabling traces. */
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@
|
||||||
// THE SOFTWARE.
|
// THE SOFTWARE.
|
||||||
|
|
||||||
#include "gc.h"
|
#include "gc.h"
|
||||||
#include "../../pkg/runtime/funcdata.h"
|
#include "../../runtime/funcdata.h"
|
||||||
|
|
||||||
/* ,x/^(print|prtree)\(/i/\/\/ */
|
/* ,x/^(print|prtree)\(/i/\/\/ */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1326,7 +1326,7 @@ sgen(Node *n, Node *res, int64 w)
|
||||||
p = gins(ADUFFCOPY, N, N);
|
p = gins(ADUFFCOPY, N, N);
|
||||||
p->to.type = D_ADDR;
|
p->to.type = D_ADDR;
|
||||||
p->to.sym = linksym(pkglookup("duffcopy", runtimepkg));
|
p->to.sym = linksym(pkglookup("duffcopy", runtimepkg));
|
||||||
// 10 and 128 = magic constants: see ../../pkg/runtime/asm_386.s
|
// 10 and 128 = magic constants: see ../../runtime/asm_386.s
|
||||||
p->to.offset = 10*(128-q);
|
p->to.offset = 10*(128-q);
|
||||||
} else
|
} else
|
||||||
while(q > 0) {
|
while(q > 0) {
|
||||||
|
|
|
||||||
|
|
@ -184,7 +184,7 @@ clearfat(Node *nl)
|
||||||
p = gins(ADUFFZERO, N, N);
|
p = gins(ADUFFZERO, N, N);
|
||||||
p->to.type = D_ADDR;
|
p->to.type = D_ADDR;
|
||||||
p->to.sym = linksym(pkglookup("duffzero", runtimepkg));
|
p->to.sym = linksym(pkglookup("duffzero", runtimepkg));
|
||||||
// 1 and 128 = magic constants: see ../../pkg/runtime/asm_386.s
|
// 1 and 128 = magic constants: see ../../runtime/asm_386.s
|
||||||
p->to.offset = 1*(128-q);
|
p->to.offset = 1*(128-q);
|
||||||
} else
|
} else
|
||||||
while(q > 0) {
|
while(q > 0) {
|
||||||
|
|
|
||||||
|
|
@ -31,11 +31,11 @@
|
||||||
#include <u.h>
|
#include <u.h>
|
||||||
#include <libc.h>
|
#include <libc.h>
|
||||||
#include "gg.h"
|
#include "gg.h"
|
||||||
#include "../../pkg/runtime/funcdata.h"
|
#include "../../runtime/funcdata.h"
|
||||||
|
|
||||||
// TODO(rsc): Can make this bigger if we move
|
// TODO(rsc): Can make this bigger if we move
|
||||||
// the text segment up higher in 8l for all GOOS.
|
// the text segment up higher in 8l for all GOOS.
|
||||||
// At the same time, can raise StackBig in ../../pkg/runtime/stack.h.
|
// At the same time, can raise StackBig in ../../runtime/stack.h.
|
||||||
uint32 unmappedzero = 4096;
|
uint32 unmappedzero = 4096;
|
||||||
|
|
||||||
#define CASE(a,b) (((a)<<16)|((b)<<0))
|
#define CASE(a,b) (((a)<<16)|((b)<<0))
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@
|
||||||
#include <stdio.h> /* if we don't, bison will, and a.h re-#defines getc */
|
#include <stdio.h> /* if we don't, bison will, and a.h re-#defines getc */
|
||||||
#include <libc.h>
|
#include <libc.h>
|
||||||
#include "a.h"
|
#include "a.h"
|
||||||
#include "../../pkg/runtime/funcdata.h"
|
#include "../../runtime/funcdata.h"
|
||||||
%}
|
%}
|
||||||
%union
|
%union
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,7 @@
|
||||||
#include <stdio.h> /* if we don't, bison will, and a.h re-#defines getc */
|
#include <stdio.h> /* if we don't, bison will, and a.h re-#defines getc */
|
||||||
#include <libc.h>
|
#include <libc.h>
|
||||||
#include "a.h"
|
#include "a.h"
|
||||||
#include "../../pkg/runtime/funcdata.h"
|
#include "../../runtime/funcdata.h"
|
||||||
|
|
||||||
|
|
||||||
/* Line 268 of yacc.c */
|
/* Line 268 of yacc.c */
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
// THE SOFTWARE.
|
// THE SOFTWARE.
|
||||||
|
|
||||||
#include "gc.h"
|
#include "gc.h"
|
||||||
#include "../../pkg/runtime/funcdata.h"
|
#include "../../runtime/funcdata.h"
|
||||||
|
|
||||||
void
|
void
|
||||||
cgen(Node *n, Node *nn)
|
cgen(Node *n, Node *nn)
|
||||||
|
|
|
||||||
|
|
@ -970,7 +970,7 @@ clearfat(Node *nl)
|
||||||
f = sysfunc("duffzero");
|
f = sysfunc("duffzero");
|
||||||
p = gins(ADUFFZERO, N, f);
|
p = gins(ADUFFZERO, N, f);
|
||||||
afunclit(&p->to, f);
|
afunclit(&p->to, f);
|
||||||
// 4 and 128 = magic constants: see ../../pkg/runtime/asm_power64x.s
|
// 4 and 128 = magic constants: see ../../runtime/asm_power64x.s
|
||||||
p->to.offset = 4*(128-q);
|
p->to.offset = 4*(128-q);
|
||||||
} else
|
} else
|
||||||
for(t = 0; t < q; t++) {
|
for(t = 0; t < q; t++) {
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue