Commit Graph

13571 Commits

Author SHA1 Message Date
Ian Lance Taylor
6fa38e5e0a cmd/go, go/build, misc/swig: add SWIG support to Go tool
R=adg, rsc, franciscossouza, seb.binet, gen.battle
CC=golang-dev
https://golang.org/cl/5845071
2012-08-03 18:08:43 -07:00
Michał Derkacz
dee5adcf74 5a, 5l, math: Add support for ABSD, ABSF floating point instructions.
R=golang-dev, dave, rsc, minux.ma
CC=golang-dev
https://golang.org/cl/6225051
2012-08-03 16:15:11 -04:00
Rémy Oudompheng
823962c521 cmd/8g: fix miscompilation due to BADWIDTH.
Fixes #3899.

R=rsc
CC=golang-dev, remy
https://golang.org/cl/6453084
2012-08-03 22:05:51 +02:00
Rémy Oudompheng
f4f1ba2b1e cmd/gc: accept switches on comparable arrays.
The compiler is incorrectly rejecting switches on arrays of
comparable types. It also doesn't catch incomparable structs
when typechecking the switch, leading to unreadable errors
during typechecking of the generated code.

Fixes #3894.

R=rsc
CC=gobot, golang-dev, r, remy
https://golang.org/cl/6442074
2012-08-03 21:47:26 +02:00
Adam Langley
728f191319 crypto/elliptic: explicitly handle P+P, ∞+P and P+∞
These aren't needed for scalar multiplication, but since we export a
generic Add function we should handle it.

This change also corrects two bugs in p224Contract that it turned up.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6458076
2012-08-03 15:42:14 -04:00
Russ Cox
3f34248a77 cmd/ld: add PT_PAX_FLAGS ELF header
PAX systems are Linux systems that are more paranoid about memory permissions.
These flags tell them to relax when running Go binaries.

Fixes #47.

R=iant
CC=golang-dev
https://golang.org/cl/6326054
2012-08-03 15:27:35 -04:00
Mike Rosset
cf06750372 debug/elf: Add support for getting DynTag string table values.
R=rsc
CC=golang-dev
https://golang.org/cl/6430064
2012-08-03 14:46:20 -04:00
Robert Griesemer
f3a45d4695 go/build: tiny cleanup
R=rsc
CC=golang-dev
https://golang.org/cl/6453083
2012-08-03 10:45:02 -07:00
Adam Langley
e107742080 crypto/tls: remove flakey tests
This removes some (non-short only) tests that involved connections to
the outside world and thus were flakey. This does remove some test
coverage of the root fetchers on non-Windows platforms, but the right
place for that is crypto/x509.

R=golang-dev, krautz, rsc
CC=golang-dev
https://golang.org/cl/6455085
2012-08-03 13:28:05 -04:00
Adam Langley
bbb5f1bffb crypto/x509: support ECDSA keys when generating certificates.
We already support reading ECDSA certificates and this change adds
write support.

R=golang-dev, bradfitz, rsc
CC=golang-dev
https://golang.org/cl/6422046
2012-08-03 10:37:30 -04:00
Marcel van Lohuizen
89d40b911c exp/locale/collate: changed API of Builder to be more convenient
for dealing with CLDR files:
- Add now taxes a list of indexes of colelems that are variables. Checking and
  handling is now done by the Builder.  VariableTop is now also properly generated
  using the Build method.
- Introduced separate Builder, called Tailoring, for creating tailorings of root
  table.  This clearly separates the functionality for building a table based on
  weights (the allkeys* files) versus tables based on LDML XML files.
- Tailorings are now added by two calls instead of one: SetAnchor and Insert.
  This more closely reflects the structure of LDML side and simplifies the
  implementation of both the client and library side.  It also preserves
  some information that is otherwise hard to recover for the Builder.
- Allow the LDML XML element extend to be passed to Insert.  This simplifies
  both client and library implementation.

R=r
CC=golang-dev
https://golang.org/cl/6454061
2012-08-03 09:01:21 +02:00
Alex Brainman
b9b29ce2ba os: test that IsExist and IsNotExist handle PathError and LinkError
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/6442080
2012-08-03 14:25:35 +10:00
Robert Griesemer
c12a63f7d3 go/scanner: fix minor typo
R=r
CC=golang-dev
https://golang.org/cl/6442076
2012-08-02 17:10:41 -07:00
Robert Griesemer
593c51cff1 go/ast: ast.Print must not crash with unexported fields
Don't print unexported struct fields; their values are
not accessible via reflection.

Fixes #3898.

Also:
- added support for arrays
- print empty maps, arrays, slices, structs on one line
  for a denser output
- added respective test cases

R=r
CC=golang-dev
https://golang.org/cl/6454089
2012-08-02 17:05:51 -07:00
Andrew Balholm
2f39a33b6a exp/html: in parse tests, discard only one trailing newline
Pass 2 additional tests.

R=nigeltao
CC=golang-dev
https://golang.org/cl/6454090
2012-08-03 09:31:45 +10:00
Nigel Tao
1916db786f html: make the low-level tokenizer also skip end-tag attributes.
R=andybalholm
CC=golang-dev
https://golang.org/cl/6453071
2012-08-03 09:29:16 +10:00
Rémy Oudompheng
37d7500f8d exp/types: set non-embedded method type during GcImport.
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/6445068
2012-08-02 16:24:09 -07:00
Robert Griesemer
a4ac339f43 exp/types: enable cycle checks again
Process a package's object in a reproducible
order (rather then in map order) so that we
get error messages in reproducible order.

R=r
CC=golang-dev
https://golang.org/cl/6449076
2012-08-01 16:37:06 -07:00
Andrew Balholm
dbbfbcc4a1 exp/html: implement escaping and double-escaping in scripts
The text inside <script> tags is not ordinary raw text; there are all sorts
of other complications. This CL implements those complications.

Pass 76 additional tests.

R=nigeltao
CC=golang-dev
https://golang.org/cl/6443070
2012-08-01 14:45:35 +10:00
Shenghou Ma
8dbeb0ad07 test/run.go: fix compiledir test on windows
we can't import "./bug0" on windows, as it will trigger
"import path contains invalid character ':'" error.
    instead, we pass "-D." and "-I." to gc to override this
behavior. this idea is due to remyoudompheng.

R=golang-dev, r, alex.brainman, remyoudompheng
CC=golang-dev
https://golang.org/cl/6441074
2012-07-31 23:26:33 -04:00
Shenghou Ma
e07958f7df runtime: round return value address in runtime.equal
Fixes #3866.

R=rsc, r, nigeltao
CC=golang-dev
https://golang.org/cl/6452046
2012-07-31 23:02:46 -04:00
Alex Brainman
f2b8f6b451 os: Rename error to fit IsExist
Fixes #3828.

R=golang-dev, iant, rsc
CC=golang-dev
https://golang.org/cl/6420056
2012-08-01 12:55:04 +10:00
Robert Griesemer
152279f203 exp/types: Replace String method with TypeString function
This is more in sync with the rest of the package;
for instance, we have functions (not methods) to
deref or find the underlying type of a Type.

In the process use a single bytes.Buffer to create
the string representation for a type rather than
the (occasional) string concatenation.

R=r
CC=golang-dev
https://golang.org/cl/6458057
2012-07-31 19:30:18 -07:00
Robert Griesemer
dcb6f59811 exp/types: implement Type.String methods for testing/debugging
Also:
- replaced existing test with a more comprehensive test
- fixed bug in map type creation

R=r
CC=golang-dev
https://golang.org/cl/6450072
2012-07-31 17:09:12 -07:00
Andrew Balholm
9f3b00579e exp/html: tokenize attributes of end tags
If an end tag has an attribute that is a quoted string containing '>',
the tokenizer would end the tag prematurely. Now it reads the attributes
on end tags just as it does on start tags, but the high-level interface
still doesn't return them, because their presence is a parse error.

Pass 1 additional test.

R=nigeltao
CC=golang-dev
https://golang.org/cl/6457060
2012-08-01 09:35:02 +10:00
Nigel Tao
695024b8fa image/png: tRNS chunk is *non*-alpha-premultiplied.
R=r
CC=golang-dev
https://golang.org/cl/6446062
2012-08-01 09:20:44 +10:00
Rémy Oudompheng
b6ea905ed9 cmd/gc: fix inlining bug with receive operator.
The receive operator was given incorrect precedence
resulting in incorrect deletion of parentheses.

Fixes #3843.

R=rsc
CC=golang-dev, remy
https://golang.org/cl/6442049
2012-08-01 00:45:26 +02:00
Mikio Hara
cbc3268d1d misc/cgo/test: fix darwin build
uuid_t is defined in unistd.h on OS X, unfortunately.

R=iant, rsc
CC=golang-dev
https://golang.org/cl/6455057
2012-07-31 20:59:06 +09:00
Mikio Hara
4e7f765b12 net: disable IPv6 multicast tests unless external IPv6 connection is present
R=rsc
CC=golang-dev
https://golang.org/cl/6398052
2012-07-31 20:58:35 +09:00
Shenghou Ma
9de61e7c8c cmd/5l, cmd/ld: add support for R_ARM_GOT_PREL
Android NDK's gcc 4.6 generates this relocation for runtime/cgo.

R=rsc
CC=golang-dev
https://golang.org/cl/6450056
2012-07-30 18:48:00 -04:00
Shenghou Ma
dd62bb4753 cmd/cgo: use 1 as last entry for __cgodebug_data
LLVM-based gcc will place all-zero data in a zero-filled
        section, but our debug/macho can't handle that.
        Fixes #3821.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6444049
2012-07-30 18:44:48 -04:00
Bobby Powers
7520f0b4aa httputil: accumulate X-Forwarded-For header info
If the X-Forwarded-For header already exists on a request, we
should append our client's IP to it after a comma+space instead
of overwriting it.

Fixes #3846.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/6448053
2012-07-31 08:38:49 +10:00
Rob Pike
ad058cacfb text/template/parse/lex.go: fix typo
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/6448081
2012-07-30 15:23:36 -07:00
Han-Wen Nienhuys
36fe436cba pkg/syscall: unexport Prlimit.
This syscall was inadvertently exported when fixing
Getrlimit/Setrlimit on 32-bit platforms.

R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/6458051
2012-07-31 08:21:24 +10:00
Rob Pike
20d9fd3ae1 text/template/parse: fix data race
The situation only affects diagnostics but is easy to fix.
When computing lineNumber, use the position of the last item
returned by nextItem rather than the current state of the lexer.
This is internal only and does not affect the API.

Fixes #3886.

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/6445061
2012-07-30 15:11:20 -07:00
Rob Pike
4783ad82da regexp: fix glitch in doc for FindReaderIndex
Fixes #3878.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6457054
2012-07-30 12:46:50 -07:00
Rémy Oudompheng
adc9337262 test: add a compiledir pattern in run.go
The compiledir pattern compiles all files xxx.dir/*.go
in lexicographic order (which is assumed to coincide with
the topological order of dependencies).

R=rsc
CC=golang-dev, remy
https://golang.org/cl/6440048
2012-07-30 21:12:05 +02:00
Russ Cox
09f1f5d76d misc/dashboard/codereview: add LastUpdate field to CL
To be filled in by a later CL. I deployed a test version to
App Engine to work on setting the values, so there are
a few records that have this field set already.

That field is breaking the live version, so I have pushed
a new copy with this 1-line change to the live version

I assumed that appengine/datastore was like every other
marshaling and unmarshaling package we have in Go
(for example, encoding/gob, encoding/json, encoding/xml,
and protobuf) and that if it loaded an unknown field it would
just ignore it. Apparently not. Sorry.

R=dsymonds
TBR=dsymonds
CC=golang-dev
https://golang.org/cl/6454064
2012-07-30 10:13:54 -04:00
Rémy Oudompheng
6cbf35c172 cmd/gc: fix initialization order involving method calls.
They were previously ignored when deciding order and
detecting dependency loops.
Fixes #3824.

R=rsc, golang-dev
CC=golang-dev, remy
https://golang.org/cl/6455055
2012-07-30 09:14:49 +02:00
Andrew Gerrand
67d8a2d4c1 doc: remove mention of weekly tag from source install doc
R=golang-dev, dsymonds, bradfitz
CC=golang-dev
https://golang.org/cl/6442062
2012-07-30 15:36:56 +10:00
David Symonds
2a9478ed64 misc/dashboard/codereview: pass user information to gobot when assigning reviewer.
R=bradfitz
CC=gobot, golang-dev, rsc
https://golang.org/cl/6457052
2012-07-30 14:41:04 +10:00
Russ Cox
7711e61031 cmd/go: show $GOPATH in 'go env' output
Also, sort output.

R=golang-dev, patrick, dave, iant
CC=golang-dev, patrick
https://golang.org/cl/6446064
2012-07-30 00:22:42 -04:00
David Symonds
e53351013d misc/dashboard/codereview: switch to using gobot to update CL reviewer info.
R=rsc
CC=golang-dev
https://golang.org/cl/6453063
2012-07-30 14:13:12 +10:00
David Symonds
4168804639 misc/dashboard/codereview: bump user-specific table limits to 100.
R=rsc
CC=golang-dev
https://golang.org/cl/6457051
2012-07-30 14:11:51 +10:00
Brad Fitzpatrick
538b2122f1 net/http: don't allow zero byte in FileServer paths
Should probably be fixed in the syscall package, either
additional or instead of this CL.

Fixes #3842

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6442061
2012-07-30 13:57:30 +10:00
David Symonds
482ceeda6d misc/dashboard/codereview: interpret zero reviewers as the CL being closed.
This is the state when the CL has been submitted by someone other than
the CL author, but before the CL author has synched their client.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6458044
2012-07-30 13:51:21 +10:00
Daniel Morsing
dd166b9437 cmd/gc: point "no new variables" error at right line number.
Fixes #3856.

R=dsymonds, rsc
CC=golang-dev
https://golang.org/cl/6455056
2012-07-29 22:24:19 -04:00
David Symonds
be629bf79e misc/dashboard/codereview: make all active CL tables hold up to 50 CLs.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/6449060
2012-07-30 11:45:17 +10:00
David Symonds
3fe5f3353f misc/dashboard/codereview: fix tag nesting.
R=golang-dev, rsc, minux.ma
CC=golang-dev
https://golang.org/cl/6454062
2012-07-30 11:37:20 +10:00
David Symonds
3cc9d16792 misc/dashboard/codereview: recognize "NOT LGTM".
A "NOT LGTM" overrules a previous "LGTM" by the same person, and vice versa.
"NOT LGTM"s are shown in the same location as LGTMs, colored red.

R=rsc
CC=golang-dev
https://golang.org/cl/6453062
2012-07-30 10:54:50 +10:00