1
0
mirror of https://github.com/golang/go synced 2024-10-04 11:11:21 -06:00
Commit Graph

76 Commits

Author SHA1 Message Date
Russ Cox
c249a8de32 rename various magic names.
sigi and sigt:
	sys·sigi_inter -> sigi·inter
	sys·sigt_int -> sigt·int
	Package·sigt_Type -> sigt·Package.Type

	local type T in file x.go T_x -> T·x
	second one T_x_1 -> T·x·1

	method names M on T  T_M -> T·M

correctly handle local embedded types

init functions are the only place left that use underscores

R=ken
OCL=18377
CL=18377
2008-11-03 15:36:08 -08:00
Ken Thompson
2fef4c7198 DOTDOTDOT import/export
R=r
OCL=18319
CL=18319
2008-11-01 16:52:12 -07:00
Ken Thompson
74427c6346 DOTDOTDOT
R=r
OCL=18317
CL=18317
2008-11-01 16:36:46 -07:00
Russ Cox
8a1ad75644 make %Z handle embedded NULs; remove fixed-size buffer
R=r
DELTA=44  (2 added, 15 deleted, 27 changed)
OCL=18270
CL=18273
2008-10-31 14:57:57 -07:00
Russ Cox
57804f1d2d escape \ in %Z
R=ken
OCL=18202
CL=18202
2008-10-30 17:28:33 -07:00
Russ Cox
dc6bd11ce8 make %Z escape "
R=ken
OCL=18180
CL=18180
2008-10-30 15:35:56 -07:00
Russ Cox
1850b29da6 struct annotations in imports.
distribute tag across multiple names.

R=ken
OCL=18178
CL=18178
2008-10-30 15:25:26 -07:00
Russ Cox
f27aaf4819 structure field annotation strings
R=ken
OCL=18176
CL=18176
2008-10-30 15:13:09 -07:00
Ken Thompson
2f5a05a859 bug 113
R=r
OCL=18081
CL=18081
2008-10-29 16:55:52 -07:00
Ken Thompson
4a3ce5f19e sigt_int
R=r
OCL=18030
CL=18030
2008-10-29 13:40:00 -07:00
Ken Thompson
c21d9a1ec9 the end of life as we know it
int is new type

R=r
OCL=18023
CL=18023
2008-10-29 12:46:44 -07:00
Ken Thompson
a3cdd2e802 bug
R=r
OCL=17853
CL=17853
2008-10-25 14:24:51 -07:00
Ken Thompson
6d3d56d55a bug
R=r
OCL=17852
CL=17852
2008-10-25 13:50:18 -07:00
Ken Thompson
b642cf8c00 embedded methods
R=r
OCL=17851
CL=17851
2008-10-25 13:31:25 -07:00
Ken Thompson
b379d54dea another step toward interface subtypes
put explicit ./ on some runtime tests

R=r
OCL=17839
CL=17839
2008-10-24 20:14:28 -07:00
Russ Cox
689b28fd96 fix method function type compare bug (again)
R=ken
OCL=17819
CL=17819
2008-10-24 14:56:54 -07:00
Russ Cox
c14c961ae4 Automated g4 rollback of changelist 17815.
*** Reason for rollback ***

  now it's comparing function parameter names...

*** Original change description ***

fix method function type compare bug

R=ken
OCL=17816
CL=17816
2008-10-24 14:32:48 -07:00
Russ Cox
0be746d581 fix method function type compare bug
R=ken
OCL=17815
CL=17815
2008-10-24 14:29:01 -07:00
Ken Thompson
7ed8fc611d embedded types
auto & on methods

R=r
OCL=17682
CL=17682
2008-10-22 18:18:08 -07:00
Russ Cox
ad48706a24 do not use fake names on anonymous function return values
R=ken
OCL=17679
CL=17679
2008-10-22 17:45:47 -07:00
Russ Cox
21617250f4 import/export of embedded types
R=ken
OCL=17643
CL=17643
2008-10-22 13:22:56 -07:00
Russ Cox
1a149ca1be stop looking for type names beginning with _.
they're gone.

R=ken
OCL=17569
CL=17569
2008-10-21 14:44:31 -07:00
Russ Cox
aacfbb461b 6g:
* print int as int, not P.int
	* write type info for non-exported types
	   in its own new section.

ar:
	skip over rest of line after $$

R=ken
OCL=17568
CL=17568
2008-10-21 14:34:45 -07:00
Russ Cox
28912ce03f fix compiler warnings
R=r
DELTA=44  (10 added, 9 deleted, 25 changed)
OCL=17502
CL=17502
2008-10-20 15:26:38 -07:00
Russ Cox
1163b1db6f diagnose various conversion problems
R=ken
OCL=17320
CL=17320
2008-10-16 15:59:31 -07:00
Ken Thompson
1bf38484d1 interface on arbitrary types
global signatures for basic types

R=r
OCL=17238
CL=17240
2008-10-15 17:08:10 -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
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
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
Ken Thompson
f25843e65e bug 026
R=r
OCL=16494
CL=16494
2008-10-04 15:17:49 -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
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
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
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
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
89ac5618ac toward methods on any type
R=r
OCL=16068
CL=16068
2008-09-28 20:22:31 -07:00
Ken Thompson
4332e0a546 remove extraneous print
R=r
OCL=15666
CL=15666
2008-09-22 17:29:12 -07:00
Ken Thompson
8231e94520 now method/interface code
R=r
OCL=15627
CL=15627
2008-09-22 12:16:19 -07:00
Ken Thompson
39a4b1421f bug103 - but the fix caused other
things to break. hopefully all fixed
now.

R=r
OCL=15597
CL=15597
2008-09-20 14:59:15 -07:00
Ken Thompson
9dbaab54d1 rewriting bugs
R=r
OCL=14810
CL=14810
2008-09-04 12:21:10 -07:00
Ken Thompson
182f91ffe0 map literals
R=r
OCL=14759
CL=14759
2008-09-03 14:40:22 -07:00
Ken Thompson
4539ced714 array literals
R=r
OCL=14756
CL=14756
2008-09-03 14:09:29 -07:00
Ken Thompson
1423bf3dc4 structure literals
R=r
OCL=14735
CL=14735
2008-09-02 19:11:25 -07:00
Ken Thompson
9c5669bd0b bug in conv(string, bytearray)
R=r
OCL=14732
CL=14732
2008-09-02 16:21:30 -07:00
Ken Thompson
c6130e9f1f get rid of static/dynamic array distinction
R=r
OCL=14634
CL=14634
2008-08-28 15:17:37 -07:00
Ken Thompson
66a603c986 arrays
R=r
OCL=14603
CL=14603
2008-08-27 17:28:30 -07:00
Ken Thompson
4797523572 fixed bugs in const/case
R=r
DELTA=138  (75 added, 12 deleted, 51 changed)
OCL=14129
CL=14131
2008-08-12 14:04:03 -07:00