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

1884 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
82c6f5e3d1 gc, runtime: copy([]byte, string)
R=ken2
CC=golang-dev
https://golang.org/cl/2741041
2010-10-26 08:36:07 -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
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
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
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
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
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
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
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
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
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
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
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