- 12 Feb, 2019 7 commits
-
-
Ian Lance Taylor authored
Fixes #30197 Change-Id: I08b592fbd477d6879eb5d3b7fcbbc8322ea90103 Reviewed-on: https://go-review.googlesource.com/c/162078 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Russ Cox authored
This CL modifies ParseInt and ParseUint to recognize 0b and 0o as binary and octal base prefixes when base == 0. See golang.org/design/19308-number-literals for background. For #19308. For #12711. Change-Id: I8efe067f415aa517bdefbff7e230d3fa1694d530 Reviewed-on: https://go-review.googlesource.com/c/160244 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org> Reviewed-by: Rob Pike <r@golang.org>
-
Russ Cox authored
This CL modifies ParseInt, ParseUint, and ParseFloat to accept digit-separating underscores in their arguments. For ParseInt and ParseUint, the underscores are only allowed when base == 0. See golang.org/design/19308-number-literals for background. For #28493. Change-Id: I057ca2539d89314643f591ba8144c3ea7126651c Reviewed-on: https://go-review.googlesource.com/c/160243 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
-
Russ Cox authored
This CL updates FormatFloat to format standard hexadecimal floating-point constants, using the 'x' and 'X' verbs. See golang.org/design/19308-number-literals for background. For #29008. Change-Id: I540b8f71d492cfdb7c58af533d357a564591f28b Reviewed-on: https://go-review.googlesource.com/c/160242 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
-
Russ Cox authored
This CL updates ParseFloat to recognize standard hexadecimal floating-point constants. See golang.org/design/19308-number-literals for background. For #29008. Change-Id: I45f3b0c36b5d92c0e8a4b35c05443a83d7a6d4b3 Reviewed-on: https://go-review.googlesource.com/c/160241 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
-
berkant ipek authored
Change-Id: I15279e4aa9306bde925929907a7b5e7ef5d8b642 GitHub-Last-Rev: 6bc2d66aecd424b322ec0c23b280e74cb22e08c3 GitHub-Pull-Request: golang/go#30193 Reviewed-on: https://go-review.googlesource.com/c/162018Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Robert Griesemer authored
Change-Id: Ia546d3f0a12a3c3c291f7b6d5291193fdd47d7dd Reviewed-on: https://go-review.googlesource.com/c/161966 Run-TryBot: Robert Griesemer <gri@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 11 Feb, 2019 13 commits
-
-
Robert Griesemer authored
Permit shifts by non-constant signed integer shift counts. Share logic for constant shift counts in non-constant shifts and improve error messages a little bit. R=Go1.13 Updates #19113. Change-Id: Ia01d83ca8aa60a6a3f4c49f026e0c46396f852be Reviewed-on: https://go-review.googlesource.com/c/159317 Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Alan Donovan <adonovan@google.com>
-
Robert Griesemer authored
This CL introduces text/scanner support for the new binary and octal integer literals, hexadecimal floats, and digit separators for all number literals. The new code is closely mirroring the respective code for number literals in cmd/compile/internal/syntax/scanner.go. Uniformly use the term "invalid" rather than "illegal" in error messages to match the respective error messages in the other scanners directly. R=Go1.13 Updates #12711. Updates #19308. Updates #28493. Updates #29008. Change-Id: I2f291de13ba5afc0e530cd8326e6bf4c3858ebac Reviewed-on: https://go-review.googlesource.com/c/161199 Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Robert Griesemer authored
The -asmhdr flag is used to generate header files for assembly code such that that code has access to compile-time constants. During the build these constants end up in the (ephemeral) file go_asm.h. For historical reasons, floating-point and complex constants are printed with a 'p' exponent but with decimal mantissa; also, because of the compiler-internal precision of 512 bits, the mantissae are quite large (and conversions are comparatively slow). With the changes to the new Go 2 number literals, the respective upcoming changes to text/scanner (which in turn is used by the assembler) will make text/scanner newly accept hexadecimal floats; but also decimal floats using the incorrect 'p' exponent and report an error in that case. As a consequence, the assembler will report an error when trying to parse the before-mentioned decimal floating-point values which are using 'p' exponents. Since these constants are never needed in the assembly code, do not emit them in the first place. Change-Id: I06c7c96b04e8d062441120107992472f87a651b2 Reviewed-on: https://go-review.googlesource.com/c/161904 Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Robert Griesemer authored
Make sure Scanner.tokEnd is set before we call Scanner.Error and update documentation accordingly. (Until now tokEnd was only set before returning from Scan, so a call to TokenText during error handling may have crashed.) While at it, tighten a check in Scanner.TokenText to ensure Scanner.tokEnd >= Scanner.tokPos if we have a token. Also, silence error messages to Stderr in unrelated TestIllegalExponent. Fixes #29723. Change-Id: Ia97beeae91eaf9e0ed3dada0a806f1f7122461cc Reviewed-on: https://go-review.googlesource.com/c/157819Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
-
Robert Griesemer authored
Rewrite non-decimal number prefixes to always use a lower-case base ("0X" -> "0x", etc.), and rewrite exponents to use a lower-case 'e' or 'p'. Leave hexadecimal digits and 0-octals alone. Comparing the best time of 3 runs of `time go test -run All` with the time for a gofmt that doesn't do the rewrite shows no increase in runtime for this bulk gofmt application (in fact on my machine I see a small decline, probably due to cache effects). R=Go1.13 Updates #12711. Updates #19308. Updates #29008. Change-Id: I9c6ebed2ffa0a6a001c59412a73382090955f5a9 Reviewed-on: https://go-review.googlesource.com/c/160184Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Robert Griesemer authored
This CL ensures that go/types can now handle the new Go 2 number literals. The relevant changes enabling them in go/types were made in go/constant in the CL https://golang.org/cl/160239. R=Go1.13 Updates #12711. Updates #19308. Updates #28493. Updates #29008. Change-Id: I45c1387198fac94769ac59c5301d86b4e1a1ff98 Reviewed-on: https://go-review.googlesource.com/c/160240Reviewed-by: Russ Cox <rsc@golang.org>
-
Robert Griesemer authored
This CL introduces go/constant support for the new binary and octal integer literals, hexadecimal floats, and digit separators for all number literals. R=Go1.13 Updates #12711. Updates #19308. Updates #28493. Updates #29008. Change-Id: I7a55f91b8b6373ae6d98ba923b626d33c5552946 Reviewed-on: https://go-review.googlesource.com/c/160239Reviewed-by: Russ Cox <rsc@golang.org>
-
Robert Griesemer authored
R=Go1.13 Updates #12711. Updates #19308. Updates #28493. Updates #29008. Change-Id: Icd25aa7f6e18ed671ea6cf2b1b292899daf4b1a5 Reviewed-on: https://go-review.googlesource.com/c/160018Reviewed-by: Russ Cox <rsc@golang.org>
-
Robert Griesemer authored
This CL introduces go/scanner support for the new binary and octal integer literals, hexadecimal floats, and digit separators for all number literals. The new code is closely mirroring the respective code for number literals in cmd/compile/internal/syntax/scanner.go. R=Go1.13 Updates #12711. Updates #19308. Updates #28493. Updates #29008. Change-Id: I5315c6aaa7cfc41a618296be20e3acd5114d6b3c Reviewed-on: https://go-review.googlesource.com/c/159997Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
-
Robert Griesemer authored
This CL introduces compiler support for the new binary and octal integer literals, hexadecimal floats, and digit separators for all number literals. The new Go 2 number literal scanner accepts the following liberal format: number = [ prefix ] digits [ "." digits ] [ exponent ] [ "i" ] . prefix = "0" [ "b" |"B" | "o" | "O" | "x" | "X" ] . digits = { digit | "_" } . exponent = ( "e" | "E" | "p" | "P" ) [ "+" | "-" ] digits . If the number starts with "0x" or "0X", digit is any hexadecimal digit; otherwise, digit is any decimal digit. If the accepted number is not valid, errors are reported accordingly. See the new test cases in scanner_test.go for a selection of valid and invalid numbers and the respective error messages. R=Go1.13 Updates #12711. Updates #19308. Updates #28493. Updates #29008. Change-Id: Ic8febc7bd4dc5186b16a8c8897691e81125cf0ca Reviewed-on: https://go-review.googlesource.com/c/157677Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
-
Robert Griesemer authored
The current implementation accepted binary exponents but restricted them to 'p'. This change permits both 'p' and 'P'. R=Go1.13 Updates #29008. Change-Id: I7a89ccb86af4438f17b0422be7cb630ffcf43272 Reviewed-on: https://go-review.googlesource.com/c/159297Reviewed-by: Russ Cox <rsc@golang.org> Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
-
Robert Griesemer authored
Make it possible to "unread" more than one byte before the most recently read rune. Use a better name than ungetr2 and make it slightly more efficient. R=Go1.13 Change-Id: I45d5dfa11e508259a972ca6560d1f78d7a51fe15 Reviewed-on: https://go-review.googlesource.com/c/158957Reviewed-by: Russ Cox <rsc@golang.org>
-
Bryan C. Mills authored
Fixes #30166 Change-Id: I4704b57ed48197f512cd1b818e1f7d2fffc0d9ce Reviewed-on: https://go-review.googlesource.com/c/161898 Run-TryBot: Bryan C. Mills <bcmills@google.com> Reviewed-by: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 10 Feb, 2019 1 commit
-
-
Daniel Martí authored
install.html still insisted that GOROOT must be set if a binary install of Go is set up in a custom directory. However, since 1.10, this has been unnecessary as the GOROOT will be found based on the location of the 'go' binary being run. Likewise, install-source.html includes an 'export GOROOT' line in a section that only talks about explicitly setting GOARCH and GOOS, which is optional. We don't want to have users think it is recommended to set GOROOT here either, so remove the unnecessary line. Change-Id: I7dfef09f9a1d003e0253b793d63ea40d5cf1837f Reviewed-on: https://go-review.googlesource.com/c/161758Reviewed-by: Andrew Bonventre <andybons@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 09 Feb, 2019 2 commits
-
-
Ian Lance Taylor authored
runtime/internal/atomic/atomic_mipsx.go enforces 64-bit alignment. Change-Id: Ifdc36e1c0322827711425054d10f1c52425a13fa Reviewed-on: https://go-review.googlesource.com/c/161697 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
alkesh26 authored
Change-Id: I46046cddceff2d44a7b2517db1ebf7acdf5f2b90 GitHub-Last-Rev: 7fb9f26476d2764f07d068ce612bf79b1e7f44b4 GitHub-Pull-Request: golang/go#30144 Reviewed-on: https://go-review.googlesource.com/c/161718Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 08 Feb, 2019 1 commit
-
-
Justin Li authored
When prepared on a DB, prepared statement code in database/sql handles everything to keep the prepared statement alive as it moves across the connection pool. Understanding this is an important part of using this API correctly, but it was only documented indirectly via `(*Tx) Prepare*`. Change-Id: Ic8757e0150d59e675d9f0252f6c15aef2cc2e831 GitHub-Last-Rev: 55dba87458542cb631baac80aeea0c3607d8f421 GitHub-Pull-Request: golang/go#29890 Reviewed-on: https://go-review.googlesource.com/c/159077Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Daniel Theophanes <kardianos@gmail.com>
-
- 07 Feb, 2019 3 commits
-
-
Filippo Valsorda authored
Most of the issues that led to the decision on #30055 were related to incompatibility with or faulty support for RSA-PSS (#29831, #29779, v1.5 signatures). RSA-PSS is required by TLS 1.3, but is also available to be negotiated in TLS 1.2. Altering TLS 1.2 behavior based on GODEBUG=tls13=1 feels surprising, so just disable RSA-PSS entirely in TLS 1.2 until TLS 1.3 is on by default, so breakage happens all at once. Updates #30055 Change-Id: Iee90454a20ded8895e5302e8bcbcd32e4e3031c2 Reviewed-on: https://go-review.googlesource.com/c/160998 Run-TryBot: Filippo Valsorda <filippo@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Adam Langley <agl@golang.org>
-
Filippo Valsorda authored
Updates #30055 Change-Id: If68615c8e9daa4226125dcc6a6866f29f3cfeef1 Reviewed-on: https://go-review.googlesource.com/c/160997 Run-TryBot: Filippo Valsorda <filippo@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
-
Filippo Valsorda authored
If a certificate somehow has an AKID, it should still chain successfully to a parent without a SKID, even if the latter is invalid according to RFC 5280, because only the Subject is authoritative. This reverts to the behavior before #29233 was fixed in 77013065. Roots with the right subject will still be shadowed by roots with the right SKID and the wrong subject, but that's been the case for a long time, and is left for a more complete fix in Go 1.13. Updates #30079 Change-Id: If8ab0179aca86cb74caa926d1ef93fb5e416b4bb Reviewed-on: https://go-review.googlesource.com/c/161097Reviewed-by: Adam Langley <agl@golang.org>
-
- 06 Feb, 2019 1 commit
-
-
Yasser Abdolmaleki authored
Change-Id: Idee94a1d93555d53442098dd7479982e3f5afbba Reviewed-on: https://go-review.googlesource.com/c/161339Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 05 Feb, 2019 3 commits
-
-
Filippo Valsorda authored
Change-Id: If3bab2dd5278ebc621235164e9d6ff710ba326ee Reviewed-on: https://go-review.googlesource.com/c/160898Reviewed-by: Adam Langley <agl@golang.org>
-
alkesh26 authored
Change-Id: Ia830f59d6f6ca1bc506ec298ccfc154d9f94f01d GitHub-Last-Rev: 3ab18d4fd1a8d4295713cbb7ff74f30b3838b6d3 GitHub-Pull-Request: golang/go#30067 Reviewed-on: https://go-review.googlesource.com/c/160829 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Yuval Pavel Zholkover authored
Fixes #22447 Fixes #22448 Change-Id: Ia24f42c31e014c79040ff927f1247dfb2318de4f Reviewed-on: https://go-review.googlesource.com/c/160778Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
-
- 04 Feb, 2019 3 commits
-
-
Alberto Donizetti authored
Expand modules documentation to clarify why @none is useful. The wording is the one suggested by rsc on the issue. Fixes #26684 Change-Id: I76dc4ff87e50f1dd8536fd9ac1fd938adb29bee3 Reviewed-on: https://go-review.googlesource.com/c/161037Reviewed-by: Bryan C. Mills <bcmills@google.com>
-
spring1843 authored
Change-Id: Ib0a0d04aaaaa3c213fdb8646bd9b7dfdadae40d4 Reviewed-on: https://go-review.googlesource.com/c/160831Reviewed-by: Filippo Valsorda <filippo@golang.org>
-
Ian Lance Taylor authored
Fixes #30065 Change-Id: I3d0fb03bab397548653d5f3b386cfe2980ac1030 Reviewed-on: https://go-review.googlesource.com/c/160830 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
- 01 Feb, 2019 4 commits
-
-
Keith Randall authored
Make sure the argument to memmove is of pointer type before we try to get the element type. This has been noticed for code that uses unsafe+linkname so it can call runtime.memmove. Probably not the best thing to allow, but the code is out there and we'd rather not break it unnecessarily. Fixes #30061 Change-Id: I334a8453f2e293959fd742044c43fbe93f0b3d31 Reviewed-on: https://go-review.googlesource.com/c/160826 Run-TryBot: Keith Randall <khr@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Cherry Zhang authored
We are copying the results to uninitialized stack space. Write barrier is not needed. Fixes #30041. Change-Id: Ia91d74dbafd96dc2bd92de0cb479808991dda03e Reviewed-on: https://go-review.googlesource.com/c/160737 Run-TryBot: Cherry Zhang <cherryyz@google.com> Reviewed-by: Keith Randall <khr@golang.org>
-
Ian Lance Taylor authored
Fixes #30043 Change-Id: I4ecfff7d8a9432240c1927f7484786fe1182b773 Reviewed-on: https://go-review.googlesource.com/c/160797Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Yuval Pavel Zholkover authored
CL 159859 causes build failure with old clang versions (3.4.1) on FreeBSD 10.3/10.4. Update #29962 Update #27619 Change-Id: I78264ac5d8d17eeae89a982e89aac988eb22b286 Reviewed-on: https://go-review.googlesource.com/c/160777 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
- 31 Jan, 2019 2 commits
-
-
Michael Anthony Knyszek authored
When scavenging small amounts it's possible we over-scavenge by a significant margin since we choose to scavenge the largest spans first. This over-scavenging is never accounted for. With this change, we add a scavenge credit pool, similar to the reclaim credit pool. Any time scavenging triggered by RSS growth starts up, it checks if it can cash in some credit first. If after using all the credit it still needs to scavenge, then any extra it does it adds back into the credit pool. This change mitigates the performance impact of golang.org/cl/159500 on the Garbage benchmark. On Go1 it suggests some improvements, but most of that is within the realm of noise (Revcomp seems very sensitive to GC-related changes, both postively and negatively). Garbage: https://perf.golang.org/search?q=upload:20190131.5 Go1: https://perf.golang.org/search?q=upload:20190131.4 Performance change with both changes: Garbage: https://perf.golang.org/search?q=upload:20190131.7 Go1: https://perf.golang.org/search?q=upload:20190131.6 Change-Id: I87bd3c183e71656fdafef94714194b9fdbb77aa2 Reviewed-on: https://go-review.googlesource.com/c/160297Reviewed-by: Austin Clements <austin@google.com>
-
Michael Anthony Knyszek authored
Because scavenged and unscavenged spans no longer coalesce, memory that is freed no longer has a high likelihood of being re-scavenged. As a result, if an application is allocating at a fast rate, it may work fast enough to undo all the scavenging work performed by the runtime's current scavenging mechanisms. This behavior is exacerbated by the global best-fit allocation policy the runtime uses, since scavenged spans are just as likely to be chosen as unscavenged spans on average. To remedy that, we treat each allocation of scavenged space as a heap growth, and scavenge other memory to make up for the allocation. This change makes performance of the runtime slightly worse, as now we're scavenging more often during allocation. The regression is particularly obvious with the garbage benchmark (3%) but most of the Go1 benchmarks are within the margin of noise. A follow-up change should help. Garbage: https://perf.golang.org/search?q=upload:20190131.3 Go1: https://perf.golang.org/search?q=upload:20190131.2 Updates #14045. Change-Id: I44a7e6586eca33b5f97b6d40418db53a8a7ae715 Reviewed-on: https://go-review.googlesource.com/c/159500Reviewed-by: Austin Clements <austin@google.com>
-