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

2426 Commits

Author SHA1 Message Date
Robert Hencke
b88e669a8f nacl, tiny: remove vestiges
R=golang-dev, r, rsc
CC=golang-dev
https://golang.org/cl/4635053
2011-06-21 12:02:40 -04:00
Russ Cox
d6be71c788 gopprof: update list of memory allocators
Also import new weblist command from Google version.

R=r, bradfitz
CC=golang-dev
https://golang.org/cl/4650048
2011-06-21 11:27:08 -04:00
Andrew Gerrand
f338d9f73b goinstall: undo 1ad616fb313d (always rebuild...)
CL 4627051 is a better way of doing the same thing.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4654045
2011-06-21 17:13:16 +10:00
Andrew Gerrand
ceae2c9301 goinstall: undo repo peeking code
Keeping the Julian's good refactoring work.

R=rsc
CC=golang-dev
https://golang.org/cl/4638049
2011-06-21 11:28:15 +10:00
Anthony Martin
028f74f827 5g, 6g, 8g: fix comments in method call generation
R=golang-dev
CC=golang-dev
https://golang.org/cl/4652042
2011-06-20 14:49:29 -04:00
Anthony Martin
12b2269860 5g, 5l: fix more set but not used warnings
These are present when building with gcc 4.6.

R=golang-dev, dave
CC=golang-dev, lvd
https://golang.org/cl/4636047
2011-06-20 14:18:04 -04:00
Andrew Gerrand
f22e5cfc6d goinstall: update doc.go
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4645048
2011-06-20 16:39:16 +10:00
Andrew Gerrand
f3a7dad654 goinstall: s/vlogf/printf/
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/4628050
2011-06-20 14:44:14 +10:00
Andrew Gerrand
e068b85bea goinstall: wait for all commands to finish instead of timeout
goinstall: make ".git" repo suffix optional

R=golang-dev, r, r
CC=golang-dev
https://golang.org/cl/4643048
2011-06-20 14:12:23 +10:00
Julian Phillips
c319fb07bc goinstall: Add support for arbitary code repositories
Extend goinstall to support downloading from any hg/git/svn/bzr hosting
site, not just the standard ones.  The type of hosting is automatically
checked by trying all the tools, so the import statement looks like:

  import "example.com/mything"

Which will work for Mercurial (http), Subversion (http, svn), Git (http,
git) and Bazaar (http, bzr) hosting.

All the existing package imports will work through this new mechanism,
but the existing hard-coded host support is left in place to ensure
there is no change in behaviour.

R=golang-dev, bradfitz, fvbommel, go.peter.90, n13m3y3r, adg, duperray.olivier
CC=golang-dev
https://golang.org/cl/4650043
2011-06-20 13:00:43 +10:00
Robert Hencke
a5b5e2b79e godefs: rudimentary tests
currently only defined for darwin

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4528123
2011-06-20 11:54:07 +10:00
Rob Pike
783c46b197 8a: delete dreg l.s
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/4631053
2011-06-20 11:53:41 +10:00
Dave Cheney
cbb2d8e20e cc: nit: silence comment warnings
R=golang-dev, r, r
CC=golang-dev
https://golang.org/cl/4648043
2011-06-19 13:58:08 +10:00
Joe Poirier
26b6a97c15 Make.ccmd: link with mach lib,
remove explicit linking in make files

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4629051
2011-06-19 13:57:22 +10:00
Andrew Gerrand
c967ba0210 goinstall: always rebuild a package after its dependencies are built
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4627047
2011-06-19 09:36:45 +10:00
Russ Cox
cf9f380499 gc: unsafe.Alignof, unsafe.Offsetof, unsafe.Sizeof now return uintptr
R=ken2
CC=golang-dev
https://golang.org/cl/4640045
2011-06-17 16:12:14 -04:00
Russ Cox
b96ff8458c 5g, 8g: fix build
R=ken2
CC=golang-dev
https://golang.org/cl/4627045
2011-06-17 16:05:00 -04:00
Russ Cox
7f4c5ea7d8 gc: implement goto restriction
Remove now-unnecessary zeroing of stack frames.

R=ken2
CC=golang-dev
https://golang.org/cl/4641044
2011-06-17 15:25:05 -04:00
Russ Cox
e852202f37 gc: descriptive panic for nil pointer -> value method call
R=ken2
CC=golang-dev
https://golang.org/cl/4646042
2011-06-17 15:23:27 -04:00
Russ Cox
21e75da486 respect goto restrictions
R=gri
CC=golang-dev
https://golang.org/cl/4625044
2011-06-17 06:07:13 -04:00
Alex Brainman
eaa082f691 8l: minor fix discovered by lucio
R=lucio.dere, vcc.163, bradfitz
CC=golang-dev
https://golang.org/cl/4645044
2011-06-17 15:55:54 +10:00
Andrew Gerrand
4340b57d88 goinstall, go/build: support building cgo packages
Fixes #1962.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/4636044
2011-06-17 11:15:54 +10:00
Alex Brainman
c562fbc44e cgo: make file path work for windows
R=golang-dev, mattn.jp, adg
CC=golang-dev
https://golang.org/cl/4634043
2011-06-17 10:17:33 +10:00
Brad Fitzpatrick
6e9b1a78ff http: make Headers be source of truth
Previously Request and Response had redundant fields for
Referer, UserAgent, and cookies which caused confusion and
bugs.  It also didn't allow us to expand the package over
time, since the way to access fields would be in the Headers
one day and promoted to a field the next day.  That would be
hard to gofix, especially with code ranging over Headers.

After a discussion on the mail package's design with a similar
problem, we've designed to make the Headers be the source of
truth and add accessors instead.

Request:
change: Referer -> Referer()
change: UserAgent -> UserAgent()
change: Cookie -> Cookies()
new: Cookie(name) *Cookie
new: AddCookie(*Cookie)

Response:
change: Cookie -> Cookies()

Cookie:
new: String() string

R=rsc
CC=golang-dev
https://golang.org/cl/4620049
2011-06-16 13:02:28 -07:00
Russ Cox
5a5a7b5163 6g, 8g: fix goto fix
R=ken2
CC=golang-dev
https://golang.org/cl/4632041
2011-06-16 01:25:49 -04:00
Russ Cox
5d9dbe19a7 gc: work around goto bug
R=ken2
CC=golang-dev
https://golang.org/cl/4629042
2011-06-16 00:18:43 -04:00
Robert Griesemer
fb9ea79916 godoc: replace direct OS file system accesses in favor
of accesses via a FileSystem interface.

Preparation for appengine version which gets its files
via a snapshot or zip file and uses a corresponding
FileSystem implementation.

R=rsc, r
CC=golang-dev
https://golang.org/cl/4572065
2011-06-15 14:06:35 -07:00
Scott Lawrence
bee3b0358c gofix: Fix inconsistent indentation in help output
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4572066
2011-06-15 21:07:21 +10:00
Andrew Gerrand
db5a4ffc2a goinstall: use go/make package to scan and build packages
R=rsc, n13m3y3r, kevlar
CC=golang-dev
https://golang.org/cl/4515180
2011-06-15 13:28:35 +10:00
Lucio De Re
340251e43d build: fix header files for Plan 9
The "elf.h" header changes involve only comments, the released
Plan 9 C preprocessing function does not cope with multiline
comments following the #define keyword.  All multiline comments
have been moved to the line above the associated definition.
Sigh!  Fixing the Plan 9 compiler is not an option.

<time.h> does not exist in the Plan 9 Native library.  I have
moved it from src/cmd/ld/pe.h to include/u.h. RSC correctly points
out that this copy of <u.h> is not the one used to compile the
Go release on Plan 9 platforms.

R=golang-dev
CC=golang-dev, rsc
https://golang.org/cl/4574042
2011-06-14 14:14:11 -04:00
Gustavo Niemeyer
a84e9d01f0 ld: make .rodata section read-only
Fixes the respective warning from elflint.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4607048
2011-06-14 15:13:54 -03:00
Wei Guangjing
9e2ffc315f ld: fix link Windows PE __declspec(dllimport) symbol
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4568077
2011-06-14 11:05:59 -04:00
Luuk van Dijk
2ad42a8249 gc: frame compaction for arm.
Required moving some parts of gc/pgen.c to ?g/ggen.c

on linux tests pass for all 3 architectures, and
frames are actually compacted (diagnostic code for
that has been removed from the CL).

R=rsc
CC=golang-dev
https://golang.org/cl/4571071
2011-06-14 17:03:37 +02:00
Russ Cox
9968090ddd cgo: handle new Apple LLVM-based gcc from Xcode 4.2
That gcc does not include enumerator names and values
in its DWARF debug output.  Create a data block from which
we can read the values instead.

Fixes #1881.

R=iant
CC=golang-dev
https://golang.org/cl/4607045
2011-06-13 14:43:54 -04:00
Luuk van Dijk
d164b6081d ld: dwarf emit filenames in debug_line header instead of as extended opcodes.
Makes it possible for older tools like objdump to find the filenames,
fixes  objdump -d -l --start-address=0x400c00 --stop-address=0x400c36 6.out
fixes #1950

R=rsc
CC=golang-dev
https://golang.org/cl/4609043
2011-06-13 16:56:43 +02:00
Stephen Ma
b4bb970e18 gc: handle go print() and go println()
Fixes #1952.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4611041
2011-06-13 22:50:51 +10:00
Dave Cheney
86183e43c9 gopack: make unused page function a fatal error
R=iant, rsc
CC=golang-dev
https://golang.org/cl/4601051
2011-06-09 22:41:19 -04:00
Dave Cheney
aac6afbb11 gopack: remove warning from the use of mktemp
gcc-4.6 considers mktemp to be racey

R=golang-dev, rsc, iant
CC=golang-dev
https://golang.org/cl/4602050
2011-06-09 18:04:26 -07:00
Russ Cox
1fddbab736 5l: fix softfloat nits
Need to load math.a so that sqrtGoC is available.
Also was missing prototype.

R=ken2
CC=golang-dev
https://golang.org/cl/4517148
2011-06-09 18:38:25 -04:00
Russ Cox
900c5fa98e gc: compactframe breaks arm - fix build
R=lvd
CC=golang-dev
https://golang.org/cl/4591063
2011-06-09 18:28:27 -04:00
Luuk van Dijk
fd2e24727e gc: nit
R=rsc
CC=golang-dev
https://golang.org/cl/4604041
2011-06-10 00:08:57 +02:00
Russ Cox
3e57d7f7bf 5l: delete dead code
Thumb code and ARM pre-V4 code is unused,
unmaintained, and almost certainly wrong by now.
Every time I try to change 5l I have to sort out
what's dead code and what's not.

30% of lines of code in this directory deleted.

R=ken2
CC=golang-dev
https://golang.org/cl/4601049
2011-06-09 18:07:56 -04:00
Luuk van Dijk
2ac375b2df gc: compact stackframe
After allocparams and walk, remove unused auto variables
and re-layout the remaining in reverse alignment order.

R=rsc
CC=golang-dev
https://golang.org/cl/4568068
2011-06-10 00:02:34 +02:00
Fan Hongjian
fc41e621e8 math: add sqrt_arm.s and sqrtGoC.go as fallback to soft fp emulation
5a: add SQRTF and SQRTD
5l: add ASQRTF and ASQRTD

Use ARMv7 VFP VSQRT instruction to speed up math.Sqrt

R=rsc, dave, m
CC=golang-dev
https://golang.org/cl/4551082
2011-06-09 17:19:08 -04:00
Russ Cox
17ca32e9db gc: nits
R=ken2
CC=golang-dev
https://golang.org/cl/4572052
2011-06-09 11:44:28 -04:00
Robert Griesemer
013cfea362 gofmt: update test script so that it passes again
(TODO: should replace this with a Go program, eventually)

R=bradfitz
CC=golang-dev
https://golang.org/cl/4584047
2011-06-08 12:05:40 -07:00
Robert Griesemer
a609a6bb63 ebnf: follow EBNF for EBNF faithfully
Apply analogous changes in godoc/spec.go.

Fixes #1829.

R=nmessenger, r
CC=golang-dev
https://golang.org/cl/4528127
2011-06-08 09:10:30 -07:00
Dave Cheney
6998ea2982 gc: alternative clang compatible abort.
Tested on clang 2.9/amd64

R=rsc, jeff, r
CC=golang-dev
https://golang.org/cl/4517143
2011-06-08 10:46:15 +10:00
Brad Fitzpatrick
be48115f48 gofix: fix diff regression from exec change
Also pass -u to diff to be consistent with gofmt.

Fixes #1619

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/4591041
2011-06-07 11:53:47 -07:00
Robert Hencke
8cd7aac223 godefs: do not assume forward type references are enums
Fixes #1466.

R=mikioh.mikioh, rsc
CC=golang-dev
https://golang.org/cl/4564043
2011-06-07 14:28:10 -04:00
Anthony Martin
c5030e5f4b ld: fix and simplify ELF symbol generation
I started looking at this code because the nm in GNU
binutils was ignoring the first symbol in the .symtab
section.  Apparently, the System V ABI reserves the
first entry and requires all fields inside to be set
to zero.

The list of changes is as follows:

  · reserve the first symbol entry (as noted above)
  · fix the section indices for .data and .bss symbols
  · factor out common code for Elf32 and Elf64
  · remove the special case for elfsymo in [568]l/asm.c:/^asmb
  · add the "etext" symbol in 6l
  · add static symbols

R=rsc
CC=golang-dev
https://golang.org/cl/4524075
2011-06-07 14:26:16 -04:00
Caine Tighe
7c19d88b0f gc/lex.c: fix formatting of #include statement
R=rsc, gri
CC=golang-dev
https://golang.org/cl/4564048
2011-06-07 09:57:26 -07:00
Brad Fitzpatrick
687102ed4f gofmt: fix -d regression from exec change
Fixes #1916

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/4590041
2011-06-07 09:38:04 -07:00
Dave Cheney
4881e7744a cgo: support non intel gcc machine flags
R=adg
CC=golang-dev
https://golang.org/cl/4528124
2011-06-07 16:59:35 +10:00
Dave Cheney
60a4b5e4db gc: enable building under clang/2.9
To build under clang, pass the path to clang in CC when
calling ./make.bash

CC=/opt/llvm/llvm-2.9/bin/clang ./make.bash

Credit goes to jmhodges for suggestions.

R=jeff, r, ality
CC=golang-dev
https://golang.org/cl/4527098
2011-06-06 19:53:44 +10:00
Russ Cox
84f291b1bd 8g: compute register liveness during regopt
Input code like

0000 (x.go:2) TEXT    main+0(SB),$36-0
0001 (x.go:3) MOVL    $5,i+-8(SP)
0002 (x.go:3) MOVL    $0,i+-4(SP)
0003 (x.go:4) MOVL    $1,BX
0004 (x.go:4) MOVL    i+-8(SP),AX
0005 (x.go:4) MOVL    i+-4(SP),DX
0006 (x.go:4) MOVL    AX,autotmp_0000+-20(SP)
0007 (x.go:4) MOVL    DX,autotmp_0000+-16(SP)
0008 (x.go:4) MOVL    autotmp_0000+-20(SP),CX
0009 (x.go:4) CMPL    autotmp_0000+-16(SP),$0
0010 (x.go:4) JNE     ,13
0011 (x.go:4) CMPL    CX,$32
0012 (x.go:4) JCS     ,14
0013 (x.go:4) MOVL    $0,BX
0014 (x.go:4) SHLL    CX,BX
0015 (x.go:4) MOVL    BX,x+-12(SP)
0016 (x.go:5) MOVL    x+-12(SP),AX
0017 (x.go:5) CDQ     ,
0018 (x.go:5) MOVL    AX,autotmp_0001+-28(SP)
0019 (x.go:5) MOVL    DX,autotmp_0001+-24(SP)
0020 (x.go:5) MOVL    autotmp_0001+-28(SP),AX
0021 (x.go:5) MOVL    autotmp_0001+-24(SP),DX
0022 (x.go:5) MOVL    AX,(SP)
0023 (x.go:5) MOVL    DX,4(SP)
0024 (x.go:5) CALL    ,runtime.printint+0(SB)
0025 (x.go:5) CALL    ,runtime.printnl+0(SB)
0026 (x.go:6) RET     ,

is problematic because the liveness range for
autotmp_0000 (0006-0009) is nested completely
inside a span where BX holds a live value (0003-0015).
Because the register allocator only looks at 0006-0009
to see which registers are used, it misses the fact that
BX is unavailable and uses it anyway.

The n->pun = anyregalloc() check in tempname is
a workaround for this bug, but I hit it again because
I did the tempname call before allocating BX, even
though I then used the temporary after storing in BX.
This should fix the real bug, and then we can remove
the workaround in tempname.

The code creates pseudo-variables for each register
and includes that information in the liveness propagation.
Then the regu fields can be populated using that more
complete information.  With that approach, BX is marked
as in use on every line in the whole span 0003-0015,
so that the decision about autotmp_0000
(using only 0006-0009) still has all the information
it needs.

This is not specific to the 386, but it only happens in
generated code of the form

        load R1
        ...
        load var into R2
        ...
        store R2 back into var
        ...
        use R1

and for the most part the other compilers generate
the loads for a given compiled line before any of
the stores.  Even so, this may not be the case everywhere,
so the change is worth making in all three.

R=ken2, ken, ken
CC=golang-dev
https://golang.org/cl/4529106
2011-06-03 14:10:39 -04:00
Lucio De Re
9baaa6f742 8l, ld: Initial adjustments for Plan 9 native compilation of 8l
These changes are not particularly invasive and have been tested
as broadly as possible.

8l/l.h:
  -	#pragma varargck: added some, removed duplicates.

ld/dwarf.c:
  -	As Plan 9 has no NULL, changed all occurrences to nil.
  -	Added USED(size); where necessary.
  -	Added (void) argument in definition of finddebugruntimepath().
  -	Plan 9 compiler was complaining about multiple
        assignments, repeaired by breaking up the commands.
  -	Correction: havedynamic = 1; restored.

ld/go.c:
  -	Needed USED(file); in two functions.
  -	Removed unused assignments flagged by the Plan 9 compiler.

ld/lib.c:
  -	Replaced unlink() with remove() which seems available everywhere.
  -	Removed USED(c4); and USED(magic) no longer required.
  -	Removed code flagged as unused by the Plan 9 compiler.
  -	Added attributes to a number of format strings.

R=rsc
CC=golang-dev
https://golang.org/cl/4435047
2011-06-03 13:20:31 -04:00
Luuk van Dijk
ab8ed7f8dd gc: renamed walkdef to typecheckdef and moved from walk to typedef.
also inlined a typechecking function in dcl away.

R=rsc
CC=golang-dev
https://golang.org/cl/4550115
2011-06-03 17:44:02 +02:00
Luuk van Dijk
56668283f1 gc: allow tags on parameters in export section of object files.
This is in preparation of escape analysis; function parameters
can now be tagged with interesting bits by the compiler by
assigning to n->note.

tested by having typecheck put a fake tag on all parameters of
pointer type and compiling the tree.

R=rsc
CC=golang-dev
https://golang.org/cl/4524092
2011-06-03 03:54:56 +02:00
Luuk van Dijk
e59aa8ea4a gc: typecheck the whole tree before walking. preparation for some escape-analysis related changes.
R=rsc
CC=golang-dev
https://golang.org/cl/4528116
2011-06-02 18:48:17 +02:00
Brad Fitzpatrick
f259f6ba0a exec: new API, replace Run with Command
This removes exec.Run and replaces exec.Cmd with a
new implementation. The new exec.Cmd represents
both a currently-running command and also a command
being prepared. It has a good zero value.

You can Start + Wait on a Cmd, or simply Run it.
Start (and Run) deal with copying stdout, stdin,
and stderr between the Cmd's io.Readers and
io.Writers.

There are convenience methods to capture a command's
stdout and/or stderr.

R=r, n13m3y3r, rsc, gustavo, alex.brainman, dsymonds, r, adg, duzy.chan, mike.rosset, kevlar
CC=golang-dev
https://golang.org/cl/4552052
2011-06-01 15:26:53 -07:00
Luuk van Dijk
2c4edb0eea gc: make merely referencing an outer variable in a closure not force heapallocation.
before: runtime_test.BenchmarkCallClosure1       20000000              135 ns/op
after:  runtime_test.BenchmarkCallClosure1      500000000                6 ns/op

R=rsc
CC=golang-dev
https://golang.org/cl/4527091
2011-06-01 17:02:43 +02:00
Rob Pike
73d57642a4 filepath: remove string constants. They are unnecessary.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4527090
2011-06-01 13:06:04 +10:00
Andrew Gerrand
581bd378ec gobuilder: include file missing from change, fix build
R=golang-dev
CC=golang-dev
https://golang.org/cl/4539099
2011-06-01 11:56:46 +10:00
Andrew Gerrand
9f0cabfab9 goinstall: document GOPATH and support relative/absolute installs
goinstall: more verbose logging with -v

Fixes #1901.

R=rsc, n13m3y3r
CC=golang-dev
https://golang.org/cl/4524078
2011-06-01 10:48:15 +10:00
Russ Cox
15dcdf751c gc: fix m[x], _ = y.(T)
Fixes #1900.

R=ken2
CC=golang-dev
https://golang.org/cl/4561053
2011-05-31 15:52:04 -04:00
Anthony Martin
5b62ba14c4 gc: disallow ... in type conversions
Fixes #1866.

R=bradfitz, rsc
CC=golang-dev
https://golang.org/cl/4548073
2011-05-31 15:41:47 -04:00
Russ Cox
5ab096d030 gc: implement new shift rules
The change is that 1.0<<2 is now okay.

R=ken2
CC=golang-dev
https://golang.org/cl/4524084
2011-05-31 15:05:40 -04:00
Luuk van Dijk
9b82408f6d gc: elide call to runtime.closure for function literals called in-place.
before:
runtime_test.BenchmarkCallClosure        5000000               499 ns/op
runtime_test.BenchmarkCallClosure1       5000000               681 ns/op

after:
runtime_test.BenchmarkCallClosure       500000000                5 ns/op
runtime_test.BenchmarkCallClosure1       10000000              160 ns/op

R=rsc
CC=golang-dev
https://golang.org/cl/4515167
2011-05-31 20:52:21 +02:00
Anthony Martin
67b4db9e9e gc: check parameter declarations in interface fields
Fixes #1663.
Fixes #1871.

R=rsc, lstoakes
CC=golang-dev
https://golang.org/cl/4530084
2011-05-31 13:41:32 -04:00
Russ Cox
2c6a2a9773 goinstall: skip standard packages
R=adg, n13m3y3r
CC=golang-dev
https://golang.org/cl/4526084
2011-05-30 18:23:16 -04:00
Robert Hencke
3fbd478a8a pkg: spelling tweaks, I-Z
also, a few miscellaneous fixes to files outside pkg

R=golang-dev, dsymonds, mikioh.mikioh, r
CC=golang-dev
https://golang.org/cl/4517116
2011-05-30 18:02:59 +10:00
Alex Brainman
9107b530d8 goinstall: use bash to execute gomake
R=golang-dev, r, adg
CC=golang-dev
https://golang.org/cl/4551074
2011-05-30 16:15:08 +10:00
Alex Brainman
b7582852f6 gotest, pkg/exec: use bash instead of sh to execute shell scripts on windows
As suggested by dho, iant2.

R=golang-dev, rsc
CC=devon.odell, golang-dev, iant
https://golang.org/cl/4515147
2011-05-28 21:26:03 +10:00
Gustavo Niemeyer
a825e8a69f cgo: restrict #cgo directives to prevent shell expansion
Fixes issue #1879.

Directives were not directly expanded, but since their
content ended up in makefiles, further expansion would
take place there.  This prevents such artifacts by
restricting the set of characters that may be used in
a directive value.

To build the list of safe characters I went through the
contents of /usr/lib/pkgconfig and extracted LDFLAGS
and CFLAGS information, so hopefully this is a
reasonable default to get started.

R=rsc
CC=golang-dev
https://golang.org/cl/4532092
2011-05-27 08:46:51 -03:00
Gustavo Niemeyer
bddb75127f cgo: support pkg-config for flags and libs
Fixes issue #1853.

R=golang-dev, mattn.jp, adg
CC=golang-dev
https://golang.org/cl/4550084
2011-05-26 22:19:23 -03:00
Ian Lance Taylor
9ef8ebafe4 gc: patch y.tab.c to fix build when using Bison 2.5
Fixes #1843.

R=rsc
CC=golang-dev
https://golang.org/cl/4535101
2011-05-26 11:28:23 -07:00
Russ Cox
e94eb38975 gc: typo
R=ken2
CC=golang-dev
https://golang.org/cl/4539086
2011-05-25 10:19:50 -04:00
Russ Cox
2286471651 5g: alignment fixes
Makes all.bash work after echo 4 >/proc/cpu/alignment,
which means kill the process on an unaligned access.

The default behavior on DreamPlug/GuruPlug/SheevaPlug
is to simulate an ARMv3 and just let the unaligned accesses
stop at the word boundary, resulting in all kinds of surprises.

Fixes #1240.

R=ken2
CC=golang-dev
https://golang.org/cl/4551064
2011-05-25 10:18:49 -04:00
Russ Cox
831c684434 5l: fix build
R=ken2
CC=golang-dev
https://golang.org/cl/4538095
2011-05-25 09:44:05 -04:00
Russ Cox
64b497c62a ld: add -w to disable dwarf, make errors obviously from dwarf
Reenable dwarf output on Mac.
Was writing headers but no actual dwarf data.

Fixes #1877 (accidentally).
Workaround for issue 1878.

R=lvd
CC=golang-dev
https://golang.org/cl/4515139
2011-05-25 08:25:33 -04:00
Wei Guangjing
2ad58d48fb 8l: emit resources (.rsrc) in Windows PE.
R=alex.brainman, rsc
CC=golang-dev, vcc.163
https://golang.org/cl/4516055
2011-05-25 07:53:00 -04:00
Russ Cox
d2b2b3f4a8 6l, 8l: fix Mach-O binaries with many dynamic libraries
R=ken2
CC=golang-dev
https://golang.org/cl/4529084
2011-05-24 19:50:13 -04:00
Anthony Martin
0b209b36b6 gc: relax assignability of method receivers
The spec was adjusted in commit df410d6a4842 to allow the
implicit assignment of strutures with unexported fields in
method receivers.  This change updates the compiler.

Also moved bug322 into fixedbugs and updated golden.out
to reflect the removal of the last known bug.

Fixes #1402.

R=golang-dev, gri, rsc
CC=golang-dev
https://golang.org/cl/4526069
2011-05-24 19:48:19 -04:00
Robert Griesemer
3c7271f057 go spec: be precise with the use of the informal ellipsis … and the Go token ...
Fixes #1867.

R=r
CC=golang-dev
https://golang.org/cl/4538092
2011-05-24 14:18:44 -07:00
Dave Cheney
648f25b237 5l: fix set but not used warnings
R=rsc, iant
CC=golang-dev
https://golang.org/cl/4538083
2011-05-21 08:00:53 -07:00
Russ Cox
975ba88e0e cgo: use packed struct to fix Windows behavior
R=golang-dev, mattn.jp, jcowgar, iant
CC=golang-dev
https://golang.org/cl/4535080
2011-05-18 14:08:12 -04:00
Wei Guangjing
b256358008 6l: fix emit windows dwarf sections
R=alex.brainman, rsc
CC=golang-dev, vcc.163
https://golang.org/cl/4532069
2011-05-18 13:12:38 -04:00
Anthony Martin
f570d9d765 8g: fix conversion from float to uint64
The code for converting negative floats was
incorrectly loading an FP control word from
the stack without ever having stored it there.

Thanks to Lars Pensjö for reporting this bug.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4515091
2011-05-16 22:14:56 -04:00
Alexey Borzenkov
b701cf3332 runtime: make StackSystem part of StackGuard
Fixes #1779

R=rsc
CC=golang-dev
https://golang.org/cl/4543052
2011-05-16 16:57:49 -04:00
Russ Cox
e69b9ddd42 ld: do not emit reference to dynamic library named ""
Fixes #1778.

R=ken2
CC=golang-dev
https://golang.org/cl/4550047
2011-05-16 16:24:17 -04:00
Russ Cox
2d310a0087 5c, 5g: another attempt at silencing gcc
R=ken2
CC=golang-dev
https://golang.org/cl/4535074
2011-05-16 16:15:13 -04:00
Russ Cox
40745a579c 5l: delete pre-ARMv4 instruction implementations
Add implementation for addr<->reg short moves.
Align large data, for ARM.

R=ken2
CC=golang-dev
https://golang.org/cl/4545050
2011-05-16 16:14:37 -04:00
Robert Hencke
d49844bcce gofmt: skip bug340.go in test.sh
bug340.go is a test case for a syntax error

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4523069
2011-05-14 23:06:50 -07:00
Luuk van Dijk
36cec789cd gc: generalize dst = append(src,...) inlining to arbitrary src and dst arguments.
R=rsc
CC=golang-dev
https://golang.org/cl/4517057
2011-05-14 00:35:10 +02:00
Robert Griesemer
ba006e6b6a go/types: type checker API + testing infrastructure
At the moment types.Check() only deals with global
types and only partially so. But the framework is
there to compute them and check for cycles. An initial
type test is passing.

First step of a series of CLs to come.

R=rsc
CC=golang-dev
https://golang.org/cl/4425063
2011-05-13 15:31:09 -07:00
Russ Cox
2d174db6a6 5c, 5g: fix build with too-smart gcc
R=ken2
CC=golang-dev
https://golang.org/cl/4543049
2011-05-13 12:15:46 -04:00
Brad Fitzpatrick
05a1b7ec41 http: remove finalURL from Client.Get; move to Response
This CL:

-- removes Response.RequestMethod string
-- adds Response.Request *Request
-- removes the finalURL result parameter from client.Get()
-- adds a gofix rule for callers of http.Get which assign
   the final url to the blank identifier; warning otherwise

Caller who did:

res, finalURL, err := http.Get(...)

now need to do:

res, err := http.Get(...)
if err != nil {
   ...
}
finalURL := res.Request.URL.String()

R=rsc
CC=golang-dev
https://golang.org/cl/4535056
2011-05-13 07:31:24 -07:00
Alex Brainman
34ac4ec30c 6l, 8l: emit windows dwarf sections similar to other platforms
R=golang-dev, rsc
CC=golang-dev, vcc.163
https://golang.org/cl/4517056
2011-05-13 16:05:47 +10:00
Robert Hencke
a005617c5a gotest: document unit of time for elapsed()
R=golang-dev
CC=golang-dev
https://golang.org/cl/4543044
2011-05-12 22:00:14 -07:00