1
0
mirror of https://github.com/golang/go synced 2024-11-21 22:34:48 -07:00

Convert go tree to hierarchical pkg directory:

import (
		"vector" -> "container/vector"
		"ast" -> "go/ast"
		"sha1" -> "hash/sha1"
		etc.
	)

and update Makefiles.  Because I did the conversion
semi-automatically, I sorted all the import blocks
as a post-processing.  Some files have therefore
changed that didn't strictly need to.

Rename local packages to lower case.
The upper/lower distinction doesn't work on OS X
and complicates the "single-package directories
with the same package name as directory name"
heuristic used by gobuild and godoc to create
the correlation between source and binary locations.
Now that we have a plan to avoid globally unique
names, the upper/lower is unnecessary.

The renamings will cause trouble for a few users,
but so will the change in import paths.
This way, the two maintenance fixes are rolled into
one inconvenience.

R=r
OCL=27573
CL=27575
This commit is contained in:
Russ Cox 2009-04-16 20:52:37 -07:00
parent 0f153ec6b4
commit 1f6463f823
59 changed files with 365 additions and 293 deletions

View File

@ -8,8 +8,8 @@
package bufio
import (
"os";
"io";
"os";
"utf8";
)

View File

@ -5,13 +5,15 @@
# DO NOT EDIT. Automatically generated by gobuild.
# gobuild -m >Makefile
D=/container
O_arm=5
O_amd64=6
O_386=8
OS=568vq
O=$(O_$(GOARCH))
GC=$(O)g
GC=$(O)g -I_obj
CC=$(O)c -FVw
AS=$(O)a
AR=6ar
@ -19,7 +21,7 @@ AR=6ar
default: packages
clean:
rm -f *.[$(OS)] *.a [$(OS)].out
rm -rf *.[$(OS)] *.a [$(OS)].out _obj
test: packages
gotest
@ -46,32 +48,34 @@ O2=\
phases: a1 a2
vector.a: phases
iterable.a: phases
_obj$D/vector.a: phases
_obj$D/iterable.a: phases
a1: $(O1)
$(AR) grc vector.a vector.$O
$(AR) grc _obj$D/vector.a vector.$O
rm -f $(O1)
a2: $(O2)
$(AR) grc vector.a intvector.$O
$(AR) grc iterable.a iterable.$O
$(AR) grc _obj$D/vector.a intvector.$O
$(AR) grc _obj$D/iterable.a iterable.$O
rm -f $(O2)
newpkg: clean
$(AR) grc vector.a
$(AR) grc iterable.a
mkdir -p _obj$D
$(AR) grc _obj$D/vector.a
$(AR) grc _obj$D/iterable.a
$(O1): newpkg
$(O2): a1
$(O3): a2
nuke: clean
rm -f $(GOROOT)/pkg/vector.a $(GOROOT)/pkg/iterable.a
rm -f $(GOROOT)/pkg$D/vector.a $(GOROOT)/pkg$D/iterable.a
packages: vector.a iterable.a
packages: _obj$D/vector.a _obj$D/iterable.a
install: packages
cp vector.a $(GOROOT)/pkg/vector.a
cp iterable.a $(GOROOT)/pkg/iterable.a
test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg$D
cp _obj$D/vector.a $(GOROOT)/pkg$D/vector.a
cp _obj$D/iterable.a $(GOROOT)/pkg$D/iterable.a

View File

@ -4,7 +4,7 @@
package vector
import "vector"
import "container/vector"
// IntVector is a specialization of Vector that hides the wrapping of Elements around ints.
type IntVector struct {

View File

@ -8,7 +8,7 @@
// something that would produce an infinite amount of data.
package iterable
import "vector"
import "container/vector"
type Iterable interface {
// Iter should return a fresh channel each time it is called.

View File

@ -5,7 +5,7 @@
package iterable
import (
"iterable";
"container/iterable";
"testing";
)

View File

@ -4,7 +4,7 @@
package vector
import "vector"
import "container/vector"
import "testing"
import "sort"

View File

@ -5,13 +5,15 @@
# DO NOT EDIT. Automatically generated by gobuild.
# gobuild -m >Makefile
D=
O_arm=5
O_amd64=6
O_386=8
OS=568vq
O=$(O_$(GOARCH))
GC=$(O)g
GC=$(O)g -I_obj
CC=$(O)c -FVw
AS=$(O)a
AR=6ar
@ -19,7 +21,7 @@ AR=6ar
default: packages
clean:
rm -f *.[$(OS)] *.a [$(OS)].out
rm -rf *.[$(OS)] *.a [$(OS)].out _obj
test: packages
gotest
@ -45,28 +47,30 @@ O2=\
phases: a1 a2
fmt.a: phases
_obj$D/fmt.a: phases
a1: $(O1)
$(AR) grc fmt.a format.$O
$(AR) grc _obj$D/fmt.a format.$O
rm -f $(O1)
a2: $(O2)
$(AR) grc fmt.a print.$O
$(AR) grc _obj$D/fmt.a print.$O
rm -f $(O2)
newpkg: clean
$(AR) grc fmt.a
mkdir -p _obj$D
$(AR) grc _obj$D/fmt.a
$(O1): newpkg
$(O2): a1
$(O3): a2
nuke: clean
rm -f $(GOROOT)/pkg/fmt.a
rm -f $(GOROOT)/pkg$D/fmt.a
packages: fmt.a
packages: _obj$D/fmt.a
install: packages
cp fmt.a $(GOROOT)/pkg/fmt.a
test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg$D
cp _obj$D/fmt.a $(GOROOT)/pkg$D/fmt.a

View File

@ -21,8 +21,8 @@ package fmt
import (
"fmt";
"io";
"reflect";
"os";
"reflect";
"utf8";
)

View File

@ -5,13 +5,15 @@
# DO NOT EDIT. Automatically generated by gobuild.
# gobuild -m >Makefile
D=/go
O_arm=5
O_amd64=6
O_386=8
OS=568vq
O=$(O_$(GOARCH))
GC=$(O)g
GC=$(O)g -I_obj
CC=$(O)c -FVw
AS=$(O)a
AR=6ar
@ -19,7 +21,7 @@ AR=6ar
default: packages
clean:
rm -f *.[$(OS)] *.a [$(OS)].out
rm -rf *.[$(OS)] *.a [$(OS)].out _obj
test: packages
gotest
@ -49,30 +51,31 @@ O3=\
phases: a1 a2 a3
ast.a: phases
parser.a: phases
scanner.a: phases
token.a: phases
_obj$D/ast.a: phases
_obj$D/parser.a: phases
_obj$D/scanner.a: phases
_obj$D/token.a: phases
a1: $(O1)
$(AR) grc token.a token.$O
$(AR) grc _obj$D/token.a token.$O
rm -f $(O1)
a2: $(O2)
$(AR) grc scanner.a scanner.$O
$(AR) grc ast.a ast.$O
$(AR) grc _obj$D/scanner.a scanner.$O
$(AR) grc _obj$D/ast.a ast.$O
rm -f $(O2)
a3: $(O3)
$(AR) grc parser.a parser.$O
$(AR) grc _obj$D/parser.a parser.$O
rm -f $(O3)
newpkg: clean
$(AR) grc ast.a
$(AR) grc parser.a
$(AR) grc scanner.a
$(AR) grc token.a
mkdir -p _obj$D
$(AR) grc _obj$D/ast.a
$(AR) grc _obj$D/parser.a
$(AR) grc _obj$D/scanner.a
$(AR) grc _obj$D/token.a
$(O1): newpkg
$(O2): a1
@ -80,12 +83,13 @@ $(O3): a2
$(O4): a3
nuke: clean
rm -f $(GOROOT)/pkg/ast.a $(GOROOT)/pkg/parser.a $(GOROOT)/pkg/scanner.a $(GOROOT)/pkg/token.a
rm -f $(GOROOT)/pkg$D/ast.a $(GOROOT)/pkg$D/parser.a $(GOROOT)/pkg$D/scanner.a $(GOROOT)/pkg$D/token.a
packages: ast.a parser.a scanner.a token.a
packages: _obj$D/ast.a _obj$D/parser.a _obj$D/scanner.a _obj$D/token.a
install: packages
cp ast.a $(GOROOT)/pkg/ast.a
cp parser.a $(GOROOT)/pkg/parser.a
cp scanner.a $(GOROOT)/pkg/scanner.a
cp token.a $(GOROOT)/pkg/token.a
test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg$D
cp _obj$D/ast.a $(GOROOT)/pkg$D/ast.a
cp _obj$D/parser.a $(GOROOT)/pkg$D/parser.a
cp _obj$D/scanner.a $(GOROOT)/pkg$D/scanner.a
cp _obj$D/token.a $(GOROOT)/pkg$D/token.a

View File

@ -8,7 +8,7 @@
package ast
import (
"token";
"go/token";
"unicode";
"utf8";
)

View File

@ -10,12 +10,12 @@
package parser
import (
"ast";
"container/vector";
"fmt";
"go/ast";
"go/scanner";
"go/token";
"io";
"scanner";
"token";
"vector";
)
@ -135,7 +135,7 @@ func (p *parser) collectComment() int {
}
p.comments.Push(&ast.Comment{p.pos, p.lit, endline});
p.next0();
return endline;
}
@ -155,7 +155,7 @@ func (p *parser) getComments() interval {
func (p *parser) getDoc() ast.Comments {
doc := p.last_doc;
n := doc.end - doc.beg;
if n <= 0 || p.comments.At(doc.end - 1).(*ast.Comment).EndLine + 1 < p.pos.Line {
// no comments or empty line between last comment and current token;
// do not use as documentation
@ -348,7 +348,7 @@ func (p *parser) parseArrayOrSliceType(ellipsis_ok bool) ast.Expr {
if len != nil {
return &ast.ArrayType{lbrack, len, elt};
}
return &ast.SliceType{lbrack, elt};
}
@ -769,7 +769,7 @@ func (p *parser) parseStatementList() []ast.Stmt {
expect_semi = true;
}
}
return makeStmtList(list);
}
@ -800,7 +800,7 @@ func (p *parser) parseStringList(x *ast.StringLit) []*ast.StringLit {
if x != nil {
list.Push(x);
}
for p.tok == token.STRING {
list.Push(&ast.StringLit{p.pos, p.lit});
p.next();
@ -811,7 +811,7 @@ func (p *parser) parseStringList(x *ast.StringLit) []*ast.StringLit {
for i := 0; i < list.Len(); i++ {
strings[i] = list.At(i).(*ast.StringLit);
}
return strings;
}
@ -972,7 +972,7 @@ func (p *parser) parseKeyValueExpr() ast.Expr {
value := p.parseExpression();
return &ast.KeyValueExpr{key, colon, value};
}
return key;
}
@ -1010,13 +1010,13 @@ func (p *parser) parseExpressionOrKeyValueList() []ast.Expr {
break;
}
}
// convert list
elts := make([]ast.Expr, list.Len());
for i := 0; i < list.Len(); i++ {
elts[i] = list.At(i).(ast.Expr);
}
return elts;
}
@ -1133,7 +1133,7 @@ func (p *parser) checkExprOrType(x ast.Expr) ast.Expr {
x = &ast.BadExpr{x.Pos()};
}
}
// all other nodes are expressions or types
return x;
}
@ -1386,7 +1386,7 @@ func (p *parser) parseControlClause(isForStmt bool) (s1, s2, s3 ast.Stmt) {
} else {
s1, s2 = nil, s1;
}
p.expr_lev = prev_lev;
}
@ -1426,7 +1426,7 @@ func (p *parser) parseCaseClause() *ast.CaseClause {
} else {
p.expect(token.DEFAULT);
}
colon := p.expect(token.COLON);
body := p.parseStatementList();
@ -1594,7 +1594,7 @@ func (p *parser) parseForStmt() ast.Stmt {
// regular for statement
return &ast.ForStmt{pos, s1, p.makeExpr(s2), s3, body};
}
panic(); // unreachable
return nil;
}
@ -1824,7 +1824,7 @@ func (p *parser) parseDeclaration() ast.Decl {
p.next(); // make progress
return &ast.BadDecl{pos};
}
return p.parseGenDecl(p.tok, f);
}
@ -1941,7 +1941,7 @@ func readSource(src interface{}, err ErrorHandler) []byte {
// Parse returns an AST and the boolean value true if no errors occured;
// it returns a partial AST (or nil if the source couldn't be read) and
// the boolean value false to indicate failure.
//
//
// If syntax errors were found, the AST may only be constructed partially,
// with ast.BadX nodes representing the fragments of erroneous source code.
//

View File

@ -5,9 +5,9 @@
package parser
import (
"ast";
"go/ast";
"go/parser";
"os";
"parser";
"testing";
)

View File

@ -9,10 +9,10 @@
package scanner
import (
"utf8";
"unicode";
"go/token";
"strconv";
"token";
"unicode";
"utf8";
)

View File

@ -5,9 +5,9 @@
package scanner
import (
"go/scanner";
"go/token";
"io";
"token";
"scanner";
"testing";
)

View File

@ -5,13 +5,15 @@
# DO NOT EDIT. Automatically generated by gobuild.
# gobuild -m >Makefile
D=/hash
O_arm=5
O_amd64=6
O_386=8
OS=568vq
O=$(O_$(GOARCH))
GC=$(O)g
GC=$(O)g -I_obj
CC=$(O)c -FVw
AS=$(O)a
AR=6ar
@ -19,7 +21,7 @@ AR=6ar
default: packages
clean:
rm -f *.[$(OS)] *.a [$(OS)].out
rm -rf *.[$(OS)] *.a [$(OS)].out _obj
test: packages
gotest
@ -49,41 +51,43 @@ O2=\
phases: a1 a2
adler32.a: phases
crc32.a: phases
md5.a: phases
sha1.a: phases
_obj$D/adler32.a: phases
_obj$D/crc32.a: phases
_obj$D/md5.a: phases
_obj$D/sha1.a: phases
a1: $(O1)
$(AR) grc adler32.a adler32.$O
$(AR) grc sha1.a sha1.$O
$(AR) grc md5.a md5.$O
$(AR) grc crc32.a crc32.$O
$(AR) grc _obj$D/adler32.a adler32.$O
$(AR) grc _obj$D/sha1.a sha1.$O
$(AR) grc _obj$D/md5.a md5.$O
$(AR) grc _obj$D/crc32.a crc32.$O
rm -f $(O1)
a2: $(O2)
$(AR) grc sha1.a sha1block.$O
$(AR) grc md5.a md5block.$O
$(AR) grc _obj$D/sha1.a sha1block.$O
$(AR) grc _obj$D/md5.a md5block.$O
rm -f $(O2)
newpkg: clean
$(AR) grc adler32.a
$(AR) grc crc32.a
$(AR) grc md5.a
$(AR) grc sha1.a
mkdir -p _obj$D
$(AR) grc _obj$D/adler32.a
$(AR) grc _obj$D/crc32.a
$(AR) grc _obj$D/md5.a
$(AR) grc _obj$D/sha1.a
$(O1): newpkg
$(O2): a1
$(O3): a2
nuke: clean
rm -f $(GOROOT)/pkg/adler32.a $(GOROOT)/pkg/crc32.a $(GOROOT)/pkg/md5.a $(GOROOT)/pkg/sha1.a
rm -f $(GOROOT)/pkg$D/adler32.a $(GOROOT)/pkg$D/crc32.a $(GOROOT)/pkg$D/md5.a $(GOROOT)/pkg$D/sha1.a
packages: adler32.a crc32.a md5.a sha1.a
packages: _obj$D/adler32.a _obj$D/crc32.a _obj$D/md5.a _obj$D/sha1.a
install: packages
cp adler32.a $(GOROOT)/pkg/adler32.a
cp crc32.a $(GOROOT)/pkg/crc32.a
cp md5.a $(GOROOT)/pkg/md5.a
cp sha1.a $(GOROOT)/pkg/sha1.a
test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg$D
cp _obj$D/adler32.a $(GOROOT)/pkg$D/adler32.a
cp _obj$D/crc32.a $(GOROOT)/pkg$D/crc32.a
cp _obj$D/md5.a $(GOROOT)/pkg$D/md5.a
cp _obj$D/sha1.a $(GOROOT)/pkg$D/sha1.a

View File

@ -5,7 +5,7 @@
package adler32
import (
"adler32";
"hash/adler32";
"io";
"testing";
)

View File

@ -5,7 +5,7 @@
package crc32
import (
"crc32";
"hash/crc32";
"io";
"testing";
)

View File

@ -6,8 +6,8 @@ package md5
import (
"fmt";
"hash/md5";
"io";
"md5";
"testing";
)

View File

@ -8,7 +8,7 @@
package md5
import "md5"
import "hash/md5"
// table[i] = int((1<<32) * abs(sin(i+1 radians))).
var table = []uint32 {

View File

@ -8,8 +8,8 @@ package sha1
import (
"fmt";
"hash/sha1";
"io";
"sha1";
"testing";
)

View File

@ -8,7 +8,7 @@
package sha1
import "sha1"
import "hash/sha1"
const (
_K0 = 0x5A827999;

View File

@ -5,13 +5,15 @@
# DO NOT EDIT. Automatically generated by gobuild.
# gobuild -m >Makefile
D=
O_arm=5
O_amd64=6
O_386=8
OS=568vq
O=$(O_$(GOARCH))
GC=$(O)g
GC=$(O)g -I_obj
CC=$(O)c -FVw
AS=$(O)a
AR=6ar
@ -19,7 +21,7 @@ AR=6ar
default: packages
clean:
rm -f *.[$(OS)] *.a [$(OS)].out
rm -rf *.[$(OS)] *.a [$(OS)].out _obj
test: packages
gotest
@ -52,27 +54,28 @@ O4=\
phases: a1 a2 a3 a4
http.a: phases
_obj$D/http.a: phases
a1: $(O1)
$(AR) grc http.a status.$O url.$O
$(AR) grc _obj$D/http.a status.$O url.$O
rm -f $(O1)
a2: $(O2)
$(AR) grc http.a request.$O
$(AR) grc _obj$D/http.a request.$O
rm -f $(O2)
a3: $(O3)
$(AR) grc http.a server.$O
$(AR) grc _obj$D/http.a server.$O
rm -f $(O3)
a4: $(O4)
$(AR) grc http.a fs.$O
$(AR) grc _obj$D/http.a fs.$O
rm -f $(O4)
newpkg: clean
$(AR) grc http.a
mkdir -p _obj$D
$(AR) grc _obj$D/http.a
$(O1): newpkg
$(O2): a1
@ -81,9 +84,10 @@ $(O4): a3
$(O5): a4
nuke: clean
rm -f $(GOROOT)/pkg/http.a
rm -f $(GOROOT)/pkg$D/http.a
packages: http.a
packages: _obj$D/http.a
install: packages
cp http.a $(GOROOT)/pkg/http.a
test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg$D
cp _obj$D/http.a $(GOROOT)/pkg$D/http.a

View File

@ -5,13 +5,15 @@
# DO NOT EDIT. Automatically generated by gobuild.
# gobuild -m >Makefile
D=
O_arm=5
O_amd64=6
O_386=8
OS=568vq
O=$(O_$(GOARCH))
GC=$(O)g
GC=$(O)g -I_obj
CC=$(O)c -FVw
AS=$(O)a
AR=6ar
@ -19,7 +21,7 @@ AR=6ar
default: packages
clean:
rm -f *.[$(OS)] *.a [$(OS)].out
rm -rf *.[$(OS)] *.a [$(OS)].out _obj
test: packages
gotest
@ -46,28 +48,30 @@ O2=\
phases: a1 a2
io.a: phases
_obj$D/io.a: phases
a1: $(O1)
$(AR) grc io.a bytebuffer.$O io.$O
$(AR) grc _obj$D/io.a bytebuffer.$O io.$O
rm -f $(O1)
a2: $(O2)
$(AR) grc io.a pipe.$O
$(AR) grc _obj$D/io.a pipe.$O
rm -f $(O2)
newpkg: clean
$(AR) grc io.a
mkdir -p _obj$D
$(AR) grc _obj$D/io.a
$(O1): newpkg
$(O2): a1
$(O3): a2
nuke: clean
rm -f $(GOROOT)/pkg/io.a
rm -f $(GOROOT)/pkg$D/io.a
packages: io.a
packages: _obj$D/io.a
install: packages
cp io.a $(GOROOT)/pkg/io.a
test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg$D
cp _obj$D/io.a $(GOROOT)/pkg$D/io.a

View File

@ -5,13 +5,15 @@
# DO NOT EDIT. Automatically generated by gobuild.
# gobuild -m >Makefile
D=
O_arm=5
O_amd64=6
O_386=8
OS=568vq
O=$(O_$(GOARCH))
GC=$(O)g
GC=$(O)g -I_obj
CC=$(O)c -FVw
AS=$(O)a
AR=6ar
@ -19,7 +21,7 @@ AR=6ar
default: packages
clean:
rm -f *.[$(OS)] *.a [$(OS)].out
rm -rf *.[$(OS)] *.a [$(OS)].out _obj
test: packages
gotest
@ -46,28 +48,30 @@ O2=\
phases: a1 a2
json.a: phases
_obj$D/json.a: phases
a1: $(O1)
$(AR) grc json.a parse.$O
$(AR) grc _obj$D/json.a parse.$O
rm -f $(O1)
a2: $(O2)
$(AR) grc json.a generic.$O struct.$O
$(AR) grc _obj$D/json.a generic.$O struct.$O
rm -f $(O2)
newpkg: clean
$(AR) grc json.a
mkdir -p _obj$D
$(AR) grc _obj$D/json.a
$(O1): newpkg
$(O2): a1
$(O3): a2
nuke: clean
rm -f $(GOROOT)/pkg/json.a
rm -f $(GOROOT)/pkg$D/json.a
packages: json.a
packages: _obj$D/json.a
install: packages
cp json.a $(GOROOT)/pkg/json.a
test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg$D
cp _obj$D/json.a $(GOROOT)/pkg$D/json.a

View File

@ -7,12 +7,12 @@
package json
import (
"container/vector";
"fmt";
"math";
"json";
"math";
"strconv";
"strings";
"vector";
)
// Integers identifying the data type in the Json interface.

View File

@ -5,13 +5,15 @@
# DO NOT EDIT. Automatically generated by gobuild.
# gobuild -m >Makefile
D=
O_arm=5
O_amd64=6
O_386=8
OS=568vq
O=$(O_$(GOARCH))
GC=$(O)g
GC=$(O)g -I_obj
CC=$(O)c -FVw
AS=$(O)a
AR=6ar
@ -19,7 +21,7 @@ AR=6ar
default: packages
clean:
rm -f *.[$(OS)] *.a [$(OS)].out
rm -rf *.[$(OS)] *.a [$(OS)].out _obj
test: packages
gotest
@ -65,27 +67,28 @@ O4=\
phases: a1 a2 a3 a4
math.a: phases
_obj$D/math.a: phases
a1: $(O1)
$(AR) grc math.a const.$O fabs.$O hypot.$O pow10.$O runtime.$O
$(AR) grc _obj$D/math.a const.$O fabs.$O hypot.$O pow10.$O runtime.$O
rm -f $(O1)
a2: $(O2)
$(AR) grc math.a atan.$O exp.$O floor.$O fmod.$O log.$O sin.$O sqrt.$O tan.$O
$(AR) grc _obj$D/math.a atan.$O exp.$O floor.$O fmod.$O log.$O sin.$O sqrt.$O tan.$O
rm -f $(O2)
a3: $(O3)
$(AR) grc math.a asin.$O atan2.$O pow.$O sinh.$O
$(AR) grc _obj$D/math.a asin.$O atan2.$O pow.$O sinh.$O
rm -f $(O3)
a4: $(O4)
$(AR) grc math.a tanh.$O
$(AR) grc _obj$D/math.a tanh.$O
rm -f $(O4)
newpkg: clean
$(AR) grc math.a
mkdir -p _obj$D
$(AR) grc _obj$D/math.a
$(O1): newpkg
$(O2): a1
@ -94,9 +97,10 @@ $(O4): a3
$(O5): a4
nuke: clean
rm -f $(GOROOT)/pkg/math.a
rm -f $(GOROOT)/pkg$D/math.a
packages: math.a
packages: _obj$D/math.a
install: packages
cp math.a $(GOROOT)/pkg/math.a
test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg$D
cp _obj$D/math.a $(GOROOT)/pkg$D/math.a

View File

@ -5,10 +5,10 @@
package net
import (
"net";
"flag";
"fmt";
"io";
"net";
"os";
"testing";
)

View File

@ -5,8 +5,8 @@
package net
import (
"os";
"net";
"os";
"strconv";
"syscall";
)

View File

@ -5,9 +5,9 @@
package net
import (
"net";
"os";
"syscall";
"net";
"unsafe";
)

View File

@ -5,9 +5,9 @@
package net
import (
"net";
"os";
"syscall";
"net";
"unsafe";
)

View File

@ -5,9 +5,9 @@
package net
import (
"os";
"io";
"net";
"os";
"testing";
)

View File

@ -6,9 +6,9 @@ package net
import (
"net";
"os";
"testing";
"time";
"os";
)
func testTimeout(t *testing.T, network, addr string) {

View File

@ -5,13 +5,15 @@
# DO NOT EDIT. Automatically generated by gobuild.
# gobuild -m dir_${GOARCH}_${GOOS}.go env.go error.go file.go stat_${GOARCH}_${GOOS}.go time.go types.go exec.go >Makefile
D=
O_arm=5
O_amd64=6
O_386=8
OS=568vq
O=$(O_$(GOARCH))
GC=$(O)g
GC=$(O)g -I_obj
CC=$(O)c -FVw
AS=$(O)a
AR=6ar
@ -19,7 +21,7 @@ AR=6ar
default: packages
clean:
rm -f *.[$(OS)] *.a [$(OS)].out
rm -rf *.[$(OS)] *.a [$(OS)].out _obj
test: packages
gotest
@ -55,27 +57,28 @@ O4=\
phases: a1 a2 a3 a4
os.a: phases
_obj$D/os.a: phases
a1: $(O1)
$(AR) grc os.a error.$O types.$O
$(AR) grc _obj$D/os.a error.$O types.$O
rm -f $(O1)
a2: $(O2)
$(AR) grc os.a env.$O stat_$(GOARCH)_$(GOOS).$O time.$O
$(AR) grc _obj$D/os.a env.$O stat_$(GOARCH)_$(GOOS).$O time.$O
rm -f $(O2)
a3: $(O3)
$(AR) grc os.a file.$O
$(AR) grc _obj$D/os.a file.$O
rm -f $(O3)
a4: $(O4)
$(AR) grc os.a dir_$(GOARCH)_$(GOOS).$O exec.$O
$(AR) grc _obj$D/os.a dir_$(GOARCH)_$(GOOS).$O exec.$O
rm -f $(O4)
newpkg: clean
$(AR) grc os.a
mkdir -p _obj$D
$(AR) grc _obj$D/os.a
$(O1): newpkg
$(O2): a1
@ -84,9 +87,10 @@ $(O4): a3
$(O5): a4
nuke: clean
rm -f $(GOROOT)/pkg/os.a
rm -f $(GOROOT)/pkg$D/os.a
packages: os.a
packages: _obj$D/os.a
install: packages
cp os.a $(GOROOT)/pkg/os.a
test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg$D
cp _obj$D/os.a $(GOROOT)/pkg$D/os.a

View File

@ -5,8 +5,8 @@
package os
import (
"syscall";
"os";
"syscall";
"unsafe";
)

View File

@ -5,8 +5,8 @@
package os
import (
"syscall";
"os";
"syscall";
"unsafe";
)

View File

@ -5,13 +5,15 @@
# DO NOT EDIT. Automatically generated by gobuild.
# gobuild -m >Makefile
D=
O_arm=5
O_amd64=6
O_386=8
OS=568vq
O=$(O_$(GOARCH))
GC=$(O)g
GC=$(O)g -I_obj
CC=$(O)c -FVw
AS=$(O)a
AR=6ar
@ -19,7 +21,7 @@ AR=6ar
default: packages
clean:
rm -f *.[$(OS)] *.a [$(OS)].out
rm -rf *.[$(OS)] *.a [$(OS)].out _obj
test: packages
gotest
@ -50,23 +52,24 @@ O3=\
phases: a1 a2 a3
reflect.a: phases
_obj$D/reflect.a: phases
a1: $(O1)
$(AR) grc reflect.a type.$O typestring.$O
$(AR) grc _obj$D/reflect.a type.$O typestring.$O
rm -f $(O1)
a2: $(O2)
$(AR) grc reflect.a value.$O
$(AR) grc _obj$D/reflect.a value.$O
rm -f $(O2)
a3: $(O3)
$(AR) grc reflect.a deepequal.$O tostring.$O
$(AR) grc _obj$D/reflect.a deepequal.$O tostring.$O
rm -f $(O3)
newpkg: clean
$(AR) grc reflect.a
mkdir -p _obj$D
$(AR) grc _obj$D/reflect.a
$(O1): newpkg
$(O2): a1
@ -74,9 +77,10 @@ $(O3): a2
$(O4): a3
nuke: clean
rm -f $(GOROOT)/pkg/reflect.a
rm -f $(GOROOT)/pkg$D/reflect.a
packages: reflect.a
packages: _obj$D/reflect.a
install: packages
cp reflect.a $(GOROOT)/pkg/reflect.a
test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg$D
cp _obj$D/reflect.a $(GOROOT)/pkg$D/reflect.a

View File

@ -12,9 +12,9 @@
package reflect
import (
"utf8";
"sync";
"unsafe";
"utf8";
)
type Type interface

View File

@ -5,13 +5,15 @@
# DO NOT EDIT. Automatically generated by gobuild.
# gobuild -m >Makefile
D=
O_arm=5
O_amd64=6
O_386=8
OS=568vq
O=$(O_$(GOARCH))
GC=$(O)g
GC=$(O)g -I_obj
CC=$(O)c -FVw
AS=$(O)a
AR=6ar
@ -19,7 +21,7 @@ AR=6ar
default: packages
clean:
rm -f *.[$(OS)] *.a [$(OS)].out
rm -rf *.[$(OS)] *.a [$(OS)].out _obj
test: packages
gotest
@ -42,23 +44,25 @@ O1=\
phases: a1
regexp.a: phases
_obj$D/regexp.a: phases
a1: $(O1)
$(AR) grc regexp.a regexp.$O
$(AR) grc _obj$D/regexp.a regexp.$O
rm -f $(O1)
newpkg: clean
$(AR) grc regexp.a
mkdir -p _obj$D
$(AR) grc _obj$D/regexp.a
$(O1): newpkg
$(O2): a1
nuke: clean
rm -f $(GOROOT)/pkg/regexp.a
rm -f $(GOROOT)/pkg$D/regexp.a
packages: regexp.a
packages: _obj$D/regexp.a
install: packages
cp regexp.a $(GOROOT)/pkg/regexp.a
test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg$D
cp _obj$D/regexp.a $(GOROOT)/pkg$D/regexp.a

View File

@ -23,9 +23,9 @@
package regexp
import (
"container/vector";
"os";
"utf8";
"vector";
)
var debug = false;

View File

@ -5,13 +5,15 @@
# DO NOT EDIT. Automatically generated by gobuild.
# gobuild -m >Makefile
D=
O_arm=5
O_amd64=6
O_386=8
OS=568vq
O=$(O_$(GOARCH))
GC=$(O)g
GC=$(O)g -I_obj
CC=$(O)c -FVw
AS=$(O)a
AR=6ar
@ -19,7 +21,7 @@ AR=6ar
default: packages
clean:
rm -f *.[$(OS)] *.a [$(OS)].out
rm -rf *.[$(OS)] *.a [$(OS)].out _obj
test: packages
gotest
@ -51,23 +53,24 @@ O3=\
phases: a1 a2 a3
strconv.a: phases
_obj$D/strconv.a: phases
a1: $(O1)
$(AR) grc strconv.a atoi.$O decimal.$O itoa.$O quote.$O
$(AR) grc _obj$D/strconv.a atoi.$O decimal.$O itoa.$O quote.$O
rm -f $(O1)
a2: $(O2)
$(AR) grc strconv.a ftoa.$O
$(AR) grc _obj$D/strconv.a ftoa.$O
rm -f $(O2)
a3: $(O3)
$(AR) grc strconv.a atof.$O
$(AR) grc _obj$D/strconv.a atof.$O
rm -f $(O3)
newpkg: clean
$(AR) grc strconv.a
mkdir -p _obj$D
$(AR) grc _obj$D/strconv.a
$(O1): newpkg
$(O2): a1
@ -75,9 +78,10 @@ $(O3): a2
$(O4): a3
nuke: clean
rm -f $(GOROOT)/pkg/strconv.a
rm -f $(GOROOT)/pkg$D/strconv.a
packages: strconv.a
packages: _obj$D/strconv.a
install: packages
cp strconv.a $(GOROOT)/pkg/strconv.a
test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg$D
cp _obj$D/strconv.a $(GOROOT)/pkg$D/strconv.a

View File

@ -5,13 +5,15 @@
# DO NOT EDIT. Automatically generated by gobuild.
# gobuild -m >Makefile
D=
O_arm=5
O_amd64=6
O_386=8
OS=568vq
O=$(O_$(GOARCH))
GC=$(O)g
GC=$(O)g -I_obj
CC=$(O)c -FVw
AS=$(O)a
AR=6ar
@ -19,7 +21,7 @@ AR=6ar
default: packages
clean:
rm -f *.[$(OS)] *.a [$(OS)].out
rm -rf *.[$(OS)] *.a [$(OS)].out _obj
test: packages
gotest
@ -43,23 +45,25 @@ O1=\
phases: a1
sync.a: phases
_obj$D/sync.a: phases
a1: $(O1)
$(AR) grc sync.a asm_$(GOARCH).$O mutex.$O
$(AR) grc _obj$D/sync.a asm_$(GOARCH).$O mutex.$O
rm -f $(O1)
newpkg: clean
$(AR) grc sync.a
mkdir -p _obj$D
$(AR) grc _obj$D/sync.a
$(O1): newpkg
$(O2): a1
nuke: clean
rm -f $(GOROOT)/pkg/sync.a
rm -f $(GOROOT)/pkg$D/sync.a
packages: sync.a
packages: _obj$D/sync.a
install: packages
cp sync.a $(GOROOT)/pkg/sync.a
test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg$D
cp _obj$D/sync.a $(GOROOT)/pkg$D/sync.a

View File

@ -5,13 +5,15 @@
# DO NOT EDIT. Automatically generated by gobuild.
# gobuild -m errstr_${GOOS}.go file_${GOOS}.go socket_${GOOS}.go syscall_${GOARCH}_${GOOS}.go time_${GOARCH}_${GOOS}.go types_${GOARCH}_${GOOS}.go asm_${GOARCH}_${GOOS}.s syscall.go signal_${GOARCH}_${GOOS}.go exec.go >Makefile
D=
O_arm=5
O_amd64=6
O_386=8
OS=568vq
O=$(O_$(GOARCH))
GC=$(O)g
GC=$(O)g -I_obj
CC=$(O)c -FVw
AS=$(O)a
AR=6ar
@ -19,7 +21,7 @@ AR=6ar
default: packages
clean:
rm -f *.[$(OS)] *.a [$(OS)].out
rm -rf *.[$(OS)] *.a [$(OS)].out _obj
test: packages
gotest
@ -57,27 +59,28 @@ O4=\
phases: a1 a2 a3 a4
syscall.a: phases
_obj$D/syscall.a: phases
a1: $(O1)
$(AR) grc syscall.a asm_$(GOARCH)_$(GOOS).$O errstr_$(GOOS).$O signal_$(GOARCH)_$(GOOS).$O syscall.$O syscall_$(GOARCH)_$(GOOS).$O
$(AR) grc _obj$D/syscall.a asm_$(GOARCH)_$(GOOS).$O errstr_$(GOOS).$O signal_$(GOARCH)_$(GOOS).$O syscall.$O syscall_$(GOARCH)_$(GOOS).$O
rm -f $(O1)
a2: $(O2)
$(AR) grc syscall.a types_$(GOARCH)_$(GOOS).$O
$(AR) grc _obj$D/syscall.a types_$(GOARCH)_$(GOOS).$O
rm -f $(O2)
a3: $(O3)
$(AR) grc syscall.a file_$(GOOS).$O socket_$(GOOS).$O time_$(GOARCH)_$(GOOS).$O
$(AR) grc _obj$D/syscall.a file_$(GOOS).$O socket_$(GOOS).$O time_$(GOARCH)_$(GOOS).$O
rm -f $(O3)
a4: $(O4)
$(AR) grc syscall.a exec.$O
$(AR) grc _obj$D/syscall.a exec.$O
rm -f $(O4)
newpkg: clean
$(AR) grc syscall.a
mkdir -p _obj$D
$(AR) grc _obj$D/syscall.a
$(O1): newpkg
$(O2): a1
@ -86,9 +89,10 @@ $(O4): a3
$(O5): a4
nuke: clean
rm -f $(GOROOT)/pkg/syscall.a
rm -f $(GOROOT)/pkg$D/syscall.a
packages: syscall.a
packages: _obj$D/syscall.a
install: packages
cp syscall.a $(GOROOT)/pkg/syscall.a
test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg$D
cp _obj$D/syscall.a $(GOROOT)/pkg$D/syscall.a

View File

@ -5,13 +5,15 @@
# DO NOT EDIT. Automatically generated by gobuild.
# gobuild -m >Makefile
D=
O_arm=5
O_amd64=6
O_386=8
OS=568vq
O=$(O_$(GOARCH))
GC=$(O)g
GC=$(O)g -I_obj
CC=$(O)c -FVw
AS=$(O)a
AR=6ar
@ -19,7 +21,7 @@ AR=6ar
default: packages
clean:
rm -f *.[$(OS)] *.a [$(OS)].out
rm -rf *.[$(OS)] *.a [$(OS)].out _obj
test: packages
gotest
@ -42,23 +44,25 @@ O1=\
phases: a1
tabwriter.a: phases
_obj$D/tabwriter.a: phases
a1: $(O1)
$(AR) grc tabwriter.a tabwriter.$O
$(AR) grc _obj$D/tabwriter.a tabwriter.$O
rm -f $(O1)
newpkg: clean
$(AR) grc tabwriter.a
mkdir -p _obj$D
$(AR) grc _obj$D/tabwriter.a
$(O1): newpkg
$(O2): a1
nuke: clean
rm -f $(GOROOT)/pkg/tabwriter.a
rm -f $(GOROOT)/pkg$D/tabwriter.a
packages: tabwriter.a
packages: _obj$D/tabwriter.a
install: packages
cp tabwriter.a $(GOROOT)/pkg/tabwriter.a
test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg$D
cp _obj$D/tabwriter.a $(GOROOT)/pkg$D/tabwriter.a

View File

@ -10,9 +10,9 @@
package tabwriter
import (
"os";
"container/vector";
"io";
"vector";
"os";
"utf8";
)

View File

@ -5,8 +5,8 @@
package tabwriter
import (
"os";
"io";
"os";
"tabwriter";
"testing";
)

View File

@ -5,13 +5,15 @@
# DO NOT EDIT. Automatically generated by gobuild.
# gobuild -m >Makefile
D=
O_arm=5
O_amd64=6
O_386=8
OS=568vq
O=$(O_$(GOARCH))
GC=$(O)g
GC=$(O)g -I_obj
CC=$(O)c -FVw
AS=$(O)a
AR=6ar
@ -19,7 +21,7 @@ AR=6ar
default: packages
clean:
rm -f *.[$(OS)] *.a [$(OS)].out
rm -rf *.[$(OS)] *.a [$(OS)].out _obj
test: packages
gotest
@ -45,28 +47,30 @@ O2=\
phases: a1 a2
template.a: phases
_obj$D/template.a: phases
a1: $(O1)
$(AR) grc template.a format.$O
$(AR) grc _obj$D/template.a format.$O
rm -f $(O1)
a2: $(O2)
$(AR) grc template.a template.$O
$(AR) grc _obj$D/template.a template.$O
rm -f $(O2)
newpkg: clean
$(AR) grc template.a
mkdir -p _obj$D
$(AR) grc _obj$D/template.a
$(O1): newpkg
$(O2): a1
$(O3): a2
nuke: clean
rm -f $(GOROOT)/pkg/template.a
rm -f $(GOROOT)/pkg$D/template.a
packages: template.a
packages: _obj$D/template.a
install: packages
cp template.a $(GOROOT)/pkg/template.a
test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg$D
cp _obj$D/template.a $(GOROOT)/pkg$D/template.a

View File

@ -12,8 +12,8 @@
package testing
import (
"fmt";
"flag";
"fmt";
)
// Report as tests are run; default is silent for success.

View File

@ -5,13 +5,15 @@
# DO NOT EDIT. Automatically generated by gobuild.
# gobuild -m >Makefile
D=
O_arm=5
O_amd64=6
O_386=8
OS=568vq
O=$(O_$(GOARCH))
GC=$(O)g
GC=$(O)g -I_obj
CC=$(O)c -FVw
AS=$(O)a
AR=6ar
@ -19,7 +21,7 @@ AR=6ar
default: packages
clean:
rm -f *.[$(OS)] *.a [$(OS)].out
rm -rf *.[$(OS)] *.a [$(OS)].out _obj
test: packages
gotest
@ -49,23 +51,24 @@ O3=\
phases: a1 a2 a3
time.a: phases
_obj$D/time.a: phases
a1: $(O1)
$(AR) grc time.a sleep.$O zoneinfo.$O
$(AR) grc _obj$D/time.a sleep.$O zoneinfo.$O
rm -f $(O1)
a2: $(O2)
$(AR) grc time.a time.$O
$(AR) grc _obj$D/time.a time.$O
rm -f $(O2)
a3: $(O3)
$(AR) grc time.a tick.$O
$(AR) grc _obj$D/time.a tick.$O
rm -f $(O3)
newpkg: clean
$(AR) grc time.a
mkdir -p _obj$D
$(AR) grc _obj$D/time.a
$(O1): newpkg
$(O2): a1
@ -73,9 +76,10 @@ $(O3): a2
$(O4): a3
nuke: clean
rm -f $(GOROOT)/pkg/time.a
rm -f $(GOROOT)/pkg$D/time.a
packages: time.a
packages: _obj$D/time.a
install: packages
cp time.a $(GOROOT)/pkg/time.a
test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg$D
cp _obj$D/time.a $(GOROOT)/pkg$D/time.a

View File

@ -5,13 +5,15 @@
# DO NOT EDIT. Automatically generated by gobuild.
# gobuild -m >Makefile
D=
O_arm=5
O_amd64=6
O_386=8
OS=568vq
O=$(O_$(GOARCH))
GC=$(O)g
GC=$(O)g -I_obj
CC=$(O)c -FVw
AS=$(O)a
AR=6ar
@ -19,7 +21,7 @@ AR=6ar
default: packages
clean:
rm -f *.[$(OS)] *.a [$(OS)].out
rm -rf *.[$(OS)] *.a [$(OS)].out _obj
test: packages
gotest
@ -45,28 +47,30 @@ O2=\
phases: a1 a2
unicode.a: phases
_obj$D/unicode.a: phases
a1: $(O1)
$(AR) grc unicode.a letter.$O
$(AR) grc _obj$D/unicode.a letter.$O
rm -f $(O1)
a2: $(O2)
$(AR) grc unicode.a decimaldigit.$O
$(AR) grc _obj$D/unicode.a decimaldigit.$O
rm -f $(O2)
newpkg: clean
$(AR) grc unicode.a
mkdir -p _obj$D
$(AR) grc _obj$D/unicode.a
$(O1): newpkg
$(O2): a1
$(O3): a2
nuke: clean
rm -f $(GOROOT)/pkg/unicode.a
rm -f $(GOROOT)/pkg$D/unicode.a
packages: unicode.a
packages: _obj$D/unicode.a
install: packages
cp unicode.a $(GOROOT)/pkg/unicode.a
test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg$D
cp _obj$D/unicode.a $(GOROOT)/pkg$D/unicode.a

View File

@ -7,8 +7,8 @@
package main
import (
"os";
"fmt";
"os";
)
type T struct {

View File

@ -6,7 +6,7 @@
package main
import "vector"
import "container/vector"
type S struct {

View File

@ -5,17 +5,17 @@
package astPrinter
import (
"ast";
"container/vector";
"flag";
"fmt";
"go/ast";
"go/token";
"io";
"os";
"strings";
"tabwriter";
"token";
"unicode";
"utf8";
"vector";
)
@ -137,7 +137,7 @@ const (
type Printer struct {
// output
text io.Write;
// token printing
tprinter TokenPrinter;
@ -146,7 +146,7 @@ type Printer struct {
full bool; // if false, print interface only; print all otherwise
// comments
comments []*ast.Comment; // the list of unassociated comments
comments []*ast.Comment; // the list of unassociated comments
cindex int; // the current comment index
cpos token.Position; // the position of the next comment
@ -163,7 +163,7 @@ type Printer struct {
// semantic state
state int; // current semantic state
laststate int; // state for last string
// expression precedence
prec int;
}
@ -204,7 +204,7 @@ func (P *Printer) Init(text io.Write, tprinter TokenPrinter, comments []*ast.Com
P.nextComments();
// formatting parameters & semantic state initialized correctly by default
// expression precedence
P.prec = token.LowestPrec;
}
@ -563,7 +563,7 @@ func (P *Printer) Signature(params, result []*ast.Field) {
return;
}
}
P.Parameters(result);
}
}

View File

@ -5,18 +5,18 @@
package Compilation
import (
"vector";
"utf8";
"container/vector";
"fmt";
"go/ast";
"go/parser";
"go/scanner";
"go/token";
"os";
"utils";
"platform";
"token";
"scanner";
"parser";
"ast";
"typechecker";
"sort";
"typechecker";
"utf8";
"utils";
)
@ -63,7 +63,7 @@ func (h *errorHandler) Init(filename string, columns bool) {
func (h *errorHandler) Error(pos token.Position, msg string) {
// only report errors that are on a new line
// only report errors that are on a new line
// in the hope to avoid most follow-up errors
if pos.Line == h.errline {
return;
@ -102,7 +102,7 @@ func Compile(filename string, flags *Flags) (*ast.Program, ErrorList) {
if ok2 {
TypeChecker.CheckProgram(&err, prog);
}
// convert error list and sort it
errors := make(ErrorList, err.errors.Len());
for i := 0; i < err.errors.Len(); i++ {

View File

@ -7,17 +7,17 @@
package doc
import (
"ast";
"container/vector";
"fmt";
"go/ast";
"go/token";
"io";
"once";
"regexp";
"sort";
"strings";
"token";
"unicode";
"utf8";
"vector";
"astprinter";
)

View File

@ -27,25 +27,25 @@
package main
import (
"ast";
"bufio";
"container/vector";
"flag";
"fmt";
"go/ast";
"go/parser";
"go/token";
"http";
"io";
"log";
"net";
"once";
"os";
"parser";
pathutil "path";
"sort";
"strings";
"tabwriter";
"template";
"time";
"token";
"vector";
"astprinter";
"comment";

View File

@ -5,13 +5,13 @@
package main
import (
"os";
"flag";
"platform";
"compilation";
"tabwriter";
"ast";
"astprinter";
"compilation";
"flag";
"go/ast";
"os";
"platform";
"tabwriter";
)

View File

@ -5,9 +5,9 @@
package SymbolTable
import (
"utf8";
"container/vector";
"unicode";
"vector";
"utf8";
)

View File

@ -5,9 +5,9 @@
package TypeChecker
import (
"token";
"scanner";
"ast";
"go/ast";
"go/scanner";
"go/token";
)

View File

@ -5,10 +5,10 @@
package main
import (
"os";
"io";
"flag";
"fmt";
"io";
"os";
"tabwriter";
)