Russ Cox
900e076d21
handle zeroed interface in ifaceI2I
...
R=r
OCL=16938
CL=16938
2008-10-10 16:21:50 -07:00
Russ Cox
0adc1db757
until 6g implements it, warn about using int in interface.
...
R=ken
OCL=16935
CL=16935
2008-10-10 16:14:13 -07:00
Russ Cox
827dcb86b7
add sys.BUG_intereq to compare interfaces for equality
...
R=r
OCL=16929
CL=16929
2008-10-10 15:30:32 -07:00
Cary Hull
f960840a0e
Adding Mkdir.
...
R=rsc
APPROVED=rsc
DELTA=21 (21 added, 0 deleted, 0 changed)
OCL=16794
CL=16803
2008-10-09 00:15:37 -07:00
Russ Cox
5f1202428b
add empty var ( ), type ( ), const ( ) factorings
...
suggested by rob (could make programs generating
go easier to write).
R=ken
DELTA=13 (13 added, 0 deleted, 0 changed)
OCL=16766
CL=16766
2008-10-08 15:33:09 -07:00
Russ Cox
bbb00c62e1
split all.bash into make.bash and run.bash
...
R=r
OCL=16720
CL=16728
2008-10-08 09:46:54 -07:00
Russ Cox
103fec0455
add http to lib build
...
R=r
OCL=16721
CL=16727
2008-10-08 09:46:31 -07:00
Russ Cox
047c6ec6da
check $GOROOT before diving into build
...
R=r
DELTA=6 (6 added, 0 deleted, 0 changed)
OCL=16726
CL=16726
2008-10-08 09:46:20 -07:00
Cary Hull
f4a8db667b
Fixes breakage caused by semicolon restriction.
...
R=rsc
APPROVED=rsc
DELTA=50 (4 added, 0 deleted, 46 changed)
OCL=16707
CL=16725
2008-10-08 09:34:50 -07:00
Russ Cox
b4f8e01acb
more interface checks:
...
- pointer to interface cannot have methods
- record type names for better runtime error
R=r,ken
DELTA=85 (80 added, 0 deleted, 5 changed)
OCL=16658
CL=16722
2008-10-08 09:21:57 -07:00
Cary Hull
38c2472609
Unterminated declaration breaks build.
...
R=rsc
APPROVED=rsc
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=16688
CL=16690
2008-10-07 17:25:32 -07:00
Russ Cox
02d184b303
remove support for *T as an implicit declaration of T
...
R=ken
OCL=16651
CL=16653
2008-10-07 13:00:10 -07:00
Russ Cox
e6cd1e445b
remove uses of *T as an implicit forward declaration of T
...
R=gri,r
OCL=16648
CL=16652
2008-10-07 12:59:54 -07:00
Russ Cox
96da920f1a
fix bug:
...
type T struct
export type T struct { a int }
was not exporting T
R=ken
OCL=16650
CL=16650
2008-10-07 12:42:57 -07:00
Russ Cox
d364d28142
implement new semicolon rules:
...
* 1. all statements and declarations are terminated by semicolons
* 2. semicolons can be omitted at top level.
* 3. semicolons can be omitted before and after the closing ) or }
* on a list of statements or declarations.
now that semicolons are in, uncomment forward declaration
of interfaces
R=ken
DELTA=285 (124 added, 114 deleted, 47 changed)
OCL=16638
CL=16646
2008-10-07 12:36:30 -07:00
Russ Cox
983f06bdb6
update code to follow new semicolon rules:
...
* 1. all statements and declarations are terminated by semicolons
* 2. semicolons can be omitted at top level.
* 3. semicolons can be omitted before and after the closing ) or }
* on a list of statements or declarations.
/home/rsc/bin/addsemi and then diff+tweak.
R=r,gri
OCL=16620
CL=16643
2008-10-07 12:31:31 -07:00
Rob Pike
7ee60b174d
sys.stringtorune doesn't need a length parameter.
...
R=rsc
DELTA=7 (0 added, 0 deleted, 7 changed)
OCL=16600
CL=16630
2008-10-07 10:03:34 -07:00
Russ Cox
74e2e087e2
change type names to go live at the name, so that
...
type T struct {
next *T
}
and
type T *struct {
next T
}
are valid without needing forward declarations.
add "type T struct" syntax for forward struct declarations.
add "type T interface" syntax, but commented out
(need to fix semicolons first)
R=ken
DELTA=452 (259 added, 115 deleted, 78 changed)
OCL=16580
CL=16584
2008-10-06 16:44:17 -07:00
Russ Cox
1b257b2bb3
silence gcc warning - initialize two variables
...
R=ken
OCL=16550
CL=16550
2008-10-06 13:52:23 -07:00
Ken Thompson
6499fbe734
bug060
...
R=r
OCL=16497
CL=16497
2008-10-04 17:11:01 -07:00
Ken Thompson
f25843e65e
bug 026
...
R=r
OCL=16494
CL=16494
2008-10-04 15:17:49 -07:00
Russ Cox
c8b9970e16
change *a1++; to plain a1++
...
R=ken
DELTA=2 (0 added, 0 deleted, 2 changed)
OCL=16489
CL=16489
2008-10-04 02:54:19 -07:00
Russ Cox
2e1bb4a4cf
add method test & fix method name bugs
...
R=ken,r
DELTA=86 (72 added, 9 deleted, 5 changed)
OCL=16488
CL=16488
2008-10-04 02:51:03 -07:00
Russ Cox
45f4e38506
silence gcc warnings
...
R=ken
OCL=16449
CL=16466
2008-10-03 16:23:02 -07:00
Russ Cox
b8babed7c2
new import/export format
...
package flag
export type flag.Flag struct { name flag.string; usage flag.string; \
value flag.Value; next *flag.Flag }
type flag.string string
type flag.Value interface { AsBool () (? *flag.BoolValue); \
AsInt () (? *flag.IntValue); AsString () (? *flag.StringValue); \
IsBool () (? flag.bool); IsInt () (? flag.bool); IsString () (? flag.bool); \
Str () (? flag.string); ValidValue (str flag.string) (? flag.bool) }
type flag.BoolValue struct { val flag.bool; p *flag.bool }
type flag.IntValue struct { val flag.int64; p *flag.int64 }
type flag.StringValue struct { val flag.string; p *flag.string }
type flag.bool bool
func (e *flag.StringValue) AsBool () (? *flag.BoolValue)
func (e *flag.StringValue) AsInt () (? *flag.IntValue)
...
the \ continuations are for this message, not real.
changed delimiter for import from (( )) to $$ $$.
replaced mksys.bash with mksys.c
changed sys.go to use leading export,
fake package name is now SYS not foop
don't always require ; on forward func decls
R=ken,r
DELTA=1827 (446 added, 1083 deleted, 298 changed)
OCL=16433
CL=16463
2008-10-03 16:15:55 -07:00
Ken Thompson
8877d27b40
interfaces of all types
...
R=r
OCL=16462
CL=16462
2008-10-03 16:12:21 -07:00
Rob Pike
bbb908fef0
allow prof to launch the process
...
R=rsc
DELTA=32 (30 added, 0 deleted, 2 changed)
OCL=16440
CL=16445
2008-10-03 14:49:10 -07:00
Ken Thompson
ed139c1e37
more on arbitrary receiver types
...
this CL passes the tests, but should
be considered unstable
R=r
OCL=16390
CL=16390
2008-10-02 20:51:10 -07:00
Ken Thompson
53a22770a7
names now println/panicln
...
bug fix in named-return
R=r
OCL=16377
CL=16377
2008-10-02 15:37:15 -07:00
Ken Thompson
f21e731c71
added printn and panicn
...
prints that insert spaces and new line
R=r
OCL=16370
CL=16370
2008-10-02 14:38:07 -07:00
Russ Cox
0216273c7a
add values to some "return" statements.
...
delete unused variables
R=ken
OCL=16360
CL=16360
2008-10-02 11:34:04 -07:00
Ken Thompson
d015f896bb
clear output parameters
...
R=r
OCL=16345
CL=16345
2008-10-01 20:00:58 -07:00
Ken Thompson
970d6a14c4
initialization of
...
var a,b int;
R=r
OCL=16318
CL=16318
2008-10-01 14:16:57 -07:00
Russ Cox
abb95518ab
add a script to build *everything*
...
R=r
DELTA=41 (41 added, 0 deleted, 0 changed)
OCL=16290
CL=16293
2008-10-01 11:06:13 -07:00
Russ Cox
8dc08788ef
remove ( ) around mismatch type prints,
...
so that they don't look like functions.
R=ken
OCL=16244
CL=16244
2008-09-30 15:38:41 -07:00
Russ Cox
387c1bc31e
pretty types; use 6g -t to disable
...
R=ken
OCL=16240
CL=16242
2008-09-30 15:35:40 -07:00
Russ Cox
a4f15640aa
i can import "net" in package net
...
and still have a variable named "net"
R=r
DELTA=18 (0 added, 0 deleted, 18 changed)
OCL=16220
CL=16222
2008-09-30 14:03:13 -07:00
Russ Cox
1f1ae404f8
for loops in hashmap.
...
a few missing FLUSH.
R=ken
OCL=16221
CL=16221
2008-09-30 14:02:53 -07:00
Russ Cox
a05c59fe91
cleanup export
...
R=ken
OCL=16219
CL=16219
2008-09-30 13:52:44 -07:00
Russ Cox
b033c581db
fix export bug for /usr/r/rpc
...
R=ken
OCL=16218
CL=16218
2008-09-30 13:49:31 -07:00
Russ Cox
4d571c9093
fix up arg list parsing to handle any names:
...
type t1 int;
type t2 int;
type t3 int;
func f1(t1, t2, t3);
func f2(t1, t2, t3 bool);
func f3(t1, t2, x t3);
func f4(*t2, x t3); // error: cannot mix
func f5(t1, *t3);
func (x *t1) f6(y *[]t2) (t1, *t3);
func f7() (int, *string);
func f8(t1, *t2, x t3); // error: cannot mix
func f9() (x int, *string);
func f10(*t2, t3);
R=ken
OCL=16202
CL=16210
2008-09-30 12:53:11 -07:00
Ken Thompson
b6f59358b5
minor bugs
...
R=r
OCL=16163
CL=16163
2008-09-29 20:33:51 -07:00
Ian Lance Taylor
489b5001e2
Use unsigned int in itoa to avoid relying on the behaviour of
...
signed integer overflow when negating the most negative
integer.
R=rsc
DELTA=11 (0 added, 7 deleted, 4 changed)
OCL=16105
CL=16120
2008-09-29 13:40:23 -07:00
Russ Cox
e4a61c6524
* implement Linux epoll for polling i/o
...
* isolate OS-specific polling goop in Pollster type
* move generic poll loop out of fd_darwin.go into fd.go
R=r
DELTA=782 (448 added, 281 deleted, 53 changed)
OCL=16108
CL=16119
2008-09-29 13:37:00 -07:00
Russ Cox
878fe69bc1
delete unused files
...
R=r
DELTA=494 (0 added, 494 deleted, 0 changed)
OCL=16109
CL=16115
2008-09-29 13:16:28 -07:00
Ken Thompson
89ac5618ac
toward methods on any type
...
R=r
OCL=16068
CL=16068
2008-09-28 20:22:31 -07:00
Ken Thompson
3a884d76ac
bug in simul assignment
...
R=r
OCL=16053
CL=16053
2008-09-27 17:46:40 -07:00
Ken Thompson
ce0f1dee6f
change print(float) from 5 to 7 sig digits
...
R=r
OCL=16045
CL=16045
2008-09-27 13:33:50 -07:00
Ken Thompson
7be2b9fdf6
bug in argument passing
...
R=r
OCL=16044
CL=16044
2008-09-27 13:32:38 -07:00
Ian Lance Taylor
2fb4edd3e1
Correct zoneinfo version number: it's not 2, it's '2'.
...
R=rsc
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=16032
CL=16040
2008-09-27 09:39:37 -07:00