Store the reflect.Value in the internal print state. Code is simpler, cleaner,
and a little faster - back to what it was before the change.
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/5299046
The mechanism to record the error in the call is already in place.
Fixes#2382.
R=golang-dev, dsymonds, bradfitz, r
CC=golang-dev
https://golang.org/cl/5307043
cssEscaper escapes using the CSS convention: `\` + hex + optional-space
It outputs the space when the escape could be followed by
a hex digit to distinguish a "\na" from "\u00aa".
It did not output a space when the escape is followed by a space
character so did not distinguish "\n " from "\n".
Currently when doing lookahead, it does not distinguish spaces that
will be escaped later by the same function from ones that will not.
This is correct but suboptimal.
R=nigeltao
CC=golang-dev
https://golang.org/cl/5306042
Move string table to the end of the __LINKEDIT segment.
This change allows Apple's codesign(1) utility to successfully sign
Go binaries, as long as they don't contain DWARF data (-w flag to
8l/6l). This is because codesign(1) expects the string table to be
the last part of the file.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5271050
1. Generate TOC for package pages using template,
instead of using JavaScript magic. This makes the
pages generated by godoc -html easier to export
to other systems.
2. Make TOC one column. It's hard to do two columns
portably without invoking JavaScript.
3. Since the TOC is only one column, show full type
signatures for functions and methods. Many times
that's all you need to see anyway.
4. Name the section after the TOC "Overview".
Naming it something is important, to set it off
from the TOC and so that there's a quick link to
it in the TOC.
For now, some illustrative examples:
http://swtch.com:6060/pkg/io/http://swtch.com:6060/pkg/strings/http://swtch.com:6060/pkg/tabwriter/http://swtch.com:6060/pkg/unicode/Fixes#1982.
R=gri, bradfitz, r
CC=golang-dev
https://golang.org/cl/5303044
If the length of the interpreter string
pushes us over the ELFRESERVE limit, the
resulting error message will be comical.
I was doing some ELF tinkering with a
modified version of 8l when I hit this.
To be clear, the stock linkers wouldn't
hit this without adding about forty more
section headers. We're safe for now. ;)
Also, remove a redundant call to cflush.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5268044
There is no semantic change here, just better errors.
If a function says it takes a byte, and you pass it an int,
the compiler error now says that you need a byte, not
that you need a uint8.
Groundwork for rune.
R=ken2
CC=golang-dev
https://golang.org/cl/5300042
For example, if you are debugging an optimization
problem you can now run
GCFLAGS=-N gotest
This is a convention for make, not for the general build,
so it may go away or be done differently in the eventual
'go' command.
The plan is that people will be able to test their code for
rune safety by doing GCFLAGS=-r.
R=golang-dev, bradfitz, lvd
CC=golang-dev
https://golang.org/cl/5294042
The implementation of splitFirst was broken;
splitFirst("foo/") must be the same as splitFirst("foo").
As a result, ToAbsolute could be simplified, and as a side
effect this fixes a long-standing bug.
Thanks to Luca Greco <luca.greco@alcacoop.it> for doing
the investigation.
Fixes#1157.
R=rsc
CC=golang-dev
https://golang.org/cl/5278050
tls.Conn.Close() didn't close the underlying connection and tried to
do a handshake in order to send the close notify alert.
http didn't look for errors from the TLS handshake.
Fixes#2281.
R=bradfitz
CC=golang-dev
https://golang.org/cl/5283045
This change splits terminal handling from exp/ssh, as suggested
several times in the ssh code review.
shell.go and shell_test.go are copies from exp/ssh with minimal
changes, so don't need another full review. A future CL will remove
that code from exp/ssh.
R=bradfitz, r, dave, rsc
CC=golang-dev
https://golang.org/cl/5278049
Revert workaround in compiler and
revert test for compiler workaround.
Tested that the 386 build continues to fail if
the gc change is made without the reflect change.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5312041
The old m[x] = 0, false syntax will be deleted
in a month or so, once people have had time to
change their code (there is a gofix in a separate CL).
R=ken2
CC=golang-dev
https://golang.org/cl/5265048
The Windows signtool.exe thinks our binaries are 'invalid
Win32 programs' unless the PE linker version field is 3.0
or greater.
This minor change makes it possible to successfully sign
gc-built binaries on Windows.
R=golang-dev, alex.brainman, rsc
CC=golang-dev
https://golang.org/cl/5268045
scanner.Position is the position of the most recently
scanned token. Make sure it is invalid if there is no
token scanned and update corresponding comment. This
is particularly important when reporting errors.
Fixes#2371.
R=r
CC=golang-dev
https://golang.org/cl/5294041
Had been allowing it for use by fmt, but it is too hard to lock down.
Fix other packages not to depend on it.
R=r, r
CC=golang-dev
https://golang.org/cl/5266054
Previously, Next would call either nextText or nextTag, but nextTag
could also call nextText. Both nextText and nextTag were responsible
for detecting "</a" end tags and "<!" comments. This change simplifies
the call chain and puts that responsibility in a single place.
R=andybalholm
CC=golang-dev
https://golang.org/cl/5263050