Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
50941e9
cmd/vendor/golang.org/x/tools: update to 7d6b83ca
adonovan Nov 14, 2018
0a40d45
internal/cpu: move GODEBUGCPU options into GODEBUG
martisch Nov 14, 2018
c7a4165
cmd/link: fix isStmt DWARF info
aclements Nov 14, 2018
7a6ccec
x/net/route: use libc calls on Darwin
randall77 Nov 8, 2018
564a652
cmd/vendor: update to golang.org/x/tools@f62bfb54
adonovan Nov 15, 2018
35770ab
cmd/vet/all: use x/tools/go/analysis/cmd/vet not cmd/vet
adonovan Nov 12, 2018
cd3b878
runtime: track all heap arenas in a slice
aclements Sep 26, 2018
c186004
runtime: record in-use spans in a page-indexed bitmap
aclements Sep 26, 2018
6d19461
runtime: mark span when marking any object on the span
aclements Sep 26, 2018
6bd85f7
runtime: implement efficient page reclaimer
aclements Sep 27, 2018
8fa789b
runtime: eliminate mheap.busy* lists
aclements Sep 27, 2018
700575b
cmd/vet: switch to x/tools/go/analysis implementation
adonovan Nov 14, 2018
1460897
cmd/go: correctly suggest tidy instead of nonexistent fix for -fix
y-yagi Nov 15, 2018
34f1f5d
cmd/cgo: fix comment grammar
ianlancetaylor Jun 22, 2018
657f6d6
misc/cgo/testsanitizers: gofmt
tklauser Nov 16, 2018
722ff6b
reflect: add comment for String method of Kind struct
cn0047 Nov 16, 2018
c6fe208
cmd/vet: fix two failing test cases
adonovan Nov 16, 2018
6557af7
net/http: fix typo in the SameSite docs
mbj36 Nov 16, 2018
79257c4
testing: add example to package doc
leighmcculloch Nov 16, 2018
a33cebf
database/sql: add examples for opening and testing a DB pool
kardianos Mar 16, 2018
a1025ba
cmd/compile: provide updating mechanism for format test
griesemer Nov 13, 2018
53ed92d
cmd/go: fix detection of unexpected files in downloaded zips
rsc Nov 13, 2018
b19adfd
cmd/go: fix experiment isolation in cache key
rsc Nov 13, 2018
478af80
doc/go_spec: tweak wording to avoid 'explicit assignment' misreading
rsc Nov 13, 2018
3757284
cmd/vet: reenable cgo test
adonovan Nov 16, 2018
465c311
build: clear GO111MODULE during make.bash etc
rsc Nov 16, 2018
ed3a357
cmd/go: vet: provide package ID to the vet tool
adonovan Nov 16, 2018
6157dda
cmd/go: accept @hash/branch in mod download
marwan-at-work Nov 16, 2018
a54b7b2
cmd/vendor: update to golang.org/x/tools@8e5aba0a
adonovan Nov 16, 2018
2900943
cmd/vet: basic tests of go vet -json -c=N flags
adonovan Nov 16, 2018
6f5be37
cmd/vet/all: remove skip when x/tools isn't in $GOPATH
bradfitz Nov 16, 2018
3faab79
cmd/asm: rename -symabis to -gensymabis
aclements Nov 15, 2018
6797b32
cmd/cgo: recognized untyped Go constants as untyped constants
ianlancetaylor Nov 16, 2018
b65f5c8
cmd/vet: remove pkgfact analyzer, left in by mistake
adonovan Nov 16, 2018
96eeaa1
runtime: don't use thread local storage before it is set up on iOS
Nov 17, 2018
054640b
crypto/hmac: rename CheckHMAC to ValidHMAC in package docs
sevki Nov 17, 2018
fe562ce
os: make RemoveAll("") fail silently on unix
tklauser Nov 17, 2018
310f2e2
cmd/go: packages that use SWIG depend on "unsafe"
ianlancetaylor Nov 16, 2018
0b9004f
cmd/compile: bulk rename
josharian Nov 18, 2018
24ba631
cmd/vendor: update to golang.org/x/tools@139d099f
mvdan Nov 19, 2018
af21ffd
cmd/go: improve go vet documentation
adonovan Nov 2, 2018
e003c6f
cmd/vendor: eliminate vet-lite
adonovan Nov 19, 2018
47d5a44
cmd/go: parse dot-separated identifiers in build metadata
mellis Nov 7, 2018
e337904
cmd/link: directly get max pc value in findfunctab
snyh Nov 19, 2018
e58475b
regexp: add matching and finding examples
cn0047 Nov 19, 2018
90777a3
encoding/pem: test getLine does not include trailing whitespace
santhosh-tekuri Feb 6, 2018
0f02664
doc/go1.12: announce deprecation of support for FreeBSD 10.x
tklauser Nov 18, 2018
bbd1771
regexp: use backquotes for all regular expression examples
cn0047 Nov 20, 2018
b34ea7e
syscall/js: document ValueOf() panic
markus-wa Nov 17, 2018
d6f2fd9
mime: correctly detect non-ASCII characters in FormatMediaType
dddent Nov 20, 2018
977f431
cmd/link, runtime: add initial cgo support for ppc64
zte-majiang Nov 16, 2018
8679b91
misc/wasm: use temporary directory provided by Node.js
neelance Nov 20, 2018
b44cd15
syscall: add dummy SIGTERM constant to js/wasm
neelance Nov 20, 2018
0d29261
mime: remove allocation introduced in recent fix
bradfitz Nov 20, 2018
9f832f1
os: permit RemoveAll with paths that end in ".."
ianlancetaylor Nov 20, 2018
7c71aa2
os: return PathError on RemoveAll with trailing dots
tklauser Nov 18, 2018
339e5ff
go/doc: disable playground for examples that use syscall/js
neelance Nov 10, 2018
e35e924
Addresses 29069
ChrisPortman Dec 3, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions doc/go1.12.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,16 @@ <h2 id="language">Changes to the language</h2>
There are no changes to the language specification.
</p>

<h2 id="ports">Ports</h2>

<h3 id="freebsd">FreeBSD</h3>

<p>
Go 1.12 is the last release that is supported on FreeBSD 10.x, which has
already reached end-of-life. Go 1.13 will require FreeBSD 11.2+ or FreeBSD
12.0+.
</p>

<h2 id="tools">Tools</h2>

<h3 id="gocache">Build cache requirement</h3>
Expand Down
9 changes: 5 additions & 4 deletions doc/go_spec.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!--{
"Title": "The Go Programming Language Specification",
"Subtitle": "Version of November 12, 2018",
"Subtitle": "Version of November 16, 2018",
"Path": "/ref/spec"
}-->

Expand Down Expand Up @@ -1348,8 +1348,9 @@ <h3 id="Channel_types">Channel types</h3>
The optional <code>&lt;-</code> operator specifies the channel <i>direction</i>,
<i>send</i> or <i>receive</i>. If no direction is given, the channel is
<i>bidirectional</i>.
A channel may be constrained only to send or only to receive by explicit
<a href="#Conversions">conversion</a> or <a href="#Assignments">assignment</a>.
A channel may be constrained only to send or only to receive by
<a href="#Assignments">assignment</a> or
explicit <a href="#Conversions">conversion</a>.
</p>

<pre>
Expand Down Expand Up @@ -3624,7 +3625,7 @@ <h4 id="Integer_overflow">Integer overflow</h4>
<code>-</code>, <code>*</code>, <code>/</code>, and <code>&lt;&lt;</code> may legally
overflow and the resulting value exists and is deterministically defined
by the signed integer representation, the operation, and its operands.
Overflow does not cause a <a href="#Run_time_panics">run-time panic</a>.
Overflow does not cause a <a href="#Run_time_panics">run-time panic</a>.
A compiler may not optimize code under the assumption that overflow does
not occur. For instance, it may not assume that <code>x &lt; x + 1</code> is always true.
</p>
Expand Down
6 changes: 6 additions & 0 deletions misc/cgo/test/issue28545.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,24 @@
// license that can be found in the LICENSE file.

// Failed to add type conversion for negative constant.
// Issue 28772: Failed to add type conversion for Go constant set to C constant.
// No runtime test; just make sure it compiles.

package cgotest

/*
#include <complex.h>

#define issue28772Constant 1

static void issue28545F(char **p, int n, complex double a) {}
*/
import "C"

const issue28772Constant = C.issue28772Constant

func issue28545G(p **C.char) {
C.issue28545F(p, -1, (0))
C.issue28545F(p, 2+3, complex(1, 1))
C.issue28545F(p, issue28772Constant, (0))
}
2 changes: 1 addition & 1 deletion misc/cgo/testsanitizers/tsan_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
package sanitizers_test

import (
"runtime"
"strings"
"testing"
"runtime"
)

func TestTSAN(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion misc/wasm/wasm_exec.js
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@

const go = new Go();
go.argv = process.argv.slice(2);
go.env = process.env;
go.env = Object.assign({ TMPDIR: require("os").tmpdir() }, process.env);
go.exit = process.exit;
WebAssembly.instantiate(fs.readFileSync(process.argv[2]), go.importObject).then((result) => {
process.on("exit", (code) => { // Node.js exits if no callback is pending
Expand Down
2 changes: 2 additions & 0 deletions src/cmd/asm/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ Flags:
Generate code that can be linked into a shared library.
-trimpath prefix
Remove prefix from recorded source file paths.
-gensymabis
Write symbol ABI information to output file. Don't assemble.
Input language:

The assembler uses mostly the same syntax for all architectures,
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/asm/internal/flags/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ var (
Shared = flag.Bool("shared", false, "generate code that can be linked into a shared library")
Dynlink = flag.Bool("dynlink", false, "support references to Go symbols defined in other shared libraries")
AllErrors = flag.Bool("e", false, "no limit on number of errors reported")
SymABIs = flag.Bool("symabis", false, "write symbol ABI information to output file, don't assemble")
SymABIs = flag.Bool("gensymabis", false, "write symbol ABI information to output file, don't assemble")
)

var (
Expand Down
13 changes: 13 additions & 0 deletions src/cmd/cgo/ast.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ func (f *File) ParseGo(name string, src []byte) {
f.Package = ast1.Name.Name
f.Name = make(map[string]*Name)
f.NamePos = make(map[*Name]token.Pos)
f.Consts = make(map[string]bool)

// In ast1, find the import "C" line and get any extra C preamble.
sawC := false
Expand Down Expand Up @@ -191,6 +192,18 @@ func (f *File) saveExprs(x interface{}, context astContext) {
}
case *ast.CallExpr:
f.saveCall(x, context)
case *ast.GenDecl:
if x.Tok == token.CONST {
for _, spec := range x.Specs {
vs := spec.(*ast.ValueSpec)
if vs.Type == nil {
for _, name := range spec.(*ast.ValueSpec).Names {
f.Consts[name.Name] = true
}
}
}
}

}
}

Expand Down
9 changes: 5 additions & 4 deletions src/cmd/cgo/gcc.go
Original file line number Diff line number Diff line change
Expand Up @@ -1095,8 +1095,8 @@ func (p *Package) mangle(f *File, arg *ast.Expr) (ast.Expr, bool) {
return *arg, needsUnsafe
}

// checkIndex checks whether arg the form &a[i], possibly inside type
// conversions. If so, it writes
// checkIndex checks whether arg has the form &a[i], possibly inside
// type conversions. If so, it writes
// _cgoIndexNN := a
// _cgoNN := &cgoIndexNN[i] // with type conversions, if any
// to sb, and writes
Expand Down Expand Up @@ -1135,7 +1135,7 @@ func (p *Package) checkIndex(sb, sbCheck *bytes.Buffer, arg ast.Expr, i int) boo
}

// checkAddr checks whether arg has the form &x, possibly inside type
// conversions. If so it writes
// conversions. If so, it writes
// _cgoBaseNN := &x
// _cgoNN := _cgoBaseNN // with type conversions, if any
// to sb, and writes
Expand Down Expand Up @@ -1232,7 +1232,8 @@ func (p *Package) isConst(f *File, x ast.Expr) bool {
return x.Name == "nil" ||
strings.HasPrefix(x.Name, "_Ciconst_") ||
strings.HasPrefix(x.Name, "_Cfconst_") ||
strings.HasPrefix(x.Name, "_Csconst_")
strings.HasPrefix(x.Name, "_Csconst_") ||
f.Consts[x.Name]
case *ast.UnaryExpr:
return p.isConst(f, x.X)
case *ast.BinaryExpr:
Expand Down
1 change: 1 addition & 0 deletions src/cmd/cgo/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ type File struct {
Name map[string]*Name // map from Go name to Name
NamePos map[*Name]token.Pos // map from Name to position of the first reference
Edit *edit.Buffer
Consts map[string]bool // untyped constants
}

func (f *File) offset(p token.Pos) int {
Expand Down
Loading