1
0
mirror of https://github.com/golang/go synced 2024-09-30 12:18:33 -06:00
Commit Graph

2191 Commits

Author SHA1 Message Date
Russ Cox
daf44e2fa5 fix build: proto depends on fmt now
TBR=r,dsymonds
OCL=28711
CL=28711
2009-05-12 15:47:55 -07:00
David Symonds
6c384d2268 Allow http.Redirect to do both temporary (307) and permanent (301) redirects.
This also adds a missing 'return' when a malformed URL is passed to it.

R=rsc
APPROVED=rsc
DELTA=30  (13 added, 2 deleted, 15 changed)
OCL=28598
CL=28710
2009-05-12 15:41:19 -07:00
Rob Pike
a8f6e38bce implement IsNil() bool for those types that can be nil. most of them, anyway.
R=rsc
DELTA=97  (96 added, 0 deleted, 1 changed)
OCL=28596
CL=28702
2009-05-12 14:57:44 -07:00
Robert Griesemer
c6da3e5a69 A couple of godoc improvements:
- sort directories before printing
- apply filtering to factory functions and methods
- remove a couple of unused files

R=r
DELTA=84  (34 added, 40 deleted, 10 changed)
OCL=28657
CL=28657
2009-05-11 16:52:59 -07:00
Russ Cox
3619f1ea6a change utf8.FullRuneInString and utf8.DecodeRuneInString
to use single string argument instead of string, index.

R=r
DELTA=136  (9 added, 7 deleted, 120 changed)
OCL=28642
CL=28644
2009-05-11 14:10:34 -07:00
Robert Griesemer
5a11a46e2d weekly snapshot
- godoc updated to work w/new directory structure

TBR=r
OCL=28624
CL=28624
2009-05-11 09:47:53 -07:00
Russ Cox
9a861b6aaa check for redeclaration of package name
R=r
DELTA=10  (10 added, 0 deleted, 0 changed)
OCL=28585
CL=28591
2009-05-08 16:40:55 -07:00
Russ Cox
0880593436 gobuild: command printing bug fix
R=r
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=28583
CL=28590
2009-05-08 16:38:42 -07:00
Russ Cox
59be46ca35 use exitgroup on linux to exit whole process.
R=r
DELTA=60  (38 added, 19 deleted, 3 changed)
OCL=28589
CL=28589
2009-05-08 16:36:46 -07:00
Rob Pike
20850fc014 Package unsafe is undocumented. By installing (but not compiling) this file,
which contains only declarations, we can have godoc present documentation
for the package.

R=gri,rsc
DELTA=44  (43 added, 0 deleted, 1 changed)
OCL=28555
CL=28588
2009-05-08 16:24:55 -07:00
Rob Pike
4f21161269 Document runtime functions.
R=rsc
DELTA=25  (25 added, 0 deleted, 0 changed)
OCL=28574
CL=28580
2009-05-08 15:55:45 -07:00
Russ Cox
b3533dfd72 6g:
new type equality restrictions
	better handling of renamed packages
	"sys" is no longer available to programs

R=ken
OCL=28553
CL=28578
2009-05-08 15:40:31 -07:00
Russ Cox
917aa35f8f implications of stricter type equality:
if both types are named, they must be
the same type (arising from the same
declaration).

R=r,gri
DELTA=44  (21 added, 4 deleted, 19 changed)
OCL=28436
CL=28577
2009-05-08 15:40:14 -07:00
Russ Cox
cd3ab57a9c fix comment
R=r
DELTA=1  (0 added, 1 deleted, 0 changed)
OCL=28576
CL=28576
2009-05-08 15:39:18 -07:00
Russ Cox
7e235c1e27 fix build - missing file
TBR=r
OCL=28575
CL=28575
2009-05-08 15:29:43 -07:00
Russ Cox
918afd9491 move things out of sys into os and runtime
R=r
OCL=28569
CL=28573
2009-05-08 15:21:41 -07:00
Rob Pike
c367d1b789 Move sys.Reflect and sys.Unreflect into unsafe.
R=rsc
DELTA=19  (4 added, 5 deleted, 10 changed)
OCL=28563
CL=28566
2009-05-08 14:57:56 -07:00
Russ Cox
d4fa253837 eqtype(t1, t2, 0) => eqtype(t1, t2)
R=ken
OCL=28559
CL=28562
2009-05-08 14:40:38 -07:00
Russ Cox
1b301bac1a throw away os._Error.
make some error types in a few packages

R=r
DELTA=110  (25 added, 46 deleted, 39 changed)
OCL=28382
CL=28561
2009-05-08 14:40:20 -07:00
Rob Pike
01712ae7d3 embeddability: change bufio.BufRead to bufio.Reader etc.
R=rsc
DELTA=112  (0 added, 4 deleted, 108 changed)
OCL=28537
CL=28543
2009-05-08 11:52:39 -07:00
Rob Pike
c8b47c6fce Name change to improve embeddability:
io.Read->io.Reader
	io.Write,Close,etc.->io.Writer,Closer etc.

R=rsc
DELTA=190  (0 added, 0 deleted, 190 changed)
OCL=28525
CL=28535
2009-05-08 11:22:57 -07:00
Rob Pike
df46b3342c update tutorial text to refer to io.Reader etc.
R=rsc
DELTA=15  (0 added, 5 deleted, 10 changed)
OCL=28526
CL=28532
2009-05-08 11:21:25 -07:00
Rob Pike
fb24d792da update spec to io.Writer
R=rsc
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=28528
CL=28531
2009-05-08 11:21:20 -07:00
Robert Griesemer
1a304e1d93 - document string([]int{...}) conversion
- cleanup of open issues section

R=r
DELTA=31  (12 added, 9 deleted, 10 changed)
OCL=28450
CL=28513
2009-05-08 10:25:06 -07:00
Russ Cox
63629d5307 minor cleanup, not required by compiler changes
R=r
DELTA=14  (1 added, 4 deleted, 9 changed)
OCL=28447
CL=28509
2009-05-08 10:14:55 -07:00
Robert Griesemer
b3b3e0da94 conversion bug
R=r
DELTA=24  (24 added, 0 deleted, 0 changed)
OCL=28451
CL=28508
2009-05-08 09:58:25 -07:00
Russ Cox
97bc222d5c another attempt at avoiding IPv6 when it's not supported.
dsymonds confirms that this one works.

R=r
DELTA=50  (23 added, 17 deleted, 10 changed)
OCL=28433
CL=28444
2009-05-07 17:36:29 -07:00
Rob Pike
93bbbf90ef make go/src/lib/hash one directory per package
(slipped through the cracks last time)

R=rsc
DELTA=2436  (1337 added, 1090 deleted, 9 changed)
OCL=28427
CL=28443
2009-05-07 17:15:24 -07:00
David Symonds
abdf4853a7 Define Len() for JSON Map.
R=rsc
APPROVED=rsc
DELTA=6  (5 added, 0 deleted, 1 changed)
OCL=28398
CL=28430
2009-05-07 15:09:32 -07:00
Russ Cox
9ab8129ebe test of struct with embedded interface.
also tests method calls on ptr to interface value.

R=r
DELTA=74  (74 added, 0 deleted, 0 changed)
OCL=28419
CL=28424
2009-05-07 13:43:00 -07:00
Russ Cox
401a95aa83 if a struct s contains an anonymous interface value
with method m, s.m() is ok and m now shows up
in s's method set for interface runtime.

see http://cl/28419-p2 for new test interface10.go.

R=ken
OCL=28420
CL=28423
2009-05-07 13:42:47 -07:00
Russ Cox
0d33992866 next step for 6.out on Borg: fix and test
net code on IPv4-only machines.

R=r
DELTA=27  (25 added, 0 deleted, 2 changed)
OCL=28404
CL=28411
2009-05-07 10:31:48 -07:00
Russ Cox
88a1aa8e1a 6g: error messages
part 2; missing files

R=ken
OCL=28408
CL=28410
2009-05-07 10:30:22 -07:00
Russ Cox
b5e212ffdd 6g: error messages
replace "shape error across CALL" with more information.

x.go:7: not enough arguments to CALL
	a int, b int
	int
x.go:10: assignment count mismatch: 3 = 2
x.go:12: too many arguments to RETURN
	[no arguments expected]
	int, int, int

also leave type alone after conversion failure,
for later errors:

bug049.go:6: cannot convert nil constant to string
bug049.go:6: illegal types for operand: EQ
	string
	nil		# this used to be blank

R=ken
OCL=28405
CL=28407
2009-05-07 10:29:35 -07:00
Russ Cox
5a67ea3883 6g: simplify trampoline by postponing load.
TEXT tramp
		MOVQ 8(SP), AX
		ADDQ $40, AX
		MOVQ AX, 8(SP)
		JMP oldfunc

	is now

	TEXT tramp
		ADDQ $40, 8(SP)
		JMP oldfunc

	and if s/40/0/, then it simplifies to

	TEXT tramp
		JMP oldfunc

	(the tramp is still needed to satisfy
	symbol references from other object files)

R=ken
OCL=28377
CL=28381
2009-05-06 17:06:06 -07:00
Russ Cox
e508c55760 interface method tests
R=r
DELTA=134  (134 added, 0 deleted, 0 changed)
OCL=28373
CL=28380
2009-05-06 17:05:55 -07:00
Russ Cox
3071f8c8e5 fix a few type errors, make ErrorString a value
will submit with fixed compiler

R=r
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=28371
CL=28379
2009-05-06 17:05:46 -07:00
Russ Cox
a6ba5ec535 6g: new interface rules (code got simpler!)
R=ken
OCL=28374
CL=28378
2009-05-06 17:05:35 -07:00
Robert Griesemer
d76f095750 semi-weekly snapshot:
- format-driven pretty printing now handles all of Go code
- better error handling

R=r
OCL=28370
CL=28372
2009-05-06 16:28:18 -07:00
Russ Cox
1d1316c885 makefile fixes
R=r
OCL=28369
CL=28369
2009-05-06 16:16:55 -07:00
Russ Cox
83cd4ee070 6g: generate string data as individual symbols,
so that 6l can discard strings used by dead code.
also, for short strings, generate DUPOK global
symbols so that references to, say, "%s: %s" in
multiple files result in only a single symbol.

R=ken
OCL=28361
CL=28361
2009-05-06 13:47:40 -07:00
Rob Pike
0c3a43e7b2 error handling had a bug in execute: the error channel was being shared.
fix that and clean up state handling a little.

R=rsc
DELTA=44  (18 added, 8 deleted, 18 changed)
OCL=28359
CL=28359
2009-05-06 13:42:59 -07:00
Ken Thompson
876c637e42 added a distinguishing string to the error prints
R=r
OCL=28321
CL=28357
2009-05-06 12:43:09 -07:00
Rob Pike
68382ec021 add missing Makefile to repair build
TBR=gri
OCL=28320
CL=28320
2009-05-05 21:31:22 -07:00
Ken Thompson
c4de24981a signs on div and mod
R=r
OCL=28319
CL=28319
2009-05-05 21:19:58 -07:00
Robert Griesemer
1d6bd79ceb new dir structure for lib/go
R=r
DELTA=9298  (4760 added, 4536 deleted, 2 changed)
OCL=28317
CL=28317
2009-05-05 18:38:45 -07:00
Russ Cox
3e9b171b79 6g bug: was dropping assignment of nil to globals
R=ken
OCL=28314
CL=28314
2009-05-05 17:33:51 -07:00
Rob Pike
86043a87c9 mv container/vector down one level for new rules.
simplify run.bash now that lib has make test that recurs.

R=rsc
DELTA=1179  (578 added, 596 deleted, 5 changed)
OCL=28313
CL=28313
2009-05-05 17:24:01 -07:00
Robert Griesemer
cc35ca529b wrong type used for dynamic type test
R=r
DELTA=40  (40 added, 0 deleted, 0 changed)
OCL=28308
CL=28311
2009-05-05 17:05:58 -07:00
Rob Pike
9b2c5da922 directory-per-package step 1: move files from lib/X.go to lib/X/X.go
no substantive changes except:
	- new Makefiles, all auto-generated
	- go/src/lib/Makefile has been extensively edited

R=rsc
OCL=28310
CL=28310
2009-05-05 17:05:39 -07:00