This CL makes the compiler understand that the type of
the len or cap of a map, slice, or string is 'int', not 'int32'.
It does not change the meaning of int, but it should make
the eventual change of the meaning of int in 6g a bit smoother.
Update #2188.
R=ken, dave, remyoudompheng
CC=golang-dev
https://golang.org/cl/6542059
Use explicit IntSize constant instead of 4.
This CL does not change the meaning of int, but it should make
the eventual change of the meaning of int on amd64 a bit
smoother.
Update #2188.
R=ken, dave
CC=golang-dev
https://golang.org/cl/6554076
This CL makes the size of an int controlled by a variable
in cgo instead of hard-coding 4 (or 32 bits) in various places.
Update #2188.
R=iant, r, dave
CC=golang-dev
https://golang.org/cl/6548061
This CL makes the runtime understand that the type of
the len or cap of a map, slice, or string is 'int', not 'int32',
and it is also careful to distinguish between function arguments
and results of type 'int' vs type 'int32'.
In the runtime, the new typedefs 'intgo' and 'uintgo' refer
to Go int and uint. The C types int and uint continue to be
unavailable (cause intentional compile errors).
This CL does not change the meaning of int, but it should make
the eventual change of the meaning of int on amd64 a bit
smoother.
Update #2188.
R=iant, r, dave, remyoudompheng
CC=golang-dev
https://golang.org/cl/6551067
Using offsets from Tos is cumbersome and we've had problems
in the past. Since it's only being used to grab the PID, we'll just
get that from the default TLS instead.
R=rsc, rminnich, npe
CC=golang-dev
https://golang.org/cl/6543049
Revision 63f7abcae015 introduced a bug caused by
code assuming registers started at X5, not X0.
Fixes#4138.
R=rsc
CC=golang-dev, remy
https://golang.org/cl/6558043
The width was not being set on the address, which meant
that the optimizer could not find variables that overlapped
with it and mark them as having had their address taken.
This let to the compiler believing variables had been set
but never used and then optimizing away the set.
Fixes#4129.
R=ken2
CC=golang-dev
https://golang.org/cl/6552059
OpenBSD now requires ELF binaries to have a PT_NOTE that identifies
it as an OpenBSD binary. Refactor the existing NetBSD ELF signature
code and implement support for OpenBSD ELF signatures.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6489131
Always process the DWARF info, even when the const value is determined
using the debug data block. This ensures that the injected enum is
removed and future loads of the same constant do not trigger
inconsistent definitions.
Add tests for issues 2470 and 4054.
Fixes#4054.
R=golang-dev, fullung, dave, rsc, minux.ma
CC=golang-dev
https://golang.org/cl/6501101
In a range loop, the presence of a value implies the presence of a key.
However, the presence of a value as an *ast.Ident does not imply that
the key is also an *ast.Ident, thus leading to a panic any time the
two argument form is used where the key is not an identifier.
R=golang-dev, adg, r
CC=golang-dev
https://golang.org/cl/6540045
(see also issue 3961).
hexdump -c testdata/crlf.input
0000000 / * \r \n \t S o u r c e c o n t
0000010 a i n i n g C R / L F l i n
0000020 e e n d i n g s . \r \n \t T h e
0000030 g o f m t ' e d o u t p u t
0000040 m u s t o n l y h a v e
0000050 L F \r \n \t l i n e e n d i n g
0000060 s . \r \n * / \r \n p a c k a g e
0000070 m a i n \r \n \r \n f u n c m a i
0000080 n ( ) { \r \n \t / / l i n e
0000090 c o m m e n t \r \n \t p r i n t l
00000a0 n ( " h e l l o , w o r l d !
00000b0 " ) / / a n o t h e r l i
00000c0 n e c o m m e n t \r \n \t p r i
00000d0 n t l n ( ) \r \n } \r \n
00000db
hexdump -c testdata/crlf.golden
0000000 / * \n \t S o u r c e c o n t a
0000010 i n i n g C R / L F l i n e
0000020 e n d i n g s . \n \t T h e g
0000030 o f m t ' e d o u t p u t m
0000040 u s t o n l y h a v e L F
0000050 \n \t l i n e e n d i n g s . \n
0000060 * / \n p a c k a g e m a i n \n
0000070 \n f u n c m a i n ( ) { \n \t
0000080 / / l i n e c o m m e n t \n
0000090 \t p r i n t l n ( " h e l l o ,
00000a0 w o r l d ! " ) / / a n o
00000b0 t h e r l i n e c o m m e n
00000c0 t \n \t p r i n t l n ( ) \n } \n
00000cf
R=rsc
CC=golang-dev
https://golang.org/cl/6526052
We use pkg path instead of file name (which contains $WORK) in section symbols names.
R=golang-dev, fullung, rsc, iant
CC=golang-dev
https://golang.org/cl/6445085
Fixes writing of function parameter, result lists which
consist of multiple named or unnamed items with same type.
Fixes#4011.
R=golang-dev, bsiegert, bradfitz, rsc
CC=golang-dev
https://golang.org/cl/6475062
This is the second part of a bigger change that adds data race detection feature:
https://golang.org/cl/6456044
This change makes the linker emit dependency on runtime/race package when supplied with -b flag.
R=rsc, minux.ma
CC=golang-dev
https://golang.org/cl/6488074
This is the first part of a bigger change that adds data race detection feature:
https://golang.org/cl/6456044
Adds -race flag to go command.
API change:
+pkg go/build, type Context struct, InstallTag string
R=rsc
CC=golang-dev
https://golang.org/cl/6488075
This is a part of a bigger change that adds data race detection feature:
https://golang.org/cl/6456044
This change breaks circular dependency between runtime/race and syscall packages.
R=rsc
CC=golang-dev
https://golang.org/cl/6498079
During interface compare, the operands will be evaluated twice. The operands might include function calls for conversion, so make them cheap before comparing them.
R=rsc
CC=golang-dev
https://golang.org/cl/6498133
Fixes#3456.
This proposal is a reformulation of CL 5987063. This CL resets
the default GOARM value to 6 and allows the use of the VFPv3
optimisation if GOARM=7. Binaries built with this CL in place
will abort if GOARM=7 was used and the target host does not
support VFPv3.
R=minux.ma, rsc, ajstarks
CC=golang-dev
https://golang.org/cl/6501099
In switches without an expression, the compiler would not convert the implicit true to an interface, causing codegen errors.
Fixes#3980.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6497147
This fixes a problem with ELF tools thinking they know the
format of the symbol table, as we do not use any of the
standard formats for that table.
This change will probably annoy the Plan 9 users, but I
believe there are other incompatibilities already that mean
they have to use a Go-specific nm.
Fixes#3473.
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/6500117
go tool dist env -w is supposed to print a Windows batch file.
Normally Windows will execute batch files without \r before \n,
but issue 3060 reports that if the file ends up containing paths
written in Chinese, Windows 7 cannot execute it without the \r.
So add the \r.
Fixes#3060.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/6498120
It is enough to load directly the data word and the itab word
from memory, so we save a LEA instruction for each method call,
and allow elimination of some extra temporaries.
Update #1914.
R=daniel.morsing, rsc
CC=golang-dev, remy
https://golang.org/cl/6501110
Removes an extra LEAL/LEAQ instructions there and usually saves
a useless temporary in the idiom
if err := foo(); err != nil {...}
Generated code is also less involved:
MOVQ err+n(SP), AX
CMPQ AX, $0
(potentially CMPQ n(SP), $0) instead of
LEAQ err+n(SP), AX
CMPQ (AX), $0
Update #1914.
R=daniel.morsing, nigeltao, rsc
CC=golang-dev, remy
https://golang.org/cl/6493099
Broke tests on 386.
««« original CL description
6l/8l: emit correct opcodes to F(SUB|DIV)R?D.
When the destination was not F0, 6l and 8l swapped FSUBD/FSUBRD and
FDIVD/FDIVRD.
R=golang-dev, dave, rsc
CC=golang-dev
https://golang.org/cl/6498092
»»»
R=golang-dev
CC=golang-dev
https://golang.org/cl/6492100