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

5158 Commits

Author SHA1 Message Date
Russ Cox
9e26c4bd1a gc: complex(0)
Fixes #1232.

R=ken2
CC=golang-dev
https://golang.org/cl/3621041
2010-12-13 15:34:45 -05:00
Russ Cox
88cf5564fc ld: missing prototype
R=ken2
CC=golang-dev
https://golang.org/cl/3620041
2010-12-13 15:26:52 -05:00
Russ Cox
603f9feeec gc: another shift bug
Fixes #1316.

R=ken2
CC=golang-dev
https://golang.org/cl/3575042
2010-12-13 13:42:51 -05:00
Russ Cox
9da73612ed cgo: do not reset tag generator between files
Clean up an error message and error exit too.
Insert blank line after "DO NOT EDIT" comment
to keep it from being a doc comment.

Fixes #1213.
Fixes #1222.

R=r
CC=golang-dev
https://golang.org/cl/3608042
2010-12-13 13:20:04 -05:00
Russ Cox
e7a0f67603 gc: introduce explicit alignments
No semantic changes here, but working
toward being able to align structs based
on the maximum alignment of the fields
inside instead of having a fixed alignment
for all structs (issue 482).

R=ken2
CC=golang-dev
https://golang.org/cl/3617041
2010-12-13 11:57:41 -05:00
Russ Cox
96db724cfc gc: emit reflect correct reflect types
Fixes #1169.

R=ken2
CC=golang-dev
https://golang.org/cl/3595043
2010-12-13 10:05:20 -05:00
Russ Cox
c7c16175e0 ld: allow .o files with no symbols
Don't crash in dwarf for foreign functions.

R=ken2
CC=golang-dev
https://golang.org/cl/3576043
2010-12-13 10:05:07 -05:00
Russ Cox
cc1556d9a2 runtime/linux/386: set FPU to 64-bit precision
Fixes #550.

R=r
CC=golang-dev
https://golang.org/cl/3469044
2010-12-13 10:04:53 -05:00
Alex Brainman
84713d46f6 syscall: remove terminating \r and \n from windows error messages
R=rsc, peterGo
CC=golang-dev
https://golang.org/cl/3095042
2010-12-13 17:02:01 +11:00
Wei Guangjing
e04ef7769e Fix windows build.
R=brainman, rsc
CC=golang-dev
https://golang.org/cl/3533041
2010-12-13 16:41:02 +11:00
Gustavo Niemeyer
1f6b6ca9ba A selection of trivials.
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/3606043
2010-12-12 14:16:37 -08:00
Robert Griesemer
5e54e93675 godoc: improved textual search
- improved search result page
- clicking on files shows highlighted search phrase
  (.go files loose their godoc-specific formatting and
  highlighting in this mode - a better solution is in
  the works)
- support for textual results
- fixed bug with non-URL escaped URL parameter (Query)

R=rsc, adg
CC=golang-dev
https://golang.org/cl/3585041
2010-12-12 13:13:07 -08:00
Eoghan Sherry
40ff071e9b 5g/8g, 8l, ld, prof: fix output of 32-bit values
If an %lld argument can be 32 or 64 bits wide, cast to vlong.
If always 32 bits, drop the ll.
Fixes #1336.

R=brainman, rsc
CC=golang-dev
https://golang.org/cl/3580041
2010-12-12 14:40:19 -05:00
Nigel Tao
73fd298901 reflect: rename reflect.ArrayCopy to be reflect.Copy.
R=r
CC=golang-dev
https://golang.org/cl/3601041
2010-12-12 20:27:29 +11:00
Mikio Hara
7ec69c179d gofmt -s -w src
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/3592041
2010-12-11 13:49:45 -08:00
Robert Griesemer
055650daa4 godoc: first cut at textual search
To enable use -fulltext flag; e.g.: godoc -v -fulltext -http=:7777

Enabling the fulltext index will use significantly more memory as
the text of all source code, the respective suffixarray, and the
file set data structure is kept in memory. At the moment there is
about 6Mb of source code (~1400 files) indexed under GOROOT.
Source code + suffix array together consume 5*(size of source) or
about 30Mb. The file set data structure consumes about 4b/src line.
By default only up to 5000 results are shown for now.

The presentation of the results needs tuning. In particular,
if a string is found, clicking on the respective file does not
highlight them, yet.

At the moment, only Go source files are indexed. Eventually,
the full text index should encompass other files as well.

R=rsc, adg
CC=golang-dev
https://golang.org/cl/3182043
2010-12-10 14:40:22 -08:00
Russ Cox
9282a768cf math: s/MinFloat/SmallestNonzeroFloat/
R=r, gri
CC=golang-dev
https://golang.org/cl/3547042
2010-12-10 11:39:09 -08:00
Russ Cox
e454af4d64 cgo: avoid self-interference of global names
Fixes #1332.

R=iant, iant2
CC=golang-dev
https://golang.org/cl/3555041
2010-12-10 11:32:58 -08:00
Russ Cox
4324a31376 nm: silently ignore .o files in .a files
Update #1334.

R=r
CC=golang-dev
https://golang.org/cl/3553041
2010-12-10 11:32:48 -08:00
Nigel Tao
71bd053ada html: parse <table><tr><td> tags.
Also, shorten fooInsertionMode to fooIM.

R=gri
CC=golang-dev
https://golang.org/cl/3504042
2010-12-10 12:20:14 +11:00
Ryan Hitchman
8959851a96 os: make MkdirAll work with symlinks
Fixes #1149.

R=adg
CC=golang-dev
https://golang.org/cl/3564041
2010-12-10 10:43:45 +11:00
Ken Thompson
ae60526848 arm floating point simulation
R=rsc
CC=golang-dev
https://golang.org/cl/3565041
2010-12-09 14:45:27 -08:00
Andrew Gerrand
aa9c213e56 http: ServeFile to handle Range header for partial requests
and send Content-Length.

Also includes some testing of the server code.

R=rsc
CC=golang-dev
https://golang.org/cl/2831041
2010-12-10 08:51:13 +11:00
Nigel Kerr
27f2d5ce8c xml: disallow invalid Unicode code points
Fixes #1259.

R=rsc
CC=golang-dev
https://golang.org/cl/2967041
2010-12-09 14:51:01 -05:00
Russ Cox
92b4506f73 os: fix test of RemoveAll
Fixes #22. (again)

R=r
CC=golang-dev
https://golang.org/cl/3547041
2010-12-09 14:49:13 -05:00
Mikio Hara
6555cfc6c6 syscall: add network interface constants for linux/386, linux/amd64
R=rsc
CC=golang-dev
https://golang.org/cl/3266042
2010-12-09 13:55:59 -05:00
Ryan Hitchman
f980577064 gc: syntax error for incomplete chan type
Fixes #932.

R=rsc
CC=golang-dev
https://golang.org/cl/3515041
2010-12-09 13:41:24 -05:00
Robert Griesemer
e1d6b3c98d go/ast: fix ast.Walk
- change Walk signature to use an ast.Node instead of interface{}
- add Pos functions to a couple of ast types to make them proper nodes
- explicit nil checks where a node can be nil; incorrect ASTs cause Walk to crash

For now ast.Walk is exercised extensively as part of godoc's indexer;
so we have some confidence in its correctness. But this needs a test,
eventually.

Fixes #1326.

R=rsc, r
CC=golang-dev
https://golang.org/cl/3481043
2010-12-09 10:22:01 -08:00
Robert Griesemer
e2da3b6498 gofmt: simplify "x, _ = range y" to "x = range y"
(inspired by CL 3529041 by hitchmanr@gmail.com)

R=rsc
CC=golang-dev
https://golang.org/cl/3527042
2010-12-09 10:11:57 -08:00
Balazs Lecz
2bdb2e78fe os/inotify: new package
This patch adds a new package: os/inotify, which
provides a Go wrapper to the Linux inotify system.

R=rsc, albert.strasheim, rog, jacek.masiulaniec
CC=golang-dev
https://golang.org/cl/2049043
2010-12-09 13:11:39 -05:00
Robert Griesemer
b98fffe39e go/token,scanner: fix comments so godoc aligns properly
R=iant, r2
CC=golang-dev
https://golang.org/cl/3532042
2010-12-09 10:11:00 -08:00
Rob Pike
8e609cddef govet: a new static checker for Go programs.
At the moment, and for the forseeable future, it only checks arguments to print calls.

R=rsc, gri, niemeyer, iant2, rog, lstoakes, jacek.masiulaniec, cw
CC=golang-dev
https://golang.org/cl/3522041
2010-12-09 12:37:18 -05:00
Rob Pike
b7c73110b1 gob: fix bug sending zero-length top-level slices and maps
Fixes #1278.

R=rsc
CC=golang-dev
https://golang.org/cl/3434046
2010-12-09 11:01:32 -05:00
Ryan Hitchman
062406bc64 throughout: simplify two-variable ranges with unused second variable
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/3529041
2010-12-08 21:36:56 -08:00
Rob Pike
14804a412b event.go: another print glitch from gocheck.
R=rsc
CC=golang-dev
https://golang.org/cl/3524041
2010-12-08 17:12:25 -05:00
Russ Cox
85d9ab61d2 arm: more fixes
R=ken2
CC=golang-dev
https://golang.org/cl/3523041
2010-12-08 16:49:49 -05:00
Russ Cox
7eeebf49be runtime/cgo: adapt files copied from libcgo
Necessary but not sufficient step toward
making those builds work.

R=r
CC=golang-dev
https://golang.org/cl/3411043
2010-12-08 16:35:05 -05:00
Rob Pike
70113b436e a few more errors caught by the print checker
R=rsc
CC=golang-dev
https://golang.org/cl/3431046
2010-12-08 16:25:14 -05:00
Russ Cox
839abc2ea7 5l (and 6l, 8l, ld): more arm build fixes
R=ken2
CC=golang-dev
https://golang.org/cl/3521041
2010-12-08 15:44:59 -05:00
Russ Cox
b8562ff488 5l: fix build
Makes 5l build with recent changes, but not yet tested on ARM hardware.

R=ken2
CC=golang-dev
https://golang.org/cl/3449044
2010-12-08 15:37:51 -05:00
Adam Langley
3a5efdf230 crypto/elliptic: remove mistakenly commited code
One of my own experiments ended up getting mistakenly commited when
        switching to Jacobian transformations.

R=rsc
CC=golang-dev
https://golang.org/cl/3473044
2010-12-08 15:01:53 -05:00
Russ Cox
5a8f2ba727 fix build: more libcgo references
R=r
CC=golang-dev
https://golang.org/cl/3448043
2010-12-08 14:36:45 -05:00
Russ Cox
98b2d7062e libcgo: delete (replaced by runtime/cgo)
Move unported files (freebsd*, windows*, nacl*) to runtime/cgo.

Step toward fixing FreeBSD build.

R=r
TBR=r
CC=golang-dev
https://golang.org/cl/3497042
2010-12-08 14:33:17 -05:00
Russ Cox
66f7463e80 syscall: fix linux/arm build
bug introduced at
https://golang.org/cl/2331044

R=ken2
CC=golang-dev
https://golang.org/cl/3440046
2010-12-08 14:31:46 -05:00
Russ Cox
b07b04d35f runtime/cgo: take 2
This is a second attempt at submitting
https://golang.org/cl/3420043

A Mercurial problem lost the new files
in that submit.

TBR=r
CC=golang-dev
https://golang.org/cl/3511043
2010-12-08 14:10:00 -05:00
Russ Cox
14d677ecba cgo: new cgo
Very few changes here: the subtle ones are in Make.pkg.

Note that incredibly (and importantly) there are
no changes necessary to the test programs in misc/cgo.

R=iant
CC=golang-dev
https://golang.org/cl/3504041
2010-12-08 13:56:51 -05:00
Russ Cox
f5690004c2 6l, 8l: support for linking ELF and Mach-O .o files
More support for references to dynamic symbols,
including full GOT and PLT for ELF objects.

For Mach-O everything ends up in the GOT: dealing
with the real lazy PLT is too hard for now so we punt.

R=iant, iant2
CC=golang-dev
https://golang.org/cl/3491042
2010-12-08 13:56:43 -05:00
Russ Cox
9042c2ce68 runtime/cgo: runtime changes for new cgo
Formerly known as libcgo.
Almost no code here is changing; the diffs
are shown relative to the originals in libcgo.

R=r
CC=golang-dev
https://golang.org/cl/3420043
2010-12-08 13:53:30 -05:00
Russ Cox
cf42a45587 ld: reading of Mach-O object files
R=iant
CC=golang-dev
https://golang.org/cl/3431045
2010-12-08 13:53:24 -05:00
Russ Cox
37499ebcfd debug/elf, debug/macho: add ImportedLibraries, ImportedSymbols
R=r, iant
CC=golang-dev
https://golang.org/cl/3470044
2010-12-08 13:53:19 -05:00
Russ Cox
f16c280fe5 gopack: allow ELF/Mach-O objects in .a files without clearing allobj
R=iant
CC=golang-dev
https://golang.org/cl/3503041
2010-12-08 13:53:13 -05:00
Russ Cox
8132f1d016 6l, 8l: minor changes & cleanup
R=ken2, ken3
CC=golang-dev
https://golang.org/cl/3505041
2010-12-08 13:53:07 -05:00
Russ Cox
4d8d6d5cda ld: reading of ELF object files
R=iant
CC=golang-dev
https://golang.org/cl/3507041
2010-12-08 13:52:59 -05:00
Russ Cox
7431a3165e ld: re-add ELF symbol tables
R=iant
CC=golang-dev
https://golang.org/cl/3506041
2010-12-08 13:52:50 -05:00
Rob Pike
0313ea80ab path: fix printf glitch in test
R=rh, gri
CC=golang-dev
https://golang.org/cl/3514041
2010-12-08 09:58:46 -05:00
Robert Griesemer
4ba27e27f3 godoc: use file instead of file set for computing line info
Reduces indexing time by ~10%; from ~44s to ~39s, best of 3 runs.

R=rsc
CC=golang-dev
https://golang.org/cl/3510041
2010-12-07 21:55:32 -08:00
Robert Griesemer
1612b8734a token/position.go: provide FileSet.File(), minor optimizations
R=rsc
CC=golang-dev
https://golang.org/cl/3399042
2010-12-07 21:50:08 -08:00
Alex Brainman
1e2876469b syscall: restrict access rights param of OpenProcess() to the minimum needed
Fixes #1270.

R=vcc, rsc
CC=golang-dev
https://golang.org/cl/3299041
2010-12-08 16:20:30 +11:00
Alex Brainman
60c91bbf4c runtime: fix windows build
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/3419043
2010-12-08 12:52:36 +11:00
Keith Rarick
51a2183851 runtime: add Goroutines
R=rsc
CC=golang-dev
https://golang.org/cl/3508041
2010-12-07 18:06:31 -05:00
Eoghan Sherry
63544c4754 ld: fix dwarf decoding of 64-bit reflect values
R=rsc
CC=golang-dev
https://golang.org/cl/3002041
2010-12-07 17:20:52 -05:00
Russ Cox
7e14bd81f4 runtime: debugging help on 386
R=r
CC=golang-dev
https://golang.org/cl/3502041
2010-12-07 17:19:36 -05:00
Nigel Tao
49014c5b12 html: handle unexpected EOF during parsing.
This lets us parse HTML like "<html>foo".

R=gri
CC=golang-dev
https://golang.org/cl/3460043
2010-12-08 08:59:20 +11:00
Russ Cox
8d50557979 cc: allow $ as letter in pragma arguments
(Needed for Mac OS X symbol names.)

R=ken2
CC=golang-dev
https://golang.org/cl/3499041
2010-12-07 16:45:06 -05:00
Robert Griesemer
ce89f213a8 go/parser: Better comment for ParseFile.
The name ParseFile was kept as it indicates that
this function parses a Go 'SourceFile' per the
Go spec. Similarly, the other functions (ParseExpr,
ParseStmtList, ParseDeclList) parse the corresponding
constructs as defined in the Go spec.

Fixes #1311.

R=r, rsc
CC=golang-dev
https://golang.org/cl/3453042
2010-12-07 13:44:01 -08:00
Rob Pike
1ce6245d6c throughout: fix broken calls to Printf etc.
I have written a tool to verify Printf calls, and although it's not
ready to be reviewed yet it's already uncovered a spate of problems
in the repository.  I'm sending this CL to break the changes into
pieces; as the tool improves it will find more, I'm sure.

R=rsc
CC=golang-dev
https://golang.org/cl/3427043
2010-12-07 16:42:54 -05:00
Russ Cox
8694959b12 http: fix build
R=dsymonds
TBR=dsymonds
CC=golang-dev
https://golang.org/cl/3425044
2010-12-07 16:20:15 -05:00
Eoghan Sherry
cab83650d1 gc: skip undefined symbols in import .
Fixes #1284.

R=ken3, rsc
CC=golang-dev
https://golang.org/cl/3210041
2010-12-07 16:16:01 -05:00
Russ Cox
b15c4245c5 crypto/tls: add *Config argument to Dial
Document undocumented exported names.
Allow nil Rand, Time, RootCAs in Config.

Fixes #1248.

R=agl1
CC=golang-dev
https://golang.org/cl/3481042
2010-12-07 16:15:15 -05:00
Christian Himpel
2660c2a7be crypto/tls: fix build of certificate generation example
R=agl1, rsc
CC=golang-dev
https://golang.org/cl/3366041
2010-12-07 16:14:55 -05:00
Michael Hoisie
bfac91a6b9 exec.LookPath: return os.PathError instad of os.ENOENT, it's more descriptive.
R=rsc
CC=golang-dev
https://golang.org/cl/3448042
2010-12-07 15:57:00 -05:00
Nigel Tao
688a83128d html: move the sanity checking of the entity map from runtime
(during init) to test-time (via gotest).

R=gri
CC=golang-dev
https://golang.org/cl/3466044
2010-12-08 07:55:03 +11:00
David Symonds
ae2495c5b0 http: Add EncodeQuery, a handy helper function for constructing URL query strings.
R=stephenm, rsc
CC=golang-dev
https://golang.org/cl/2985042
2010-12-07 15:54:04 -05:00
Wei Guangjing
70deac67cf 8l : add dynimport to import table in Windows PE, initial make cgo dll work.
R=rsc, brainman, Joe Poirier, mattn
CC=golang-dev
https://golang.org/cl/2166041
2010-12-07 15:28:33 -05:00
Albert Strasheim
836643400c build: Allow archiver to be specified in the environment with HOST_AR.
R=rsc
CC=golang-dev
https://golang.org/cl/2515043
2010-12-07 15:28:26 -05:00
Roger Peppe
24a78a026d bufio: make Reader.Read implement io.Reader semantics
R=rsc
CC=golang-dev
https://golang.org/cl/3395042
2010-12-07 14:54:15 -05:00
Albert Strasheim
cf6c212197 syscall, net: Add Recvmsg and Sendmsg on Linux.
Working on issue 1101.

R=rsc
CC=golang-dev
https://golang.org/cl/2331044
2010-12-07 13:40:14 -05:00
Russ Cox
ed7c3f3127 flag: handle multiple calls to flag.Parse
R=r
CC=golang-dev
https://golang.org/cl/3071041
2010-12-07 13:19:01 -05:00
Robert Griesemer
14eb03f614 go/scanner: remove Tokenize() - was only used in tests
R=r
CC=golang-dev
https://golang.org/cl/3415042
2010-12-07 10:08:00 -08:00
Eoghan Sherry
6aa85d1cbe gc: fix method offsets of anonymous interfaces
Fixes #1290.

R=rsc
CC=golang-dev
https://golang.org/cl/3259043
2010-12-07 12:56:26 -05:00
Dean Prichard
cd319092e0 sync: small naming fix for armv5
R=rsc
CC=golang-dev
https://golang.org/cl/3268042
2010-12-07 12:05:00 -05:00
Andrew Gerrand
79dcf180a2 runtime: fix build for nacl
R=lvd
CC=golang-dev
https://golang.org/cl/3391044
2010-12-07 15:24:46 +11:00
Ryan Hitchman
f503e26379 html: unescape numeric entities, and complete the named entities table, including two-character entities.
Fixes #1233.

R=nigeltao
CC=golang-dev
https://golang.org/cl/3445041
2010-12-07 12:13:47 +11:00
Nigel Tao
08a47d6f60 html: first cut at a parser.
R=gri
CC=golang-dev
https://golang.org/cl/3355041
2010-12-07 12:02:36 +11:00
Robert Griesemer
2fd2991eac godoc: don't call flush if position is not valid
(fixes new godoc crash when looking at spec)

R=rsc, r, iant
CC=golang-dev
https://golang.org/cl/3488041
2010-12-06 15:34:23 -08:00
Robert Griesemer
5a9ad8b9e3 go/ast: use token.Pos instead of token.Position; adjust all dependent code
Specifically:

	* lib/godoc:
	- provide file set (FSet) argument to formatters where needed

	* src/cmd:
	- cgo, ebnflint, godoc, gofmt, goinstall: provide file set (fset) where needed
	- godoc: remove local binary search with sort.Search (change by rsc),
	  extract file set for formatters

	* src/pkg:
	- exp/eval: remove embedded token.Position fields from nodes and replace
	  with named token.Pos fields; add corresponding Pos() accessor methods
	- go/token: added file.Line(), changed signature of File.Position()

	* test/fixedbugs/:
	- bug206.go: change test to not rely on token.Pos details

	* added various extra comments
	* Runs all.bash
	* gofmt formats all of src, misc w/o changes
	* godoc runs

	* performance:
	- The new version of godoc consumes about the same space after indexing
	  has completed, but indexing is half the speed. Significant space savings
	  are expected from smaller ASTs, but since they are thrown away after a
	  file has been indexed, this is not visible anymore. The slower indexing
	  time is due to the much more expensive computation of line information.
	  However, with the new compressed position information, indexing can be
	  rewritten and simplified. Furthermore, computing the line info can be
	  done more efficiently.

        New godoc, immediately after indexing completed (best of three runs):

	  PID COMMAND      %CPU   TIME   #TH #PRTS #MREGS RPRVT  RSHRD  RSIZE  VSIZE
	44381 godoc        0.0%  0:38.00   4    19    149  145M   184K   148M   176M

	2010/12/03 17:58:35 index updated (39.231s, 18505 unique words, 386387 spots)
	2010/12/03 17:58:35 bytes=90858456 footprint=199182584
	2010/12/03 17:58:36 bytes=47858568 footprint=167295224

	Old godoc, immediately after indexing completed (best of three runs):

	  PID COMMAND      %CPU   TIME   #TH #PRTS #MREGS RPRVT  RSHRD  RSIZE  VSIZE
	23167 godoc        0.0%  0:22.02   4    17    132  129M   184K   132M   173M

	2010/12/03 14:51:32 index updated (24.892s, 18765 unique words, 393830 spots)
	2010/12/03 14:51:32 bytes=66404528 footprint=163907832
	2010/12/03 14:51:32 bytes=46282224 footprint=163907832

	The different numbers for unique words/spots stem from the fact the the
	two workspaces are not exactly identical. The new godoc maintains a large
	file set data structure during indexing which (probably) is the reason
	for the larger heap (90858456 vs 66404528) before garbage collection.

R=rsc, r
CC=golang-dev
https://golang.org/cl/3050041
2010-12-06 14:23:18 -08:00
Russ Cox
92bfd850e0 net: fix TestDialGoogle
TBR=r
CC=golang-dev
https://golang.org/cl/3417042
2010-12-06 14:07:36 -08:00
Yuval Pavel Zholkover
8221eb9103 8l, runtime: fix Plan 9 386 build.
8l was broken by commit 7ac0d2eed9, it caused .data to be page aligned in the file - which is not how Plan 9 expects things to be.
Also .rodata was layed out in a similar fashion.

Not sure when signame was introduced, but added a stub.
Removed the symo assignment in asm.c as it is not currently used.

Fix runtime breakage after commit 629c065d36 which prefixes all external symbols with runtime·.

R=rsc
CC=golang-dev
https://golang.org/cl/2674041
2010-12-06 16:38:28 -05:00
Eoghan Sherry
ff4e08f60d math: improve accuracy of Exp2
Note:
* Exp2 doesn't have a special case for very small arguments
* Exp2 hasn't been subject to a proper error analysis

Also:
* add tests for Exp2 with integer argument
* always test Go versions of Exp and Exp2

R=rsc
CC=Charlie Dorian, PeterGo, golang-dev
https://golang.org/cl/3481041
2010-12-06 16:24:51 -05:00
Russ Cox
6eee9ed507 time: fix build
Allow less precise timing on build machines.

TBR=r
CC=golang-dev
https://golang.org/cl/3391043
2010-12-06 16:22:32 -05:00
Rob Pike
42cfe48ffc use the new %U format for runes
R=rsc
CC=golang-dev
https://golang.org/cl/3483041
2010-12-06 14:38:25 -05:00
Rob Pike
53eaf40eba netchan: fix dumb locking bug introduced in recent editing.
-found by Dave Cheney

R=rsc
CC=golang-dev
https://golang.org/cl/3460042
2010-12-06 14:29:05 -05:00
Rob Pike
e26f9b3420 flag: fix format error in boolean error report. just use %q; the values are strings.
R=rsc
CC=golang-dev
https://golang.org/cl/3418043
2010-12-06 14:23:52 -05:00
Rob Pike
730e39cd13 fmt: add %U format for standard Unicode representation of integer values.
fmt.Printf("%U", 1) yields "U+0001"
It's essentially "U+%.4x" but lets you override the precision works in scan, too.

R=rsc
CC=golang-dev
https://golang.org/cl/3423043
2010-12-06 14:23:37 -05:00
Roger Peppe
e2d1595c81 time: make After use fewer goroutines and host processes.
With credit to Gustavo Niemeyer, who hinted at this approach
in #go-nuts.

R=adg, rsc, niemeyer, r
CC=golang-dev
https://golang.org/cl/3416043
2010-12-06 14:19:30 -05:00
Roger Peppe
415545e539 bytes: add Buffer.UnreadRune, Buffer.UnreadByte
R=rsc, r
CC=golang-dev
https://golang.org/cl/3421041
2010-12-06 14:10:10 -05:00
Luuk van Dijk
9a71bb00bb [68]l: generate debug info for builtin structured types. prettyprinting in gdb.
R=rsc
CC=golang-dev
https://golang.org/cl/3309041
2010-12-03 19:19:33 +01:00
Jamie Gennis
b88b38ac12 go/printer: preserve newlines in func parameter lists
Fixes #1179.

R=gri
CC=golang-dev
https://golang.org/cl/3225042
2010-12-02 10:42:10 -08:00
Stefan Nilsson
6f1835dce0 Sort: reduced stack depth to lg(n) in quickSort
Doing the tail recursion elimination explicitly
seems safer than leaving it to the compiler;
the code is still clean and easy to understand.

R=r, r2, gri
CC=golang-dev
https://golang.org/cl/3373041
2010-12-02 09:18:20 -08:00
Brad Fitzpatrick
042a7a81d3 http: consume request body before next request
Fixes #1306.

R=rsc
CC=golang-dev
https://golang.org/cl/3332043
2010-12-01 20:00:19 -08:00
Rob Pike
5e4882a325 template: implement multi-word variable instantation for formatters.
Before one could say
	{field}
or
	{field|formatter}
Now one can also say
	{field1 field2 field3}
or
	{field1 field2 field3|formatter}
and the fields are passed as successive arguments to the formatter,
analogous to fmt.Print.

R=rsc, gri
CC=golang-dev
https://golang.org/cl/3385041
2010-12-01 17:10:40 -08:00
Rob Pike
d1524217df template: change the signature of formatters for future development.
Make them more like Printf, with a ... final argument.  This breaks
code with existing formatters but not the templates that use them.

R=rsc, gri
CC=golang-dev
https://golang.org/cl/3378041
2010-12-01 13:33:49 -08:00
Kyle Consalus
009aebdba8 Removed bytes.Add and bytes.AddByte; we now have 'append'.
Changed all uses of bytes.Add (aside from those testing bytes.Add) to append(a, b...).
Also ran "gofmt -s" and made use of copy([]byte, string) in the fasta benchmark.

R=golang-dev, r, r2
CC=golang-dev
https://golang.org/cl/3302042
2010-12-01 11:59:13 -08:00
Roger Peppe
1f90447e31 log: ensure writes are atomic.
This means that any Writer can be used safely
even when Output is called concurrently.
Fixes #1302.

R=r, nigeltao_gnome
CC=golang-dev
https://golang.org/cl/3300042
2010-12-01 10:15:42 -08:00
Benny Siegert
b06dc26a58 path: Windows support for Split
Make Split work on backslashes as well as on slashes under Windows
and support the "C:filename" special case. Also add corresponding
tests.

R=r, rsc, PeterGo, r2, brainman
CC=golang-dev
https://golang.org/cl/3008041
2010-11-30 17:17:45 -08:00
Luuk van Dijk
555feea117 runtime: fix windows breakage
R=iant
CC=golang-dev
https://golang.org/cl/3344044
2010-12-01 00:19:00 +01:00
Rob Pike
fdeda13f9e fmt: fix documentation format glitch. no content to change.
Fixes #1313.

R=gri
CC=golang-dev
https://golang.org/cl/3361041
2010-11-30 14:28:33 -08:00
Adam Langley
3cb4bdb9ce utf8: make EncodeRune's destination the first argument.
R=r
CC=golang-dev
https://golang.org/cl/3364041
2010-11-30 16:59:43 -05:00
Adam Langley
287045085d crypto/elliptic: use a Jacobian transform
(Speeds up the code about 25x)

R=r
CC=golang-dev
https://golang.org/cl/3359042
2010-11-30 16:58:59 -05:00
Rob Pike
6540c85c7f fmt.Scan: accept Inf and NaN
Fixes #1308.

R=rsc, r2
CC=golang-dev
https://golang.org/cl/3280045
2010-11-30 12:59:52 -08:00
Rob Pike
448c05d7c8 strconv: Atof on Infs and NaNs
R=rsc
CC=golang-dev
https://golang.org/cl/3359041
2010-11-30 12:53:42 -08:00
Rob Pike
b389646243 sort: avoid overflow in pivot calculation.
thanks to snilsson@nada.kth.se for the original CL.

R=gri
CC=golang-dev, snilsson
https://golang.org/cl/3280044
2010-11-30 10:37:57 -08:00
Eoghan Sherry
0dc24603eb big: fix (*Rat) SetFrac64(a, b) when b < 0.
R=gri
CC=golang-dev
https://golang.org/cl/3352041
2010-11-30 10:23:27 -08:00
Luuk van Dijk
85cae877f5 runtime: parallel definitions in Go for all C structs.
R=rsc
CC=golang-dev
https://golang.org/cl/3308041
2010-11-30 18:21:26 +01:00
Peter Mundy
37b7e3db73 godoc: fix doc typo
Consistently use 6060 as the port number.

R=gri
CC=golang-dev
https://golang.org/cl/3287042
2010-11-29 14:31:24 -08:00
Luuk van Dijk
f08baa38f8 [68]l: correct dwarf location for globals and ranges for arrays.
R=rsc
CC=golang-dev
https://golang.org/cl/3306042
2010-11-29 19:25:33 +01:00
Rob Pike
d90d0ede3f fmt: allow "% X" as well as "% x"
R=rsc, cw, PeterGo
CC=golang-dev
https://golang.org/cl/3319042
2010-11-29 07:30:36 -08:00
Anschel Schaffer-Cohen
f5bc87cb75 exp/eval: build fix for parser.ParseFile API change.
R=golang-dev, nigeltao
CC=golang-dev
https://golang.org/cl/3283042
2010-11-29 09:25:31 +11:00
Mathieu Lonjaret
387d58e790 compress/flate: fix typo in comment.
R=golang-dev, nigeltao_gnome, nigeltao
CC=golang-dev
https://golang.org/cl/3334041
2010-11-26 13:05:22 +11:00
Alex Brainman
4e69976a60 runtime: fix SysFree to really free memory on Windows
Fixes #1294.

R=golang-dev, PeterGo, iant
CC=golang-dev
https://golang.org/cl/3271041
2010-11-24 11:47:35 +11:00
Wei Guangjing
95c341fc78 net: add ReadFrom and WriteTo windows version.
Fixes #1275.

R=rsc, brainman
CC=golang-dev
https://golang.org/cl/3136042
2010-11-22 11:01:30 -05:00
Anthony Martin
1ee4512b98 gc: better error message for bad type in channel send
# test program
1 package main
2
3 type C chan int
4
5 func F(c C) {
6 	c <- true
7 }

# old error
test.go:6: cannot use true (type bool) as type int in function argument

# new error
test.go:6: cannot use true (type bool) as type int in channel send

R=rsc, ejsherry
CC=golang-dev
https://golang.org/cl/3231042
2010-11-22 10:59:51 -05:00
Robert Griesemer
e21aac29ba position.go: more flexible AddFile method
This will make it easier to use Pos values
together with suffix arrays by slightly de-
coupling the mapping of Pos values to global
offsets.

R=rsc
CC=golang-dev
https://golang.org/cl/3231041
2010-11-20 21:30:36 -08:00
Ken Thompson
8cb8ba14a5 more on dynamic hash in compound literals.
thanks to vskrap, andrey mirtchovski,
and Eoghan Sherry.

R=rsc
CC=golang-dev
https://golang.org/cl/3245041
2010-11-20 15:58:28 -08:00
Robert Griesemer
b1fd0860df godoc: use correct time stamp to indicate accuracy of search result
- compare against fsModified to check if index is out of date
- don't change fsModified if there are no user-mapped file systems

R=rsc, iant
CC=golang-dev
https://golang.org/cl/3213041
2010-11-19 14:05:12 -08:00
Adam Langley
b84b20b820 crypto/cipher: add CFB and OCFB mode.
(Files which I left out of the initial commit to keep it small.)

R=rsc
CC=golang-dev
https://golang.org/cl/3183043
2010-11-19 16:17:58 -05:00
Russ Cox
b51f0c5cca index/suffixarray: use sort.Search
R=gri
CC=golang-dev
https://golang.org/cl/3200041
2010-11-19 16:04:25 -05:00
Adam Langley
07791d04d6 crypto/cipher: add package
cipher is intended to replace crypto/block over time. This
change only adds basic parts: CBC and CTR mode and doesn't add
the package to the top-level Makefile.

R=r, rsc
CC=golang-dev
https://golang.org/cl/3069041
2010-11-19 14:12:07 -05:00
Robert Griesemer
ad21c42f05 godoc: compute search index for all file systems under godoc's observation
R=rsc
CC=golang-dev
https://golang.org/cl/3209041
2010-11-18 19:55:38 -08:00
Ken Thompson
b3dd22fecb adjustable hash code in
typecheck of composit literals
to get rid of n^2 behavior.

R=rsc
CC=golang-dev
https://golang.org/cl/3208041
2010-11-18 13:07:34 -08:00
Ian Lance Taylor
1fab0cd12a Makefiles: Don't define _64BIT now that 6c does it by default.
R=rsc
CC=golang-dev
https://golang.org/cl/3207041
2010-11-18 12:34:47 -08:00
Ian Lance Taylor
553a88cfe7 cgo: Print required space after parameter name in wrapper function.
R=rsc, gri
CC=golang-dev
https://golang.org/cl/3206041
2010-11-18 12:34:04 -08:00
Ian Lance Taylor
d853b594b4 6c: automatically #define _64BIT.
This makes it much easier to use a tool like Swig which needs
to run either 8c or 6c on generated code which #include's
"runtime.h".

R=ken2, rsc
CC=golang-dev
https://golang.org/cl/3205041
2010-11-18 10:26:41 -08:00
Russ Cox
285298b975 sort: invert meaning of f in Search
Backwards incompatible change, but makes
it easier to reason about non-idiomatic searches:
now f specifies what is sought.

R=gri
CC=golang-dev
https://golang.org/cl/3195042
2010-11-18 11:46:07 -05:00
Russ Cox
19f0e4603d sort: edit doc comment for Search
Change comment to be more generic,
with indexed data structure search as
one common use case.

Fix typo []data.

R=gri, rog
CC=golang-dev
https://golang.org/cl/3159041
2010-11-18 07:16:09 -05:00
Andrew Gerrand
3fa6dcaca4 rpc: add RegisterName to allow override of default type name
R=r, r2
CC=golang-dev
https://golang.org/cl/2890041
2010-11-18 14:14:42 +11:00
Robert Griesemer
6aeaa5d3fe go/token position: code improvements per rsc's suggestion
R=rsc
CC=golang-dev
https://golang.org/cl/3183041
2010-11-17 17:00:25 -08:00
Robert Griesemer
ac966ac706 position.go: test cases for token.Pos
- adjustments to position.go due to changed sort.Search semantics
- various minor fixes

R=rsc
CC=golang-dev, r
https://golang.org/cl/3079041
2010-11-17 12:17:40 -08:00
Robert Griesemer
e38b7f4953 godoc: bug fix in relativePath
This fixes a problem with relativePath, where
a prefix was not recognized because it ended
in "//" as opposed to just "/".

Also: Minor unrelated cleanup of a declaration.

R=rsc
CC=golang-dev
https://golang.org/cl/3146041
2010-11-17 11:03:33 -08:00
Robert Griesemer
18ae633472 token/position: implemented Pos
A pos value represents a file-set specific, accurate
source position value. It is 8x smaller in size than
the corresponding Position value (4 bytes vs 32 bytes).

Using Pos values instead of Position values in AST
saves approx. 25MBytes of memory when running godoc
on the current repository.

This CL introduces the Pos, File, and FileSet data
types; it does not affect existing code. Another
(pending CL) will make the change to all dependent
source files.

Missing: tests

R=r
CC=golang-dev, rsc
https://golang.org/cl/2936041
2010-11-12 16:39:33 -08:00
Alex Brainman
a2a4e0c01a exec: enable tests on windows
Fixes #1104.

R=golang-dev, mattn, r
CC=Joe Poirier, golang-dev
https://golang.org/cl/3051041
2010-11-13 11:15:09 +11:00
Robert Griesemer
8f651ff742 sort.Search: slightly more precise wording in comment
(+ some cosmetic changes)

R=iant, iant2
CC=golang-dev
https://golang.org/cl/3076041
2010-11-12 16:08:56 -08:00
Roger Peppe
bac478da1c sort: simplify semantics of Search.
As discussed earlier.

R=gri
CC=golang-dev
https://golang.org/cl/3025042
2010-11-12 15:57:33 -08:00
Kyle Consalus
81cb189a06 Remove unnecessary casts in Get() methods.
Cleaner, but also results in a 25%+ performance improvement for Get()/SetValue() on my machine.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/3072041
2010-11-12 15:25:25 -08:00
Ken Thompson
48cc88d063 arm is not little-endian
R=rob
CC=golang-dev
https://golang.org/cl/3075041
2010-11-12 14:27:55 -08:00
Benny Siegert
8530e8ef65 strings: add LastIndexAny
The need for a LastIndexAny function has come up in the discussion
for https://golang.org/cl/3008041/. This function is
implemented analogously to lastIndexFunc, using functions from
the utf8 package.

R=r, rsc, PeterGo
CC=golang-dev
https://golang.org/cl/3057041
2010-11-12 12:47:50 -08:00
Rob Pike
f0d174b776 gc: fix arm build
R=ken2
CC=golang-dev
https://golang.org/cl/3074041
2010-11-12 12:46:46 -08:00
Adam Langley
fb784785f5 crypto/elliptic: add package
elliptic implements several standard elliptic curves over prime fields.

R=r, r2
CC=golang-dev
https://golang.org/cl/3065041
2010-11-12 14:55:32 -05:00
Ken Thompson
8613eb56b2 last of the arm conversions
R=rsc
CC=golang-dev
https://golang.org/cl/3053041
2010-11-11 19:54:35 -08:00
Robert Griesemer
6498c1d468 sort.Search: added extra test to verify efficiency
R=r
CC=golang-dev
https://golang.org/cl/3048041
2010-11-11 14:52:37 -08:00
Robert Griesemer
febde3882b sort.Search: more typos
R=r
CC=golang-dev
https://golang.org/cl/3042041
2010-11-11 13:52:49 -08:00
Adam Langley
ffa9000b75 crypto/x509: policy OID support and fixes.
* Add support for certificate policy identifiers
        * Fix the version number of generated certificates
        * Fix the parsing of version numbers
        * Fix the case of multiple name entries (it should have been a list of
          tagged values, not a tagged list of values).

R=r
CC=golang-dev
https://golang.org/cl/3044041
2010-11-11 15:50:40 -05:00
Robert Griesemer
86630fe6ad sort.Search: fix typo in documentation
R=r
CC=golang-dev
https://golang.org/cl/3016043
2010-11-11 10:51:59 -08:00
Alex Brainman
b611137098 runtime: free memory allocated by windows CommandLineToArgv
R=golang-dev, r2
CC=golang-dev
https://golang.org/cl/3003043
2010-11-11 10:38:45 +11:00
Ian Lance Taylor
e8605b1279 runtime: omit runtime· prefix from static functions (in ARM code).
R=r
CC=golang-dev
https://golang.org/cl/3026041
2010-11-10 15:23:20 -08:00
Ian Lance Taylor
7e69c90ade runtime: Add some missing runtime· prefixes to ARM asm code.
R=r, r2
CC=golang-dev
https://golang.org/cl/3024041
2010-11-10 15:10:19 -08:00
Ian Lance Taylor
be0b649eb1 path: Fix Glob when it finds a file in directory position.
When searching a list of directories, the files which match
the pattern are accumulated in a slice.  If the glob has a
wildcard for the directory, and the wildcard matches a file
rather than a directory, then the files found so far are
discarded.  E.g., path.Glob("*/x") in a directory which
contains both files and subdirectories.  This patch avoids
discarding matches found so far when a file is found.

R=r
CC=bsiegert, golang-dev
https://golang.org/cl/3015042
2010-11-10 13:25:49 -08:00
Robert Griesemer
194dde22c3 sort: binary search for sorted slices
R=r, r2
CC=golang-dev
https://golang.org/cl/2997041
2010-11-10 13:19:28 -08:00
Roger Peppe
089c21ea52 testing: delete redundant name argument to Benchmark().
[it was a carry over from the previous iteration]

R=r
CC=golang-dev
https://golang.org/cl/3016041
2010-11-10 09:39:26 -08:00
Ken Thompson
cb3754fd43 fix error converting result of complex
division. resolves issue 1261.

R=rsc
CC=golang-dev
https://golang.org/cl/2985043
2010-11-09 17:39:36 -08:00
Robert Griesemer
56bfe95e7f go/ast: change embedded token.Position fields to named fields
This is in preparation for a different position representation.
It also resolves situations where a node would be printed as
it's node position simply because the embedded token.Position
has a String method.

R=r
CC=golang-dev
https://golang.org/cl/2991041
2010-11-09 11:26:54 -08:00
Roger Peppe
e9afb9d399 container/list: make Remove return Value of removed element.
When it is known that there is already at least one element in the
list, it is awkwardly verbose to use three lines and an extra
variable declaration to remove the first or last item (a common
case), rather than use a simple expression.

a stack:
	stk.PushFront(x)
	x = stk.Front().Remove().(T)

vs.
	stk.PushFront(x)
	e := stk.Front()
	e.Remove()
	x = e.Value.(T)
[An alternative CL might be to add PopFront and PopBack methods].

R=gri
CC=golang-dev
https://golang.org/cl/3000041
2010-11-09 08:58:23 -08:00
Evan Shaw
49fdfe21dd bytes: SSE for bytes.IndexByte on amd64
Performance on 2.8 GHz Intel Core i7:

Before:
BenchmarkIndexByte4K  1000000              2997 ns/op        1366.70 MB/s
BenchmarkIndexByte4M      500           3049772 ns/op        1375.28 MB/s
BenchmarkIndexByte64M      50          49582280 ns/op        1353.48 MB/s

After:
BenchmarkIndexByte4K 10000000               298 ns/op       13744.97 MB/s
BenchmarkIndexByte4M    10000            285993 ns/op       14665.76 MB/s
BenchmarkIndexByte64M     500           4618172 ns/op       14531.48 MB/s

R=rsc, PeterGo, r2, r
CC=golang-dev
https://golang.org/cl/2888041
2010-11-08 17:33:53 -08:00
Rob Pike
e9c901dbf4 json: don't indirect before testing for custom unmarshaler
Fixes #1260.

R=gri
CC=golang-dev
https://golang.org/cl/2994041
2010-11-08 15:33:00 -08:00
Robert Griesemer
9f19392f1a os.Expand: don't call append for each non-variable char
R=r
CC=golang-dev
https://golang.org/cl/2993041
2010-11-08 15:13:35 -08:00
Rob Pike
02469b8200 strconv: quote erroneous string in errors
Fixes #1253.

R=gri
CC=golang-dev
https://golang.org/cl/2990041
2010-11-08 15:08:41 -08:00
Rob Pike
26cda27b0f os: add Expand function to evaluate environment variables.
Fixes #1258.

R=gri, msolo, bradfitzpatrick, r2
CC=golang-dev
https://golang.org/cl/2988041
2010-11-08 13:25:01 -08:00
Luuk van Dijk
fbd92dba96 6l/8l: generate dwarf variable names with disambiguating suffix.
R=rsc
CC=golang-dev
https://golang.org/cl/2733042
2010-11-08 19:48:21 +01:00
Wei Guangjing
11ace8e975 net: fix windows build
R=rsc
CC=golang-dev
https://golang.org/cl/2932041
2010-11-05 23:08:18 -04:00
Peter Mundy
3b44fbe869 testing: rename type Test to InternalTest
type Benchmark has been renamed to InternalBenchmark

R=rsc
CC=golang-dev
https://golang.org/cl/2942042
2010-11-05 23:05:53 -04:00
Russ Cox
9e1ee8ff4f env.bash: more quoting in case of spaces
R=r, r2
CC=golang-dev
https://golang.org/cl/2938041
2010-11-05 23:04:08 -04:00
Russ Cox
81cf9f7e63 libmach: detail for darwin errors
R=r, r2
CC=golang-dev
https://golang.org/cl/2937041
2010-11-05 23:03:53 -04:00
Peter Mundy
fa7341aafd syscall: use 64-bit file size for truncation on Linux
Truncate and Ftruncate for 32-bit Linux should use 64-bit
offset system calls.

R=rsc
CC=golang-dev, royger
https://golang.org/cl/2943041
2010-11-05 16:41:23 -04:00
Christopher Wedgwood
6101788972 io: use SetFinalizer more elegantly in Pipe
(this works now that issue 751 is resolved)

R=rsc
CC=golang-dev
https://golang.org/cl/2834041
2010-11-05 15:05:39 -04:00
Rob Pike
c9d39dca8d gob: don't add "." if package path is empty when registering a type.
R=rsc
CC=golang-dev
https://golang.org/cl/2939041
2010-11-05 11:22:28 -07:00
Eric Clark
40d10a34db gc: doc nit
R=rsc, r
CC=golang-dev
https://golang.org/cl/2918042
2010-11-05 11:21:54 -07:00
Keith Rarick
a144e3ec36 net: provide public access to file descriptors
Fixes #918.

R=rsc, rog, brainman
CC=golang-dev
https://golang.org/cl/2904041
2010-11-05 14:02:03 -04:00
Russ Cox
9ce0eb2d07 runtime: explain nacl closure failure
R=r, r2
CC=golang-dev
https://golang.org/cl/2889042
2010-11-05 14:00:46 -04:00
Evan Shaw
4d429c7fe5 6l: More SSE instruction fixes
PSADBW and PSHUFL had the wrong prefixes.

R=rsc
CC=golang-dev
https://golang.org/cl/2836041
2010-11-05 13:59:53 -04:00
Benny Siegert
a4f3d647d4 path: add Glob
As discussed in http://groups.google.com/group/golang-dev/browse_thread/thread/926b7d550d98ec9e,
add a simple "path expander" function, which returns all the
files matching the given pattern. This function is called Glob
after glob(3) in libc.

Also add a convenience function, hasMeta, that checks whether
a string contains one of the characters which are specially handled
by Match.

R=rsc, r, r2
CC=golang-dev
https://golang.org/cl/2476041
2010-11-05 10:47:56 -07:00
Rob Pike
9f7f69d300 gob: when sending an interface value, indirect down to the
underlying type; otherwise encoding fails when sending
a pointer value.

R=rsc
CC=golang-dev
https://golang.org/cl/2922041
2010-11-05 10:36:27 -07:00
Adam Langley
836529a63c crypto/tls: use pool building for certificate checking
Previously we checked the certificate chain from the leaf
upwards and expected to jump from the last cert in the chain to
a root certificate.

Although technically correct, there are a number of sites with
problems including out-of-order certs, superfluous certs and
missing certs.

The last of these requires AIA chasing, which is a lot of
complexity. However, we can address the more common cases by
using a pool building algorithm, as browsers do.

We build a pool of root certificates and a pool from the
server's chain. We then try to build a path to a root
certificate, using either of these pools.

This differs from the behaviour of, say, Firefox in that Firefox
will accumulate intermedite certificate in a persistent pool in
the hope that it can use them to fill in gaps in future chains.

We don't do that because it leads to confusing errors which only
occur based on the order to sites visited.

This change also enabled SNI for tls.Dial so that sites will return
the correct certificate chain.

R=rsc
CC=golang-dev
https://golang.org/cl/2916041
2010-11-05 09:54:56 -04:00
Alex Brainman
2b18b18263 runtime: fix windows build
R=rsc
CC=golang-dev
https://golang.org/cl/2923041
2010-11-05 17:27:12 +11:00
Graham Miller
23c41a1ef2 Small addition to previous optimization of memequal as discussed here: http://groups.google.com/group/golang-nuts/browse_thread/thread/f591ba36d83723c0/9aba02d344045f38
R=golang-dev, r, r2
CC=golang-dev
https://golang.org/cl/2880041
2010-11-04 13:45:18 -07:00
Robert Griesemer
3a50d721a8 go/scanner: line comments may end in EOF
R=rsc
CC=golang-dev
https://golang.org/cl/2908041
2010-11-04 13:15:42 -07:00
Russ Cox
132e5435e3 gc: line comments may end in EOF
R=ken2
CC=golang-dev
https://golang.org/cl/2907041
2010-11-04 16:04:04 -04:00
Russ Cox
68b4255a96 runtime: ,s/[a-zA-Z0-9_]+/runtime·&/g, almost
Prefix all external symbols in runtime by runtime·,
to avoid conflicts with possible symbols of the same
name in linked-in C libraries.  The obvious conflicts
are printf, malloc, and free, but hide everything to
avoid future pain.

The symbols left alone are:

	** known to cgo **
	_cgo_free
	_cgo_malloc
	libcgo_thread_start
	initcgo
	ncgocall

	** known to linker **
	_rt0_$GOARCH
	_rt0_$GOARCH_$GOOS
	text
	etext
	data
	end
	pclntab
	epclntab
	symtab
	esymtab

	** known to C compiler **
	_divv
	_modv
	_div64by32
	etc (arch specific)

Tested on darwin/386, darwin/amd64, linux/386, linux/amd64.

Built (but not tested) for freebsd/386, freebsd/amd64, linux/arm, windows/386.

R=r, PeterGo
CC=golang-dev
https://golang.org/cl/2899041
2010-11-04 14:00:19 -04:00
Ian Lance Taylor
d2d650bdc9 Use future official DWARF language code for Go.
http://dwarfstd.org/ShowIssue.php?issue=101014.1&type=open

Informally accepted for future DWARF 5.

R=lvd
CC=golang-dev, rsc
https://golang.org/cl/2881042
2010-11-04 08:45:25 -07:00
Chris Jones
25b1e83262 net: fix LookupSRV
R=rsc, chris
CC=golang-dev
https://golang.org/cl/2420041
2010-11-04 10:30:39 -04:00
Ken Thompson
9c6df3ca13 add hardware floating point.
currently, softfloat does not work and
there are some unsigned-to-float conversion errors.

R=rsc
CC=golang-dev
https://golang.org/cl/2886041
2010-11-03 17:31:07 -07:00
Rob Pike
0aa9d84b56 units: fix compilation
R=ken2, ken3
CC=golang-dev
https://golang.org/cl/2865041
2010-11-03 12:20:37 -07:00
Adam Langley
02939dec80 crypto: switch block ciphers to detination first.
Previously all the functions took two arguments: src, dst. This is the
reverse of the usual Go style and worth changing sooner rather than
later.

Unfortunately, this is a change that the type system doesn't help
with. However, it's not a subtle change: any unittest worth the name
should catch this.

R=rsc, r
CC=golang-dev
https://golang.org/cl/2751042
2010-11-03 10:43:43 -04:00
Adam Langley
b5135b34c9 crypto: add cast5
CAST5 is the default OpenPGP cipher.

(This won't make Rob any happier about the size of crypto/, of course.)

It already has dst, src in that order but it doesn't have any users yet so I figure it's better than changing it later.

R=rsc, gri, r
CC=golang-dev
https://golang.org/cl/2762042
2010-11-03 10:39:15 -04:00
Robert Griesemer
417e22b584 sync: fix typo in documentation
R=rsc, adg
CC=golang-dev
https://golang.org/cl/2841041
2010-11-02 16:01:07 -07:00
Kai Backman
95b40f6ca1 Fix a deadlock bug in the rpc client. The panic will trigger
regularly when client connections are flaky (probably another
issue).

(credits to jussi@tinkercad.com for finding the issue)

R=rsc, r
CC=golang-dev, jussi
https://golang.org/cl/2831042
2010-11-02 14:04:56 -07:00
Rob Pike
59315fbfb5 netchan: fix locking bug.
There's no need to hold the client mutex when calling encode, since encode itself
uses a mutex to make the writes atomic.  However, we need to keep
the messages ordered, so add a mutex for that purpose alone.
Fixes #1244.

R=rsc
CC=golang-dev
https://golang.org/cl/2833041
2010-11-02 10:58:27 -07:00
Robert Griesemer
396228a652 go/scanner: removed scanner/internal-only uses of token.Position
First step towards a more light-weight implementation of token.Position:
- only use token.Position for reporting token and error position
- use offsets only for scanner control
- no interface changes yet

R=rsc
CC=golang-dev
https://golang.org/cl/2825041
2010-11-02 10:38:07 -07:00
Alex Brainman
8f8f625cb1 8l: pe generation fixes
Restore ability to have different file and
section alignment in generated pe file.

Stop generating .bss pe section, it is
part of .data now.

Some code refactoring.

R=rsc, vcc
CC=golang-dev
https://golang.org/cl/2731041
2010-11-02 10:56:56 +11:00
Robert Griesemer
ce98044523 fix build
R=rsc
CC=golang-dev
https://golang.org/cl/2820041
2010-11-01 15:25:39 -07:00
Brad Fitzpatrick
b0afb931a8 Use strings.Contains in src/cmd/...
R=r
CC=golang-dev, r2, rsc
https://golang.org/cl/2819041
2010-11-01 15:21:35 -07:00
Robert Griesemer
7996924c89 go/printer: do not remove parens around composite literals starting with a type name in control clauses
(even when they are nested inside an expression).

Fixes #1243.

R=rsc
CC=golang-dev
https://golang.org/cl/2817041
2010-11-01 15:08:03 -07:00
Robert Griesemer
9384fdc96a go/ast: add Inspect function for easy AST inspection w/o a visitor
R=rsc
CC=golang-dev
https://golang.org/cl/2770044
2010-11-01 15:06:34 -07:00
Wei Guangjing
035696c59a debug/pe, cgo: add windows support
R=rsc, mattn
CC=golang-dev
https://golang.org/cl/1976045
2010-11-01 17:52:26 -04:00
Brad Fitzpatrick
e198a5086a strings: Contains
Tiny helper to avoid strings.Index(s, sub) != -1

R=rsc, r2, r
CC=golang-dev
https://golang.org/cl/2265044
2010-11-01 14:32:48 -07:00
Rob Pike
e8436689ad gotest: if the benchmark list is empty, print it in a way that
gofmt will leave alone.

R=rsc, bradfitz, bradfitzpatrick
CC=golang-dev
https://golang.org/cl/2816041
2010-11-01 14:23:07 -07:00
Albert Strasheim
6442f38a91 syscall: SIO constants for Linux
R=rsc
CC=golang-dev
https://golang.org/cl/2303043
2010-11-01 16:42:33 -04:00
Roger Peppe
270bad3939 testing: add Benchmark to allow benchmarks to be run without gotest.
R=rsc
CC=golang-dev
https://golang.org/cl/2506042
2010-11-01 16:15:17 -04:00
Michael Hoisie
7b4eed7d66 http server: don't send trailing '0' for chunked encoding when responding with 304 NotModified
R=rsc, adg
CC=golang-dev
https://golang.org/cl/2723041
2010-11-01 16:15:03 -04:00
Russ Cox
276003adb1 build: fiddle with make variables
Fixes #1234.

R=r, r2
CC=golang-dev
https://golang.org/cl/2735043
2010-11-01 16:14:58 -04:00
Anthony Martin
51b15d68aa libutf: update to Unicode 5.2.0 to match pkg/unicode
R=rsc, r, PeterGo, r2
CC=golang-dev
https://golang.org/cl/2753045
2010-11-01 16:14:48 -04:00
Evan Shaw
884dceca1f 6a/6l: fix MOVOU encoding
The andproto field was set incorrectly, causing 6a to encode illegal
instructions.

R=rsc
CC=golang-dev
https://golang.org/cl/2781042
2010-11-01 16:14:43 -04:00
Robert Griesemer
68ac0c1d94 go/scanner: don't accept '\x0g' character escape (bug fix)
Added more test cases.

R=rsc
CC=golang-dev
https://golang.org/cl/2804041
2010-11-01 12:50:21 -07:00
Rob Pike
6dc4c58f87 gob: documentation. this time for sure.
if the interface value is nil, it sends no value,

R=rsc, adg
CC=golang-dev
https://golang.org/cl/2801042
2010-10-31 17:48:19 -07:00
Rob Pike
fbfb1d9e72 mkrunetype: install a Makefile and tweak it slightly so it can be built.
R=rsc
CC=golang-dev
https://golang.org/cl/2813041
2010-10-31 17:46:26 -07:00
Rob Pike
41ac2f8a42 gob: update documentation about wire format for interfaces.
R=rsc
CC=golang-dev
https://golang.org/cl/2814041
2010-10-31 15:08:45 -07:00
Rob Pike
7f7cb166c8 gob: several fixes.
1) Be sure to use the eval-time encoder/decoder rather than
the compile-time decoder.  In a few cases the receiver for
the compiling encoder was being pickled incorrectly into a
closure.
(This is the fix for issue 1238).

2) Get the innermost name right when given a pointer to an
unnamed type.

3) Use a count to delineate interface values, making it
possible to ignore values without having a concrete type
to encode into.  This is a protocol change but only for the
new feature, so it shouldn't affect anyone.  The old test
worked because, amazingly, it depended on bug #1.

Fixes #1238.

R=rsc, albert.strasheim
CC=golang-dev
https://golang.org/cl/2806041
2010-10-31 13:41:30 -07:00
Alex Brainman
a8c4da996e syscall: fix windows build
R=golang-dev
CC=golang-dev
https://golang.org/cl/2713043
2010-10-30 23:55:22 +11:00
Alex Brainman
7812b79627 syscall: fix Stat(path) where path is directory with trailing '/' on windows
Fixes #1220.

R=rsc, r
CC=golang-dev
https://golang.org/cl/2728043
2010-10-30 23:06:49 +11:00
Rob Pike
c490bb6f81 gob: clarify the comments about installing the debug/dumper.
R=rsc
CC=golang-dev
https://golang.org/cl/2789043
2010-10-29 15:52:25 -07:00
Rob Pike
96b9efe8a9 gob: make the debugging (dumping) code work again. Mostly rewrite it, in fact.
It's still not compiled in by default.

R=rsc, r2
CC=golang-dev
https://golang.org/cl/2754043
2010-10-29 15:07:56 -07:00
Robert Griesemer
907e998cba go/scanner: added another test case, clarified some code
R=rsc
CC=golang-dev
https://golang.org/cl/2741042
2010-10-29 15:07:04 -07:00
Robert Griesemer
7eb5c9a520 ebnf: use append
R=r, rsc
CC=golang-dev
https://golang.org/cl/2799041
2010-10-28 21:23:24 -07:00
Robert Griesemer
75855a8f5e tabwriter: use append
R=rsc
CC=golang-dev
https://golang.org/cl/2798041
2010-10-28 21:23:04 -07:00
Robert Griesemer
5762cd3755 go/doc: use append
R=rsc
CC=golang-dev
https://golang.org/cl/2792041
2010-10-28 17:26:01 -07:00
Rob Pike
4e9cc085d2 testing: eliminate testing/regexp
Rather than updating the stripped-down regexp implementation embedded
in testing, delete it by passing the one function we need from the package
main file created by gotest.

R=rsc
CC=golang-dev
https://golang.org/cl/2761043
2010-10-28 16:54:24 -07:00
Rob Pike
1f4d54ea01 regexp: eliminate vector in favor of append.
R=rsc
CC=golang-dev
https://golang.org/cl/2795041
2010-10-28 15:54:01 -07:00
Robert Griesemer
fafb116c75 go/printer: use append
R=rsc
CC=golang-dev
https://golang.org/cl/2793041
2010-10-28 15:09:47 -07:00
Robert Griesemer
098e94173a go/typechecker: use append
R=rsc
CC=golang-dev
https://golang.org/cl/2736044
2010-10-28 15:09:21 -07:00
Andrew Gerrand
6062515a93 container/list: document iteration
R=rsc
CC=golang-dev
https://golang.org/cl/2768042
2010-10-29 08:48:16 +11:00
Robert Griesemer
302b0ff942 go/parser: use append
R=rsc
CC=golang-dev
https://golang.org/cl/2720042
2010-10-28 13:36:28 -07:00
Robert Griesemer
12be168b4b godoc: bug fix (bug introduced with revision 3ee58453e961)
(thanks to Chris Dollin for identifying the cause)

Fixes #1237.

R=rsc
CC=golang-dev
https://golang.org/cl/2753043
2010-10-28 08:44:25 -07:00
Russ Cox
69c4e9380b use append
R=gri, r, r2
CC=golang-dev
https://golang.org/cl/2743042
2010-10-27 19:47:23 -07:00
Russ Cox
d8b5d039cd gc: implement append
R=ken2
CC=golang-dev
https://golang.org/cl/2757042
2010-10-27 17:56:32 -07:00
Andrew Gerrand
250ac87368 rpc: expose Server type to allow multiple RPC Server instances
R=r, rsc, msolo, sougou
CC=golang-dev
https://golang.org/cl/2696041
2010-10-28 11:05:56 +11:00
Brad Fitzpatrick
ad7d24ac4b image/png: speed up paletted encoding ~25%
Avoids a lot of redundant bounds checks.

R=nigeltao, rsc
CC=golang-dev
https://golang.org/cl/2678041
2010-10-27 22:48:18 +11:00
Russ Cox
d86ab015f7 use copy
R=gri
CC=golang-dev
https://golang.org/cl/2763041
2010-10-26 21:52:54 -07:00
Russ Cox
e48c0fb562 5g, 6g, 8g: generate code for string index
instead of calling function.

R=ken2
CC=golang-dev
https://golang.org/cl/2762041
2010-10-26 21:11:17 -07:00
Russ Cox
705c0382e8 big: arm assembly, faster software mulWW, divWW
Reduces time spent running crypto/rsa test by 65%.

Fixes #1227.

R=gri, PeterGo
CC=golang-dev
https://golang.org/cl/2743041
2010-10-26 21:10:17 -07:00
Rob Pike
f437d4d356 gob: must register basic types to store them in interfaces.
Fixes #1230.

R=rsc
CC=golang-dev
https://golang.org/cl/2750041
2010-10-26 17:07:39 -07:00
Nigel Tao
3bb036958c gob: package doc fixes.
R=r, r2, nigeltao_gnome
CC=golang-dev
https://golang.org/cl/2748041
2010-10-27 10:46:00 +11:00
Russ Cox
82c6f5e3d1 gc, runtime: copy([]byte, string)
R=ken2
CC=golang-dev
https://golang.org/cl/2741041
2010-10-26 08:36:07 -07:00
Russ Cox
8fff9166f6 arm: enable all tests
ARM functionality is now completely working.
(Or if it's not, we'll fix it.)

R=ken2
CC=golang-dev
https://golang.org/cl/2738041
2010-10-25 21:25:13 -07:00
Russ Cox
da26e27c05 debug/gosym: do not run when cross-compiling
R=r
CC=golang-dev
https://golang.org/cl/2737041
2010-10-25 18:00:42 -07:00
Russ Cox
7c2b1597c6 arm: precise float64 software floating point
Adds softfloat64 to generic runtime
(will be discarded by linker when unused)
and adds test for it.  I used the test to check
the software code against amd64 hardware
and then check the software code against
the arm and its simulation of hardware.
The latter should have been a no-op (testing
against itself) but turned up a bug in 5c causing
the vlrt.c routines to miscompile.

These changes make the cmath, math,
and strconv tests pass without any special
accommodations for arm.

R=ken2
CC=golang-dev
https://golang.org/cl/2713042
2010-10-25 17:55:50 -07:00
Robert Griesemer
e351533aab big: delete unnecessary type decls
R=rsc, r
CC=golang-dev
https://golang.org/cl/2732041
2010-10-25 17:45:43 -07:00
Robert Griesemer
19b8fc788c tabwriter: delete unnecessary type declaration
R=rsc, r2
CC=golang-dev
https://golang.org/cl/2733041
2010-10-25 17:45:26 -07:00
Robert Griesemer
c77f090085 go/scanner: delete unnecessary type declarations
R=rsc, r2
CC=golang-dev
https://golang.org/cl/2735041
2010-10-25 17:44:54 -07:00
Rob Pike
5556f733c7 gotest: generate correct gofmt-formatted _testmain.go
Fixes #1225.

R=adg
CC=golang-dev
https://golang.org/cl/2729041
2010-10-25 17:03:25 -07:00
Andrew Gerrand
ec8f8149d2 goinstall: display helpful message when encountering a cgo package.
R=rsc
CC=golang-dev
https://golang.org/cl/2701042
2010-10-26 10:59:30 +11:00
Russ Cox
35f8a3f90e runtime: remove .c generated from .goc during make clean
R=r
CC=golang-dev
https://golang.org/cl/2704042
2010-10-25 16:54:59 -07:00
Russ Cox
079cbddbd8 arm: fix signal handler
R=ken2
CC=golang-dev
https://golang.org/cl/2670042
2010-10-26 01:32:36 +02:00
Russ Cox
b0ad7a4268 5g: complex "regalloc"
R=ken2
CC=golang-dev
https://golang.org/cl/2727041
2010-10-26 01:26:33 +02:00
Russ Cox
41b5fb4761 5c: implement uint32 -> float
There are other missing conversion cases
still but they do not show up in my tests.
This one is needed for vlrt.c's _v2d (int64, uint64 -> float).

Thankfully, VFP has a single instruction to do this.

R=ken2
CC=golang-dev
https://golang.org/cl/2726041
2010-10-25 16:18:16 -07:00
Andrew Gerrand
6e87a0abc9 build: only print "You need to add foo to PATH" when needed
Fixes #1223.

R=bradfitz
CC=golang-dev
https://golang.org/cl/2701041
2010-10-25 16:38:48 +11:00
Andrew Gerrand
32a6613e94 container/list: elide redundant tests and fix comment typo
R=dsymonds
CC=golang-dev
https://golang.org/cl/2700041
2010-10-25 14:50:47 +11:00
Andrew Gerrand
01389b966e container/list: fix Remove bug and use pointer to self as identifier
Remove wasn't nil'ing the *Element.id. This property was exploited
by MoveToFront and MoveToBack internally, so I renamed the existing
Remove to "remove", and created an exported wrapper "Remove" that does
the right thing for the user's sake.

Also, saved an allocation by using *List as the id rather than *byte.

Fixes #1224.

R=rsc, dsymonds
CC=golang-dev
https://golang.org/cl/2685042
2010-10-25 14:37:30 +11:00
Fazlul Shahriar
ee065332dd goinstall: don't wrongly error out with "multiple package names"
Fixes #1215.

R=adg, rsc
CC=golang-dev
https://golang.org/cl/2695042
2010-10-25 13:13:00 +11:00
Luuk van Dijk
4228e62259 6l/8l: global and local variables and type info.
R=rsc
CC=golang-dev
https://golang.org/cl/2201044
2010-10-24 23:07:52 +02:00
Rob Pike
c28fa513f5 gob: error cleanup 2
Simplify error handling during the compilation phase.

R=rsc
CC=golang-dev
https://golang.org/cl/2652042
2010-10-22 16:07:26 -07:00
Rob Pike
f593b37f23 gobs: error cleanup part 1.
Remove err from the encoderState and decoderState types, so we're
not always copying to and from various copies of the error, and then
use panic/recover to eliminate lots of error checking.

another pass might take a crack at the same thing for the compilation phase.

R=rsc
CC=golang-dev
https://golang.org/cl/2660042
2010-10-22 15:16:34 -07:00
Russ Cox
1dd0319be3 runtime: print unknown types in panic
R=r
CC=golang-dev
https://golang.org/cl/2683041
2010-10-22 17:04:32 -04:00
Russ Cox
e5e9211071 5l, 6l, 8l: introduce sub-symbols
Sub-symbols are laid out inside a larger symbol
but can be addressed directly.

Use to make Mach-O pointer array not a special case.

Will use later to describe ELF sections.

Glimpses of the beginning of ELF loading.

R=ken2
CC=golang-dev
https://golang.org/cl/2623043
2010-10-22 15:27:50 -04:00
Rob Pike
5d9064697b gob: allow exchange of interface values
The implemetation describes each value as a string identifying the
concrete type of the value, followed by the usual encoding of that
value.  All types to be exchanged as contents of interface values
must be registered ahead of time with the new Register function.
Although this would not seem strictly necessary, the linker garbage
collects unused types so without some mechanism to guarantee
the type exists in the binary, there could be unpleasant surprises.
Moreover, the receiver needs a reflect.Type of the value to be
written in order to be able to save the data. A Register function
seems necessary.

The implementation may require defining types in the middle of
of sending a value.  The old code never did this. Therefore there
has been some refactoring to make the encoder and decoder
work recursively.

This change changes the internal type IDs. Existing gob archives
will break with this change.  Apologies for that. If this is a deal
breaker it should be possible to create a conversion tool.

Error handling is too complicated in this code. A subsequent
change should clean it up.

R=rsc
CC=golang-dev
https://golang.org/cl/2618042
2010-10-22 11:17:40 -07:00
Robert Griesemer
3478891d12 gofmt -s -w src misc
R=r, rsc
CC=golang-dev
https://golang.org/cl/2662041
2010-10-22 10:06:33 -07:00
Robert Griesemer
f613015e0e go ast/parser/printer: permit elision of composite literal types for composite literal elements
gofmt: added -s flag to simplify composite literal expressions through type elision where possible

R=rsc
CC=golang-dev
https://golang.org/cl/2319041
2010-10-22 10:03:14 -07:00
Russ Cox
1c8f185611 arm: 3 more tests pass
R=ken2
CC=golang-dev
https://golang.org/cl/2666041
2010-10-22 05:53:03 +02:00
Russ Cox
45c48d51f7 5g: missed one case last night
R=ken2
CC=golang-dev
https://golang.org/cl/2658042
2010-10-22 05:50:45 +02:00
Russ Cox
8ffc4ec5d0 gc: implement new composite literal spec
R=ken2
CC=golang-dev
https://golang.org/cl/2350041
2010-10-21 23:17:20 -04:00
Ken Thompson
e5bd12ea90 bug right shifting 64 bits
by a variable that equals 32

R=rsc
CC=golang-dev
https://golang.org/cl/2645042
2010-10-21 18:15:00 -07:00
Rob Pike
b12f32372a Make.inc: delete unnecessary -no-inline flag to quietgcc
R=rsc
CC=golang-dev
https://golang.org/cl/2654041
2010-10-21 11:00:54 -07:00
Russ Cox
4fd12c04c5 fix windows build
R=ken2
CC=golang-dev
https://golang.org/cl/2650041
2010-10-21 13:06:17 -04:00
Russ Cox
d10963b6d7 fix arm build
R=ken2
CC=golang-dev
https://golang.org/cl/2649041
2010-10-21 13:03:59 -04:00
Russ Cox
833c06581a fix build
R=ken2
CC=golang-dev
https://golang.org/cl/2621042
2010-10-21 12:50:23 -04:00
Robert Griesemer
b57b10f992 go/parser: consume auto-inserted semi when calling ParseExpr()
Fixes #1170.

R=rsc
CC=golang-dev
https://golang.org/cl/2622041
2010-10-21 08:40:33 -07:00
Russ Cox
49084db386 ld: abandon symbol-driven archive loading
Load the entire archive file instead.
Reduces I/O by avoiding additional passes
through libraries to resolve symbols.
Go packages always need all the files anyway
(most often, all 1 of them).

R=ken2
CC=golang-dev
https://golang.org/cl/2613042
2010-10-21 11:39:47 -04:00
Russ Cox
1451695f86 encoding/binary: give LittleEndian, BigEndian specific types
Giving them specific types has the benefit that
binary.BigEndian.Uint32(b) is now a direct call, not an
indirect via a mutable interface value, so it can potentially
be inlined.

Recent changes to the spec relaxed the rules for comparison,
so this code is still valid:

	func isLittle(o binary.ByteOrder) { return o == binary.LittleEndian }

The change does break this potential idiom:

	o := binary.BigEndian
	if foo {
		o = binary.LittleEndian
	}

That must rewrite to give o an explicit binary.ByteOrder type.
On balance I think the benefit from the direct call and inlining
outweigh the cost of breaking that idiom.

R=r, r2
CC=golang-dev
https://golang.org/cl/2427042
2010-10-21 11:25:14 -04:00
David Symonds
4f6fb1b775 net: fix comment on Dial to mention unix/unixgram.
R=rsc
CC=golang-dev
https://golang.org/cl/2639041
2010-10-21 08:17:24 -04:00
Russ Cox
69188ad9bb arm: prop up software floating point
Just enough to make mov instructions work,
which in turn is enough to make strconv work
when it avoids any floating point calculations.
That makes a bunch of other packages pass
their tests.

Should suffice until hardware floating point
is available.

Enable package tests that now pass
(some due to earlier fixes).

Looks like there is a new integer math bug
exposed in the fmt and json tests.

R=ken2
CC=golang-dev
https://golang.org/cl/2638041
2010-10-21 06:56:20 +02:00
Fumitoshi Ukai
64cc5be4ad web socket: fix short Read
Fixes #1145.

R=rsc
CC=golang-dev
https://golang.org/cl/2302042
2010-10-20 22:36:06 -04:00
Fazlul Shahriar
3ee49850a0 goinstall: fix documentation typo
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/2585043
2010-10-21 10:47:02 +11:00
Andrew Gerrand
06492d47cb build: add gobuilder and goplay to run.bash
gobuilder: fix build to work with new log package

R=rsc
CC=golang-dev
https://golang.org/cl/2592041
2010-10-21 10:46:10 +11:00
Yasuhiro Matsumoto
1c9dfb7647 os: correct Stat S_ISDIR on Windows
R=rsc, brainman
CC=golang-dev
https://golang.org/cl/2598041
2010-10-21 10:29:45 +11:00
Russ Cox
231fcea7e6 5l: two stack split bugs in one day
An ARM expert could probably phrase the
comparison in fewer instructions, but this works.

R=ken2
CC=golang-dev
https://golang.org/cl/2620041
2010-10-20 18:11:53 -04:00
Russ Cox
10b53867e8 encoding/hex: fix typo
Thanks to avadh4all for spotting it.

Fixes #1214.

R=r, r2
CC=golang-dev
https://golang.org/cl/2616041
2010-10-20 16:38:57 -04:00
Russ Cox
0db8d3df4c gc: select receive with implicit conversion
Fixes #1172.

R=ken2
CC=golang-dev
https://golang.org/cl/2615041
2010-10-20 16:38:25 -04:00
Ken Thompson
6096fc83cd code gen error for *(complex)++
includes array[i]++ and slice[i]++

R=rsc
CC=golang-dev
https://golang.org/cl/2614041
2010-10-20 13:18:00 -07:00
Russ Cox
6a3b29895f runtime: don't let select split stack
Fixes #1209.

R=ken2
CC=golang-dev
https://golang.org/cl/2612041
2010-10-20 15:54:17 -04:00
Russ Cox
c026c91b5c arm: fix typo in softfloat
R=kaib
CC=golang-dev
https://golang.org/cl/2608041
2010-10-20 15:35:37 -04:00
Russ Cox
c2b91d4889 6l: correct logic for morestack choice
The frame that gets allocated is for both
the args and the autos.  If together they
exceed the default frame size, we need to
tell morestack about both so that it allocates
a large enough frame.

Sanity check stack pointer in morestack
to catch similar bugs.

R=ken2
CC=golang-dev
https://golang.org/cl/2609041
2010-10-20 12:16:39 -07:00
Russ Cox
4ae9311174 arm: more tests pass
R=ken2
CC=golang-dev
https://golang.org/cl/2606041
2010-10-20 11:43:27 -04:00
Russ Cox
1142b60dad syscall/arm: correct 64-bit system call arguments
Thanks to kaib for the tip.

R=ken2
CC=golang-dev
https://golang.org/cl/2596043
2010-10-20 10:39:46 -04:00
Russ Cox
c00f9f49bb 6g: avoid too-large immediate constants
R=ken2
CC=golang-dev
https://golang.org/cl/2566042
2010-10-20 00:40:06 -04:00
Rob Pike
97f3a80d93 reflect: add InterfaceValue.Get to enable setting of an interface
value (through unsafe means) without having a reflect.Type
of type *interface{} (pointer to interface).  This is needed to make
gob able to handle interface values by a method analogous to
the way it handles maps.

R=rsc
CC=golang-dev
https://golang.org/cl/2597041
2010-10-19 21:25:28 -07:00
Rob Pike
321f0c7fe2 gob: break documentation into a separate doc.go file
R=adg, r2
CC=golang-dev
https://golang.org/cl/2596041
2010-10-19 20:39:29 -07:00
Russ Cox
17c32ad712 http: do not close connection after sending HTTP/1.0 request
Fixes #671.

R=adg, cw
CC=golang-dev
https://golang.org/cl/2431042
2010-10-19 23:29:25 -04:00
Alex Brainman
5e4963d9e8 8l: fix windows build
R=rsc
CC=golang-dev
https://golang.org/cl/2595041
2010-10-20 14:06:00 +11:00
Yasuhiro Matsumoto
a9725396c0 os: change TestForkExec so it can run on windows
R=brainman, vcc, Joe Poirier, rsc
CC=golang-dev
https://golang.org/cl/2530041
2010-10-20 09:46:24 +11:00
Nigel Tao
a3bcf4b664 nntp: remove nntp package from the standard library.
R=adg
CC=golang-dev
https://golang.org/cl/2470045
2010-10-20 09:43:27 +11:00
Russ Cox
d5dffb9f29 8l: fix references to INITDAT in windows pe.c
R=ken2
CC=golang-dev
https://golang.org/cl/2588041
2010-10-19 18:17:07 -04:00
Russ Cox
19fd5c787f 5l, 6l, 8l: link pclntab and symtab as ordinary rodata symbols
That is, move the pc/ln table and the symbol table
into the read-only data segment.  This eliminates
the need for a special load command to map the
symbol table into memory, which makes the
information available on systems that couldn't handle
the magic load to 0x99000000, like NaCl and ARM QEMU
and Linux without config_highmem=y.  It also
eliminates an #ifdef and some clumsy code to
find the symbol table on Windows.

The bad news is that the binary appears to be bigger
than it used to be.  This is not actually the case, though:
the same amount of data is being mapped into memory
as before, and the tables are still read-only, so they're
still shared across multiple instances of the binary as
they were before.  The difference is just that the tables
aren't squirreled away in some section that "size" doesn't
know to look at.

This is a checkpoint.
It probably breaks Windows and breaks NaCl more
than it used to be broken, but those will be fixed.
The logic involving -s needs to be revisited too.

Fixes #871.

R=ken2
CC=golang-dev
https://golang.org/cl/2587041
2010-10-19 18:07:19 -04:00