1
0
mirror of https://github.com/golang/go synced 2024-09-30 08:28:34 -06:00
Commit Graph

2205 Commits

Author SHA1 Message Date
Ian Lance Taylor
025506d0a3 A comparison of two values with a type equivalent to string
gives an type mismatch error, although both values appear to
have the same type.

R=ken,rsc
DELTA=23  (23 added, 0 deleted, 0 changed)
OCL=28786
CL=28805
2009-05-14 06:25:40 -07:00
Russ Cox
7cf30cd49e bug150
R=ken
OCL=28785
CL=28785
2009-05-13 18:05:27 -07:00
Russ Cox
8f854174c7 reflect: update comment (there is no BoolType)
R=r
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=28756
CL=28784
2009-05-13 18:03:49 -07:00
Russ Cox
cc1d4b7e1b Unix domain socket support, Linux and Darwin.
R=r
DELTA=534  (353 added, 99 deleted, 82 changed)
OCL=28783
CL=28783
2009-05-13 18:03:41 -07:00
Robert Griesemer
533dfd6291 New type compatibility rules:
- changed type equality to type compatibility, updated rules
- string literals have ideal string type
- conversion w/ relaxed type compatibilty

DELTA=123  (26 added, 22 deleted, 75 changed)
OCL=28763
CL=28780
2009-05-13 16:56:00 -07:00
Robert Griesemer
f3b08744a2 Simplified AST:
- one node for array and slice types
- one node for index and slice expressions
- simplified parser, astprinter, and ast.txt

R=r
DELTA=71  (0 added, 43 deleted, 28 changed)
OCL=28768
CL=28768
2009-05-13 15:18:05 -07:00
Rob Pike
6fa6f134f1 fix indentation
R=rsc
OCL=28752
CL=28752
2009-05-13 10:34:11 -07:00
Ian Lance Taylor
7aabf2d9b1 Add os.Link, os.Symlink, os.Readlink.
R=r,rsc
DELTA=161  (161 added, 0 deleted, 0 changed)
OCL=28745
CL=28747
2009-05-13 10:16:46 -07:00
Rob Pike
52f071ed43 Rename ParseError to Error
R=rsc
DELTA=13  (6 added, 1 deleted, 6 changed)
OCL=28743
CL=28746
2009-05-13 10:01:55 -07:00
Robert Griesemer
98b4f6ac38 cleanup of unsafe documentation
R=r
DELTA=19  (4 added, 7 deleted, 8 changed)
OCL=28723
CL=28732
2009-05-12 21:37:46 -07:00
Rob Pike
b66d703941 change name of reflect.NewInitValue to the more descriptive NewZeroValue.
R=rsc
DELTA=10  (0 added, 0 deleted, 10 changed)
OCL=28717
CL=28720
2009-05-12 16:16:52 -07:00
Russ Cox
d06a79e31b no need for compiler to hard-code definition of runtime.
use the actual go source instead.

R=r
DELTA=90  (66 added, 18 deleted, 6 changed)
OCL=28708
CL=28719
2009-05-12 16:15:52 -07:00
Russ Cox
c7d30bceb2 describe each interface test
R=r
DELTA=20  (20 added, 0 deleted, 0 changed)
OCL=28707
CL=28716
2009-05-12 16:09:47 -07:00
Russ Cox
28516d4c78 update reflect for upcoming interface representation change.
test case for new change.

both work with the current compiler too.

R=r
DELTA=150  (145 added, 2 deleted, 3 changed)
OCL=28703
CL=28715
2009-05-12 16:08:16 -07:00
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