]> Cypherpunks.ru repositories - gostls13.git/commitdiff
convert non-pkg go files to whole-package compilation.
authorRuss Cox <rsc@golang.org>
Wed, 12 Aug 2009 20:18:54 +0000 (13:18 -0700)
committerRuss Cox <rsc@golang.org>
Wed, 12 Aug 2009 20:18:54 +0000 (13:18 -0700)
mostly removing forward declarations.

R=r
DELTA=138  (2 added, 127 deleted, 9 changed)
OCL=33068
CL=33099

13 files changed:
test/chan/powser1.go
test/chan/powser2.go
test/fixedbugs/bug043.go [deleted file]
test/fixedbugs/bug044.go [deleted file]
test/fixedbugs/bug085.go
test/hashmap.go
test/interface/recursive.go
test/ken/mfunc.go
test/ken/ptrfun.go
test/ken/rob2.go
test/ken/simpfun.go
usr/dsymonds/iterable/Makefile
usr/dsymonds/iterable/iterable_test.go

index f37f639aba24e71c34a63caab598c91db68c2041..fc828330683a04c4e8ed2172322db202d66ac4ef 100644 (file)
@@ -41,8 +41,6 @@ var chnames string
 var chnameserial int
 var seqno int
 
-func Init();
-
 func mkdch() *dch {
        c := chnameserial % len(chnames);
        chnameserial++;
@@ -428,7 +426,7 @@ func Poly(a []rat) PS {
 */
 
 // Multiply. The algorithm is
-//     let U = u + x*UU
+//     let U = u + x*UU
 //     let V = v + x*VV
 //     then UV = u*v + x*(u*VV+v*UU) + x*x*UU*VV
 
@@ -547,7 +545,7 @@ func Exp(U PS) PS {
 // Substitute V for x in U, where the leading term of V is zero
 //     let U = u + x*UU
 //     let V = v + x*VV
-//     then S(U,V) = u + VV*S(V,UU)
+//     then S(U,V) = u + VV*S(V,UU)
 // bug: a nonzero constant term is ignored
 
 func Subst(U, V PS) PS {
index d910019691fb4cf83c0fa493ef18c96e7c8abd11..afd126f07d620c9c8cb21e89fa443b2a7079242a 100644 (file)
@@ -50,8 +50,6 @@ var chnames string
 var chnameserial int
 var seqno int
 
-func Init();
-
 func mkdch() *dch {
        c := chnameserial % len(chnames);
        chnameserial++;
@@ -441,7 +439,7 @@ func Poly(a [] *rat) PS{
 */
 
 // Multiply. The algorithm is
-//     let U = u + x*UU
+//     let U = u + x*UU
 //     let V = v + x*VV
 //     then UV = u*v + x*(u*VV+v*UU) + x*x*UU*VV
 
@@ -560,7 +558,7 @@ func Exp(U PS) PS{
 // Substitute V for x in U, where the leading term of V is zero
 //     let U = u + x*UU
 //     let V = v + x*VV
-//     then S(U,V) = u + VV*S(V,UU)
+//     then S(U,V) = u + VV*S(V,UU)
 // bug: a nonzero constant term is ignored
 
 func Subst(U, V PS) PS {
diff --git a/test/fixedbugs/bug043.go b/test/fixedbugs/bug043.go
deleted file mode 100644 (file)
index 65d720b..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2009 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// $G $D/$F.go && $L $F.$A && ./$A.out
-
-// Forward declarations
-
-package main
-
-func f (x int) ;  // this works
-func f (x int) {}
-
-func i (x, y int) ;  // this works
-func i (x, y int) {}
-
-func g (x int) float ;  // BUG this doesn't
-func g (x int) float { return 0.0 }
-
-func h (x int) (u int, v int) ;  // BUG this doesn't
-func h (x int) (u int, v int) { return; }
-
-func main() {}
diff --git a/test/fixedbugs/bug044.go b/test/fixedbugs/bug044.go
deleted file mode 100644 (file)
index 789237a..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// $G $D/$F.go && $L $F.$A && ./$A.out
-
-package main
-
-type S struct {
-};
-
-func (p *S) M1a() ;
-
-func (p *S) M2a() {
-  p.M1a();
-}
-
-func (p *S) M1a() {}  // this works
-
-
-func (p *S) M1b() int;
-
-func (p *S) M2b() {
-  p.M1b();
-}
-
-func (p *S) M1b() int { return 0 }  // BUG this doesn't
-
-func main() {}
index c1133fe92890fe9db21ec9a615dc2e042a22155f..02be717534039bd903743737b56d0b4e7eab4f2c 100644 (file)
@@ -9,11 +9,11 @@ package P
 var x int
 
 func foo() {
-       print(P.x);  // P should be defined between the outermost "universe" scope and the global scope
+       print(P.x);  // ERROR "undefined"
 }
 
 /*
-uetli:~/Source/go1/test/bugs gri$ 6g bug085.go 
+uetli:~/Source/go1/test/bugs gri$ 6g bug085.go
 bug085.go:6: P: undefined
 Bus error
 */
index 6f70f2b50c60dc5e892c1aac030b87655774d4be..49007810c6ccc639750bbe4cc51458373eb2ac1f 100755 (executable)
@@ -87,9 +87,6 @@ func (m *HashMap) Probe (key *KeyType) *Entry {
 }
 
 
-func (m *HashMap) Resize();
-
-
 func (m *HashMap) Lookup (key *KeyType, insert bool) *Entry {
        // Find a matching entry.
        var p *Entry = m.Probe(key);
index 707cfcb8c3d780a187c3da66b3e78ea417aebbf6..87509838f4c08a2866df5a89ac707fc4e0d50c5d 100644 (file)
@@ -19,6 +19,5 @@ type I2 interface {
 }
 
 type T int
-func (t T) bar() I1;
 func (t T) foo() I2 { return t }
 func (t T) bar() I1 { return t }
index ab579e9324b7bc1166c8536a63c200ed07a0c563..78c9617a8fe541a4cd3cf23ac4398cceca84c008 100644 (file)
@@ -6,8 +6,6 @@
 
 package main
 
-func   simple(ia,ib,ic int) (oa,ob int);
-
 func
 main()
 {
index fe16fce3aa8a12823c7401b1c10ed48099705b9d..111ac61bb9f230824dd87ba52afebf956226b579 100644 (file)
@@ -13,8 +13,6 @@ type C struct
        x       func(p *C)int;
 }
 
-func   g(p *C)int;
-
 func
 (this *C) f()int
 {
index 29be2efcc183e7cda592e82fec5ef5e910e60829..5098d939901e2e7d653858947e0bb68ebaa63a63 100644 (file)
@@ -36,8 +36,6 @@ type Slist struct {
 
 }
 
-func (this *Slist) Print();
-
 func (this *Slist) Car() *Slist {
        return this.list.car;
 }
@@ -67,9 +65,6 @@ func (slist *Slist) Free() {
 //     free(slist);
 }
 
-func OpenFile();
-func Parse() *Slist;
-
 //Slist* atom(byte *s, int i);
 
 var token int;
index 1e063bf0f6d846c09e709607afb7dac6d6aa2fa9..ee2c1a9a0914c2a72a4fcd5ef86bc4ef76022a0c 100644 (file)
@@ -7,8 +7,6 @@
 
 package main
 
-func fun(ia,ib,ic int)int;
-
 func
 main()
 {
index e47791c42b6e03d1ef1b68b1cf4b0087269c7a30..3485d0ee43acc9ef1a877891c2fc1df18ede9420 100644 (file)
@@ -2,67 +2,10 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-# DO NOT EDIT.  Automatically generated by gobuild.
-# gobuild -m >Makefile
+include $(GOROOT)/src/Make.$(GOARCH)
 
-D=
+TARG=iterable
+GOFILES=\
+       iterable.go\
 
-O_arm=5
-O_amd64=6
-O_386=8
-OS=568vq
-
-O=$(O_$(GOARCH))
-GC=$(O)g -I_obj
-CC=$(O)c -FVw
-AS=$(O)a
-AR=6ar
-
-default: packages
-
-clean:
-       rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
-       gotest
-
-coverage: packages
-       gotest
-       6cov -g `pwd` | grep -v '_test\.go:'
-
-%.$O: %.go
-       $(GC) $*.go
-
-%.$O: %.c
-       $(CC) $*.c
-
-%.$O: %.s
-       $(AS) $*.s
-
-O1=\
-       iterable.$O\
-
-
-phases: a1
-_obj$D/iterable.a: phases
-
-a1: $(O1)
-       $(AR) grc _obj$D/iterable.a iterable.$O
-       rm -f $(O1)
-
-
-newpkg: clean
-       mkdir -p _obj$D
-       $(AR) grc _obj$D/iterable.a
-
-$(O1): newpkg
-$(O2): a1
-
-nuke: clean
-       rm -f $(GOROOT)/pkg$D/iterable.a
-
-packages: _obj$D/iterable.a
-
-install: packages
-       test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg$D
-       cp _obj$D/iterable.a $(GOROOT)/pkg$D/iterable.a
+include $(GOROOT)/src/Make.pkg
index 8abba646e1d67e7313f459d7adaec910b5befa09..512cac1398efaf81ff27fdac615dd854f22d85e4 100644 (file)
@@ -5,7 +5,6 @@
 package iterable
 
 import (
-       "iterable";
        "testing";
 )