mirror of
https://github.com/golang/go
synced 2024-09-04 23:44:16 +00:00
build: adjustments for move from src/pkg to src
This CL adjusts code referring to src/pkg to refer to src. Immediately after submitting this CL, I will submit a change doing 'hg mv src/pkg/* src'. That change will be too large to review with Rietveld but will contain only the 'hg mv'. This CL will break the build. The followup 'hg mv' will fix it. For more about the move, see golang.org/s/go14nopkg. LGTM=r R=r CC=golang-codereviews https://golang.org/cl/134570043
This commit is contained in:
parent
36ca636fab
commit
220a6de47e
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>
|
||||||
|
|
|
@ -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{
|
||||||
|
|
|
@ -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'
|
||||||
|
|
|
@ -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))
|
||||||
|
|
|
@ -143,7 +143,7 @@ func main() {
|
||||||
|
|
||||||
var featureCtx = make(map[string]map[string]bool) // feature -> context name -> true
|
var featureCtx = make(map[string]map[string]bool) // feature -> context name -> true
|
||||||
for _, context := range contexts {
|
for _, context := range contexts {
|
||||||
w := NewWalker(context, filepath.Join(build.Default.GOROOT, "src/pkg"))
|
w := NewWalker(context, filepath.Join(build.Default.GOROOT, "src"))
|
||||||
|
|
||||||
for _, name := range pkgNames {
|
for _, name := range pkgNames {
|
||||||
// - Package "unsafe" contains special signatures requiring
|
// - Package "unsafe" contains special signatures requiring
|
||||||
|
|
|
@ -38,7 +38,7 @@ func TestGolden(t *testing.T) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
goldenFile := filepath.Join("testdata", "src", "pkg", fi.Name(), "golden.txt")
|
goldenFile := filepath.Join("testdata", "src", fi.Name(), "golden.txt")
|
||||||
w := NewWalker(nil, "testdata/src/pkg")
|
w := NewWalker(nil, "testdata/src/pkg")
|
||||||
w.export(w.Import(fi.Name()))
|
w.export(w.Import(fi.Name()))
|
||||||
|
|
||||||
|
@ -176,7 +176,7 @@ func BenchmarkAll(b *testing.B) {
|
||||||
|
|
||||||
for i := 0; i < b.N; i++ {
|
for i := 0; i < b.N; i++ {
|
||||||
for _, context := range contexts {
|
for _, context := range contexts {
|
||||||
w := NewWalker(context, filepath.Join(build.Default.GOROOT, "src/pkg"))
|
w := NewWalker(context, filepath.Join(build.Default.GOROOT, "src"))
|
||||||
for _, name := range pkgNames {
|
for _, name := range pkgNames {
|
||||||
if name != "unsafe" && !strings.HasPrefix(name, "cmd/") {
|
if name != "unsafe" && !strings.HasPrefix(name, "cmd/") {
|
||||||
w.export(w.Import(name))
|
w.export(w.Import(name))
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
// THE SOFTWARE.
|
// THE SOFTWARE.
|
||||||
|
|
||||||
#include "gc.h"
|
#include "gc.h"
|
||||||
#include "../../pkg/runtime/funcdata.h"
|
#include "../../runtime/funcdata.h"
|
||||||
|
|
||||||
enum { BitsPerPointer = 2 };
|
enum { BitsPerPointer = 2 };
|
||||||
|
|
||||||
|
|
|
@ -272,7 +272,7 @@ func (f *File) walk(x interface{}, context string, visit func(*File, interface{}
|
||||||
|
|
||||||
case nil:
|
case nil:
|
||||||
|
|
||||||
// These are ordered and grouped to match ../../pkg/go/ast/ast.go
|
// These are ordered and grouped to match ../../go/ast/ast.go
|
||||||
case *ast.Field:
|
case *ast.Field:
|
||||||
if len(n.Names) == 0 && context == "field" {
|
if len(n.Names) == 0 && context == "field" {
|
||||||
f.walk(&n.Type, "embed-type", visit)
|
f.walk(&n.Type, "embed-type", visit)
|
||||||
|
|
208
src/cmd/dist/build.c
vendored
208
src/cmd/dist/build.c
vendored
|
@ -366,8 +366,8 @@ static char *oldtool[] = {
|
||||||
// not be in release branches.
|
// not be in release branches.
|
||||||
static char *unreleased[] = {
|
static char *unreleased[] = {
|
||||||
"src/cmd/link",
|
"src/cmd/link",
|
||||||
"src/pkg/debug/goobj",
|
"src/debug/goobj",
|
||||||
"src/pkg/old",
|
"src/old",
|
||||||
};
|
};
|
||||||
|
|
||||||
// setup sets up the tree for the initial build.
|
// setup sets up the tree for the initial build.
|
||||||
|
@ -590,7 +590,7 @@ static struct {
|
||||||
"$GOROOT/pkg/obj/$GOHOSTOS_$GOHOSTARCH/libbio.a",
|
"$GOROOT/pkg/obj/$GOHOSTOS_$GOHOSTARCH/libbio.a",
|
||||||
"$GOROOT/pkg/obj/$GOHOSTOS_$GOHOSTARCH/lib9.a",
|
"$GOROOT/pkg/obj/$GOHOSTOS_$GOHOSTARCH/lib9.a",
|
||||||
}},
|
}},
|
||||||
{"pkg/runtime", {
|
{"runtime", {
|
||||||
"zaexperiment.h", // must sort above zasm
|
"zaexperiment.h", // must sort above zasm
|
||||||
"zasm_$GOOS_$GOARCH.h",
|
"zasm_$GOOS_$GOARCH.h",
|
||||||
"zsys_$GOOS_$GOARCH.s",
|
"zsys_$GOOS_$GOARCH.s",
|
||||||
|
@ -706,7 +706,7 @@ install(char *dir)
|
||||||
}
|
}
|
||||||
|
|
||||||
islib = hasprefix(dir, "lib") || streq(dir, "cmd/cc") || streq(dir, "cmd/gc");
|
islib = hasprefix(dir, "lib") || streq(dir, "cmd/cc") || streq(dir, "cmd/gc");
|
||||||
ispkg = hasprefix(dir, "pkg");
|
ispkg = !islib && !hasprefix(dir, "cmd/");
|
||||||
isgo = ispkg || streq(dir, "cmd/go") || streq(dir, "cmd/cgo");
|
isgo = ispkg || streq(dir, "cmd/go") || streq(dir, "cmd/cgo");
|
||||||
|
|
||||||
exe = "";
|
exe = "";
|
||||||
|
@ -732,11 +732,11 @@ install(char *dir)
|
||||||
// Go library (package).
|
// Go library (package).
|
||||||
ispackcmd = 1;
|
ispackcmd = 1;
|
||||||
vadd(&link, "pack"); // program name - unused here, but all the other cases record one
|
vadd(&link, "pack"); // program name - unused here, but all the other cases record one
|
||||||
p = bprintf(&b, "%s/pkg/%s_%s/%s", goroot, goos, goarch, dir+4);
|
p = bprintf(&b, "%s/pkg/%s_%s/%s", goroot, goos, goarch, dir);
|
||||||
*xstrrchr(p, '/') = '\0';
|
*xstrrchr(p, '/') = '\0';
|
||||||
xmkdirall(p);
|
xmkdirall(p);
|
||||||
targ = link.len;
|
targ = link.len;
|
||||||
vadd(&link, bpathf(&b, "%s/pkg/%s_%s/%s.a", goroot, goos, goarch, dir+4));
|
vadd(&link, bpathf(&b, "%s/pkg/%s_%s/%s.a", goroot, goos, goarch, dir));
|
||||||
} else if(streq(dir, "cmd/go") || streq(dir, "cmd/cgo")) {
|
} else if(streq(dir, "cmd/go") || streq(dir, "cmd/cgo")) {
|
||||||
// Go command.
|
// Go command.
|
||||||
vadd(&link, bpathf(&b, "%s/%sl", tooldir, gochar));
|
vadd(&link, bpathf(&b, "%s/%sl", tooldir, gochar));
|
||||||
|
@ -883,7 +883,7 @@ install(char *dir)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
// For package runtime, copy some files into the work space.
|
// For package runtime, copy some files into the work space.
|
||||||
if(streq(dir, "pkg/runtime")) {
|
if(streq(dir, "runtime")) {
|
||||||
copyfile(bpathf(&b, "%s/arch_GOARCH.h", workdir),
|
copyfile(bpathf(&b, "%s/arch_GOARCH.h", workdir),
|
||||||
bpathf(&b1, "%s/arch_%s.h", bstr(&path), goarch), 0);
|
bpathf(&b1, "%s/arch_%s.h", bstr(&path), goarch), 0);
|
||||||
copyfile(bpathf(&b, "%s/defs_GOOS_GOARCH.h", workdir),
|
copyfile(bpathf(&b, "%s/defs_GOOS_GOARCH.h", workdir),
|
||||||
|
@ -911,7 +911,7 @@ install(char *dir)
|
||||||
errprintf("generate %s\n", p);
|
errprintf("generate %s\n", p);
|
||||||
gentab[j].gen(bstr(&path), p);
|
gentab[j].gen(bstr(&path), p);
|
||||||
// Do not add generated file to clean list.
|
// Do not add generated file to clean list.
|
||||||
// In pkg/runtime, we want to be able to
|
// In runtime, we want to be able to
|
||||||
// build the package with the go tool,
|
// build the package with the go tool,
|
||||||
// and it assumes these generated files already
|
// and it assumes these generated files already
|
||||||
// exist (it does not know how to build them).
|
// exist (it does not know how to build them).
|
||||||
|
@ -929,7 +929,7 @@ install(char *dir)
|
||||||
// One more copy for package runtime.
|
// One more copy for package runtime.
|
||||||
// The last batch was required for the generators.
|
// The last batch was required for the generators.
|
||||||
// This one is generated.
|
// This one is generated.
|
||||||
if(streq(dir, "pkg/runtime")) {
|
if(streq(dir, "runtime")) {
|
||||||
copyfile(bpathf(&b, "%s/zasm_GOOS_GOARCH.h", workdir),
|
copyfile(bpathf(&b, "%s/zasm_GOOS_GOARCH.h", workdir),
|
||||||
bpathf(&b1, "%s/zasm_%s_%s.h", bstr(&path), goos, goarch), 0);
|
bpathf(&b1, "%s/zasm_%s_%s.h", bstr(&path), goos, goarch), 0);
|
||||||
}
|
}
|
||||||
|
@ -1074,7 +1074,7 @@ install(char *dir)
|
||||||
else
|
else
|
||||||
vadd(&compile, "main");
|
vadd(&compile, "main");
|
||||||
|
|
||||||
if(streq(dir, "pkg/runtime"))
|
if(streq(dir, "runtime"))
|
||||||
vadd(&compile, "-+");
|
vadd(&compile, "-+");
|
||||||
|
|
||||||
vcopy(&compile, go.p, go.len);
|
vcopy(&compile, go.p, go.len);
|
||||||
|
@ -1103,11 +1103,11 @@ install(char *dir)
|
||||||
nobuild:
|
nobuild:
|
||||||
// In package runtime, we install runtime.h and cgocall.h too,
|
// In package runtime, we install runtime.h and cgocall.h too,
|
||||||
// for use by cgo compilation.
|
// for use by cgo compilation.
|
||||||
if(streq(dir, "pkg/runtime")) {
|
if(streq(dir, "runtime")) {
|
||||||
copyfile(bpathf(&b, "%s/pkg/%s_%s/cgocall.h", goroot, goos, goarch),
|
copyfile(bpathf(&b, "%s/pkg/%s_%s/cgocall.h", goroot, goos, goarch),
|
||||||
bpathf(&b1, "%s/src/pkg/runtime/cgocall.h", goroot), 0);
|
bpathf(&b1, "%s/src/runtime/cgocall.h", goroot), 0);
|
||||||
copyfile(bpathf(&b, "%s/pkg/%s_%s/runtime.h", goroot, goos, goarch),
|
copyfile(bpathf(&b, "%s/pkg/%s_%s/runtime.h", goroot, goos, goarch),
|
||||||
bpathf(&b1, "%s/src/pkg/runtime/runtime.h", goroot), 0);
|
bpathf(&b1, "%s/src/runtime/runtime.h", goroot), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1304,47 +1304,47 @@ static char *buildorder[] = {
|
||||||
// back when there were build scripts. Will have to
|
// back when there were build scripts. Will have to
|
||||||
// be maintained by hand, but shouldn't change very
|
// be maintained by hand, but shouldn't change very
|
||||||
// often.
|
// often.
|
||||||
"pkg/runtime",
|
"runtime",
|
||||||
"pkg/errors",
|
"errors",
|
||||||
"pkg/sync/atomic",
|
"sync/atomic",
|
||||||
"pkg/sync",
|
"sync",
|
||||||
"pkg/io",
|
"io",
|
||||||
"pkg/unicode",
|
"unicode",
|
||||||
"pkg/unicode/utf8",
|
"unicode/utf8",
|
||||||
"pkg/unicode/utf16",
|
"unicode/utf16",
|
||||||
"pkg/bytes",
|
"bytes",
|
||||||
"pkg/math",
|
"math",
|
||||||
"pkg/strings",
|
"strings",
|
||||||
"pkg/strconv",
|
"strconv",
|
||||||
"pkg/bufio",
|
"bufio",
|
||||||
"pkg/sort",
|
"sort",
|
||||||
"pkg/container/heap",
|
"container/heap",
|
||||||
"pkg/encoding/base64",
|
"encoding/base64",
|
||||||
"pkg/syscall",
|
"syscall",
|
||||||
"pkg/time",
|
"time",
|
||||||
"pkg/os",
|
"os",
|
||||||
"pkg/reflect",
|
"reflect",
|
||||||
"pkg/fmt",
|
"fmt",
|
||||||
"pkg/encoding",
|
"encoding",
|
||||||
"pkg/encoding/json",
|
"encoding/json",
|
||||||
"pkg/flag",
|
"flag",
|
||||||
"pkg/path/filepath",
|
"path/filepath",
|
||||||
"pkg/path",
|
"path",
|
||||||
"pkg/io/ioutil",
|
"io/ioutil",
|
||||||
"pkg/log",
|
"log",
|
||||||
"pkg/regexp/syntax",
|
"regexp/syntax",
|
||||||
"pkg/regexp",
|
"regexp",
|
||||||
"pkg/go/token",
|
"go/token",
|
||||||
"pkg/go/scanner",
|
"go/scanner",
|
||||||
"pkg/go/ast",
|
"go/ast",
|
||||||
"pkg/go/parser",
|
"go/parser",
|
||||||
"pkg/os/exec",
|
"os/exec",
|
||||||
"pkg/os/signal",
|
"os/signal",
|
||||||
"pkg/net/url",
|
"net/url",
|
||||||
"pkg/text/template/parse",
|
"text/template/parse",
|
||||||
"pkg/text/template",
|
"text/template",
|
||||||
"pkg/go/doc",
|
"go/doc",
|
||||||
"pkg/go/build",
|
"go/build",
|
||||||
"cmd/go",
|
"cmd/go",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1352,6 +1352,7 @@ static char *buildorder[] = {
|
||||||
// It is bigger than the buildorder because we clean all the
|
// It is bigger than the buildorder because we clean all the
|
||||||
// compilers but build only the $GOARCH ones.
|
// compilers but build only the $GOARCH ones.
|
||||||
static char *cleantab[] = {
|
static char *cleantab[] = {
|
||||||
|
// Commands and C libraries.
|
||||||
"cmd/5a",
|
"cmd/5a",
|
||||||
"cmd/5c",
|
"cmd/5c",
|
||||||
"cmd/5g",
|
"cmd/5g",
|
||||||
|
@ -1370,46 +1371,48 @@ static char *cleantab[] = {
|
||||||
"lib9",
|
"lib9",
|
||||||
"libbio",
|
"libbio",
|
||||||
"liblink",
|
"liblink",
|
||||||
"pkg/bufio",
|
|
||||||
"pkg/bytes",
|
// Go packages.
|
||||||
"pkg/container/heap",
|
"bufio",
|
||||||
"pkg/encoding",
|
"bytes",
|
||||||
"pkg/encoding/base64",
|
"container/heap",
|
||||||
"pkg/encoding/json",
|
"encoding",
|
||||||
"pkg/errors",
|
"encoding/base64",
|
||||||
"pkg/flag",
|
"encoding/json",
|
||||||
"pkg/fmt",
|
"errors",
|
||||||
"pkg/go/ast",
|
"flag",
|
||||||
"pkg/go/build",
|
"fmt",
|
||||||
"pkg/go/doc",
|
"go/ast",
|
||||||
"pkg/go/parser",
|
"go/build",
|
||||||
"pkg/go/scanner",
|
"go/doc",
|
||||||
"pkg/go/token",
|
"go/parser",
|
||||||
"pkg/io",
|
"go/scanner",
|
||||||
"pkg/io/ioutil",
|
"go/token",
|
||||||
"pkg/log",
|
"io",
|
||||||
"pkg/math",
|
"io/ioutil",
|
||||||
"pkg/net/url",
|
"log",
|
||||||
"pkg/os",
|
"math",
|
||||||
"pkg/os/exec",
|
"net/url",
|
||||||
"pkg/path",
|
"os",
|
||||||
"pkg/path/filepath",
|
"os/exec",
|
||||||
"pkg/reflect",
|
"path",
|
||||||
"pkg/regexp",
|
"path/filepath",
|
||||||
"pkg/regexp/syntax",
|
"reflect",
|
||||||
"pkg/runtime",
|
"regexp",
|
||||||
"pkg/sort",
|
"regexp/syntax",
|
||||||
"pkg/strconv",
|
"runtime",
|
||||||
"pkg/strings",
|
"sort",
|
||||||
"pkg/sync",
|
"strconv",
|
||||||
"pkg/sync/atomic",
|
"strings",
|
||||||
"pkg/syscall",
|
"sync",
|
||||||
"pkg/text/template",
|
"sync/atomic",
|
||||||
"pkg/text/template/parse",
|
"syscall",
|
||||||
"pkg/time",
|
"text/template",
|
||||||
"pkg/unicode",
|
"text/template/parse",
|
||||||
"pkg/unicode/utf16",
|
"time",
|
||||||
"pkg/unicode/utf8",
|
"unicode",
|
||||||
|
"unicode/utf16",
|
||||||
|
"unicode/utf8",
|
||||||
};
|
};
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -1438,9 +1441,9 @@ clean(void)
|
||||||
xremove(bpathf(&b, "%s/%s", bstr(&path), cleantab[i]+4));
|
xremove(bpathf(&b, "%s/%s", bstr(&path), cleantab[i]+4));
|
||||||
}
|
}
|
||||||
|
|
||||||
// remove src/pkg/runtime/z* unconditionally
|
// remove src/runtime/z* unconditionally
|
||||||
vreset(&dir);
|
vreset(&dir);
|
||||||
bpathf(&path, "%s/src/pkg/runtime", goroot);
|
bpathf(&path, "%s/src/runtime", goroot);
|
||||||
xreaddir(&dir, bstr(&path));
|
xreaddir(&dir, bstr(&path));
|
||||||
for(j=0; j<dir.len; j++) {
|
for(j=0; j<dir.len; j++) {
|
||||||
if(hasprefix(dir.p[j], "z"))
|
if(hasprefix(dir.p[j], "z"))
|
||||||
|
@ -1577,6 +1580,15 @@ cmdbootstrap(int argc, char **argv)
|
||||||
if(argc > 0)
|
if(argc > 0)
|
||||||
usage();
|
usage();
|
||||||
|
|
||||||
|
if(isdir(bpathf(&b, "%s/src/pkg", goroot))) {
|
||||||
|
fatal("\n\n"
|
||||||
|
"The Go package sources have moved to $GOROOT/src.\n"
|
||||||
|
"*** %s still exists. ***\n"
|
||||||
|
"It probably contains stale files that may confuse the build.\n"
|
||||||
|
"Please (check what's there and) remove it and try again.\n"
|
||||||
|
"See http://golang.org/s/go14nopkg\n", bpathf(&b, "%s/src/pkg", goroot));
|
||||||
|
}
|
||||||
|
|
||||||
if(rebuildall)
|
if(rebuildall)
|
||||||
clean();
|
clean();
|
||||||
goversion = findgoversion();
|
goversion = findgoversion();
|
||||||
|
@ -1607,9 +1619,9 @@ cmdbootstrap(int argc, char **argv)
|
||||||
xsetenv("GOARCH", goarch);
|
xsetenv("GOARCH", goarch);
|
||||||
xsetenv("GOOS", goos);
|
xsetenv("GOOS", goos);
|
||||||
|
|
||||||
// Build pkg/runtime for actual goos/goarch too.
|
// Build runtime for actual goos/goarch too.
|
||||||
if(!streq(goos, gohostos) || !streq(goarch, gohostarch))
|
if(!streq(goos, gohostos) || !streq(goarch, gohostarch))
|
||||||
install("pkg/runtime");
|
install("runtime");
|
||||||
|
|
||||||
bfree(&b);
|
bfree(&b);
|
||||||
}
|
}
|
||||||
|
|
2
src/cmd/dist/buildruntime.c
vendored
2
src/cmd/dist/buildruntime.c
vendored
|
@ -5,7 +5,7 @@
|
||||||
#include "a.h"
|
#include "a.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Helpers for building pkg/runtime.
|
* Helpers for building runtime.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// mkzversion writes zversion.go:
|
// mkzversion writes zversion.go:
|
||||||
|
|
2
src/cmd/dist/windows.c
vendored
2
src/cmd/dist/windows.c
vendored
|
@ -929,7 +929,7 @@ xsamefile(char *f1, char *f2)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
torune(&ru, f1);
|
torune(&ru, f1);
|
||||||
// refer to ../../pkg/os/stat_windows.go:/sameFile
|
// refer to ../../os/stat_windows.go:/sameFile
|
||||||
fd1 = CreateFileW(ru, 0, 0, NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0);
|
fd1 = CreateFileW(ru, 0, 0, NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0);
|
||||||
xfree(ru);
|
xfree(ru);
|
||||||
if(fd1 == INVALID_HANDLE_VALUE)
|
if(fd1 == INVALID_HANDLE_VALUE)
|
||||||
|
|
|
@ -101,7 +101,7 @@ func walkBeforeAfter(x interface{}, before, after func(interface{})) {
|
||||||
case *[]ast.Stmt:
|
case *[]ast.Stmt:
|
||||||
walkBeforeAfter(*n, before, after)
|
walkBeforeAfter(*n, before, after)
|
||||||
|
|
||||||
// These are ordered and grouped to match ../../pkg/go/ast/ast.go
|
// These are ordered and grouped to match ../../go/ast/ast.go
|
||||||
case *ast.Field:
|
case *ast.Field:
|
||||||
walkBeforeAfter(&n.Names, before, after)
|
walkBeforeAfter(&n.Names, before, after)
|
||||||
walkBeforeAfter(&n.Type, before, after)
|
walkBeforeAfter(&n.Type, before, after)
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
// 64-bit MD5 (does full MD5 but returns 64 bits only).
|
// 64-bit MD5 (does full MD5 but returns 64 bits only).
|
||||||
// Translation of ../../pkg/crypto/md5/md5*.go.
|
// Translation of ../../crypto/md5/md5*.go.
|
||||||
|
|
||||||
#include <u.h>
|
#include <u.h>
|
||||||
#include <libc.h>
|
#include <libc.h>
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
#include "md5.h"
|
#include "md5.h"
|
||||||
#include "gg.h"
|
#include "gg.h"
|
||||||
#include "opt.h"
|
#include "opt.h"
|
||||||
#include "../../pkg/runtime/funcdata.h"
|
#include "../../runtime/funcdata.h"
|
||||||
|
|
||||||
static void allocauto(Prog* p);
|
static void allocauto(Prog* p);
|
||||||
|
|
||||||
|
@ -233,7 +233,7 @@ compile(Node *fn)
|
||||||
ptxt->TEXTFLAG |= NOSPLIT;
|
ptxt->TEXTFLAG |= NOSPLIT;
|
||||||
|
|
||||||
// Clumsy but important.
|
// Clumsy but important.
|
||||||
// See test/recover.go for test cases and src/pkg/reflect/value.go
|
// See test/recover.go for test cases and src/reflect/value.go
|
||||||
// for the actual functions being considered.
|
// for the actual functions being considered.
|
||||||
if(myimportpath != nil && strcmp(myimportpath, "reflect") == 0) {
|
if(myimportpath != nil && strcmp(myimportpath, "reflect") == 0) {
|
||||||
if(strcmp(curfn->nname->sym->name, "callReflect") == 0 || strcmp(curfn->nname->sym->name, "callMethod") == 0)
|
if(strcmp(curfn->nname->sym->name, "callReflect") == 0 || strcmp(curfn->nname->sym->name, "callMethod") == 0)
|
||||||
|
|
|
@ -18,8 +18,8 @@
|
||||||
#include "gg.h"
|
#include "gg.h"
|
||||||
#include "opt.h"
|
#include "opt.h"
|
||||||
#include "../ld/textflag.h"
|
#include "../ld/textflag.h"
|
||||||
#include "../../pkg/runtime/funcdata.h"
|
#include "../../runtime/funcdata.h"
|
||||||
#include "../../pkg/runtime/mgc0.h"
|
#include "../../runtime/mgc0.h"
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
UNVISITED = 0,
|
UNVISITED = 0,
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
#include <libc.h>
|
#include <libc.h>
|
||||||
#include "go.h"
|
#include "go.h"
|
||||||
#include "../ld/textflag.h"
|
#include "../ld/textflag.h"
|
||||||
#include "../../pkg/runtime/mgc0.h"
|
#include "../../runtime/mgc0.h"
|
||||||
#include "../../pkg/runtime/typekind.h"
|
#include "../../runtime/typekind.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* runtime interface and reflection data structures
|
* runtime interface and reflection data structures
|
||||||
|
@ -109,7 +109,7 @@ lsort(Sig *l, int(*f)(Sig*, Sig*))
|
||||||
// the given map type. This type is not visible to users -
|
// the given map type. This type is not visible to users -
|
||||||
// we include only enough information to generate a correct GC
|
// we include only enough information to generate a correct GC
|
||||||
// program for it.
|
// program for it.
|
||||||
// Make sure this stays in sync with ../../pkg/runtime/hashmap.c!
|
// Make sure this stays in sync with ../../runtime/hashmap.c!
|
||||||
enum {
|
enum {
|
||||||
BUCKETSIZE = 8,
|
BUCKETSIZE = 8,
|
||||||
MAXKEYSIZE = 128,
|
MAXKEYSIZE = 128,
|
||||||
|
@ -192,7 +192,7 @@ mapbucket(Type *t)
|
||||||
// the given map type. This type is not visible to users -
|
// the given map type. This type is not visible to users -
|
||||||
// we include only enough information to generate a correct GC
|
// we include only enough information to generate a correct GC
|
||||||
// program for it.
|
// program for it.
|
||||||
// Make sure this stays in sync with ../../pkg/runtime/hashmap.go!
|
// Make sure this stays in sync with ../../runtime/hashmap.go!
|
||||||
static Type*
|
static Type*
|
||||||
hmap(Type *t)
|
hmap(Type *t)
|
||||||
{
|
{
|
||||||
|
@ -261,7 +261,7 @@ hiter(Type *t)
|
||||||
// bptr *Bucket
|
// bptr *Bucket
|
||||||
// other [4]uintptr
|
// other [4]uintptr
|
||||||
// }
|
// }
|
||||||
// must match ../../pkg/runtime/hashmap.c:hash_iter.
|
// must match ../../runtime/hashmap.c:hash_iter.
|
||||||
field[0] = typ(TFIELD);
|
field[0] = typ(TFIELD);
|
||||||
field[0]->type = ptrto(t->down);
|
field[0]->type = ptrto(t->down);
|
||||||
field[0]->sym = mal(sizeof(Sym));
|
field[0]->sym = mal(sizeof(Sym));
|
||||||
|
@ -550,7 +550,7 @@ dgopkgpath(Sym *s, int ot, Pkg *pkg)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* uncommonType
|
* uncommonType
|
||||||
* ../../pkg/runtime/type.go:/uncommonType
|
* ../../runtime/type.go:/uncommonType
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
dextratype(Sym *sym, int off, Type *t, int ptroff)
|
dextratype(Sym *sym, int off, Type *t, int ptroff)
|
||||||
|
@ -594,7 +594,7 @@ dextratype(Sym *sym, int off, Type *t, int ptroff)
|
||||||
// methods
|
// methods
|
||||||
for(a=m; a; a=a->link) {
|
for(a=m; a; a=a->link) {
|
||||||
// method
|
// method
|
||||||
// ../../pkg/runtime/type.go:/method
|
// ../../runtime/type.go:/method
|
||||||
ot = dgostringptr(s, ot, a->name);
|
ot = dgostringptr(s, ot, a->name);
|
||||||
ot = dgopkgpath(s, ot, a->pkg);
|
ot = dgopkgpath(s, ot, a->pkg);
|
||||||
ot = dsymptr(s, ot, dtypesym(a->mtype), 0);
|
ot = dsymptr(s, ot, dtypesym(a->mtype), 0);
|
||||||
|
@ -710,7 +710,7 @@ haspointers(Type *t)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* commonType
|
* commonType
|
||||||
* ../../pkg/runtime/type.go:/commonType
|
* ../../runtime/type.go:/commonType
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
dcommontype(Sym *s, int ot, Type *t)
|
dcommontype(Sym *s, int ot, Type *t)
|
||||||
|
@ -992,7 +992,7 @@ ok:
|
||||||
|
|
||||||
case TARRAY:
|
case TARRAY:
|
||||||
if(t->bound >= 0) {
|
if(t->bound >= 0) {
|
||||||
// ../../pkg/runtime/type.go:/ArrayType
|
// ../../runtime/type.go:/ArrayType
|
||||||
s1 = dtypesym(t->type);
|
s1 = dtypesym(t->type);
|
||||||
t2 = typ(TARRAY);
|
t2 = typ(TARRAY);
|
||||||
t2->type = t->type;
|
t2->type = t->type;
|
||||||
|
@ -1004,7 +1004,7 @@ ok:
|
||||||
ot = dsymptr(s, ot, s2, 0);
|
ot = dsymptr(s, ot, s2, 0);
|
||||||
ot = duintptr(s, ot, t->bound);
|
ot = duintptr(s, ot, t->bound);
|
||||||
} else {
|
} else {
|
||||||
// ../../pkg/runtime/type.go:/SliceType
|
// ../../runtime/type.go:/SliceType
|
||||||
s1 = dtypesym(t->type);
|
s1 = dtypesym(t->type);
|
||||||
ot = dcommontype(s, ot, t);
|
ot = dcommontype(s, ot, t);
|
||||||
xt = ot - 3*widthptr;
|
xt = ot - 3*widthptr;
|
||||||
|
@ -1013,7 +1013,7 @@ ok:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TCHAN:
|
case TCHAN:
|
||||||
// ../../pkg/runtime/type.go:/ChanType
|
// ../../runtime/type.go:/ChanType
|
||||||
s1 = dtypesym(t->type);
|
s1 = dtypesym(t->type);
|
||||||
ot = dcommontype(s, ot, t);
|
ot = dcommontype(s, ot, t);
|
||||||
xt = ot - 3*widthptr;
|
xt = ot - 3*widthptr;
|
||||||
|
@ -1063,14 +1063,14 @@ ok:
|
||||||
n++;
|
n++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ../../pkg/runtime/type.go:/InterfaceType
|
// ../../runtime/type.go:/InterfaceType
|
||||||
ot = dcommontype(s, ot, t);
|
ot = dcommontype(s, ot, t);
|
||||||
xt = ot - 3*widthptr;
|
xt = ot - 3*widthptr;
|
||||||
ot = dsymptr(s, ot, s, ot+widthptr+2*widthint);
|
ot = dsymptr(s, ot, s, ot+widthptr+2*widthint);
|
||||||
ot = duintxx(s, ot, n, widthint);
|
ot = duintxx(s, ot, n, widthint);
|
||||||
ot = duintxx(s, ot, n, widthint);
|
ot = duintxx(s, ot, n, widthint);
|
||||||
for(a=m; a; a=a->link) {
|
for(a=m; a; a=a->link) {
|
||||||
// ../../pkg/runtime/type.go:/imethod
|
// ../../runtime/type.go:/imethod
|
||||||
ot = dgostringptr(s, ot, a->name);
|
ot = dgostringptr(s, ot, a->name);
|
||||||
ot = dgopkgpath(s, ot, a->pkg);
|
ot = dgopkgpath(s, ot, a->pkg);
|
||||||
ot = dsymptr(s, ot, dtypesym(a->type), 0);
|
ot = dsymptr(s, ot, dtypesym(a->type), 0);
|
||||||
|
@ -1078,7 +1078,7 @@ ok:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TMAP:
|
case TMAP:
|
||||||
// ../../pkg/runtime/type.go:/MapType
|
// ../../runtime/type.go:/MapType
|
||||||
s1 = dtypesym(t->down);
|
s1 = dtypesym(t->down);
|
||||||
s2 = dtypesym(t->type);
|
s2 = dtypesym(t->type);
|
||||||
s3 = dtypesym(mapbucket(t));
|
s3 = dtypesym(mapbucket(t));
|
||||||
|
@ -1109,11 +1109,11 @@ ok:
|
||||||
case TPTR32:
|
case TPTR32:
|
||||||
case TPTR64:
|
case TPTR64:
|
||||||
if(t->type->etype == TANY) {
|
if(t->type->etype == TANY) {
|
||||||
// ../../pkg/runtime/type.go:/UnsafePointerType
|
// ../../runtime/type.go:/UnsafePointerType
|
||||||
ot = dcommontype(s, ot, t);
|
ot = dcommontype(s, ot, t);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// ../../pkg/runtime/type.go:/PtrType
|
// ../../runtime/type.go:/PtrType
|
||||||
s1 = dtypesym(t->type);
|
s1 = dtypesym(t->type);
|
||||||
ot = dcommontype(s, ot, t);
|
ot = dcommontype(s, ot, t);
|
||||||
xt = ot - 3*widthptr;
|
xt = ot - 3*widthptr;
|
||||||
|
@ -1121,7 +1121,7 @@ ok:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TSTRUCT:
|
case TSTRUCT:
|
||||||
// ../../pkg/runtime/type.go:/StructType
|
// ../../runtime/type.go:/StructType
|
||||||
// for security, only the exported fields.
|
// for security, only the exported fields.
|
||||||
n = 0;
|
n = 0;
|
||||||
for(t1=t->type; t1!=T; t1=t1->down) {
|
for(t1=t->type; t1!=T; t1=t1->down) {
|
||||||
|
@ -1134,7 +1134,7 @@ ok:
|
||||||
ot = duintxx(s, ot, n, widthint);
|
ot = duintxx(s, ot, n, widthint);
|
||||||
ot = duintxx(s, ot, n, widthint);
|
ot = duintxx(s, ot, n, widthint);
|
||||||
for(t1=t->type; t1!=T; t1=t1->down) {
|
for(t1=t->type; t1!=T; t1=t1->down) {
|
||||||
// ../../pkg/runtime/type.go:/structField
|
// ../../runtime/type.go:/structField
|
||||||
if(t1->sym && !t1->embedded) {
|
if(t1->sym && !t1->embedded) {
|
||||||
ot = dgostringptr(s, ot, t1->sym->name);
|
ot = dgostringptr(s, ot, t1->sym->name);
|
||||||
if(exportname(t1->sym->name))
|
if(exportname(t1->sym->name))
|
||||||
|
@ -1260,7 +1260,7 @@ dalgsym(Type *t)
|
||||||
dsymptr(eqfunc, 0, eq, 0);
|
dsymptr(eqfunc, 0, eq, 0);
|
||||||
ggloblsym(eqfunc, widthptr, DUPOK|RODATA);
|
ggloblsym(eqfunc, widthptr, DUPOK|RODATA);
|
||||||
|
|
||||||
// ../../pkg/runtime/alg.go:/typeAlg
|
// ../../runtime/alg.go:/typeAlg
|
||||||
ot = 0;
|
ot = 0;
|
||||||
ot = dsymptr(s, ot, hashfunc, 0);
|
ot = dsymptr(s, ot, hashfunc, 0);
|
||||||
ot = dsymptr(s, ot, eqfunc, 0);
|
ot = dsymptr(s, ot, eqfunc, 0);
|
||||||
|
|
|
@ -325,7 +325,7 @@ out:
|
||||||
lineno = lno;
|
lineno = lno;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Keep in sync with src/pkg/runtime/chan.h.
|
// Keep in sync with src/runtime/chan.h.
|
||||||
static Type*
|
static Type*
|
||||||
selecttype(int32 size)
|
selecttype(int32 size)
|
||||||
{
|
{
|
||||||
|
|
|
@ -3641,7 +3641,7 @@ ngotype(Node *n)
|
||||||
* users if we escape that as little as possible.
|
* users if we escape that as little as possible.
|
||||||
*
|
*
|
||||||
* If you edit this, edit ../ld/lib.c:/^pathtoprefix too.
|
* If you edit this, edit ../ld/lib.c:/^pathtoprefix too.
|
||||||
* If you edit this, edit ../../pkg/debug/goobj/read.go:/importPathToPrefix too.
|
* If you edit this, edit ../../debug/goobj/read.go:/importPathToPrefix too.
|
||||||
*/
|
*/
|
||||||
static char*
|
static char*
|
||||||
pathtoprefix(char *s)
|
pathtoprefix(char *s)
|
||||||
|
|
|
@ -688,7 +688,7 @@ walkexpr(Node **np, NodeList **init)
|
||||||
walkexpr(&r->right, init);
|
walkexpr(&r->right, init);
|
||||||
t = r->left->type;
|
t = r->left->type;
|
||||||
p = nil;
|
p = nil;
|
||||||
if(t->type->width <= 128) { // Check ../../pkg/runtime/hashmap.c:MAXVALUESIZE before changing.
|
if(t->type->width <= 128) { // Check ../../runtime/hashmap.c:MAXVALUESIZE before changing.
|
||||||
switch(simsimtype(t->down)) {
|
switch(simsimtype(t->down)) {
|
||||||
case TINT32:
|
case TINT32:
|
||||||
case TUINT32:
|
case TUINT32:
|
||||||
|
@ -1083,7 +1083,7 @@ walkexpr(Node **np, NodeList **init)
|
||||||
|
|
||||||
t = n->left->type;
|
t = n->left->type;
|
||||||
p = nil;
|
p = nil;
|
||||||
if(t->type->width <= 128) { // Check ../../pkg/runtime/hashmap.c:MAXVALUESIZE before changing.
|
if(t->type->width <= 128) { // Check ../../runtime/hashmap.c:MAXVALUESIZE before changing.
|
||||||
switch(simsimtype(t->down)) {
|
switch(simsimtype(t->down)) {
|
||||||
case TINT32:
|
case TINT32:
|
||||||
case TUINT32:
|
case TUINT32:
|
||||||
|
|
|
@ -433,12 +433,11 @@ const (
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
goroot = filepath.Clean(runtime.GOROOT())
|
goroot = filepath.Clean(runtime.GOROOT())
|
||||||
gobin = os.Getenv("GOBIN")
|
gobin = os.Getenv("GOBIN")
|
||||||
gorootBin = filepath.Join(goroot, "bin")
|
gorootBin = filepath.Join(goroot, "bin")
|
||||||
gorootSrcPkg = filepath.Join(goroot, "src/pkg")
|
gorootPkg = filepath.Join(goroot, "pkg")
|
||||||
gorootPkg = filepath.Join(goroot, "pkg")
|
gorootSrc = filepath.Join(goroot, "src")
|
||||||
gorootSrc = filepath.Join(goroot, "src")
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func (b *builder) init() {
|
func (b *builder) init() {
|
||||||
|
@ -1255,7 +1254,7 @@ func (b *builder) showcmd(dir string, format string, args ...interface{}) {
|
||||||
// the source directory for the package that has failed to build.
|
// the source directory for the package that has failed to build.
|
||||||
// showOutput rewrites mentions of dir with a relative path to dir
|
// showOutput rewrites mentions of dir with a relative path to dir
|
||||||
// when the relative path is shorter. This is usually more pleasant.
|
// when the relative path is shorter. This is usually more pleasant.
|
||||||
// For example, if fmt doesn't compile and we are in src/pkg/html,
|
// For example, if fmt doesn't compile and we are in src/html,
|
||||||
// the output is
|
// the output is
|
||||||
//
|
//
|
||||||
// $ go build
|
// $ go build
|
||||||
|
@ -1267,7 +1266,7 @@ func (b *builder) showcmd(dir string, format string, args ...interface{}) {
|
||||||
//
|
//
|
||||||
// $ go build
|
// $ go build
|
||||||
// # fmt
|
// # fmt
|
||||||
// /usr/gopher/go/src/pkg/fmt/print.go:1090: undefined: asdf
|
// /usr/gopher/go/src/fmt/print.go:1090: undefined: asdf
|
||||||
// $
|
// $
|
||||||
//
|
//
|
||||||
// showOutput also replaces references to the work directory with $WORK.
|
// showOutput also replaces references to the work directory with $WORK.
|
||||||
|
|
|
@ -537,7 +537,7 @@ func matchPackages(pattern string) []string {
|
||||||
})
|
})
|
||||||
|
|
||||||
for _, src := range buildContext.SrcDirs() {
|
for _, src := range buildContext.SrcDirs() {
|
||||||
if pattern == "std" && src != gorootSrcPkg {
|
if pattern == "std" && src != gorootSrc {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
src = filepath.Clean(src) + string(filepath.Separator)
|
src = filepath.Clean(src) + string(filepath.Separator)
|
||||||
|
@ -619,7 +619,7 @@ func matchPackagesInFS(pattern string) []string {
|
||||||
// The initial case is not Cleaned, though, so we do this explicitly.
|
// The initial case is not Cleaned, though, so we do this explicitly.
|
||||||
//
|
//
|
||||||
// This converts a path like "./io/" to "io". Without this step, running
|
// This converts a path like "./io/" to "io". Without this step, running
|
||||||
// "cd $GOROOT/src/pkg; go list ./io/..." would incorrectly skip the io
|
// "cd $GOROOT/src; go list ./io/..." would incorrectly skip the io
|
||||||
// package, because prepending the prefix "./" to the unclean path would
|
// package, because prepending the prefix "./" to the unclean path would
|
||||||
// result in "././io", and match("././io") returns false.
|
// result in "././io", and match("././io") returns false.
|
||||||
path = filepath.Clean(path)
|
path = filepath.Clean(path)
|
||||||
|
|
|
@ -218,7 +218,7 @@ func dirToImportPath(dir string) string {
|
||||||
}
|
}
|
||||||
|
|
||||||
func makeImportValid(r rune) rune {
|
func makeImportValid(r rune) rune {
|
||||||
// Should match Go spec, compilers, and ../../pkg/go/parser/parser.go:/isValidImport.
|
// Should match Go spec, compilers, and ../../go/parser/parser.go:/isValidImport.
|
||||||
const illegalChars = `!"#$%&'()*,:;<=>?[\]^{|}` + "`\uFFFD"
|
const illegalChars = `!"#$%&'()*,:;<=>?[\]^{|}` + "`\uFFFD"
|
||||||
if !unicode.IsGraphic(r) || unicode.IsSpace(r) || strings.ContainsRune(illegalChars, r) {
|
if !unicode.IsGraphic(r) || unicode.IsSpace(r) || strings.ContainsRune(illegalChars, r) {
|
||||||
return '_'
|
return '_'
|
||||||
|
@ -783,24 +783,13 @@ func loadPackage(arg string, stk *importStack) *Package {
|
||||||
arg = sub
|
arg = sub
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if strings.HasPrefix(arg, "cmd/") {
|
if strings.HasPrefix(arg, "cmd/") && !strings.Contains(arg[4:], "/") {
|
||||||
if p := cmdCache[arg]; p != nil {
|
if p := cmdCache[arg]; p != nil {
|
||||||
return p
|
return p
|
||||||
}
|
}
|
||||||
stk.push(arg)
|
stk.push(arg)
|
||||||
defer stk.pop()
|
defer stk.pop()
|
||||||
|
|
||||||
if strings.Contains(arg[4:], "/") {
|
|
||||||
p := &Package{
|
|
||||||
Error: &PackageError{
|
|
||||||
ImportStack: stk.copy(),
|
|
||||||
Err: fmt.Sprintf("invalid import path: cmd/... is reserved for Go commands"),
|
|
||||||
hard: true,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
return p
|
|
||||||
}
|
|
||||||
|
|
||||||
bp, err := buildContext.ImportDir(filepath.Join(gorootSrc, arg), 0)
|
bp, err := buildContext.ImportDir(filepath.Join(gorootSrc, arg), 0)
|
||||||
bp.ImportPath = arg
|
bp.ImportPath = arg
|
||||||
bp.Goroot = true
|
bp.Goroot = true
|
||||||
|
|
|
@ -430,7 +430,7 @@ fi
|
||||||
# Test that without GOPATH set, go get should fail
|
# Test that without GOPATH set, go get should fail
|
||||||
TEST without GOPATH, go get fails
|
TEST without GOPATH, go get fails
|
||||||
d=$(mktemp -d -t testgoXXX)
|
d=$(mktemp -d -t testgoXXX)
|
||||||
mkdir -p $d/src/pkg
|
mkdir -p $d/src
|
||||||
if GOPATH= GOROOT=$d ./testgo get -d code.google.com/p/go.codereview/cmd/hgpatch ; then
|
if GOPATH= GOROOT=$d ./testgo get -d code.google.com/p/go.codereview/cmd/hgpatch ; then
|
||||||
echo 'go get code.google.com/p/go.codereview/cmd/hgpatch should not succeed with $GOPATH unset'
|
echo 'go get code.google.com/p/go.codereview/cmd/hgpatch should not succeed with $GOPATH unset'
|
||||||
ok=false
|
ok=false
|
||||||
|
@ -440,7 +440,7 @@ rm -rf $d
|
||||||
# Test that with GOPATH=$GOROOT, go get should fail
|
# Test that with GOPATH=$GOROOT, go get should fail
|
||||||
TEST with GOPATH=GOROOT, go get fails
|
TEST with GOPATH=GOROOT, go get fails
|
||||||
d=$(mktemp -d -t testgoXXX)
|
d=$(mktemp -d -t testgoXXX)
|
||||||
mkdir -p $d/src/pkg
|
mkdir -p $d/src
|
||||||
if GOPATH=$d GOROOT=$d ./testgo get -d code.google.com/p/go.codereview/cmd/hgpatch ; then
|
if GOPATH=$d GOROOT=$d ./testgo get -d code.google.com/p/go.codereview/cmd/hgpatch ; then
|
||||||
echo 'go get code.google.com/p/go.codereview/cmd/hgpatch should not succeed with GOPATH=$GOROOT'
|
echo 'go get code.google.com/p/go.codereview/cmd/hgpatch should not succeed with GOPATH=$GOROOT'
|
||||||
ok=false
|
ok=false
|
||||||
|
@ -595,7 +595,7 @@ export GOPATH=$(pwd)/testdata/shadow/root1:$(pwd)/testdata/shadow/root2
|
||||||
|
|
||||||
# The math in root1 is not "math" because the standard math is.
|
# The math in root1 is not "math" because the standard math is.
|
||||||
cdir=$(./testgo list -f '({{.ImportPath}}) ({{.ConflictDir}})' ./testdata/shadow/root1/src/math)
|
cdir=$(./testgo list -f '({{.ImportPath}}) ({{.ConflictDir}})' ./testdata/shadow/root1/src/math)
|
||||||
if [ "$cdir" != "(_$(pwd)/testdata/shadow/root1/src/math) ($GOROOT/src/pkg/math)" ]; then
|
if [ "$cdir" != "(_$(pwd)/testdata/shadow/root1/src/math) ($GOROOT/src/math)" ]; then
|
||||||
echo shadowed math is not shadowed: "$cdir"
|
echo shadowed math is not shadowed: "$cdir"
|
||||||
ok=false
|
ok=false
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -67,7 +67,7 @@ To remove the parentheses:
|
||||||
|
|
||||||
To convert the package tree from explicit slice upper bounds to implicit ones:
|
To convert the package tree from explicit slice upper bounds to implicit ones:
|
||||||
|
|
||||||
gofmt -r 'α[β:len(α)] -> α[β:]' -w $GOROOT/src/pkg
|
gofmt -r 'α[β:len(α)] -> α[β:]' -w $GOROOT/src
|
||||||
|
|
||||||
The simplify command
|
The simplify command
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
#include "../ld/elf.h"
|
#include "../ld/elf.h"
|
||||||
#include "../ld/macho.h"
|
#include "../ld/macho.h"
|
||||||
#include "../ld/pe.h"
|
#include "../ld/pe.h"
|
||||||
#include "../../pkg/runtime/mgc0.h"
|
#include "../../runtime/mgc0.h"
|
||||||
|
|
||||||
void dynreloc(void);
|
void dynreloc(void);
|
||||||
|
|
||||||
|
|
|
@ -4,10 +4,10 @@
|
||||||
|
|
||||||
#include "l.h"
|
#include "l.h"
|
||||||
#include "lib.h"
|
#include "lib.h"
|
||||||
#include "../../pkg/runtime/typekind.h"
|
#include "../../runtime/typekind.h"
|
||||||
|
|
||||||
// Decoding the type.* symbols. This has to be in sync with
|
// Decoding the type.* symbols. This has to be in sync with
|
||||||
// ../../pkg/runtime/type.go, or more specificaly, with what
|
// ../../runtime/type.go, or more specificaly, with what
|
||||||
// ../gc/reflect.c stuffs in these.
|
// ../gc/reflect.c stuffs in these.
|
||||||
|
|
||||||
static Reloc*
|
static Reloc*
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
#include "../ld/elf.h"
|
#include "../ld/elf.h"
|
||||||
#include "../ld/macho.h"
|
#include "../ld/macho.h"
|
||||||
#include "../ld/pe.h"
|
#include "../ld/pe.h"
|
||||||
#include "../../pkg/runtime/typekind.h"
|
#include "../../runtime/typekind.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Offsets and sizes of the debug_* sections in the cout file.
|
* Offsets and sizes of the debug_* sections in the cout file.
|
||||||
|
|
|
@ -33,8 +33,8 @@
|
||||||
#include "lib.h"
|
#include "lib.h"
|
||||||
#include "../ld/elf.h"
|
#include "../ld/elf.h"
|
||||||
#include "../ld/dwarf.h"
|
#include "../ld/dwarf.h"
|
||||||
#include "../../pkg/runtime/stack.h"
|
#include "../../runtime/stack.h"
|
||||||
#include "../../pkg/runtime/funcdata.h"
|
#include "../../runtime/funcdata.h"
|
||||||
|
|
||||||
#include <ar.h>
|
#include <ar.h>
|
||||||
#if !(defined(_WIN32) || defined(PLAN9))
|
#if !(defined(_WIN32) || defined(PLAN9))
|
||||||
|
@ -899,7 +899,7 @@ unmal(void *v, uint32 n)
|
||||||
* escaping are %, ., and ", but we escape all control characters too.
|
* escaping are %, ., and ", but we escape all control characters too.
|
||||||
*
|
*
|
||||||
* If you edit this, edit ../gc/subr.c:/^pathtoprefix too.
|
* If you edit this, edit ../gc/subr.c:/^pathtoprefix too.
|
||||||
* If you edit this, edit ../../pkg/debug/goobj/read.go:/importPathToPrefix too.
|
* If you edit this, edit ../../debug/goobj/read.go:/importPathToPrefix too.
|
||||||
*/
|
*/
|
||||||
static char*
|
static char*
|
||||||
pathtoprefix(char *s)
|
pathtoprefix(char *s)
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
#include "l.h"
|
#include "l.h"
|
||||||
#include "lib.h"
|
#include "lib.h"
|
||||||
#include "../../pkg/runtime/funcdata.h"
|
#include "../../runtime/funcdata.h"
|
||||||
|
|
||||||
static void
|
static void
|
||||||
addvarint(Pcdata *d, uint32 val)
|
addvarint(Pcdata *d, uint32 val)
|
||||||
|
|
|
@ -83,7 +83,7 @@ func TestNM(t *testing.T) {
|
||||||
"plan9obj/testdata/386-plan9-exec",
|
"plan9obj/testdata/386-plan9-exec",
|
||||||
}
|
}
|
||||||
for _, f := range testfiles {
|
for _, f := range testfiles {
|
||||||
exepath := filepath.Join(runtime.GOROOT(), "src", "pkg", "debug", f)
|
exepath := filepath.Join(runtime.GOROOT(), "src", "debug", f)
|
||||||
cmd := exec.Command(testnmpath, exepath)
|
cmd := exec.Command(testnmpath, exepath)
|
||||||
out, err := cmd.CombinedOutput()
|
out, err := cmd.CombinedOutput()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
#include <bio.h>
|
#include <bio.h>
|
||||||
#include <link.h>
|
#include <link.h>
|
||||||
#include "../cmd/5l/5.out.h"
|
#include "../cmd/5l/5.out.h"
|
||||||
#include "../pkg/runtime/stack.h"
|
#include "../runtime/stack.h"
|
||||||
|
|
||||||
typedef struct Optab Optab;
|
typedef struct Optab Optab;
|
||||||
typedef struct Oprang Oprang;
|
typedef struct Oprang Oprang;
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
#include <bio.h>
|
#include <bio.h>
|
||||||
#include <link.h>
|
#include <link.h>
|
||||||
#include "../cmd/6l/6.out.h"
|
#include "../cmd/6l/6.out.h"
|
||||||
#include "../pkg/runtime/stack.h"
|
#include "../runtime/stack.h"
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
#include <bio.h>
|
#include <bio.h>
|
||||||
#include <link.h>
|
#include <link.h>
|
||||||
#include "../cmd/8l/8.out.h"
|
#include "../cmd/8l/8.out.h"
|
||||||
#include "../pkg/runtime/stack.h"
|
#include "../runtime/stack.h"
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
#include <bio.h>
|
#include <bio.h>
|
||||||
#include <link.h>
|
#include <link.h>
|
||||||
#include "../cmd/5l/5.out.h"
|
#include "../cmd/5l/5.out.h"
|
||||||
#include "../pkg/runtime/stack.h"
|
#include "../runtime/stack.h"
|
||||||
|
|
||||||
static Prog zprg = {
|
static Prog zprg = {
|
||||||
.as = AGOK,
|
.as = AGOK,
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
#include <bio.h>
|
#include <bio.h>
|
||||||
#include <link.h>
|
#include <link.h>
|
||||||
#include "../cmd/6l/6.out.h"
|
#include "../cmd/6l/6.out.h"
|
||||||
#include "../pkg/runtime/stack.h"
|
#include "../runtime/stack.h"
|
||||||
|
|
||||||
static Prog zprg = {
|
static Prog zprg = {
|
||||||
.back = 2,
|
.back = 2,
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
#include <bio.h>
|
#include <bio.h>
|
||||||
#include <link.h>
|
#include <link.h>
|
||||||
#include "../cmd/8l/8.out.h"
|
#include "../cmd/8l/8.out.h"
|
||||||
#include "../pkg/runtime/stack.h"
|
#include "../runtime/stack.h"
|
||||||
|
|
||||||
static Prog zprg = {
|
static Prog zprg = {
|
||||||
.back = 2,
|
.back = 2,
|
||||||
|
|
|
@ -163,7 +163,7 @@ linknew(LinkArch *arch)
|
||||||
case Hdarwin:
|
case Hdarwin:
|
||||||
/*
|
/*
|
||||||
* OS X system constants - offset from 0(GS) to our TLS.
|
* OS X system constants - offset from 0(GS) to our TLS.
|
||||||
* Explained in ../../pkg/runtime/cgo/gcc_darwin_*.c.
|
* Explained in ../../runtime/cgo/gcc_darwin_*.c.
|
||||||
*/
|
*/
|
||||||
switch(ctxt->arch->thechar) {
|
switch(ctxt->arch->thechar) {
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -106,7 +106,7 @@ if [ "$(uname -s)" == "GNU/kFreeBSD" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Clean old generated file that will cause problems in the build.
|
# Clean old generated file that will cause problems in the build.
|
||||||
rm -f ./pkg/runtime/runtime_defs.go
|
rm -f ./runtime/runtime_defs.go
|
||||||
|
|
||||||
# Finally! Run the build.
|
# Finally! Run the build.
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,7 @@ if(! test -f run.rc){
|
||||||
../include/plan9/mklibc.rc > ../include/plan9/libc_plan9.h
|
../include/plan9/mklibc.rc > ../include/plan9/libc_plan9.h
|
||||||
|
|
||||||
# Clean old generated file that will cause problems in the build.
|
# Clean old generated file that will cause problems in the build.
|
||||||
rm -f ./pkg/runtime/runtime_defs.go
|
rm -f ./runtime/runtime_defs.go
|
||||||
|
|
||||||
# Determine the host compiler toolchain.
|
# Determine the host compiler toolchain.
|
||||||
eval `{grep '^(CC|LD|O)=' /$objtype/mkfile}
|
eval `{grep '^(CC|LD|O)=' /$objtype/mkfile}
|
||||||
|
|
|
@ -207,9 +207,7 @@ func (ctxt *Context) gopath() []string {
|
||||||
if p == "" || p == ctxt.GOROOT {
|
if p == "" || p == ctxt.GOROOT {
|
||||||
// Empty paths are uninteresting.
|
// Empty paths are uninteresting.
|
||||||
// If the path is the GOROOT, ignore it.
|
// If the path is the GOROOT, ignore it.
|
||||||
// People sometimes set GOPATH=$GOROOT, which is useless
|
// People sometimes set GOPATH=$GOROOT.
|
||||||
// but would cause us to find packages with import paths
|
|
||||||
// like "pkg/math".
|
|
||||||
// Do not get confused by this common mistake.
|
// Do not get confused by this common mistake.
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
@ -239,7 +237,7 @@ func (ctxt *Context) gopath() []string {
|
||||||
func (ctxt *Context) SrcDirs() []string {
|
func (ctxt *Context) SrcDirs() []string {
|
||||||
var all []string
|
var all []string
|
||||||
if ctxt.GOROOT != "" {
|
if ctxt.GOROOT != "" {
|
||||||
dir := ctxt.joinPath(ctxt.GOROOT, "src", "pkg")
|
dir := ctxt.joinPath(ctxt.GOROOT, "src")
|
||||||
if ctxt.isDir(dir) {
|
if ctxt.isDir(dir) {
|
||||||
all = append(all, dir)
|
all = append(all, dir)
|
||||||
}
|
}
|
||||||
|
@ -479,7 +477,7 @@ func (ctxt *Context) Import(path string, srcDir string, mode ImportMode) (*Packa
|
||||||
}
|
}
|
||||||
// Determine canonical import path, if any.
|
// Determine canonical import path, if any.
|
||||||
if ctxt.GOROOT != "" {
|
if ctxt.GOROOT != "" {
|
||||||
root := ctxt.joinPath(ctxt.GOROOT, "src", "pkg")
|
root := ctxt.joinPath(ctxt.GOROOT, "src")
|
||||||
if sub, ok := ctxt.hasSubdir(root, p.Dir); ok {
|
if sub, ok := ctxt.hasSubdir(root, p.Dir); ok {
|
||||||
p.Goroot = true
|
p.Goroot = true
|
||||||
p.ImportPath = sub
|
p.ImportPath = sub
|
||||||
|
@ -495,7 +493,7 @@ func (ctxt *Context) Import(path string, srcDir string, mode ImportMode) (*Packa
|
||||||
// but check that using it wouldn't find something
|
// but check that using it wouldn't find something
|
||||||
// else first.
|
// else first.
|
||||||
if ctxt.GOROOT != "" {
|
if ctxt.GOROOT != "" {
|
||||||
if dir := ctxt.joinPath(ctxt.GOROOT, "src", "pkg", sub); ctxt.isDir(dir) {
|
if dir := ctxt.joinPath(ctxt.GOROOT, "src", sub); ctxt.isDir(dir) {
|
||||||
p.ConflictDir = dir
|
p.ConflictDir = dir
|
||||||
goto Found
|
goto Found
|
||||||
}
|
}
|
||||||
|
@ -529,12 +527,7 @@ func (ctxt *Context) Import(path string, srcDir string, mode ImportMode) (*Packa
|
||||||
|
|
||||||
// Determine directory from import path.
|
// Determine directory from import path.
|
||||||
if ctxt.GOROOT != "" {
|
if ctxt.GOROOT != "" {
|
||||||
var dir string
|
dir := ctxt.joinPath(ctxt.GOROOT, "src", path)
|
||||||
if strings.HasPrefix(path, "cmd/") {
|
|
||||||
dir = ctxt.joinPath(ctxt.GOROOT, "src", path)
|
|
||||||
} else {
|
|
||||||
dir = ctxt.joinPath(ctxt.GOROOT, "src", "pkg", path)
|
|
||||||
}
|
|
||||||
isDir := ctxt.isDir(dir)
|
isDir := ctxt.isDir(dir)
|
||||||
binaryOnly = !isDir && mode&AllowBinary != 0 && pkga != "" && ctxt.isFile(ctxt.joinPath(ctxt.GOROOT, pkga))
|
binaryOnly = !isDir && mode&AllowBinary != 0 && pkga != "" && ctxt.isFile(ctxt.joinPath(ctxt.GOROOT, pkga))
|
||||||
if isDir || binaryOnly {
|
if isDir || binaryOnly {
|
||||||
|
@ -580,11 +573,7 @@ func (ctxt *Context) Import(path string, srcDir string, mode ImportMode) (*Packa
|
||||||
|
|
||||||
Found:
|
Found:
|
||||||
if p.Root != "" {
|
if p.Root != "" {
|
||||||
if p.Goroot {
|
p.SrcRoot = ctxt.joinPath(p.Root, "src")
|
||||||
p.SrcRoot = ctxt.joinPath(p.Root, "src", "pkg")
|
|
||||||
} else {
|
|
||||||
p.SrcRoot = ctxt.joinPath(p.Root, "src")
|
|
||||||
}
|
|
||||||
p.PkgRoot = ctxt.joinPath(p.Root, "pkg")
|
p.PkgRoot = ctxt.joinPath(p.Root, "pkg")
|
||||||
p.BinDir = ctxt.joinPath(p.Root, "bin")
|
p.BinDir = ctxt.joinPath(p.Root, "bin")
|
||||||
if pkga != "" {
|
if pkga != "" {
|
||||||
|
|
|
@ -80,7 +80,7 @@ package math
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
// Notes: Rounding mode detection omitted. The constants "mask", "shift",
|
// Notes: Rounding mode detection omitted. The constants "mask", "shift",
|
||||||
// and "bias" are found in src/pkg/math/bits.go
|
// and "bias" are found in src/math/bits.go
|
||||||
|
|
||||||
// Sqrt returns the square root of x.
|
// Sqrt returns the square root of x.
|
||||||
//
|
//
|
||||||
|
|
|
@ -203,7 +203,7 @@ func (h *waitGroupHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||||
// localhostCert is a PEM-encoded TLS cert with SAN IPs
|
// localhostCert is a PEM-encoded TLS cert with SAN IPs
|
||||||
// "127.0.0.1" and "[::1]", expiring at the last second of 2049 (the end
|
// "127.0.0.1" and "[::1]", expiring at the last second of 2049 (the end
|
||||||
// of ASN.1 time).
|
// of ASN.1 time).
|
||||||
// generated from src/pkg/crypto/tls:
|
// generated from src/crypto/tls:
|
||||||
// go run generate_cert.go --rsa-bits 512 --host 127.0.0.1,::1,example.com --ca --start-date "Jan 1 00:00:00 1970" --duration=1000000h
|
// go run generate_cert.go --rsa-bits 512 --host 127.0.0.1,::1,example.com --ca --start-date "Jan 1 00:00:00 1970" --duration=1000000h
|
||||||
var localhostCert = []byte(`-----BEGIN CERTIFICATE-----
|
var localhostCert = []byte(`-----BEGIN CERTIFICATE-----
|
||||||
MIIBdzCCASOgAwIBAgIBADALBgkqhkiG9w0BAQUwEjEQMA4GA1UEChMHQWNtZSBD
|
MIIBdzCCASOgAwIBAgIBADALBgkqhkiG9w0BAQUwEjEQMA4GA1UEChMHQWNtZSBD
|
||||||
|
|
|
@ -669,7 +669,7 @@ func sendMail(hostPort string) error {
|
||||||
// localhostCert is a PEM-encoded TLS cert with SAN IPs
|
// localhostCert is a PEM-encoded TLS cert with SAN IPs
|
||||||
// "127.0.0.1" and "[::1]", expiring at the last second of 2049 (the end
|
// "127.0.0.1" and "[::1]", expiring at the last second of 2049 (the end
|
||||||
// of ASN.1 time).
|
// of ASN.1 time).
|
||||||
// generated from src/pkg/crypto/tls:
|
// generated from src/crypto/tls:
|
||||||
// go run generate_cert.go --rsa-bits 512 --host 127.0.0.1,::1,example.com --ca --start-date "Jan 1 00:00:00 1970" --duration=1000000h
|
// go run generate_cert.go --rsa-bits 512 --host 127.0.0.1,::1,example.com --ca --start-date "Jan 1 00:00:00 1970" --duration=1000000h
|
||||||
var localhostCert = []byte(`-----BEGIN CERTIFICATE-----
|
var localhostCert = []byte(`-----BEGIN CERTIFICATE-----
|
||||||
MIIBdzCCASOgAwIBAgIBADALBgkqhkiG9w0BAQUwEjEQMA4GA1UEChMHQWNtZSBD
|
MIIBdzCCASOgAwIBAgIBADALBgkqhkiG9w0BAQUwEjEQMA4GA1UEChMHQWNtZSBD
|
||||||
|
|
|
@ -1563,7 +1563,7 @@ const (
|
||||||
bitsPointer = 2
|
bitsPointer = 2
|
||||||
)
|
)
|
||||||
|
|
||||||
// Make sure these routines stay in sync with ../../pkg/runtime/hashmap.go!
|
// Make sure these routines stay in sync with ../../runtime/hashmap.go!
|
||||||
// These types exist only for GC, so we only fill out GC relevant info.
|
// These types exist only for GC, so we only fill out GC relevant info.
|
||||||
// Currently, that's just size and the GC program. We also fill in string
|
// Currently, that's just size and the GC program. We also fill in string
|
||||||
// for possible debugging use.
|
// for possible debugging use.
|
||||||
|
|
|
@ -2679,7 +2679,7 @@ func cvtI2I(v Value, typ Type) Value {
|
||||||
return cvtT2I(v.Elem(), typ)
|
return cvtT2I(v.Elem(), typ)
|
||||||
}
|
}
|
||||||
|
|
||||||
// implemented in ../pkg/runtime
|
// implemented in ../runtime
|
||||||
func chancap(ch unsafe.Pointer) int
|
func chancap(ch unsafe.Pointer) int
|
||||||
func chanclose(ch unsafe.Pointer)
|
func chanclose(ch unsafe.Pointer)
|
||||||
func chanlen(ch unsafe.Pointer) int
|
func chanlen(ch unsafe.Pointer) int
|
||||||
|
|
|
@ -2,4 +2,4 @@
|
||||||
# Use of this source code is governed by a BSD-style
|
# Use of this source code is governed by a BSD-style
|
||||||
# license that can be found in the LICENSE file.
|
# license that can be found in the LICENSE file.
|
||||||
|
|
||||||
include ../../Make.dist
|
include ../Make.dist
|
||||||
|
|
|
@ -22,15 +22,15 @@ func (t T) method() []byte {
|
||||||
The traceback should look something like this, modulo line numbers and hex constants.
|
The traceback should look something like this, modulo line numbers and hex constants.
|
||||||
Don't worry much about the base levels, but check the ones in our own package.
|
Don't worry much about the base levels, but check the ones in our own package.
|
||||||
|
|
||||||
/Users/r/go/src/pkg/runtime/debug/stack_test.go:15 (0x13878)
|
/Users/r/go/src/runtime/debug/stack_test.go:15 (0x13878)
|
||||||
(*T).ptrmethod: return Stack()
|
(*T).ptrmethod: return Stack()
|
||||||
/Users/r/go/src/pkg/runtime/debug/stack_test.go:18 (0x138dd)
|
/Users/r/go/src/runtime/debug/stack_test.go:18 (0x138dd)
|
||||||
T.method: return t.ptrmethod()
|
T.method: return t.ptrmethod()
|
||||||
/Users/r/go/src/pkg/runtime/debug/stack_test.go:23 (0x13920)
|
/Users/r/go/src/runtime/debug/stack_test.go:23 (0x13920)
|
||||||
TestStack: b := T(0).method()
|
TestStack: b := T(0).method()
|
||||||
/Users/r/go/src/pkg/testing/testing.go:132 (0x14a7a)
|
/Users/r/go/src/testing/testing.go:132 (0x14a7a)
|
||||||
tRunner: test.F(t)
|
tRunner: test.F(t)
|
||||||
/Users/r/go/src/pkg/runtime/proc.c:145 (0xc970)
|
/Users/r/go/src/runtime/proc.c:145 (0xc970)
|
||||||
???: runtime·unlock(&runtime·sched);
|
???: runtime·unlock(&runtime·sched);
|
||||||
*/
|
*/
|
||||||
func TestStack(t *testing.T) {
|
func TestStack(t *testing.T) {
|
||||||
|
@ -49,10 +49,10 @@ func TestStack(t *testing.T) {
|
||||||
n++
|
n++
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
frame("src/pkg/runtime/debug/stack_test.go", "\t(*T).ptrmethod: return Stack()")
|
frame("src/runtime/debug/stack_test.go", "\t(*T).ptrmethod: return Stack()")
|
||||||
frame("src/pkg/runtime/debug/stack_test.go", "\tT.method: return t.ptrmethod()")
|
frame("src/runtime/debug/stack_test.go", "\tT.method: return t.ptrmethod()")
|
||||||
frame("src/pkg/runtime/debug/stack_test.go", "\tTestStack: b := T(0).method()")
|
frame("src/runtime/debug/stack_test.go", "\tTestStack: b := T(0).method()")
|
||||||
frame("src/pkg/testing/testing.go", "")
|
frame("src/testing/testing.go", "")
|
||||||
}
|
}
|
||||||
|
|
||||||
func check(t *testing.T, line, has string) {
|
func check(t *testing.T, line, has string) {
|
||||||
|
|
|
@ -310,45 +310,45 @@ func TestBlockProfile(t *testing.T) {
|
||||||
tests := [...]TestCase{
|
tests := [...]TestCase{
|
||||||
{"chan recv", blockChanRecv, `
|
{"chan recv", blockChanRecv, `
|
||||||
[0-9]+ [0-9]+ @ 0x[0-9,a-f]+ 0x[0-9,a-f]+ 0x[0-9,a-f]+ 0x[0-9,a-f]+ 0x[0-9,a-f]+
|
[0-9]+ [0-9]+ @ 0x[0-9,a-f]+ 0x[0-9,a-f]+ 0x[0-9,a-f]+ 0x[0-9,a-f]+ 0x[0-9,a-f]+
|
||||||
# 0x[0-9,a-f]+ runtime\.chanrecv1\+0x[0-9,a-f]+ .*/src/pkg/runtime/chan.go:[0-9]+
|
# 0x[0-9,a-f]+ runtime\.chanrecv1\+0x[0-9,a-f]+ .*/src/runtime/chan.go:[0-9]+
|
||||||
# 0x[0-9,a-f]+ runtime/pprof_test\.blockChanRecv\+0x[0-9,a-f]+ .*/src/pkg/runtime/pprof/pprof_test.go:[0-9]+
|
# 0x[0-9,a-f]+ runtime/pprof_test\.blockChanRecv\+0x[0-9,a-f]+ .*/src/runtime/pprof/pprof_test.go:[0-9]+
|
||||||
# 0x[0-9,a-f]+ runtime/pprof_test\.TestBlockProfile\+0x[0-9,a-f]+ .*/src/pkg/runtime/pprof/pprof_test.go:[0-9]+
|
# 0x[0-9,a-f]+ runtime/pprof_test\.TestBlockProfile\+0x[0-9,a-f]+ .*/src/runtime/pprof/pprof_test.go:[0-9]+
|
||||||
`},
|
`},
|
||||||
{"chan send", blockChanSend, `
|
{"chan send", blockChanSend, `
|
||||||
[0-9]+ [0-9]+ @ 0x[0-9,a-f]+ 0x[0-9,a-f]+ 0x[0-9,a-f]+ 0x[0-9,a-f]+ 0x[0-9,a-f]+
|
[0-9]+ [0-9]+ @ 0x[0-9,a-f]+ 0x[0-9,a-f]+ 0x[0-9,a-f]+ 0x[0-9,a-f]+ 0x[0-9,a-f]+
|
||||||
# 0x[0-9,a-f]+ runtime\.chansend1\+0x[0-9,a-f]+ .*/src/pkg/runtime/chan.go:[0-9]+
|
# 0x[0-9,a-f]+ runtime\.chansend1\+0x[0-9,a-f]+ .*/src/runtime/chan.go:[0-9]+
|
||||||
# 0x[0-9,a-f]+ runtime/pprof_test\.blockChanSend\+0x[0-9,a-f]+ .*/src/pkg/runtime/pprof/pprof_test.go:[0-9]+
|
# 0x[0-9,a-f]+ runtime/pprof_test\.blockChanSend\+0x[0-9,a-f]+ .*/src/runtime/pprof/pprof_test.go:[0-9]+
|
||||||
# 0x[0-9,a-f]+ runtime/pprof_test\.TestBlockProfile\+0x[0-9,a-f]+ .*/src/pkg/runtime/pprof/pprof_test.go:[0-9]+
|
# 0x[0-9,a-f]+ runtime/pprof_test\.TestBlockProfile\+0x[0-9,a-f]+ .*/src/runtime/pprof/pprof_test.go:[0-9]+
|
||||||
`},
|
`},
|
||||||
{"chan close", blockChanClose, `
|
{"chan close", blockChanClose, `
|
||||||
[0-9]+ [0-9]+ @ 0x[0-9,a-f]+ 0x[0-9,a-f]+ 0x[0-9,a-f]+ 0x[0-9,a-f]+ 0x[0-9,a-f]+
|
[0-9]+ [0-9]+ @ 0x[0-9,a-f]+ 0x[0-9,a-f]+ 0x[0-9,a-f]+ 0x[0-9,a-f]+ 0x[0-9,a-f]+
|
||||||
# 0x[0-9,a-f]+ runtime\.chanrecv1\+0x[0-9,a-f]+ .*/src/pkg/runtime/chan.go:[0-9]+
|
# 0x[0-9,a-f]+ runtime\.chanrecv1\+0x[0-9,a-f]+ .*/src/runtime/chan.go:[0-9]+
|
||||||
# 0x[0-9,a-f]+ runtime/pprof_test\.blockChanClose\+0x[0-9,a-f]+ .*/src/pkg/runtime/pprof/pprof_test.go:[0-9]+
|
# 0x[0-9,a-f]+ runtime/pprof_test\.blockChanClose\+0x[0-9,a-f]+ .*/src/runtime/pprof/pprof_test.go:[0-9]+
|
||||||
# 0x[0-9,a-f]+ runtime/pprof_test\.TestBlockProfile\+0x[0-9,a-f]+ .*/src/pkg/runtime/pprof/pprof_test.go:[0-9]+
|
# 0x[0-9,a-f]+ runtime/pprof_test\.TestBlockProfile\+0x[0-9,a-f]+ .*/src/runtime/pprof/pprof_test.go:[0-9]+
|
||||||
`},
|
`},
|
||||||
{"select recv async", blockSelectRecvAsync, `
|
{"select recv async", blockSelectRecvAsync, `
|
||||||
[0-9]+ [0-9]+ @ 0x[0-9,a-f]+ 0x[0-9,a-f]+ 0x[0-9,a-f]+ 0x[0-9,a-f]+ 0x[0-9,a-f]+
|
[0-9]+ [0-9]+ @ 0x[0-9,a-f]+ 0x[0-9,a-f]+ 0x[0-9,a-f]+ 0x[0-9,a-f]+ 0x[0-9,a-f]+
|
||||||
# 0x[0-9,a-f]+ runtime\.selectgo\+0x[0-9,a-f]+ .*/src/pkg/runtime/select.go:[0-9]+
|
# 0x[0-9,a-f]+ runtime\.selectgo\+0x[0-9,a-f]+ .*/src/runtime/select.go:[0-9]+
|
||||||
# 0x[0-9,a-f]+ runtime/pprof_test\.blockSelectRecvAsync\+0x[0-9,a-f]+ .*/src/pkg/runtime/pprof/pprof_test.go:[0-9]+
|
# 0x[0-9,a-f]+ runtime/pprof_test\.blockSelectRecvAsync\+0x[0-9,a-f]+ .*/src/runtime/pprof/pprof_test.go:[0-9]+
|
||||||
# 0x[0-9,a-f]+ runtime/pprof_test\.TestBlockProfile\+0x[0-9,a-f]+ .*/src/pkg/runtime/pprof/pprof_test.go:[0-9]+
|
# 0x[0-9,a-f]+ runtime/pprof_test\.TestBlockProfile\+0x[0-9,a-f]+ .*/src/runtime/pprof/pprof_test.go:[0-9]+
|
||||||
`},
|
`},
|
||||||
{"select send sync", blockSelectSendSync, `
|
{"select send sync", blockSelectSendSync, `
|
||||||
[0-9]+ [0-9]+ @ 0x[0-9,a-f]+ 0x[0-9,a-f]+ 0x[0-9,a-f]+ 0x[0-9,a-f]+ 0x[0-9,a-f]+
|
[0-9]+ [0-9]+ @ 0x[0-9,a-f]+ 0x[0-9,a-f]+ 0x[0-9,a-f]+ 0x[0-9,a-f]+ 0x[0-9,a-f]+
|
||||||
# 0x[0-9,a-f]+ runtime\.selectgo\+0x[0-9,a-f]+ .*/src/pkg/runtime/select.go:[0-9]+
|
# 0x[0-9,a-f]+ runtime\.selectgo\+0x[0-9,a-f]+ .*/src/runtime/select.go:[0-9]+
|
||||||
# 0x[0-9,a-f]+ runtime/pprof_test\.blockSelectSendSync\+0x[0-9,a-f]+ .*/src/pkg/runtime/pprof/pprof_test.go:[0-9]+
|
# 0x[0-9,a-f]+ runtime/pprof_test\.blockSelectSendSync\+0x[0-9,a-f]+ .*/src/runtime/pprof/pprof_test.go:[0-9]+
|
||||||
# 0x[0-9,a-f]+ runtime/pprof_test\.TestBlockProfile\+0x[0-9,a-f]+ .*/src/pkg/runtime/pprof/pprof_test.go:[0-9]+
|
# 0x[0-9,a-f]+ runtime/pprof_test\.TestBlockProfile\+0x[0-9,a-f]+ .*/src/runtime/pprof/pprof_test.go:[0-9]+
|
||||||
`},
|
`},
|
||||||
{"mutex", blockMutex, `
|
{"mutex", blockMutex, `
|
||||||
[0-9]+ [0-9]+ @ 0x[0-9,a-f]+ 0x[0-9,a-f]+ 0x[0-9,a-f]+ 0x[0-9,a-f]+ 0x[0-9,a-f]+
|
[0-9]+ [0-9]+ @ 0x[0-9,a-f]+ 0x[0-9,a-f]+ 0x[0-9,a-f]+ 0x[0-9,a-f]+ 0x[0-9,a-f]+
|
||||||
# 0x[0-9,a-f]+ sync\.\(\*Mutex\)\.Lock\+0x[0-9,a-f]+ .*/src/pkg/sync/mutex\.go:[0-9]+
|
# 0x[0-9,a-f]+ sync\.\(\*Mutex\)\.Lock\+0x[0-9,a-f]+ .*/src/sync/mutex\.go:[0-9]+
|
||||||
# 0x[0-9,a-f]+ runtime/pprof_test\.blockMutex\+0x[0-9,a-f]+ .*/src/pkg/runtime/pprof/pprof_test.go:[0-9]+
|
# 0x[0-9,a-f]+ runtime/pprof_test\.blockMutex\+0x[0-9,a-f]+ .*/src/runtime/pprof/pprof_test.go:[0-9]+
|
||||||
# 0x[0-9,a-f]+ runtime/pprof_test\.TestBlockProfile\+0x[0-9,a-f]+ .*/src/pkg/runtime/pprof/pprof_test.go:[0-9]+
|
# 0x[0-9,a-f]+ runtime/pprof_test\.TestBlockProfile\+0x[0-9,a-f]+ .*/src/runtime/pprof/pprof_test.go:[0-9]+
|
||||||
`},
|
`},
|
||||||
{"cond", blockCond, `
|
{"cond", blockCond, `
|
||||||
[0-9]+ [0-9]+ @ 0x[0-9,a-f]+ 0x[0-9,a-f]+ 0x[0-9,a-f]+ 0x[0-9,a-f]+ 0x[0-9,a-f]+
|
[0-9]+ [0-9]+ @ 0x[0-9,a-f]+ 0x[0-9,a-f]+ 0x[0-9,a-f]+ 0x[0-9,a-f]+ 0x[0-9,a-f]+
|
||||||
# 0x[0-9,a-f]+ sync\.\(\*Cond\)\.Wait\+0x[0-9,a-f]+ .*/src/pkg/sync/cond\.go:[0-9]+
|
# 0x[0-9,a-f]+ sync\.\(\*Cond\)\.Wait\+0x[0-9,a-f]+ .*/src/sync/cond\.go:[0-9]+
|
||||||
# 0x[0-9,a-f]+ runtime/pprof_test\.blockCond\+0x[0-9,a-f]+ .*/src/pkg/runtime/pprof/pprof_test.go:[0-9]+
|
# 0x[0-9,a-f]+ runtime/pprof_test\.blockCond\+0x[0-9,a-f]+ .*/src/runtime/pprof/pprof_test.go:[0-9]+
|
||||||
# 0x[0-9,a-f]+ runtime/pprof_test\.TestBlockProfile\+0x[0-9,a-f]+ .*/src/pkg/runtime/pprof/pprof_test.go:[0-9]+
|
# 0x[0-9,a-f]+ runtime/pprof_test\.TestBlockProfile\+0x[0-9,a-f]+ .*/src/runtime/pprof/pprof_test.go:[0-9]+
|
||||||
`},
|
`},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ package race
|
||||||
// This file merely ensures that we link in runtime/cgo in race build,
|
// This file merely ensures that we link in runtime/cgo in race build,
|
||||||
// this is turn ensures that runtime uses pthread_create to create threads.
|
// this is turn ensures that runtime uses pthread_create to create threads.
|
||||||
// The prebuilt race runtime lives in race_GOOS_GOARCH.syso.
|
// The prebuilt race runtime lives in race_GOOS_GOARCH.syso.
|
||||||
// Calls to the runtime are done directly from src/pkg/runtime/race.c.
|
// Calls to the runtime are done directly from src/runtime/race.c.
|
||||||
|
|
||||||
// void __race_unused_func(void);
|
// void __race_unused_func(void);
|
||||||
import "C"
|
import "C"
|
||||||
|
|
|
@ -106,7 +106,7 @@ func TestRuntimeGogoBytes(t *testing.T) {
|
||||||
}
|
}
|
||||||
defer os.RemoveAll(dir)
|
defer os.RemoveAll(dir)
|
||||||
|
|
||||||
out, err := exec.Command("go", "build", "-o", dir+"/hello", "../../../test/helloworld.go").CombinedOutput()
|
out, err := exec.Command("go", "build", "-o", dir+"/hello", "../../test/helloworld.go").CombinedOutput()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("building hello world: %v\n%s", err, out)
|
t.Fatalf("building hello world: %v\n%s", err, out)
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,4 +5,4 @@
|
||||||
// +build race
|
// +build race
|
||||||
|
|
||||||
// This file is here only to allow external functions.
|
// This file is here only to allow external functions.
|
||||||
// The operations are implemented in src/pkg/runtime/race_amd64.s
|
// The operations are implemented in src/runtime/race_amd64.s
|
||||||
|
|
|
@ -85,7 +85,7 @@ func main() {
|
||||||
var t0 time.Time
|
var t0 time.Time
|
||||||
var numGC uint32
|
var numGC uint32
|
||||||
var pauseTotalNs uint64
|
var pauseTotalNs uint64
|
||||||
pkgroot := runtime.GOROOT() + "/src/pkg/"
|
pkgroot := runtime.GOROOT() + "/src/"
|
||||||
for pass := 0; pass < 2; pass++ {
|
for pass := 0; pass < 2; pass++ {
|
||||||
// Once the heap is grown to full size, reset counters.
|
// Once the heap is grown to full size, reset counters.
|
||||||
// This hides the start-up pauses, which are much smaller
|
// This hides the start-up pauses, which are much smaller
|
||||||
|
|
|
@ -64,7 +64,7 @@ func parseDir(dirpath string) map[string]*ast.Package {
|
||||||
}
|
}
|
||||||
|
|
||||||
func stressParseGo() {
|
func stressParseGo() {
|
||||||
pkgroot := runtime.GOROOT() + "/src/pkg/"
|
pkgroot := runtime.GOROOT() + "/src/"
|
||||||
for {
|
for {
|
||||||
m := make(map[string]map[string]*ast.Package)
|
m := make(map[string]map[string]*ast.Package)
|
||||||
for _, pkg := range packages {
|
for _, pkg := range packages {
|
||||||
|
|
Loading…
Reference in a new issue