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

1606 Commits

Author SHA1 Message Date
Rob Pike
a029f1eb7e work around link bug
R=rsc
OCL=27242
CL=27242
2009-04-08 22:17:09 -07:00
Rob Pike
df0b471533 First cut at templating library for text generation
R=rsc
DELTA=663  (663 added, 0 deleted, 0 changed)
OCL=27239
CL=27241
2009-04-08 22:08:55 -07:00
David Symonds
03fbd72ddb Add new functions to the iterable package:
- Filter
- Find
- Partition

R=rsc
APPROVED=rsc
DELTA=117  (92 added, 17 deleted, 8 changed)
OCL=27135
CL=27240
2009-04-08 21:50:40 -07:00
Russ Cox
3067781ab9 func f() (int, int);
x := f();

used to give
	fatal error: dowidth fn struct struct { int; int }

now gives
	assignment count mismatch: 1 = 2

R=ken
OCL=27198
CL=27201
2009-04-07 22:20:37 -07:00
Russ Cox
7cbec417b1 fumbly fingers + non-working ^C
submitted CL without applying edits.

make changes from CL 27142 review

R=r
DELTA=26  (17 added, 3 deleted, 6 changed)
OCL=27155
CL=27199
2009-04-07 21:53:39 -07:00
Russ Cox
f13ce3ab34 throw away . and .. in directory listings
R=r
DELTA=13  (11 added, 0 deleted, 2 changed)
OCL=27147
CL=27154
2009-04-07 00:40:50 -07:00
Russ Cox
61ba160120 Chdir
R=r
DELTA=17  (17 added, 0 deleted, 0 changed)
OCL=27146
CL=27153
2009-04-07 00:40:36 -07:00
Russ Cox
16b38b554f add path.Clean and other utilities.
use path.Clean in web server to sanitize URLs.

http://triv/go/../../../etc/passwd

no longer serves the password file.
it redirects to

http://triv/etc/passwd

which then gets a 404.

R=r
DELTA=288  (286 added, 0 deleted, 2 changed)
OCL=27142
CL=27152
2009-04-07 00:40:07 -07:00
Rob Pike
640f3f25dc add error case in doc for Index. simplify code slightly.
R=rsc
DELTA=5  (1 added, 0 deleted, 4 changed)
OCL=27148
CL=27151
2009-04-07 00:32:16 -07:00
Russ Cox
d50c70d261 set line number for errors produced during walkstate.
R=ken
OCL=27145
CL=27145
2009-04-06 22:17:46 -07:00
Rob Pike
ee19695cfc make NewBufRead etc. idempotent
R=rsc
DELTA=63  (59 added, 0 deleted, 4 changed)
OCL=27143
CL=27143
2009-04-06 21:42:14 -07:00
Russ Cox
ac6ebfdea9 add method Value() Value to InterfaceValue.
use Value() in print to print underlying value
from interface.

before:
	package main
	import "fmt"
	func main() {
		x := []interface{} {1, "hello", 2.5};
		fmt.Println(x[0], x[1], x[2], x);
	}

	1 hello 2.5 [<non-nil interface> <non-nil interface> <non-nil interface>]

after:
	1 hello 2.5 [1 hello 2.5]

R=r
DELTA=44  (22 added, 16 deleted, 6 changed)
OCL=27139
CL=27141
2009-04-06 21:28:04 -07:00
Russ Cox
b80fdd1e3b an early 6g limitation forced the use of
string(b)[0:n]
instead of the more direct string(b[0:n]).
convert to the more direct form.

R=r
DELTA=5  (0 added, 0 deleted, 5 changed)
OCL=27082
CL=27140
2009-04-06 21:14:38 -07:00
Peter McKenzie
0ea0919534 Extremely minor fix to ByteBuffer.
R=r
APPROVED=r
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=27123
CL=27130
2009-04-06 17:03:07 -07:00
David Symonds
7b77851275 Add an Iterable package with handy functions like All, Any and Map.
Add a Data method to vector.Vector.

R=r,rsc
APPROVED=rsc
DELTA=173  (170 added, 0 deleted, 3 changed)
OCL=26980
CL=27098
2009-04-05 22:40:40 -07:00
Russ Cox
907cb4f1e6 fix both of anton's bugs:
* make([100]int) was being compiled to
	make([]int), kind of.
* []this = [100]that was working for any this, that.

turned up a typo in pipe_test.go

R=ken
OCL=27081
CL=27081
2009-04-03 23:20:51 -07:00
Robert Griesemer
461fb39367 change in negation
R=rsc
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=27061
CL=27061
2009-04-02 23:26:55 -07:00
Robert Griesemer
27d1159ab4 require ";" separator after function literals
R=rsc
DELTA=1  (1 added, 0 deleted, 0 changed)
OCL=27057
CL=27059
2009-04-02 22:59:57 -07:00
Russ Cox
39436f2a74 special case check for this situation
; cat >http.go
	package main
	import "http"  // intended the library, not this file
	^D
	; 6g http.go
	; 6g http.go
	http.go:4: export/package mismatch: init
	;

new error:

	http.6:7 http.go:3: cannot import package main

R=ken
OCL=27053
CL=27053
2009-04-02 21:46:19 -07:00
Russ Cox
07687705a4 type n t;
was copying a bit too much about t into n,
like whether the signature was queued to be printed.
(bug reported by anton)

was also editing t, meaning you could do
	type T int;
	func (p int) Meth() { }

both fixed.

R=ken
OCL=27052
CL=27052
2009-04-02 21:38:11 -07:00
Russ Cox
416b27548e use _f007·filename for func literals.
this avoids problems people have run into with
multiple closures in the same package.

when preparing filename, only cut off .go, not .anything.
this fixes a bug tgs ran into with foo.pb.go and foo.go
in the same package.

also turn bad identifier chars from filename into
underscores: a-b.pb.go => a_b_pb

R=ken
OCL=27050
CL=27050
2009-04-02 18:32:57 -07:00
Ken Thompson
9efd6b8a3d compiler falut for forgetting
the assignment on a type switch

R=r
OCL=27048
CL=27048
2009-04-02 18:06:43 -07:00
Russ Cox
58f5f4f18d use separate lex buf for better errors:
package main
func main() { func(){}() + + }

x.go:2: syntax error near _f001

becomes

x.go:2: syntax error near func

R=ken
OCL=27047
CL=27047
2009-04-02 17:59:09 -07:00
Russ Cox
8d8225d529 turn gc of unused data/code back on in loaders.
turned it off while debugging 8 runtime problem,
checked in the change accidentally.

R=r
DELTA=4  (0 added, 0 deleted, 4 changed)
OCL=27040
CL=27046
2009-04-02 17:56:23 -07:00
Russ Cox
6b07021a2b implement some more 8g
package main
	func main() {
		println("hello,", 123);
	}

R=ken
OCL=27043
CL=27043
2009-04-02 16:48:06 -07:00
Russ Cox
d6c59ad7b8 clarification suggested by rob
R=r
DELTA=4  (4 added, 0 deleted, 0 changed)
OCL=26983
CL=27041
2009-04-02 16:41:53 -07:00
Robert Griesemer
e3fdcdfea7 - Ident node now takes a string Value instead of a []bytes
(this removes a lot of string() conversions down the road)
- a few minor adjustments

R=rsc
DELTA=11  (0 added, 0 deleted, 11 changed)
OCL=27029
CL=27038
2009-04-02 15:58:38 -07:00
Robert Griesemer
3ba69bf08b Some AST tuning:
- have explicit XSpec nodes for declarations
- have a general GenDecl node instead of DeclList

R=rsc
DELTA=164  (52 added, 52 deleted, 60 changed)
OCL=27005
CL=27027
2009-04-02 10:15:58 -07:00
Daniel Nadasi
c4ad4f9fcf Add a DeepEqual function to the reflect package
R=r,rsc
APPROVED=rsc
DELTA=167  (166 added, 0 deleted, 1 changed)
OCL=26982
CL=27017
2009-04-01 22:20:18 -07:00
Ken Thompson
2450c590e9 typeswitch - expression evaluated
twice instead of once.

R=r
OCL=27015
CL=27015
2009-04-01 21:28:59 -07:00
Rob Pike
62d11a3302 use range in vector iterator
R=rsc
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=27003
CL=27003
2009-04-01 16:34:25 -07:00
Russ Cox
95100344d3 fix runtime stack overflow bug that gri ran into:
160 - 75 was just barely not enough for deferproc + morestack.

added enum names and bumped to 256 - 128.
added explanation.

changed a few mal() (garbage-collected) to
malloc()/free() (manually collected).

R=ken
OCL=26981
CL=26981
2009-04-01 00:26:00 -07:00
David Symonds
c025cf64dc Bail out of gotest immediately if compiling fails.
R=rsc
APPROVED=rsc
DELTA=4  (2 added, 2 deleted, 0 changed)
OCL=26978
CL=26978
2009-03-31 22:35:55 -07:00
Russ Cox
4b536c1e07 test for and fix bug involving reflect v.Interface() and ==.
R=r
DELTA=156  (149 added, 2 deleted, 5 changed)
OCL=26973
CL=26973
2009-03-31 17:33:04 -07:00
Robert Griesemer
07513c2599 1) Move parser.go into src/lib/go
- minor adjustments as suggested by rsc
2) Added parser_test fragment
3) Renamed some types in AST.go per rsc request

R=rsc
DELTA=2053  (2027 added, 0 deleted, 26 changed)
OCL=26963
CL=26971
2009-03-31 16:53:37 -07:00
Russ Cox
4702c0e5ef more 386 runtime:
remove use of _subv in vlrt.c
	darwin/386/signal.c
	darwin/386/*
	linux/386/* (forgotten before)

can run empty program on darwin/386 now.

R=r
DELTA=1140  (1021 added, 114 deleted, 5 changed)
OCL=26942
CL=26968
2009-03-31 15:45:12 -07:00
Russ Cox
42546f4812 multiple bugs in bitfield handling
R=r
DELTA=6  (3 added, 0 deleted, 3 changed)
OCL=26944
CL=26967
2009-03-31 15:44:43 -07:00
Russ Cox
dc5b4678e2 minimal 8g. can compile
package main
	func main() {
	}

and not much else.

R=ken
OCL=26943
CL=26943
2009-03-31 00:22:59 -07:00
Russ Cox
b87e3e8b7f * move go-specific loader code
into gc directory, where it gets included as ../gc/ldbody
this is similar to the assemblers including ../cc/lexbody
and ../cc/macbody.

* hook go-specific loader code into 8l.

* make current 8.out.h and 6.out.h backward compatible
with plan 9's versions.  i had added some constants in
the middle of enums and have now moved them to the end.
this keeps us from invalidating old .8 and .6 files.
not sure how much it really matters, but easy to do.

R=r
DELTA=1314  (667 added, 623 deleted, 24 changed)
OCL=26938
CL=26941
2009-03-31 00:20:07 -07:00
Russ Cox
b199035ba8 move tiny gsubr functions together at the top of the file.
delete unused mkenam file

R=ken
OCL=26940
CL=26940
2009-03-31 00:19:38 -07:00
Ian Lance Taylor
4e84174816 Separate the alignment of a field from the alignment of the
type of the field.  Use the field alignment to compute the
size of a structure.

This may help 8g but is mainly for gccgo.  gccgo maintains the
standard C/C++ ABI for structure field alignment.  For the
i386, this requires that a float64 field in a struct be
aligned on a 32-bit boundary, although for efficiency a
variable of type float64 or []float64 should be aligned on a
64-bit boundary.

I also removed the unused size field from structField.

R=r
DELTA=117  (75 added, 2 deleted, 40 changed)
OCL=26842
CL=26936
2009-03-30 23:19:31 -07:00
Russ Cox
aacdc25399 fix http://b/1748082
package main
var f = func(a, b int) int { return a + b }

R=ken
OCL=26935
CL=26935
2009-03-30 22:26:00 -07:00
Russ Cox
441da9af0d fix build (moved decl to go.h earlier
and changed vlong to int64).

R=ken
OCL=26934
CL=26934
2009-03-30 21:39:10 -07:00
Russ Cox
5e792b6c09 move portable object routines (especially
signature generation) into gc.

R=ken
OCL=26933
CL=26933
2009-03-30 21:31:29 -07:00
Russ Cox
941ed00b1d closure bug: carry along outnamed flag.
R=ken
OCL=26930
CL=26930
2009-03-30 19:21:36 -07:00
Russ Cox
bac922c6e1 move portable code generation (basic statements) to gc.
R=ken
OCL=26929
CL=26929
2009-03-30 19:15:07 -07:00
David Symonds
79b55e226a log.Stderr should actually go to stderr.
R=r
APPROVED=r
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=26926
CL=26928
2009-03-30 19:01:59 -07:00
Russ Cox
d30285a6f5 move some portable pieces of 6g/gsubr.c into gc/subr.c
int	brcom(int);
	int	brrev(int);
	void	setmaxarg(Type*);
	Sig*	lsort(Sig*, int(*)(Sig*, Sig*));
	int	dotoffset(Node*, int*, Node**);
	void	stringpool(Node*);
	void	tempname(Node*, Type*);

R=ken
OCL=26922
CL=26922
2009-03-30 17:52:21 -07:00
Russ Cox
e5ba266e93 delete dregs: inarggen, genpanic, regret
R=ken
OCL=26916
CL=26918
2009-03-30 17:15:54 -07:00
Russ Cox
8e54729b5a move alignment calculations into gc
R=ken
OCL=26914
CL=26914
2009-03-30 17:09:28 -07:00
Russ Cox
e224b1ebdb don't crash on
unsafe.Alignof(struct{x float}{0}.x)

R=ken
OCL=26911
CL=26913
2009-03-30 17:07:30 -07:00
Russ Cox
531f242f5d move bits.c from 6g to gc
R=ken
OCL=26909
CL=26909
2009-03-30 16:13:11 -07:00
Russ Cox
47fbb7639a new tool godefs.
uses gcc to determine system header layouts and
emits simple C or Go.  see comment in main.c.

R=r
DELTA=1069  (1067 added, 0 deleted, 2 changed)
OCL=26682
CL=26880
2009-03-30 00:21:25 -07:00
Russ Cox
a2cbc2998d don't write cmp's output to the c file.
cope better with p4 not found.

R=r
DELTA=3  (0 added, 0 deleted, 3 changed)
OCL=26877
CL=26879
2009-03-30 00:12:56 -07:00
Russ Cox
0d3a043de9 more 386 runtime - can run tiny c programs.
R=r
DELTA=1926  (1727 added, 168 deleted, 31 changed)
OCL=26876
CL=26878
2009-03-30 00:01:07 -07:00
Robert Griesemer
7cba8e6f72 - have explicit KeyValueExpr node instead of BinaryExpr ':' (as discussed)
- remove ':' token from operator precedence levels

R=rsc
DELTA=25  (13 added, 8 deleted, 4 changed)
OCL=26850
CL=26854
2009-03-27 19:26:03 -07:00
Ian Lance Taylor
5617028ab6 Verify that "byte" is an alias for "uint8".
R=r
DELTA=6  (6 added, 0 deleted, 0 changed)
OCL=26836
CL=26841
2009-03-27 13:43:50 -07:00
Robert Griesemer
5019a8db7f integrate feedback from rsc
R=rsc
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=26810
CL=26834
2009-03-27 09:49:11 -07:00
Ian Lance Taylor
a52d6fb73a Add a few tests which weren't being run.
R=r
DELTA=4  (4 added, 0 deleted, 0 changed)
OCL=26797
CL=26814
2009-03-26 22:20:27 -07:00
Robert Griesemer
3f9da82904 minor tweaks:
- permit scanner to run w/o error handler
- provide an error counter

R=iant
DELTA=43  (25 added, 0 deleted, 18 changed)
OCL=26804
CL=26812
2009-03-26 22:13:49 -07:00
Rob Pike
8e39472e3b rename redefined symbols
R=iant
DELTA=4  (0 added, 0 deleted, 4 changed)
OCL=26802
CL=26811
2009-03-26 22:04:34 -07:00
Robert Griesemer
b499da48a4 move AST into src/lib/go
R=r
DELTA=1509  (756 added, 751 deleted, 2 changed)
OCL=26799
CL=26801
2009-03-26 17:51:44 -07:00
Robert Griesemer
e4db08d26d fix scanner initialization, add test
R=r
DELTA=27  (25 added, 0 deleted, 2 changed)
OCL=26798
CL=26798
2009-03-26 17:40:51 -07:00
Robert Griesemer
5a72ca45fb - renamed scanner.Location to token.Position
- by moving Position into token, scanner dependencies
  are removed from several files
- clearer field names in token.Position, now possible to
  have a Pos() accessor w/o naming conflicts
- added Pos() accessor
- use anonymous token.Position field in AST nodes

R=r
DELTA=244  (28 added, 55 deleted, 161 changed)
OCL=26786
CL=26793
2009-03-26 16:08:44 -07:00
Robert Griesemer
b923b01665 EncodeRuneToString
R=rsc
DELTA=22  (22 added, 0 deleted, 0 changed)
OCL=26779
CL=26792
2009-03-26 16:05:30 -07:00
Robert Griesemer
cc8e4fb485 - introduce explicit Token type
- convert some functions into methods
- corresponding changes in pretty

R=r
DELTA=57  (3 added, 0 deleted, 54 changed)
OCL=26764
CL=26777
2009-03-26 10:53:14 -07:00
Kai Backman
99cc2fee81 This is really two changes in one but given interdependencies
and expected review latency I needed to combine the CLs.

1. Made the 5* toolpath build using the go build
   system. Hooked the subdirectories to clean.bash but added a
   separate make5.bash for now. Minor massage to make the code
   more similar to the current structure of 6c/6a/6l.

2. Change all references from long to int32 in line with
   similar change for the other toolchains.

The end result is that 5c, 5a and 5l can now be compiled and
the executables start up properly. Haven't thrown any input at
them yet.

R=rsc
APPROVED=rsc
DELTA=1052  (392 added, 328 deleted, 332 changed)
OCL=26757
CL=26761
2009-03-25 16:31:38 -07:00
Russ Cox
fcd536d801 add .8 support to libmach_amd64 [sic].
add code to handle 32-bit Mach-O and ELF binaries.

R=r
DELTA=452  (365 added, 29 deleted, 58 changed)
OCL=26696
CL=26712
2009-03-24 18:04:50 -07:00
Russ Cox
58f7fc331f make 8a, 8c build again.
add 8a 8c 8l to the build to keep us honest.

R=r
DELTA=33  (28 added, 0 deleted, 5 changed)
OCL=26694
CL=26711
2009-03-24 18:04:19 -07:00
Russ Cox
34a5537edb drop rt0 object from 8l (already dropped from 6l).
remove debugging print.

R=r
DELTA=8  (0 added, 8 deleted, 0 changed)
OCL=26695
CL=26710
2009-03-24 18:02:24 -07:00
Ken Thompson
b8be809c10 ^ type(const) now inverts "enough" bits
^ signed(const) becomes illegal
^ unsigned(const) becomes legal

R=r
OCL=26697
CL=26697
2009-03-24 16:40:38 -07:00
Russ Cox
85e014a27e fix build:
install runtime lib in correct location.
	fix one bad type definition in defs.h.
	clear out $GOROOT/lib in clean.bash.

TBR=r
OCL=26691
CL=26691
2009-03-24 16:04:25 -07:00
Russ Cox
80f4ab47ee split heapmap, which is specific to 64-bit pointer addresses,
out of malloc proper.

TBR=r
OCL=26689
CL=26689
2009-03-24 15:11:56 -07:00
Russ Cox
209865be7c convert Linux to auto-generated defs.h
TBR=r
OCL=26686
CL=26688
2009-03-24 15:04:18 -07:00
Russ Cox
08cfcd1dd6 convert darwin to use godefs-generated defs.h.
this change is much smaller if you ignore
the machine-generated defs.h.

TBR=r
OCL=26684
CL=26684
2009-03-24 13:51:48 -07:00
Russ Cox
8ee041dc24 split rt1.c into signal.c and thread.c.
move out of arch-specific directory: only os-specific.
rm sys_types.h (unused).

TBR=r
OCL=26681
CL=26681
2009-03-24 13:17:10 -07:00
Russ Cox
878822f355 move darwin specific code into runtime/darwin/
move darwin-amd64 specific code into runtime/darwin/amd64/
repeat for linux.

move rt0 into runtime.a instead of keeping a separate .6 file.
6l seems to have no problem with that.

TBR=r
OCL=26680
CL=26680
2009-03-24 13:06:51 -07:00
Russ Cox
5a68303a15 throw away most of the compat.h compatibility layer
in favor of the lib9 compatibility layer.  no need for two.

now that mycreate is gone, .6 files are 0644 not 0755.

TBR=r
OCL=26679
CL=26679
2009-03-24 12:12:57 -07:00
Russ Cox
fcd76f7dc9 move amd64-specific (but os-independent) pieces of runtime
into amd64/ directory.

split rt2_amd64.c into closure.c and traceback.c.

TBR=r
OCL=26678
CL=26678
2009-03-24 11:49:22 -07:00
Russ Cox
13584f4a23 add test for close/closed, fix a few implementation bugs.
R=ken
OCL=26664
CL=26664
2009-03-23 18:50:35 -07:00
Russ Cox
86145611b0 allow range on nil maps
R=ken
OCL=26663
CL=26663
2009-03-23 18:32:37 -07:00
Rob Pike
8d44052b6d iterator for vector
R=rsc
DELTA=35  (35 added, 0 deleted, 0 changed)
OCL=26662
CL=26662
2009-03-23 17:46:59 -07:00
Ken Thompson
79fa5b65cb rewrote switch
fixed bug 141

R=r
OCL=26627
CL=26627
2009-03-22 20:54:21 -07:00
Russ Cox
2bd101c4b1 update 8a, 8c, 8l to use new object format.
add "extern register" support to 8c.
extern register means allocate in the FS-relative segment.

make 8l generate segmented stack checks.

R=ken
OCL=26600
CL=26606
2009-03-20 16:40:00 -07:00
Russ Cox
c1e748bd2e embarassing bug in allocator:
was applying wrong waste check,
resulting in many more size classes
than necessary.

R=r
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=26602
CL=26605
2009-03-20 16:34:13 -07:00
Russ Cox
7d443bb67a make 8l generate Darwin Mach-O and Linux ELF binaries
R=ken
OCL=26584
CL=26589
2009-03-20 14:22:59 -07:00
Russ Cox
997b6f9d89 don't need two names for the same function (vputl and llputl).
also use thechar, to make copy/paste easier.

R=ken
OCL=26583
CL=26588
2009-03-20 14:22:46 -07:00
Russ Cox
0932b1f9b8 move pragtextflag into lexbody
R=ken
OCL=26581
CL=26587
2009-03-20 14:22:37 -07:00
Russ Cox
54aa835b44 range over channels.
also fix multiple-evaluation bug in range over arrays.

R=ken
OCL=26576
CL=26576
2009-03-20 11:32:58 -07:00
Russ Cox
f7772627ad fix b/1722502
BUG=1722502
R=ken
OCL=26526
CL=26526
2009-03-18 19:20:54 -07:00
Tom Szymanski
658ca49898 Make adler32 cleaner.
R=rsc
APPROVED=rsc
DELTA=22  (9 added, 6 deleted, 7 changed)
OCL=26498
CL=26500
2009-03-18 14:57:55 -07:00
Ken Thompson
1cdcfda140 remove assignment cases from switch
R=r
OCL=26480
CL=26480
2009-03-18 12:13:42 -07:00
Ken Thompson
1e0c17e294 switch on false error
R=r
OCL=26434
CL=26434
2009-03-17 19:10:32 -07:00
Ken Thompson
0f469a99a3 binary search on type switches.
new feature 'case nil:' in type switch
will match iff the interface is nil.

R=r
OCL=26404
CL=26404
2009-03-17 13:58:38 -07:00
Ken Thompson
5136a9e1f7 change format of Sigt and Sigi
to allow room for type hash
needed for log-time type switch.

R=r
OCL=26354
CL=26354
2009-03-16 15:27:08 -07:00
Robert Griesemer
1b141ca068 added &^ and &^=
R=rsc
DELTA=14  (12 added, 0 deleted, 2 changed)
OCL=26278
CL=26348
2009-03-16 14:20:08 -07:00
Ken Thompson
4523ee9ac8 close/closed on chans
R=r
OCL=26281
CL=26285
2009-03-13 16:47:54 -07:00
Kai Backman
db3a21d7c6 5a 5c 5l from inferno distribution
R=rsc
APPROVED=rsc
DELTA=19042  (19042 added, 0 deleted, 0 changed)
OCL=26268
CL=26270
2009-03-13 15:03:07 -07:00
Russ Cox
5fbadf0bc3 warn -> yyerror in mparith.
close two more bugs.

R=ken
OCL=26226
CL=26226
2009-03-12 19:57:30 -07:00
Russ Cox
8f194bf5ff make 6g constants behave as ken proposes. (i hope.)
various bug fixes and tests involving constants.

test/const1.go is the major new test case.

R=ken
OCL=26216
CL=26224
2009-03-12 19:04:38 -07:00
Ken Thompson
6eb54cb05b chan flags close/closed installed
runtime not finished.

R=r
OCL=26217
CL=26217
2009-03-12 17:55:11 -07:00
Robert Griesemer
6f321e28f4 - remove special handling of '\n' characters (used to be treated as comments
for pretty printer purposes - now properly ignored as white space since we
have line/col information)
- changed sample use in comment to an actually compiled function to make sure
sample is actually working
- added extra tests (checking line and column values, and the tokenize function)

R=rsc
DELTA=253  (61 added, 67 deleted, 125 changed)
OCL=26143
CL=26181
2009-03-12 11:04:11 -07:00
Ken Thompson
bb02e481d2 added bitclear operators &^ and &^=
R=r
OCL=26152
CL=26152
2009-03-11 19:59:35 -07:00
Ken Thompson
767845b6fa bug 125
R=r
OCL=26146
CL=26146
2009-03-11 17:37:04 -07:00
Ken Thompson
48f6b516e2 bug 137
R=r
OCL=26142
CL=26142
2009-03-11 16:25:45 -07:00
Russ Cox
4eb7ceba58 complain when trying to put T into an interface
if T has pointer methods.  this is just a heuristic
but it catches the problem robert ran into and
lets me put the larger interface issues aside for
now.  found one bug in pretty.

R=ken
OCL=26141
CL=26141
2009-03-11 16:06:17 -07:00
Russ Cox
7a706fb3d7 Rename os.FD to os.File.
Make Fstat, Readdirnames, and Readdir methods
on os.File.

R=r
DELTA=281  (79 added, 3 deleted, 199 changed)
OCL=25891
CL=26130
2009-03-11 12:51:10 -07:00
Russ Cox
6479d89378 document json
R=r
DELTA=115  (102 added, 0 deleted, 13 changed)
OCL=25953
CL=26128
2009-03-11 12:50:58 -07:00
Robert Griesemer
68c69fac9e - scanner to track line/col number instead of byte position only
- fixed a parameter name in tabwriter

R=rsc
DELTA=110  (21 added, 17 deleted, 72 changed)
OCL=26123
CL=26127
2009-03-11 12:48:45 -07:00
Russ Cox
32bf48c6d8 document http
R=r
DELTA=84  (63 added, 4 deleted, 17 changed)
OCL=25950
CL=26126
2009-03-11 12:45:53 -07:00
Rob Pike
5559ff6ece fix old-style print call in constant
R=rsc
OCL=26093
CL=26093
2009-03-10 20:47:42 -07:00
Ian Lance Taylor
062d6998ab Add support for a -I option. -I DIR searches for packages in
DIR.

R=ken,rsc
DELTA=49  (41 added, 2 deleted, 6 changed)
OCL=26057
CL=26092
2009-03-10 20:03:31 -07:00
Ken Thompson
d27e9f528d bug086
R=r
OCL=26090
CL=26090
2009-03-10 19:16:31 -07:00
Robert Griesemer
915f176f7f - fixing (internal) capitalization
R=rsc
DELTA=7  (0 added, 0 deleted, 7 changed)
OCL=26080
CL=26080
2009-03-10 18:09:13 -07:00
Robert Griesemer
d671daf7f7 - allow unicode digits in identifiers
- fixed a bug with character escapes (before: allowed arbitrary long sequences)

R=r
DELTA=63  (33 added, 19 deleted, 11 changed)
OCL=26010
CL=26070
2009-03-10 17:08:05 -07:00
Ken Thompson
0c4f4587d7 bug with interaction of variables
declared in cases and heap allocation

R=r
OCL=26064
CL=26064
2009-03-10 16:49:34 -07:00
Rob Pike
4cbfcae3d8 add unicode data for decimal digit, preparatory to allowing them in identifiers.
R=rsc
DELTA=431  (430 added, 0 deleted, 1 changed)
OCL=25975
CL=26059
2009-03-10 16:30:27 -07:00
Robert Griesemer
6906e3b884 - incorporate suggestions from previous code review
R=rsc
DELTA=64  (18 added, 3 deleted, 43 changed)
OCL=26046
CL=26058
2009-03-10 16:30:26 -07:00
Robert Griesemer
e7980732ee tabwriter documentation
R=rsc
DELTA=62  (31 added, 5 deleted, 26 changed)
OCL=26022
CL=26040
2009-03-10 14:55:04 -07:00
Robert Griesemer
efbb120d8e - more documentation adjustments
R=rsc
DELTA=6  (0 added, 1 deleted, 5 changed)
OCL=25970
CL=25973
2009-03-09 18:53:11 -07:00
Rob Pike
1fe42e2d4d delete float80 from libraries
R=rsc
DELTA=40  (0 added, 38 deleted, 2 changed)
OCL=25969
CL=25969
2009-03-09 18:00:41 -07:00
Rob Pike
3bc6fd63fe document reflect.
R=rsc
DELTA=201  (90 added, 0 deleted, 111 changed)
OCL=25904
CL=25966
2009-03-09 17:47:15 -07:00
Robert Griesemer
5bd5242bcc Fixing comment.
R=r
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=25956
CL=25960
2009-03-09 17:30:38 -07:00
Robert Griesemer
2aa77352fc scanner.go documentation
R=r
DELTA=22  (8 added, 3 deleted, 11 changed)
OCL=25947
CL=25955
2009-03-09 17:16:42 -07:00
Robert Griesemer
cdd9539362 token.go documentation
R=r
DELTA=34  (24 added, 2 deleted, 8 changed)
OCL=25946
CL=25954
2009-03-09 17:13:15 -07:00
Robert Griesemer
dc5ddd7d84 - directory rename lang -> go
R=rsc
DELTA=2070  (1035 added, 1035 deleted, 0 changed)
OCL=25939
CL=25939
2009-03-09 12:41:53 -07:00
Ken Thompson
820f42d977 binary search for constant case statements.
R=r
OCL=25890
CL=25890
2009-03-07 17:33:42 -08:00
Rob Pike
5dd4ef5716 document bufio
R=rsc
DELTA=61  (27 added, 2 deleted, 32 changed)
OCL=25877
CL=25889
2009-03-07 16:57:01 -08:00
Rob Pike
333cdd8f2a document os
R=rsc
DELTA=143  (96 added, 0 deleted, 47 changed)
OCL=25876
CL=25888
2009-03-07 16:56:44 -08:00
Rob Pike
1910a7c595 document hash
R=rsc
DELTA=50  (33 added, 4 deleted, 13 changed)
OCL=25878
CL=25887
2009-03-07 16:56:21 -08:00
Rob Pike
c5560d3aaa document time
R=rsc
DELTA=42  (23 added, 1 deleted, 18 changed)
OCL=25881
CL=25886
2009-03-07 16:56:05 -08:00
Russ Cox
1e37e8a417 document Conn interface better, in preparation
for per-method interface documentation
by mkdoc.pl.

implement timeouts on network reads
and use them in dns client.

also added locks on i/o to ensure writes
are not interlaced.

R=r
DELTA=340  (272 added, 25 deleted, 43 changed)
OCL=25799
CL=25874
2009-03-06 17:51:31 -08:00
Ken Thompson
a4a10ed856 1. type switches
2. fixed fault on bug128
3. got rid of typeof
4. fixed bug in t,ok = I2T

R=r
OCL=25873
CL=25873
2009-03-06 17:50:43 -08:00
Rob Pike
b0609f14d2 document sort
R=rsc
DELTA=20  (20 added, 0 deleted, 0 changed)
OCL=25869
CL=25872
2009-03-06 17:29:25 -08:00
Rob Pike
6f07796e86 document syscall. all we do is redirect elsewhere.
R=rsc
DELTA=7  (7 added, 0 deleted, 0 changed)
OCL=25859
CL=25871
2009-03-06 17:20:53 -08:00
Rob Pike
99d00eae3c delete vestigial references to package syscall
R=rsc
DELTA=8  (0 added, 5 deleted, 3 changed)
OCL=25857
CL=25861
2009-03-06 16:03:59 -08:00
Rob Pike
7bb335c7de document io
R=rsc
DELTA=44  (30 added, 4 deleted, 10 changed)
OCL=25819
CL=25835
2009-03-06 03:43:44 -08:00
Rob Pike
5b4fa1ad22 document once
R=rsc
DELTA=14  (7 added, 5 deleted, 2 changed)
OCL=25818
CL=25834
2009-03-06 03:36:50 -08:00
Rob Pike
85647c94e6 document fmt.
the description of the format verbs still needs to be done.

R=rsc
DELTA=288  (88 added, 12 deleted, 188 changed)
OCL=25814
CL=25833
2009-03-06 03:35:38 -08:00
Rob Pike
b18e418410 document unicode, such as it is
R=rsc
DELTA=18  (9 added, 0 deleted, 9 changed)
OCL=25817
CL=25832
2009-03-06 03:22:02 -08:00
Rob Pike
6b8ac0a9e4 document rand
R=rsc
DELTA=27  (16 added, 8 deleted, 3 changed)
OCL=25804
CL=25813
2009-03-05 19:26:27 -08:00
Rob Pike
37656ad568 document container/intvector
R=rsc
DELTA=15  (15 added, 0 deleted, 0 changed)
OCL=25794
CL=25812
2009-03-05 19:22:06 -08:00
Rob Pike
dfe0853255 document utf8
R=rsc
DELTA=18  (12 added, 0 deleted, 6 changed)
OCL=25807
CL=25811
2009-03-05 19:15:13 -08:00
Russ Cox
af678a593d new approach for generating sysimport.c
(renamed to avoid any conflict with old p4 copies).

this approach doesn't require auto-generating
files also kept in p4, so it should be easier on
go users who don't sync very often.

this approach will be more work for go developers:
builtin.c needs to be copied to builtin.c.boot in p4
as new functions are added.  mkbuiltin does this
for certain $USERs to help us remember.

R=r
DELTA=343  (176 added, 162 deleted, 5 changed)
OCL=25803
CL=25805
2009-03-05 18:26:12 -08:00
Rob Pike
681299a444 document testing and incidentally gotest
R=rsc
DELTA=25  (25 added, 0 deleted, 0 changed)
OCL=25798
CL=25802
2009-03-05 17:50:36 -08:00
Rob Pike
0f7306b78c document strings
R=rsc
DELTA=9  (4 added, 0 deleted, 5 changed)
OCL=25793
CL=25795
2009-03-05 17:02:34 -08:00
Russ Cox
63985b489b bug085 bug129
R=ken
OCL=25787
CL=25791
2009-03-05 15:57:03 -08:00
Ken Thompson
bf983477a2 new switch implementation
in preparation of type switch.
no functional change (yet).

R=r
OCL=25784
CL=25788
2009-03-05 15:49:34 -08:00
Russ Cox
c93da7c70a net: doc, doc-inspired cleanup
R=r
DELTA=368  (87 added, 14 deleted, 267 changed)
OCL=25773
CL=25786
2009-03-05 15:48:12 -08:00
Russ Cox
5bf0fbe7a8 strconv: doc
R=r
DELTA=110  (64 added, 19 deleted, 27 changed)
OCL=25761
CL=25782
2009-03-05 15:29:04 -08:00
Russ Cox
8a7eb77880 misc doc
R=r
DELTA=50  (28 added, 0 deleted, 22 changed)
OCL=25763
CL=25770
2009-03-05 13:35:45 -08:00
Rob Pike
5b814d02f2 delete deprecated files.
deletion beats documentation for deprecation.

R=rsc,gri
DELTA=509  (2 added, 490 deleted, 17 changed)
OCL=25737
CL=25768
2009-03-05 13:31:03 -08:00
Russ Cox
dfc3910afa math: doc
R=r
DELTA=173  (74 added, 14 deleted, 85 changed)
OCL=25753
CL=25767
2009-03-05 13:31:01 -08:00
Rob Pike
83de0698d6 document vector
R=rsc
DELTA=36  (30 added, 0 deleted, 6 changed)
OCL=25740
CL=25766
2009-03-05 13:30:39 -08:00
Rob Pike
26cb4df726 log: document
R=rsc
DELTA=26  (17 added, 1 deleted, 8 changed)
OCL=25731
CL=25734
2009-03-04 22:46:44 -08:00
Rob Pike
0ea27e345e flag: document
also write to stderr not stdout

R=rsc
DELTA=48  (38 added, 2 deleted, 8 changed)
OCL=25729
CL=25733
2009-03-04 22:43:51 -08:00
Rob Pike
d1ac21849e delete bogus vestige
R=rsc
OCL=25730
CL=25730
2009-03-04 22:03:35 -08:00
Rob Pike
927678694c typos
R=gri
DELTA=3  (0 added, 1 deleted, 2 changed)
OCL=25728
CL=25728
2009-03-04 21:41:12 -08:00
Russ Cox
8ba287585a sync: add documentation
R=r
DELTA=63  (57 added, 1 deleted, 5 changed)
OCL=25727
CL=25727
2009-03-04 21:30:07 -08:00
Rob Pike
a0feb32567 remove some incorrect capitalizations.
add commentary.

R=rsc
DELTA=231  (41 added, 24 deleted, 166 changed)
OCL=25724
CL=25726
2009-03-04 21:06:38 -08:00
Russ Cox
98b34e5bbd reject invalid map key types at compile time
R=ken
OCL=25720
CL=25720
2009-03-04 17:38:37 -08:00
Robert Griesemer
bd4f5af107 - missing makefile
R=r
OCL=25714
CL=25714
2009-03-04 17:16:58 -08:00
Robert Griesemer
b4802dd568 Created new directory lib/lang:
- move scanner to into lib/lang
- added test
- adjusted various make and build files

R=r
DELTA=1731  (973 added, 753 deleted, 5 changed)
OCL=25668
CL=25713
2009-03-04 17:13:12 -08:00
Russ Cox
955638e2fb disallow ordinary-type.(T), as in spec.
R=ken
OCL=25705
CL=25705
2009-03-04 14:50:25 -08:00
Rob Pike
e8e894bff3 enable pretty in run.bash
R=rsc
DELTA=5  (0 added, 0 deleted, 5 changed)
OCL=25651
CL=25655
2009-03-03 16:09:40 -08:00
Russ Cox
49cc649e59 back to T{x}, stricter handling of T(x) vs x.(T)
R=ken
DELTA=131  (60 added, 41 deleted, 30 changed)
OCL=25617
CL=25633
2009-03-03 08:41:02 -08:00
Russ Cox
be2edb5761 Automated g4 rollback of changelist 25024,
plus significant hand editing.

Back to T{x} for composite literals.

R=r
OCL=25612
CL=25632
2009-03-03 08:39:12 -08:00
Robert Griesemer
ea3d4540b3 - itob
- more test cases

R=rsc
DELTA=97  (52 added, 4 deleted, 41 changed)
OCL=25585
CL=25607
2009-03-02 17:52:58 -08:00
Russ Cox
e9b40580ba fix names: s/fd/r/
R=r
DELTA=9  (0 added, 0 deleted, 9 changed)
OCL=25593
CL=25593
2009-03-02 16:12:04 -08:00
Ken Thompson
751d13cbce bug 130 (go/defer) interface.method()
R=r
OCL=25356
CL=25356
2009-02-23 22:43:04 -08:00
Ken Thompson
a665e2924c bug with select :=
R=r
OCL=25278
CL=25278
2009-02-21 12:41:34 -08:00
Russ Cox
ebc10db3e1 allow parens to disambiguate types.
examples:

	chan <- (chan int)
	chan (<- chan int)
	(map[string]func())("a": main)

R=ken
OCL=25151
CL=25151
2009-02-18 10:07:46 -08:00
Rob Pike
6950491b4f drop trailing slashes - missed comment from last review
TBR=rsc
OCL=25135
CL=25135
2009-02-17 19:59:23 -08:00
Rob Pike
03d6909ff7 more fun with triv.go: flags and arguments
R=rsc
DELTA=23  (23 added, 0 deleted, 0 changed)
OCL=25088
CL=25134
2009-02-17 19:35:01 -08:00
Russ Cox
d0424faf17 few more Sizeof.
R=r
DELTA=3  (0 added, 1 deleted, 2 changed)
OCL=25106
CL=25106
2009-02-17 13:40:28 -08:00
Ken Thompson
3c0fc400fb fix unsafe.Sizeof("abc")
R=rsc
OCL=25105
CL=25105
2009-02-17 13:10:57 -08:00
Rob Pike
575257d503 use proper strconv in string values.
make test a little stronger.

R=rsc
DELTA=94  (27 added, 39 deleted, 28 changed)
OCL=25085
CL=25087
2009-02-16 21:55:37 -08:00
Russ Cox
c19468d8df comment nit
R=r
DELTA=2  (0 added, 2 deleted, 0 changed)
OCL=25081
CL=25084
2009-02-16 20:44:29 -08:00
Russ Cox
eb3823a44d allow hex, octal in Atoi, etc.
R=r
DELTA=169  (79 added, 23 deleted, 67 changed)
OCL=25079
CL=25083
2009-02-16 20:44:21 -08:00
Russ Cox
9e3e61627d proposed XML parser design.
inspired by expat's callback interface,
but a bit simpler thanks to go interfaces.

also serves as reference notes about XML.

the parser itself is unimplemented.

not in Makefiles, though it does build.

R=r
DELTA=425  (425 added, 0 deleted, 0 changed)
OCL=25077
CL=25080
2009-02-16 20:14:21 -08:00
Rob Pike
bbc190b3ee make interface to the flags themselves more public.
add visitor functions to scan the flags.
add a way to set a flag.
add a flag test.

R=rsc
DELTA=169  (99 added, 19 deleted, 51 changed)
OCL=25076
CL=25078
2009-02-16 19:43:15 -08:00
Russ Cox
d3d0c256be bug123
R=ken
OCL=25075
CL=25075
2009-02-16 17:44:05 -08:00
Russ Cox
aa35aee07c fix build - missed this file before
TBR=r
OCL=25074
CL=25074
2009-02-16 17:07:11 -08:00
Russ Cox
dfad8ea647 use embedded interface types
R=r
DELTA=205  (1 added, 157 deleted, 47 changed)
OCL=25071
CL=25073
2009-02-16 16:37:49 -08:00
Russ Cox
b4af09ab56 embedded interface types in interfaces.
R=ken
OCL=25072
CL=25072
2009-02-16 16:36:18 -08:00
Russ Cox
78906c3836 io.Pipe
assorted underscore cleanup

R=r
DELTA=488  (410 added, 3 deleted, 75 changed)
OCL=25070
CL=25070
2009-02-16 16:32:30 -08:00
Russ Cox
ff3173849e assorted changes:
- use a lock instead of a thread in once
		avoids deadlock in recursive once calls
	- implement os.Setenv
	- remove "export" from some scripts
	- remove _ from names in time package
	- fix time test for non-MTV machines

R=r
DELTA=265  (87 added, 58 deleted, 120 changed)
OCL=25057
CL=25057
2009-02-15 22:12:35 -08:00
Rob Pike
55d13cf139 change the URL in the test to avoid a redirection that breaks it in sydney.
R=rsc
OCL=25054
CL=25054
2009-02-15 19:58:00 -08:00
Russ Cox
91ceda5c18 add os.ForkExec, os.Exec, os.Wait, exec.OpenCmd.
as thread-safe as possible, given the surrounding system.
add stub RWLock implementation.

R=r
DELTA=852  (834 added, 6 deleted, 12 changed)
OCL=25046
CL=25053
2009-02-15 19:35:52 -08:00
Russ Cox
97dcc68f1e insert ${GOOS} and ${GOARCH} in
command-line comment.

R=r
DELTA=11  (6 added, 0 deleted, 5 changed)
OCL=25051
CL=25051
2009-02-15 19:20:35 -08:00
Russ Cox
d8921c5294 cleanups:
get rid of _ on private names in net.
	fix os_test file name list.
	newline not needed on Errorf.

R=r
DELTA=305  (34 added, 2 deleted, 269 changed)
OCL=25047
CL=25047
2009-02-15 14:18:39 -08:00
Russ Cox
78a6d68c86 build nits
R=r
DELTA=8  (0 added, 6 deleted, 2 changed)
OCL=25045
CL=25045
2009-02-15 13:41:48 -08:00
Russ Cox
3b3e63735e bug fix for &x[0] when x is slice
R=ken
OCL=25044
CL=25044
2009-02-15 13:15:46 -08:00
Robert Griesemer
070738c30c - added Makefile change again (lost due to to p4 misuse)
R=rsc
OCL=25026
CL=25026
2009-02-13 15:10:35 -08:00
Robert Griesemer
127526649f - vector package (identical to array except for names)
- updated some file (but not all - left array package in place for now)

R=rsc
DELTA=530  (483 added, 0 deleted, 47 changed)
OCL=25025
CL=25025
2009-02-13 15:07:56 -08:00
Russ Cox
9f8f2e6130 convert composite literals from { } to ( ).
only non-trivial changes are in
	convlit1.go
	golden.out

R=gri
OCL=25019
CL=25024
2009-02-13 14:48:32 -08:00
Russ Cox
07244f7c80 add composite literal ( ) syntax.
warn about composite literal { } syntax.

R=ken
OCL=25018
CL=25023
2009-02-13 14:48:16 -08:00
Russ Cox
20b6de135b fix build
TBR=r
OCL=25021
CL=25021
2009-02-13 14:35:36 -08:00
Russ Cox
5f4f5647ef require type assertions when narrowing.
R=ken
OCL=24350
CL=24914
2009-02-11 17:57:29 -08:00
Russ Cox
49e2087848 insert type assertions when narrowing.
R=r
OCL=24349
CL=24913
2009-02-11 17:55:16 -08:00
Russ Cox
7cd24361bd fix gc bug. i think this is tgs's second bug.
i stumbled across it in all.bash.

TBR=r
OCL=24912
CL=24912
2009-02-11 17:54:03 -08:00
Rob Pike
0c4010a747 change DirInfo->dirInfo now that 6g export bug is fixed
R=rsc
DELTA=4  (0 added, 0 deleted, 4 changed)
OCL=24788
CL=24805
2009-02-10 16:44:04 -08:00
Rob Pike
6017895659 drop the os_ prefix on the file names in os. os_test.go can stay.
R=rsc
DELTA=793  (392 added, 392 deleted, 9 changed)
OCL=24777
CL=24804
2009-02-10 16:40:06 -08:00
Russ Cox
73dd4a37f9 fix export bug Rob tripped over.
the lexer is already hiding names,
so this clumsy hack is no longer necessary.

R=ken
OCL=24783
CL=24783
2009-02-10 13:57:31 -08:00
Rob Pike
00b3d48f13 Make Readdirnames work properly on Linux.
Refactor so Readdir is portable code.

R=rsc
DELTA=192  (50 added, 130 deleted, 12 changed)
OCL=24770
CL=24772
2009-02-10 11:55:48 -08:00
Ian Lance Taylor
651972b31f Implement unsafe.Alignof.
R=ken
DELTA=20  (19 added, 0 deleted, 1 changed)
OCL=24719
CL=24771
2009-02-10 11:46:26 -08:00
Rob Pike
d94c5aba12 Fix Readdirnames to behave properly if reading in little pieces. Requires storing some
state in the FD.

This is Darwin only.  Next CL will make Readdir use Readdirnames to generate its files
and move Readdir into portable code, as well as fix Readdirnames for Linux.

R=rsc
DELTA=116  (79 added, 12 deleted, 25 changed)
OCL=24756
CL=24768
2009-02-10 11:27:45 -08:00
Robert Griesemer
668bf81b00 - removed obsolete comments
R=r
DELTA=2  (0 added, 1 deleted, 1 changed)
OCL=24755
CL=24760
2009-02-10 10:37:11 -08:00
Rob Pike
2f147992b4 fix Getdirentries: base comes back in r2.
R=rsc
DELTA=3  (3 added, 0 deleted, 0 changed)
OCL=24727
CL=24727
2009-02-09 20:04:36 -08:00
Rob Pike
cad7a3aefc simple accessors for Dir mode bits
R=rsc
DELTA=71  (71 added, 0 deleted, 0 changed)
OCL=24687
CL=24694
2009-02-09 12:50:54 -08:00
Rob Pike
a948fdd626 typo. this split-os building thing is frustrating.
R=rsc
OCL=24681
CL=24681
2009-02-09 11:25:47 -08:00
Rob Pike
aba4c75408 add Readdir: returns an array of Dir structures
R=rsc
DELTA=200  (176 added, 12 deleted, 12 changed)
OCL=24680
CL=24680
2009-02-09 11:24:35 -08:00
Rob Pike
c8d59c1fb2 fix int64/int error - build broken
R=gri
OCL=24678
CL=24678
2009-02-09 10:20:15 -08:00
Russ Cox
a81870badf add error to catch 6g alignment bug.
the fix appears to be to align the
out struct on an 8 boundary, but that
is a bit involved.

R=ken
OCL=24657
CL=24657
2009-02-08 11:19:45 -08:00
Russ Cox
a6c59ce274 gc funarg return fix.
change type (to satisfy OAS) after nodarg:
nodarg uses offset from type too,
and must use correct offset.

R=ken
OCL=24656
CL=24656
2009-02-08 11:01:52 -08:00
Rob Pike
b5aba026f8 First pass at reading directories.
Syscall support.
Readdirnames returns array of strings of contents of directory.

R=rsc
DELTA=216  (201 added, 0 deleted, 15 changed)
OCL=24642
CL=24655
2009-02-08 10:18:50 -08:00
Rob Pike
6506148850 a few small cleanups
R=rsc
DELTA=21  (2 added, 2 deleted, 17 changed)
OCL=24638
CL=24654
2009-02-08 10:17:23 -08:00
Rob Pike
9526f3b841 use unsafe.Sizeof
R=rsc
DELTA=9  (3 added, 3 deleted, 3 changed)
OCL=24640
CL=24653
2009-02-08 10:16:32 -08:00
Rob Pike
8f2b774ee1 update sysimport.c for unsafe.Offset and Sizeof
R=ken
DELTA=2  (2 added, 0 deleted, 0 changed)
OCL=24643
CL=24643
2009-02-07 14:48:32 -08:00
Ken Thompson
56003374d3 change array padding in structures
to pad to size of element rather
than size of array.

R=r
OCL=24641
CL=24641
2009-02-07 13:31:34 -08:00
Ken Thompson
8a70545b57 unsafe.Sizeof and unsafe.Offsetof
R=r
OCL=24639
CL=24639
2009-02-07 12:34:45 -08:00
Rob Pike
bcf48076e5 fix up syscall for darwin after StringToBytes change
R=rsc
DELTA=30  (0 added, 18 deleted, 12 changed)
OCL=24628
CL=24628
2009-02-06 18:03:13 -08:00
Rob Pike
704bc9d5c9 portable stat for os
add name to os.FD
clean up some interfaces

R=rsc
DELTA=318  (231 added, 44 deleted, 43 changed)
OCL=24624
CL=24627
2009-02-06 17:54:26 -08:00
Rob Pike
69c41d7f5f fstat used wrong system call, lstat used wrong type of name
R=rsc
DELTA=7  (4 added, 0 deleted, 3 changed)
OCL=24617
CL=24617
2009-02-06 17:10:30 -08:00
Russ Cox
3e02987508 tgs's gc bug.
R=r
DELTA=10  (7 added, 0 deleted, 3 changed)
OCL=24577
CL=24577
2009-02-06 14:41:21 -08:00
Rob Pike
39d05ae808 add a trivial visitor method, just for fun
R=gri
DELTA=31  (30 added, 1 deleted, 0 changed)
OCL=24568
CL=24575
2009-02-06 14:32:09 -08:00
Russ Cox
0970c46863 closures - 6g support
R=ken
OCL=24501
CL=24566
2009-02-06 13:47:10 -08:00
Russ Cox
0f4f2a6183 closures - runtime and debugger support, test case
R=r
DELTA=257  (250 added, 1 deleted, 6 changed)
OCL=24509
CL=24565
2009-02-06 13:46:56 -08:00
Russ Cox
5e5476c2fe 6c: byte* - byte* should be int64, not int32.
R=ken
OCL=24507
CL=24507
2009-02-05 19:09:04 -08:00
Rob Pike
f95a11e27f further pedagogy: a channel that satisfies the HTTP server interface
R=rsc
DELTA=18  (18 added, 0 deleted, 0 changed)
OCL=24482
CL=24484
2009-02-05 15:56:31 -08:00
Russ Cox
b0009bef20 bug064
make f(g()) work when g returns multiple
args with names different than f expects.

func swap(a, b int) (c, d int) {
	return b, a
}

swap(swap(1,2))

R=ken
OCL=24474
CL=24476
2009-02-05 15:22:49 -08:00
Russ Cox
7a3877aa0c take advantage of methods on funcs
R=r
DELTA=14  (0 added, 13 deleted, 1 changed)
OCL=24458
CL=24470
2009-02-05 15:09:08 -08:00
Russ Cox
aab26a5248 do not generate Init proto for sys and unsafe.
R=ken
OCL=24455
CL=24455
2009-02-05 14:49:53 -08:00
Russ Cox
fc8dca9dac heuristic to stop pulling .6 in from .a
is not right if the .6 is only for data and
the init function.

instead of that, pick up everything and
let the dead code/data eliminator throw
away the parts that weren't useful.

R=r
DELTA=25  (0 added, 22 deleted, 3 changed)
OCL=24446
CL=24446
2009-02-05 13:58:43 -08:00
Russ Cox
5e2c05877d allow methods on funcs.
R=ken
OCL=24442
CL=24442
2009-02-05 13:33:07 -08:00
Russ Cox
7fd04676ad fix build on thresher - missing constants
TBR=r
OCL=24439
CL=24439
2009-02-05 13:00:12 -08:00
Rob Pike
689c808c12 clean up flags package a bit.
fix a bug in Usage message - would print current value instead of default.

R=rsc
DELTA=53  (7 added, 4 deleted, 42 changed)
OCL=24323
CL=24323
2009-02-04 11:46:39 -08:00
Russ Cox
360f0aacee fix interface not satisifed message:
x.go:13: T is not I - missing M()

NOT
x.go:13: T is not I - missing Mfunc()

R=ken
OCL=24316
CL=24316
2009-02-04 10:37:11 -08:00
Russ Cox
c55d310cd2 fix build. missed this file
TBR=r
OCL=24269
CL=24269
2009-02-03 15:58:13 -08:00
Russ Cox
736903c170 libmach:
* heuristic to go farther during stack traces.
	* significantly improved Linux thread handing.

acid:
	* update to new libmach interface.

prof:
	* use new libmach interface.
	* multiple thread support (derived from Rob's copy).
	* first steps toward pprof-like graphs:
	  keep counters indexed by pc,callerpc pairs.

R=r
DELTA=909  (576 added, 123 deleted, 210 changed)
OCL=24240
CL=24259
2009-02-03 15:00:09 -08:00
Russ Cox
9aa28f9231 bufio:
* avoid large copies
	* NewBufRead, NewBufWrite never fail
	* add BufReadWrite

io:
	* add io.Close

http, google/net/rpc:
	* add, use http.Conn.Hijack

R=r
DELTA=416  (202 added, 123 deleted, 91 changed)
OCL=24153
CL=24238
2009-02-03 14:16:22 -08:00
Russ Cox
535dcf77c8 minor tweaks
R=r
DELTA=9  (2 added, 5 deleted, 2 changed)
OCL=24107
CL=24152
2009-02-02 18:59:20 -08:00
Russ Cox
e73acc1b35 flesh out http server.
convert to uppercase names.

R=r
DELTA=613  (460 added, 61 deleted, 92 changed)
OCL=24139
CL=24145
2009-02-02 18:01:32 -08:00
Russ Cox
f61639d4e2 6g return struct fix:
make t->width of funarg struct be width of struct.

emit MOVSL for 4-byte copy.

R=ken
OCL=24108
CL=24111
2009-02-02 13:41:38 -08:00
Russ Cox
fb88a01cc2 marginally better thread debugging on Linux.
if you clone inside a traced pid, the child
is automatically attached and stopped,
apparently.

R=r
DELTA=63  (41 added, 12 deleted, 10 changed)
OCL=24096
CL=24106
2009-02-02 13:26:40 -08:00
Rob Pike
6e395cfecf slightly better code for the frog fix
R=ken
OCL=24025
CL=24025
2009-01-31 16:44:52 -08:00
Rob Pike
2538cf747b Complain about control characters that are not white space.
Bitten by invisible chars too many times.

R=ken
OCL=24024
CL=24024
2009-01-31 16:42:10 -08:00
Russ Cox
6fdb18f900 can finally close this TODO - 6l was broken
R=r
DELTA=2  (0 added, 2 deleted, 0 changed)
OCL=23993
CL=23995
2009-01-30 17:14:39 -08:00
Russ Cox
47e27758db keep line number history even when
throwing away dead code at end of file.

also fix an uninitialized memory error
found by valgrind.

R=r
DELTA=7  (5 added, 2 deleted, 0 changed)
OCL=23991
CL=23994
2009-01-30 17:10:10 -08:00
Russ Cox
9e735985d4 avoid memcpy(x, x),
which valgrind complains about.

R=ken
OCL=23990
CL=23990
2009-01-30 16:31:26 -08:00
Russ Cox
7b6bdfb735 two uses of uninitialized memory,
picked up by valgrind.
fixes test/escape.go on linux.

R=ken
OCL=23971
CL=23971
2009-01-30 15:11:46 -08:00
Russ Cox
122ed3e988 print format bug
R=ken
OCL=23965
CL=23965
2009-01-30 14:54:49 -08:00
Russ Cox
4a43198390 update compiler to new func rules
R=ken
OCL=23958
CL=23961
2009-01-30 14:39:42 -08:00
Russ Cox
4cf7711568 update go code tree to new func rules.
R=r
DELTA=367  (111 added, 59 deleted, 197 changed)
OCL=23957
CL=23960
2009-01-30 14:39:31 -08:00
Russ Cox
391425ae55 if take address of local, move to heap.
heuristic to not print bogus strings.
fix one error message format.

R=ken
OCL=23849
CL=23851
2009-01-29 17:38:58 -08:00
Ken Thompson
4f49b88dda optimizer bug w STOstring
R=r
OCL=23820
CL=23820
2009-01-29 15:13:36 -08:00
Russ Cox
282bf8cc8c fix possible infinite recursion in eqtype.
don't use intermediate register to move
32-or-fewer-bit immediate constants
into memory.

R=ken
OCL=23726
CL=23726
2009-01-28 16:42:26 -08:00
Russ Cox
3ec4675220 clean up range grammar
R=ken
OCL=23712
CL=23714
2009-01-28 15:41:50 -08:00
Russ Cox
9f726c2c8b Use explicit allspan list instead of
trying to find all the places where
spans might be recorded.

Free can cascade into complicated
span manipulations that move them
from list to list; the old code had the
possibility of accidentally processing
a span twice or jumping to a different
list, causing an infinite loop.

R=r
DELTA=70  (28 added, 25 deleted, 17 changed)
OCL=23704
CL=23710
2009-01-28 15:22:16 -08:00
Robert Griesemer
cb659ece0e additions to array container:
- added Slice, Cut, InsertArray, AppendArray
- renamed Remove -> Delete (so we have: Insert, Delete, Cut)
- more factoring of code
- extra tests (could use some more)

R=r,rsc
DELTA=179  (127 added, 22 deleted, 30 changed)
OCL=23648
CL=23685
2009-01-28 13:32:31 -08:00
Ken Thompson
4b8e030762 bug 135
R=r
OCL=23646
CL=23646
2009-01-27 18:21:03 -08:00
Russ Cox
7fa5941fad make "size 6.out" work on mac.
R=r
DELTA=11  (6 added, 0 deleted, 5 changed)
OCL=23629
CL=23631
2009-01-27 15:40:36 -08:00
Russ Cox
743ac07cc3 change dotdotdot interfaces to be structs,
not pointers to structs.

fix defered dotdotdot.

R=r,ken
DELTA=25  (7 added, 5 deleted, 13 changed)
OCL=23620
CL=23625
2009-01-27 15:05:25 -08:00
Ken Thompson
e90314d024 pragma textflag
fixes latent bugs in go and defer

R=r
OCL=23613
CL=23613
2009-01-27 14:12:35 -08:00
Russ Cox
53e69e1db5 various race conditions.
R=r
DELTA=43  (29 added, 5 deleted, 9 changed)
OCL=23608
CL=23611
2009-01-27 14:01:20 -08:00
Ken Thompson
47ab1c1e99 spelling
R=r
OCL=23602
CL=23602
2009-01-27 13:23:28 -08:00
Ken Thompson
1e1cc4eb57 defer
R=r
OCL=23592
CL=23592
2009-01-27 12:03:53 -08:00
Russ Cox
1ce17918e3 gc #0. mark and sweep collector.
R=r,gri
DELTA=472  (423 added, 2 deleted, 47 changed)
OCL=23522
CL=23541
2009-01-26 17:37:05 -08:00
Russ Cox
5b129cda5f assignment count mismatch: 2 = 1.
R=ken
OCL=23534
CL=23534
2009-01-26 17:20:29 -08:00
Russ Cox
f1fe21a08f bug134
R=ken
OCL=23532
CL=23532
2009-01-26 17:06:20 -08:00
Russ Cox
4efad58d0a bug133
R=ken
OCL=23528
CL=23528
2009-01-26 16:57:24 -08:00
Russ Cox
9ed2960de8 in hash implementation, if data >= 8, align to 8.
R=ken
OCL=23519
CL=23521
2009-01-26 15:36:39 -08:00
Russ Cox
3c5f3a8641 print(map) and print(chan) as pointers.
R=ken
OCL=23520
CL=23520
2009-01-26 15:36:28 -08:00
Rob Pike
646b3b5c02 improved logging formats.
R=rsc
DELTA=210  (118 added, 60 deleted, 32 changed)
OCL=23508
CL=23518
2009-01-26 15:34:16 -08:00
Russ Cox
9b6d385cb5 interface speedups and fixes.
more caching, better hash functions, proper locking.
fixed a bug in interface comparison too.

R=ken
DELTA=177  (124 added, 10 deleted, 43 changed)
OCL=23491
CL=23493
2009-01-26 12:36:21 -08:00
Ken Thompson
7859ae8a2f removed a:b in range syntax
added another channel test

R=r
OCL=23488
CL=23488
2009-01-26 11:34:38 -08:00
Russ Cox
65ad3ce179 make time fields public
R=r
DELTA=49  (0 added, 0 deleted, 49 changed)
OCL=23480
CL=23487
2009-01-26 11:22:21 -08:00
Ian Lance Taylor
a01bdb4ae0 Add an accessor function os.FD.Fd() to get the file
descriptor.  Use it in the PollServer code.

6g currently accepts this code without this change, but it
should not.  Test case for the bug is bug133.go.

R=rsc
DELTA=10  (0 added, 0 deleted, 10 changed)
OCL=23451
CL=23486
2009-01-26 11:10:14 -08:00
Russ Cox
a7f6d4066e implement new restrictions on what
can be compared/hashed.

R=r
DELTA=351  (201 added, 80 deleted, 70 changed)
OCL=23423
CL=23481
2009-01-26 09:56:42 -08:00
Rob Pike
806d00fc63 add start to a logging package.
R=rsc
DELTA=205  (205 added, 0 deleted, 0 changed)
OCL=23448
CL=23478
2009-01-26 09:28:07 -08:00
Ken Thompson
3338c71fc6 bug in async select read
buganizer 1589219
channel is returning same values multiple times

R=r
OCL=23447
CL=23447
2009-01-24 15:58:44 -08:00
Rob Pike
d8819569eb fix typo in comment. s/put/Put/
R=ken
OCL=23419
CL=23419
2009-01-23 15:57:52 -08:00
Rob Pike
9a7332fb5b remove the "open" concept from reflect and go with slices and arrays.
the two still share an interface and Kind; that's probably ok but might be worth revisiting.

R=rsc
DELTA=74  (1 added, 8 deleted, 65 changed)
OCL=23416
CL=23418
2009-01-23 15:56:04 -08:00
Rob Pike
1b3299ed0b change the representation of arrays in protobufs from *[]item to []item.
for simplicity of user's code, optional arrays of bytes also don't have a pointer.
requires adding a "Set()" method to arrays in reflect.
still to do: protocol compilers, google/net/rpc.

R=rsc
DELTA=227  (36 added, 95 deleted, 96 changed)
OCL=23387
CL=23389
2009-01-23 12:40:55 -08:00
Russ Cox
f4279f587a fix build - missed this file
TBR=r
OCL=23335
CL=23335
2009-01-22 16:49:11 -08:00
Russ Cox
1f8a40d85c move math routines from package sys to package math,
though they still build in src/runtime.

use cgo instead of hand-written wrappers.

R=r
DELTA=740  (289 added, 300 deleted, 151 changed)
OCL=23326
CL=23331
2009-01-22 16:23:44 -08:00
Russ Cox
8c5bc7e93a use $GC, $GL in gotest, to match gccgo's gotest.
use $GC in all_test.go for portability.

R=r
DELTA=19  (12 added, 0 deleted, 7 changed)
OCL=23305
CL=23325
2009-01-22 15:41:12 -08:00
Russ Cox
d9abca81c0 let test sources specify commands to run
before their compilation.

R=r
OCL=23300
CL=23300
2009-01-22 14:23:50 -08:00
Rob Pike
c5f99ccbdd change reflect.CopyArray into a method on ArrayValue called CopyFrom
R=rsc
DELTA=16  (12 added, 0 deleted, 4 changed)
OCL=23242
CL=23242
2009-01-21 15:45:54 -08:00
Russ Cox
61590c4c44 disallow P.t for lowercase t and not our package P.
implement hiding lowercase methods m in
signatures by adding in a hash of the package name
to the type hash code.

remove remaining checks for internally-generated _ names:
they are all gone.

R=ken
OCL=23236
CL=23238
2009-01-21 14:51:57 -08:00
Russ Cox
c3fa54c48b delete unused code and data from 6.outs.
cuts simple test binary by 7%.
would be more except for reflection.

R=r
DELTA=126  (117 added, 4 deleted, 5 changed)
OCL=23163
CL=23237
2009-01-21 14:50:27 -08:00
Russ Cox
35e37bbf41 6g: better genembedtramp fatal error,
and don't put inaccessible private methods
   in signature.

R=ken
OCL=23138
CL=23140
2009-01-20 15:36:57 -08:00
Russ Cox
a3c4faf83f 6l: do not link in objects from an archive just for init functions.
(makes go libraries behave more like c libraries.)

R=r
DELTA=85  (67 added, 12 deleted, 6 changed)
OCL=23133
CL=23139
2009-01-20 15:36:43 -08:00
Russ Cox
839a68469b delete export
TBR=r
OCL=23121
CL=23127
2009-01-20 14:40:40 -08:00
Russ Cox
0183baaf44 * delete export
* rename init functions

R=ken
OCL=23122
CL=23126
2009-01-20 14:40:00 -08:00
Russ Cox
8f14451fe5 6l: ignore undefined symbols in gotypesigs.
they end up in the symbol table with type==0
   if they are in a library but not pulled in.
   also add a few debugging prints.

R=r
DELTA=11  (5 added, 1 deleted, 5 changed)
OCL=23104
CL=23108
2009-01-20 13:21:22 -08:00
Rob Pike
b74e3b95cf add a couple of helper methods to io.ByteBuffer
R=rsc
DELTA=456  (9 added, 2 deleted, 445 changed)
OCL=23107
CL=23107
2009-01-20 12:57:25 -08:00
Russ Cox
f48cbfdf56 convert tests; nothing interesting.
R=r
OCL=23012
CL=23014
2009-01-16 16:12:14 -08:00
Russ Cox
aec4d3194a disallow other package's names in method calls
R=ken
OCL=22999
CL=22999
2009-01-16 15:35:07 -08:00
Russ Cox
aedf121e30 casify struct fields in entire tree.
TBR=r
OCL=22997
CL=22997
2009-01-16 15:28:33 -08:00
Russ Cox
06869eedf9 disallow other package's names in struct field dot.
R=ken
OCL=22996
CL=22996
2009-01-16 15:25:52 -08:00
Ian Lance Taylor
03c40f5122 Change malloc.Lookup to return the size as uintptr rather than
uint64.  This changes the Go code to be consistent with the C
code.

R=rsc
DELTA=6  (0 added, 0 deleted, 6 changed)
OCL=22983
CL=22987
2009-01-16 15:03:22 -08:00
Ian Lance Taylor
6e4b9c696f Remove types from constants, since they didn't match what
Tick() expected.

R=rsc
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=22979
CL=22986
2009-01-16 14:59:27 -08:00
Russ Cox
360962420c casify, cleanup sys
R=r
OCL=22978
CL=22984
2009-01-16 14:58:14 -08:00
Rob Pike
ec9f2b0cd4 casify linux syscall dependents, plus a few stragglers
R=rsc
DELTA=97  (0 added, 0 deleted, 97 changed)
OCL=22971
CL=22973
2009-01-16 14:16:31 -08:00
Rob Pike
605ee5a3ef s/split/Split/ to get compiling again
R=rsc
OCL=22967
CL=22967
2009-01-16 13:55:55 -08:00
Rob Pike
db1656f3e6 two more casifications in fmt
R=rsc
DELTA=14  (0 added, 0 deleted, 14 changed)
OCL=22960
CL=22962
2009-01-16 13:29:43 -08:00
Rob Pike
55ebef615b casify flag.
R=rsc
DELTA=16  (0 added, 9 deleted, 7 changed)
OCL=22959
CL=22961
2009-01-16 13:19:43 -08:00
Rob Pike
ed2ac9b8b0 casify reflect.
R=rsc
DELTA=513  (0 added, 2 deleted, 511 changed)
OCL=22954
CL=22956
2009-01-16 12:48:07 -08:00
Russ Cox
aedfb397ae casify misc
R=r
DELTA=247  (20 added, 50 deleted, 177 changed)
OCL=22951
CL=22955
2009-01-16 12:47:24 -08:00
Robert Griesemer
116a6e9c9c - more bignum_test letter case fixes
R=r
OCL=22952
CL=22952
2009-01-16 12:04:40 -08:00
Rob Pike
1a91b9a8a9 casify syscall and sequelae
R=rsc
DELTA=337  (0 added, 1 deleted, 336 changed)
OCL=22950
CL=22950
2009-01-16 11:36:44 -08:00
Russ Cox
5d41f55acc casify http
R=r
DELTA=33  (0 added, 0 deleted, 33 changed)
OCL=22947
CL=22949
2009-01-16 11:06:42 -08:00
Russ Cox
c840657fe1 casify DNS
R=r
DELTA=221  (0 added, 0 deleted, 221 changed)
OCL=22946
CL=22948
2009-01-16 11:04:44 -08:00
Russ Cox
dec12d3654 re-export of bools was changing
format from hex to decimal, confusing
ar's strcmp-based value comparison.

switched export format to "true" or "false"
to keep bools separate from ints.

R=ken
OCL=22944
CL=22944
2009-01-16 10:45:28 -08:00
Rob Pike
794efd7e78 recasify regexp to use underscores and clean up the tests more
R=rsc
DELTA=174  (0 added, 0 deleted, 174 changed)
OCL=22917
CL=22942
2009-01-16 10:34:36 -08:00
Rob Pike
4b590bf985 casify a few more
R=rsc
DELTA=72  (0 added, 9 deleted, 63 changed)
OCL=22918
CL=22941
2009-01-16 10:34:21 -08:00
Russ Cox
393df07914 casify json
R=r
DELTA=163  (0 added, 0 deleted, 163 changed)
OCL=22910
CL=22939
2009-01-16 10:14:38 -08:00
Russ Cox
d2cdcfc1c8 casify hash
R=r
DELTA=235  (6 added, 26 deleted, 203 changed)
OCL=22907
CL=22938
2009-01-16 10:14:28 -08:00
Russ Cox
e83c85accb casify time
R=r
DELTA=103  (1 added, 0 deleted, 102 changed)
OCL=22914
CL=22937
2009-01-16 10:14:12 -08:00
Russ Cox
2c8d9a5619 redo and clean up math.
R=r
DELTA=243  (60 added, 72 deleted, 111 changed)
OCL=22909
CL=22912
2009-01-15 19:11:32 -08:00
Russ Cox
c1e7e270f1 don't crash on:
package main
var x int
type x struct { a int }

R=ken
OCL=22903
CL=22903
2009-01-15 17:32:31 -08:00
Russ Cox
8a7cbadbbe convert strconv
R=r
DELTA=568  (0 added, 9 deleted, 559 changed)
OCL=22898
CL=22901
2009-01-15 17:22:17 -08:00
Rob Pike
74a60ed08a casify lib/regexp
R=rsc
DELTA=259  (0 added, 0 deleted, 259 changed)
OCL=22897
CL=22900
2009-01-15 17:22:15 -08:00
Russ Cox
605d0746c5 catch export on func.
print names in message.

R=ken
OCL=22891
CL=22891
2009-01-15 16:43:51 -08:00
Rob Pike
33f3ed7710 casify fixup for bufio
R=rsc
DELTA=88  (0 added, 12 deleted, 76 changed)
OCL=22884
CL=22890
2009-01-15 16:22:57 -08:00
Russ Cox
3decb42e6f add warning for export of lowercase too.
R=ken
OCL=22887
CL=22887
2009-01-15 16:20:21 -08:00
Russ Cox
07d344e442 remove export name-list statement.
make package local the default.
warn about name case not matching export keyword.

R=ken
OCL=22881
CL=22886
2009-01-15 16:16:52 -08:00
Russ Cox
b54133d200 make safe for new package local defaults
R=r
DELTA=462  (9 added, 33 deleted, 420 changed)
OCL=22879
CL=22885
2009-01-15 16:16:42 -08:00
Rob Pike
1d74892178 more casifying fixups
R=rsc
DELTA=213  (0 added, 0 deleted, 213 changed)
OCL=22878
CL=22882
2009-01-15 16:03:27 -08:00
Rob Pike
497bb9c07d casify fmt and its dependents.
R=rsc
DELTA=224  (0 added, 2 deleted, 222 changed)
OCL=22875
CL=22875
2009-01-15 15:40:27 -08:00
Rob Pike
8559e3ad54 diagnose missing symbols instead of
silently miscompiling.

R=rsc
OCL=22872
CL=22872
2009-01-15 15:21:12 -08:00
Robert Griesemer
e28692f07d - converted tabwriter to new naming scheme
R=r
OCL=22870
CL=22870
2009-01-15 15:10:46 -08:00
Robert Griesemer
f4babf6931 - missed a few identifiers
R=r
OCL=22864
CL=22864
2009-01-15 14:49:40 -08:00
Robert Griesemer
364a852027 - lowercase non-exported functions in bignum
R=r
DELTA=117  (1 added, 0 deleted, 116 changed)
OCL=22764
CL=22863
2009-01-15 14:46:31 -08:00
Rob Pike
61f3302044 printf->Printf etc.
the raw fmt routines will be another, smaller but subtler pass.

R=rsc
DELTA=157  (0 added, 0 deleted, 157 changed)
OCL=22851
CL=22851
2009-01-15 13:48:11 -08:00
Russ Cox
5ea8ac78a8 add unicode library stub with just
IsUpper and IsLetter.

R=r
DELTA=746  (746 added, 0 deleted, 0 changed)
OCL=22743
CL=22750
2009-01-14 14:05:00 -08:00
Ian Lance Taylor
2b57a1124e Add cgo2c program to translate mixed Go/C code into C. This
lets us use a single source file for both 6c and gcc, handling
the incompatible handling of return values.

R=rsc
DELTA=649  (613 added, 35 deleted, 1 changed)
OCL=22682
CL=22730
2009-01-14 08:21:25 -08:00
Russ Cox
58b280db3b change another yacc reference to bison.
R=r
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=22662
CL=22691
2009-01-13 16:32:46 -08:00
Russ Cox
8fb60768c3 in 6g -r (the rsc flag),
rewrite heap pointer moves as xchg.

R=ken
OCL=22665
CL=22665
2009-01-13 13:46:09 -08:00
Ian Lance Taylor
1a0bde24ae Add USED declarations for SysUnused parameters.
R=rsc
DELTA=2  (2 added, 0 deleted, 0 changed)
OCL=22640
CL=22642
2009-01-13 10:24:06 -08:00
Ian Lance Taylor
9b8da82d72 Tweak code to make it easier to compile with gcc.
+ Use macros to name symbols with non-ASCII characters.
  + Make some variables unsigned, because they are compared
    against unsigned values.
  + Fix a few void* pointers to be MLink*.

R=rsc
DELTA=94  (44 added, 3 deleted, 47 changed)
OCL=22303
CL=22638
2009-01-13 09:55:24 -08:00
Russ Cox
0c32430534 free(nil)
R=iant
DELTA=3  (3 added, 0 deleted, 0 changed)
OCL=22467
CL=22471
2009-01-09 16:22:13 -08:00
Russ Cox
a3ed4e716a add sys.caller
R=r
DELTA=139  (101 added, 38 deleted, 0 changed)
OCL=22462
CL=22466
2009-01-09 15:52:43 -08:00
Russ Cox
ae167bf08f clean up automatic indirect, delete some dead code.
R=ken
OCL=22454
CL=22457
2009-01-09 15:21:41 -08:00
Russ Cox
316d377ac2 now that TCHAN, TMAP, and TSTRING are real types,
can do methods on them without pointer worries.

R=ken
OCL=22434
CL=22436
2009-01-09 13:50:58 -08:00
Rob Pike
c45d2a767c simplify flag interface. no more BVal etc. you just get a pointer.
fixed everything except the tutorial.

R=rsc
DELTA=404  (94 added, 139 deleted, 171 changed)
OCL=22414
CL=22422
2009-01-09 13:42:46 -08:00
Russ Cox
863dafb9ae typo
R=r
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=22411
CL=22411
2009-01-09 11:17:13 -08:00
Russ Cox
8f5bba0d82 silence gcc warnings.
not sure if the warning in reg.c was a real bug.

R=ken
OCL=22408
CL=22410
2009-01-09 11:13:59 -08:00
Russ Cox
a91af04c06 6g cleanup suggested by ken.
remove TPTR wrapper around TMAP, TCHAN, TSTRING.

R=ken
OCL=22406
CL=22409
2009-01-09 11:13:39 -08:00
Russ Cox
484ba939d2 update sys.reflect and sys.unreflect to accomodate
the possibility of large objects in interface values.

R=r
DELTA=171  (97 added, 22 deleted, 52 changed)
OCL=22382
CL=22382
2009-01-09 00:17:46 -08:00
Russ Cox
e512481b17 second pass on interface fixes and tests.
R=ken
OCL=22370
CL=22372
2009-01-08 18:06:06 -08:00
Robert Griesemer
8b8a862da8 - removed temporary work-arounds from bignum_test, not needed anymore
R=r
DELTA=93  (0 added, 61 deleted, 32 changed)
OCL=22348
CL=22366
2009-01-08 17:38:24 -08:00
Rob Pike
ab331f7a7d new sort interface - no structs, just slices.
R=rsc
DELTA=37  (0 added, 7 deleted, 30 changed)
OCL=22330
CL=22342
2009-01-08 15:12:00 -08:00
Russ Cox
1b7881adb4 fix:
type T []int
	var a []int
	var t = T(a)

R=ken
OCL=22341
CL=22341
2009-01-08 15:01:22 -08:00
Russ Cox
c0b8a7965a typo
R=ken
OCL=22327
CL=22327
2009-01-08 14:31:11 -08:00
Russ Cox
20595ac4b0 many interface bug fixes.
also, after
	func g() (int, int)
	func f(int, int)
allow
	f(g())
and
	func h() (int, int) { return g() }

R=ken
DELTA=356  (252 added, 26 deleted, 78 changed)
OCL=22319
CL=22325
2009-01-08 14:30:00 -08:00
Ian Lance Taylor
7843a14df1 Remove duplicate typedef declarations.
R=rsc
DELTA=7  (0 added, 7 deleted, 0 changed)
OCL=22267
CL=22281
2009-01-08 09:45:42 -08:00
Rob Pike
289ff7d0e4 Cache *os.Error values across all users.
R=rsc
DELTA=27  (23 added, 0 deleted, 4 changed)
OCL=22245
CL=22245
2009-01-07 16:37:43 -08:00
Ken Thompson
eed3addb9d more
R=r
OCL=22240
CL=22240
2009-01-07 15:54:08 -08:00
Ken Thompson
3f135be389 conversion from closed array to slice
R=r
OCL=22236
CL=22236
2009-01-07 15:26:11 -08:00
Russ Cox
1b1f1b53ea correct signature generation decision
for non-pointer types with methods.

R=r
DELTA=37  (13 added, 14 deleted, 10 changed)
OCL=22217
CL=22219
2009-01-07 13:29:03 -08:00
Ken Thompson
c458c98388 [...] bug
R=r
OCL=22218
CL=22218
2009-01-07 13:20:10 -08:00
Russ Cox
855495eab6 iscomposite test in OCONV is unnecessary
now that OCOMP exists

R=ken
OCL=22216
CL=22216
2009-01-07 12:39:48 -08:00
Ken Thompson
179af0bb19 clear automatic arrays created with literals
R=r
OCL=22215
CL=22215
2009-01-07 12:28:23 -08:00
Ken Thompson
b0f627a6e1 closed arrays including [...]
R=r
OCL=22182
CL=22182
2009-01-06 17:31:24 -08:00
Robert Griesemer
af065a0c77 - make code in gosrc compile again, check in all pending changes
(this code doesn't match the existing language at this point,
  but it's a large code base which compiles - will eventually go
  away)
- enable compilation of it again in run.bash

R=r
DELTA=1147  (534 added, 311 deleted, 302 changed)
OCL=22176
CL=22176
2009-01-06 16:26:45 -08:00
Rob Pike
8d21004b41 make the tutorial programs run again.
(the text still needs fixing)
add the tutorial programs to the test run.

R=rsc
DELTA=41  (6 added, 0 deleted, 35 changed)
OCL=22174
CL=22174
2009-01-06 15:49:27 -08:00
Russ Cox
84953bdaa8 fix newfn
R=ken
OCL=22173
CL=22173
2009-01-06 15:39:28 -08:00
Rob Pike
344b16512c update utf8_test.go
R=rsc
OCL=22170
CL=22170
2009-01-06 15:30:07 -08:00
Russ Cox
dabdfa6cce new new &Point{1,2}
R=ken
OCL=22168
CL=22168
2009-01-06 15:24:12 -08:00
Russ Cox
5564504507 new new & make
R=r
OCL=22166
CL=22166
2009-01-06 15:19:02 -08:00
Ken Thompson
88b5c5f0f8 make for slice/map/chan
new for pointers

R=r
OCL=22158
CL=22158
2009-01-06 14:52:26 -08:00
Rob Pike
1da03aaef7 A richer interface for regexps. Simple boolean matcher, a vector of strings rather than
indexes, and a global boolean function for quick action.

R=rsc
DELTA=152  (127 added, 12 deleted, 13 changed)
OCL=22140
CL=22142
2009-01-06 13:54:53 -08:00
Russ Cox
af0143ce03 make 8a, 8c, 8l build in go environment.
,s/int32/long/g in 8a, 8c, 8l.
delete dead code.
move enam.c, 8.out.h, mkenam from 8c to 8l.

R=r
DELTA=1850  (581 added, 983 deleted, 286 changed)
OCL=22119
CL=22129
2009-01-06 11:34:02 -08:00
Russ Cox
d8c7980514 comment sudoaddable;
remove unused second parameter.

R=ken
OCL=22126
CL=22126
2009-01-06 11:23:58 -08:00
Russ Cox
8318187f77 delete blyacc
R=r
DELTA=3562  (0 added, 3560 deleted, 2 changed)
OCL=22112
CL=22114
2009-01-06 09:53:38 -08:00
Russ Cox
859ba57bbb make acid build with bison.
ask for bison explicitly in cc, gc to try to
avoid problems with other yaccs that
might be installed.

R=r
DELTA=29  (10 added, 2 deleted, 17 changed)
OCL=22110
CL=22113
2009-01-06 09:53:30 -08:00
Russ Cox
4dee747fb9 8a, 8c, and 8l from inferno distribution
R=r
DELTA=19539  (19539 added, 0 deleted, 0 changed)
OCL=22109
CL=22109
2009-01-06 09:41:38 -08:00
Russ Cox
2d259c817a add comments and delete dead code
R=ken
OCL=22078
CL=22080
2009-01-05 17:32:23 -08:00
Russ Cox
be76898cb3 change time.Tick test to use 100ms intervals.
now passes even under loaded conditions on r45.

R=r
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=22019
CL=22022
2009-01-05 11:18:20 -08:00
Russ Cox
c14c2b231f fix 6a line number bug -
was incrementing lineno twice for
the \n after a // comment.

R=r
DELTA=3  (0 added, 2 deleted, 1 changed)
OCL=21984
CL=22021
2009-01-05 11:18:15 -08:00
Ken Thompson
4991f20b3f one bignum test fails
has to do with printing
patched it out

R=r
OCL=21921
CL=21923
2008-12-30 14:03:54 -08:00
Ken Thompson
b2dfd787d7 allow slices (open arrays) to be
receivers in methods.
put back original code for hilbert/bignum

R=r
OCL=21910
CL=21920
2008-12-30 14:02:20 -08:00
Ken Thompson
85815fe0ad diagnostic to catch pointer to
rvalue promoted to method receiver.
fixes to bignum that failed.

R=r
OCL=21827
CL=21827
2008-12-26 14:42:20 -08:00
Rob Pike
b90b4157d1 put array test in table, with TODO to fix when arrays work in interfaces.
TBR=rsc
OCL=21766
CL=21766
2008-12-23 09:34:38 -08:00
Rob Pike
b0d62676d2 print array (not just *array) using %v
TBR=rsc
DELTA=34  (33 added, 0 deleted, 1 changed)
OCL=21718
CL=21718
2008-12-22 11:04:17 -08:00
Rob Pike
eb32228627 hilbert now runs.
it's 25% faster and runs with 40% less memory allocation than before

R=rsc
DELTA=20  (15 added, 0 deleted, 5 changed)
OCL=21690
CL=21690
2008-12-20 18:15:34 -08:00
Rob Pike
9ccf39bd68 update to new regime.
lines marked BUG are rewrites working around 6g bug.

R=rsc
DELTA=161  (42 added, 2 deleted, 117 changed)
OCL=21689
CL=21689
2008-12-20 17:25:43 -08:00
Russ Cox
af5e16cfd9 fix new(T) if type T []int.
make sure type of expr is T not just []int

R=ken
OCL=21688
CL=21688
2008-12-20 16:30:44 -08:00
Ken Thompson
2b33a134a8 regfree
R=r
OCL=21685
CL=21687
2008-12-20 16:07:56 -08:00
Ken Thompson
7cfe782a69 LEAQ bug
R=r
OCL=21684
CL=21684
2008-12-20 16:05:12 -08:00
Russ Cox
c3077f7606 [] and struct in interfaces.
other [] cleanup.

convert() is gone.

R=r
DELTA=352  (144 added, 68 deleted, 140 changed)
OCL=21660
CL=21662
2008-12-19 17:11:54 -08:00
Russ Cox
33907d1346 allow Listen on ":9999" as an alias for "0.0.0.0:9999"
R=r
DELTA=21  (12 added, 0 deleted, 9 changed)
OCL=21653
CL=21653
2008-12-19 15:52:21 -08:00
Ken Thompson
a91a0a6a7a array compare (except = != nil) are illegal
R=r
OCL=21637
CL=21637
2008-12-19 14:26:52 -08:00
Ken Thompson
6fa74e0973 portability bug
cant assign to closed array

R=r
OCL=21634
CL=21634
2008-12-19 14:04:25 -08:00
Russ Cox
cd40cd2435 fix new(bool) error message
R=ken
OCL=21616
CL=21616
2008-12-19 12:18:44 -08:00
Russ Cox
eee50ae1ac chan and map of [] and struct
R=r
DELTA=192  (145 added, 8 deleted, 39 changed)
OCL=21609
CL=21614
2008-12-19 12:05:22 -08:00
Russ Cox
cbff09d666 g4 open sysimport.c before writing it
R=r
DELTA=1  (1 added, 0 deleted, 0 changed)
OCL=21577
CL=21603
2008-12-19 09:03:44 -08:00
Russ Cox
c4416ac06b new error messages
x.go:11: illegal types for operand: AS
	*I
	*T
	(*interface vs *struct)

R=r
DELTA=10  (8 added, 0 deleted, 2 changed)
OCL=21457
CL=21602
2008-12-19 09:03:24 -08:00
Russ Cox
da0a7d7b8f malloc bug fixes.
use malloc by default.
free stacks.

R=r
DELTA=424  (333 added, 29 deleted, 62 changed)
OCL=21553
CL=21584
2008-12-19 03:13:39 -08:00
Russ Cox
ba882f9940 fmt and reflect updates for recent changes
TBR=r
OCL=21580
CL=21583
2008-12-19 03:06:19 -08:00
Russ Cox
dc7b2e98d2 compiler changes for *chan -> chan; *map -> map; new(T) -> new(*T)
mainly a syntactic change: the compiler representations don't change
(chan and map are now hidden pointers like string).

R=ken
OCL=21578
CL=21582
2008-12-19 03:05:54 -08:00
Russ Cox
08ca30bbfa change *map to map; *chan to chan; new(T) to new(*T)
fix bugs left over from *[] to [] conversion.

TBR=r
OCL=21576
CL=21581
2008-12-19 03:05:37 -08:00
Russ Cox
d47d888ba6 convert *[] to [].
R=r
OCL=21563
CL=21571
2008-12-18 22:37:22 -08:00
Ken Thompson
9786f69f74 print(array)
R=r
OCL=21570
CL=21570
2008-12-18 22:17:05 -08:00
Ken Thompson
c9954c63a8 bug in [const]
R=r
OCL=21569
CL=21569
2008-12-18 22:01:46 -08:00
Russ Cox
f38d2b80a4 new []int literal
R=ken
OCL=21568
CL=21568
2008-12-18 21:59:12 -08:00
Ken Thompson
dcc064fe94 cmp [] to nil
R=r
OCL=21567
CL=21567
2008-12-18 21:33:45 -08:00
Russ Cox
78fc888e64 another [] fix
R=ken
OCL=21566
CL=21566
2008-12-18 21:15:26 -08:00
Russ Cox
92f74ca7e2 [] fixes
R=ken
OCL=21565
CL=21565
2008-12-18 21:11:56 -08:00
Ken Thompson
4026500d18 arrays
R=r
OCL=21564
CL=21564
2008-12-18 20:06:28 -08:00
Russ Cox
eaa2a364a7 libmach: always print 0x on hex numbers
R=r
DELTA=3  (0 added, 0 deleted, 3 changed)
OCL=21558
CL=21558
2008-12-18 18:23:48 -08:00
Russ Cox
83348f956e host and port name lookup
R=r,presotto
DELTA=1239  (935 added, 281 deleted, 23 changed)
OCL=21041
CL=21539
2008-12-18 15:42:39 -08:00
Russ Cox
e29ce175ed malloc in runtime (not used by default)
R=r
DELTA=1551  (1550 added, 0 deleted, 1 changed)
OCL=21404
CL=21538
2008-12-18 15:42:28 -08:00
Robert Griesemer
ab0d2582b4 - fixed a bug in Natural.And()
- removed some non-beneficial factorization and reduced number of array slices per
  operations significantly
- reduced line count
- benchhil benchmark time reduced by ~2%

R=r
DELTA=313  (106 added, 163 deleted, 44 changed)
OCL=21473
CL=21497
2008-12-18 09:55:33 -08:00
Ken Thompson
61e0fcce8a small bug
new printarray

R=r
OCL=21429
CL=21429
2008-12-17 12:13:19 -08:00
Russ Cox
697cb17b30 trailing white space
R=r
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=21403
CL=21415
2008-12-17 10:14:29 -08:00
Russ Cox
e53d5ad620 fix type/name thing, again
R=r
DELTA=8  (7 added, 0 deleted, 1 changed)
OCL=21379
CL=21379
2008-12-16 17:45:28 -08:00
Russ Cox
99435cac09 another "want type got name" error case
R=ken
OCL=21377
CL=21377
2008-12-16 17:37:07 -08:00
Russ Cox
67a7abad7f clear flags so that %+v does not pass the +
to the first field it prints.

R=r
DELTA=2  (1 added, 0 deleted, 1 changed)
OCL=21324
CL=21328
2008-12-16 14:39:29 -08:00
Rob Pike
a10267adcd If ByteBuffer has never been used, b.buf is nil but Data() should still work.
Fix the bug using a (safe) shared global empty array.

R=rsc
DELTA=8  (8 added, 0 deleted, 0 changed)
OCL=21303
CL=21303
2008-12-16 13:01:39 -08:00
Ken Thompson
8f53bc0612 new convention, direction bit is
always left cleared. changed
compiler generated memcpy and
memset to assume CLD.

R=r
OCL=21215
CL=21215
2008-12-15 15:07:35 -08:00
Ken Thompson
ae5a475e20 range clause must have = or :=
:= illegal in for-increment

R=r
OCL=21204
CL=21204
2008-12-15 13:44:27 -08:00
Russ Cox
7df571aef7 off-by-one error assigning src files to functions
R=r
DELTA=2  (2 added, 0 deleted, 0 changed)
OCL=21178
CL=21187
2008-12-15 10:50:41 -08:00
Russ Cox
5bb0c4f88b check printf format strings
R=r
DELTA=18  (16 added, 0 deleted, 2 changed)
OCL=21177
CL=21185
2008-12-15 10:50:33 -08:00
Russ Cox
7ca5a0d323 correct arg register in bsdthread_create
R=r
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=21040
CL=21176
2008-12-15 08:56:32 -08:00
Russ Cox
8fb837d96d add test for once
R=r
DELTA=31  (31 added, 0 deleted, 0 changed)
OCL=21043
CL=21175
2008-12-15 08:56:17 -08:00
Ken Thompson
42d89ac02c even more code improvement
R=r
OCL=21160
CL=21160
2008-12-14 18:45:00 -08:00
Ken Thompson
23fc0ac061 more code optimization
R=r
OCL=21159
CL=21159
2008-12-14 17:06:06 -08:00
Ken Thompson
719b088697 code generation
R=r
OCL=21146
CL=21146
2008-12-13 16:41:47 -08:00
Ken Thompson
937ac13f26 code improvement
R=r
OCL=21144
CL=21144
2008-12-13 13:16:14 -08:00
Ken Thompson
e683fb7a54 bug104
R=r
OCL=21082
CL=21082
2008-12-12 13:10:36 -08:00
Russ Cox
a3155bdb09 remove implicit int -> string
R=ken
OCL=21020
CL=21020
2008-12-11 17:04:12 -08:00
Russ Cox
bf67afc84e print field names on struct members.
also don't concatenate strings next
to each other in the struct,
like p.doprint does.

expose additional print flags to formatters

R=r
DELTA=128  (111 added, 11 deleted, 6 changed)
OCL=20991
CL=21018
2008-12-11 16:53:33 -08:00
Ken Thompson
c7ab332744 restrict declarations of type map/chan/string
(they must be pointers)

R=r
OCL=21009
CL=21009
2008-12-11 16:09:45 -08:00
Russ Cox
73653841af reject struct to interface conversion for now
R=ken
OCL=21007
CL=21007
2008-12-11 15:56:13 -08:00
Rob Pike
9ba97ca308 add uintptr to reflect and print
R=rsc
DELTA=70  (35 added, 4 deleted, 31 changed)
OCL=20993
CL=20998
2008-12-11 14:41:12 -08:00
Rob Pike
546f269c3b if the typestring gives a field name of "?", drop it.
R=rsc
DELTA=11  (7 added, 0 deleted, 4 changed)
OCL=20988
CL=20988
2008-12-11 13:24:04 -08:00
Rob Pike
ac09eb4f49 handle the nil interface better in reflect and print
R=rsc
DELTA=25  (19 added, 0 deleted, 6 changed)
OCL=20985
CL=20985
2008-12-11 12:59:49 -08:00
Russ Cox
793a6effcf add JSON library
R=r
DELTA=1127  (1127 added, 0 deleted, 0 changed)
OCL=20975
CL=20983
2008-12-11 12:25:58 -08:00
Russ Cox
fa945d5bf8 fix race with fresh perforce checkouts
R=r
DELTA=15  (9 added, 0 deleted, 6 changed)
OCL=20977
CL=20981
2008-12-11 11:58:45 -08:00
Russ Cox
cb64ec5bb6 only generate non-trivial signatures in the
file in which they occur.  avoids duplicate
trampoline generation across multiple files.

R=ken
OCL=20976
CL=20980
2008-12-11 11:54:33 -08:00
Russ Cox
a9e890d5cf looks like i broke the build
TBR=r
OCL=20963
CL=20963
2008-12-10 21:20:48 -08:00
Russ Cox
b927ad8835 DNS messages
R=r
DELTA=685  (683 added, 0 deleted, 2 changed)
OCL=20926
CL=20951
2008-12-10 17:17:59 -08:00
Ken Thompson
a4459c5520 bug
R=r
OCL=20940
CL=20940
2008-12-10 16:23:29 -08:00
Russ Cox
d0e30cdaa9 assorted cleanup and fixes
R=r
DELTA=209  (109 added, 79 deleted, 21 changed)
OCL=20930
CL=20934
2008-12-10 15:55:59 -08:00
Rob Pike
a238087aa2 StringBytes help routine, common functionality put into package io for sharing.
R=rsc
DELTA=10  (10 added, 0 deleted, 0 changed)
OCL=20928
CL=20931
2008-12-10 15:46:45 -08:00
Ken Thompson
5f1a3be9dd bug120
R=r
OCL=20921
CL=20921
2008-12-10 14:17:24 -08:00
Ken Thompson
e956429166 string hash function faults w empty string
fixes maps[""]

R=r
OCL=20909
CL=20911
2008-12-10 13:28:46 -08:00