Skip to content

Commit b8540fc

Browse files
committed
[dev.garbage] all: merge dev.cc (493ad916c3b1) into dev.garbage
TBR=austin CC=golang-codereviews https://golang.org/cl/179290043
2 parents 273507a + a236804 commit b8540fc

File tree

207 files changed

+4734
-11182
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

207 files changed

+4734
-11182
lines changed

.hgtags

+1
Original file line numberDiff line numberDiff line change
@@ -136,3 +136,4 @@ f8b50ad4cac4d4c4ecf48324b4f512f65e82cc1c go1.3beta1
136136
f44017549ff9c3cc5eef74ebe7276cd0dfc066b6 go1.3.3
137137
f44017549ff9c3cc5eef74ebe7276cd0dfc066b6 release
138138
1fdfd7dfaedb1b7702141617e621ab7328a236a1 go1.4beta1
139+
bffdd0cae380ce1ccf3e98ed6b6cd53fece7ba72 go1.4rc1

AUTHORS

+1-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ Egon Elbre <[email protected]>
145145
Ehren Kret <[email protected]>
146146
Eivind Uggedal <[email protected]>
147147
Elias Naur <[email protected]>
148-
Emil Hessman <[email protected]>
148+
149149
Eoghan Sherry <[email protected]>
150150
Eric Clark <[email protected]>
151151
Eric Milliken <[email protected]>

CONTRIBUTORS

+2-1
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ Egon Elbre <[email protected]>
214214
Ehren Kret <[email protected]>
215215
Eivind Uggedal <[email protected]>
216216
Elias Naur <[email protected]>
217-
Emil Hessman <[email protected]>
217+
218218
Eoghan Sherry <[email protected]>
219219
Eric Clark <[email protected]>
220220
Eric Milliken <[email protected]>
@@ -452,6 +452,7 @@ Nicholas Katsaros <[email protected]>
452452
453453
Nicholas Sullivan <[email protected]>
454454
Nicholas Waples <[email protected]>
455+
Nick Cooper <[email protected]>
455456
456457
Nicolas Kaiser <[email protected]>
457458
Nicolas Owens <[email protected]>

doc/go1.4.html

+60-5
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
<h2 id="introduction">Introduction to Go 1.4</h2>
88

99
<p>
10-
The latest Go release, version 1.4, arrives as scheduled six months after 1.3
11-
and contains only one tiny language change,
12-
a possibly breaking change to the compiler,
13-
a backwards-compatible simple form of <code>for</code>-<code>range</code> loop.
10+
The latest Go release, version 1.4, arrives as scheduled six months after 1.3.
11+
It contains only one tiny language change,
12+
in the form of a backwards-compatible simple variant of <code>for</code>-<code>range</code> loop,
13+
and a possibly breaking change to the compiler involving methods on pointers-to-pointers.
1414
The release focuses primarily on implementation work, improving the garbage collector
1515
and preparing the ground for a fully concurrent collector to be rolled out in the
1616
next few releases.
@@ -20,7 +20,7 @@ <h2 id="introduction">Introduction to Go 1.4</h2>
2020
There are some new tools available including support in the <code>go</code> command
2121
for build-time source code generation.
2222
The release also adds support for ARM processors on Android and Native Client (NaCl)
23-
and AMD64 on Plan 9.
23+
and for AMD64 on Plan 9.
2424
As always, Go 1.4 keeps the <a href="/doc/go1compat.html">promise
2525
of compatibility</a>,
2626
and almost everything
@@ -637,12 +637,29 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
637637

638638
<ul>
639639

640+
<li>
641+
The <a href="/pkg/archive/zip/"><code>archive/zip</code></a> package's
642+
<a href="/pkg/archive/zip/#Writer"><code>Writer</code></a> now supports a
643+
<a href="/pkg/archive/zip/#Writer.Flush"><code>Flush</code></a> method.
644+
</li>
645+
640646
<li>
641647
The <a href="/pkg/compress/flate/"><code>compress/flate</code></a>,
642648
<a href="/pkg/compress/gzip/"><code>compress/gzip</code></a>,
643649
and <a href="/pkg/compress/zlib/"><code>compress/zlib</code></a>
644650
packages now support a <code>Reset</code> method
645651
for the decompressors, allowing them to reuse buffers and improve performance.
652+
The <a href="/pkg/compress/gzip/"><code>compress/gzip</code></a> package also has a
653+
<a href="/pkg/compress/gzip/#Reader.Multistream"><code>Multistream</code></a> method to control support
654+
for multistream files.
655+
</li>
656+
657+
<li>
658+
The <a href="/pkg/crypto/"><code>crypto</code></a> package now has a
659+
<a href="/pkg/crypto/#Signer"><code>Signer</code></a> interface, implemented by the
660+
<code>PrivateKey</code> types in
661+
<a href="/pkg/crypto/ecdsa"><code>crypto/ecdsa</code></a> and
662+
<a href="/pkg/crypto/rsa"><code>crypto/rsa</code></a>.
646663
</li>
647664

648665
<li>
@@ -665,6 +682,16 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
665682
those attacks.)
666683
</li>
667684

685+
<li>
686+
The <a href="/pkg/database/sql/"><code>database/sql</code></a> package can now list all registered
687+
<a href="/pkg/database/sql/#Drivers"><code>Drivers</code></a>.
688+
</li>
689+
690+
<li>
691+
The <a href="/pkg/debug/dwarf/"><code>debug/dwarf</code></a> package now supports
692+
<a href="/pkg/debug/dwarf/#UnspecifiedType"><code>UnspecifiedType</code></a>s.
693+
</li>
694+
668695
<li>
669696
In the <a href="/pkg/encoding/asn1/"><code>encoding/asn1</code></a> package,
670697
optional elements with a default value will now only be omitted if they have that value.
@@ -685,6 +712,11 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
685712
There is no functional change.
686713
</li>
687714

715+
<li>
716+
The <a href="/pkg/encoding/xml/"><code>encoding/xml</code></a> package's
717+
<a href="/pkg/encoding/xml/#Decoder"><code>Decoder</code></a> can now report its input offset.
718+
</li>
719+
688720
<li>
689721
In the <a href="/pkg/fmt/"><code>fmt</code></a> package,
690722
formatting of pointers to maps has changed to be consistent with that of pointers
@@ -693,6 +725,28 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
693725
<code>&amp;map[one:</code> <code>1]</code> rather than as a hexadecimal pointer value.
694726
</li>
695727

728+
<li>
729+
The <a href="/pkg/image/"><code>image</code></a> package's
730+
<a href="/pkg/image/#Image"><code>Image</code></a>
731+
implementations like
732+
<a href="/pkg/image/#RGBA"><code>RGBA</code></a> and
733+
<a href="/pkg/image/#Gray"><code>Gray</code></a> have specialized
734+
<a href="/pkg/image/#RGBA.RGBAAt"><code>RGBAAt</code></a> and
735+
<a href="/pkg/image/#Gray.GrayAt"><code>GrayAt</code></a> methods alongside the general
736+
<a href="/pkg/image/#Image.At"><code>At</code></a> method.
737+
</li>
738+
739+
<li>
740+
The <a href="/pkg/image/png/"><code>image/png</code></a> package now has an
741+
<a href="/pkg/image/png/#Encoder"><code>Encoder</code></a>
742+
type to control the compression level used for encoding.
743+
</li>
744+
745+
<li>
746+
The <a href="/pkg/math/"><code>math</code></a> package now has a
747+
<a href="/pkg/math/#Nextafter32"><code>Nextafter32</code><a/> function.
748+
</li>
749+
696750
<li>
697751
The <a href="/pkg/net/http/"><code>net/http</code></a> package's
698752
<a href="/pkg/net/http/#Request"><code>Request</code></a> type
@@ -721,6 +775,7 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
721775
now implements symbolic links on the Windows operating system
722776
through the <a href="/pkg/os/#Symlink"><code>Symlink</code></a> function.
723777
Other operating systems already have this functionality.
778+
There is also a new <a href="/pkg/os/#Unsetenv"><code>Unsetenv</code></a> function.
724779
</li>
725780

726781
<li>

doc/go_spec.html

+42-26
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!--{
22
"Title": "The Go Programming Language Specification",
3-
"Subtitle": "Version of October 27, 2014",
3+
"Subtitle": "Version of November 11, 2014",
44
"Path": "/ref/spec"
55
}-->
66

@@ -2521,30 +2521,40 @@ <h3 id="Selectors">Selectors</h3>
25212521
<ol>
25222522
<li>
25232523
For a value <code>x</code> of type <code>T</code> or <code>*T</code>
2524-
where <code>T</code> is not an interface type,
2524+
where <code>T</code> is not a pointer or interface type,
25252525
<code>x.f</code> denotes the field or method at the shallowest depth
25262526
in <code>T</code> where there
25272527
is such an <code>f</code>.
25282528
If there is not exactly <a href="#Uniqueness_of_identifiers">one <code>f</code></a>
25292529
with shallowest depth, the selector expression is illegal.
25302530
</li>
2531+
25312532
<li>
2532-
For a variable <code>x</code> of type <code>I</code> where <code>I</code>
2533+
For a value <code>x</code> of type <code>I</code> where <code>I</code>
25332534
is an interface type, <code>x.f</code> denotes the actual method with name
2534-
<code>f</code> of the value assigned to <code>x</code>.
2535+
<code>f</code> of the dynamic value of <code>x</code>.
25352536
If there is no method with name <code>f</code> in the
25362537
<a href="#Method_sets">method set</a> of <code>I</code>, the selector
25372538
expression is illegal.
25382539
</li>
2540+
2541+
<li>
2542+
As an exception, if the type of <code>x</code> is a named pointer type
2543+
and <code>(*x).f</code> is a valid selector expression denoting a field
2544+
(but not a method), <code>x.f</code> is shorthand for <code>(*x).f</code>.
2545+
</li>
2546+
25392547
<li>
25402548
In all other cases, <code>x.f</code> is illegal.
25412549
</li>
2550+
25422551
<li>
25432552
If <code>x</code> is of pointer type and has the value
25442553
<code>nil</code> and <code>x.f</code> denotes a struct field,
25452554
assigning to or evaluating <code>x.f</code>
25462555
causes a <a href="#Run_time_panics">run-time panic</a>.
25472556
</li>
2557+
25482558
<li>
25492559
If <code>x</code> is of interface type and has the value
25502560
<code>nil</code>, <a href="#Calls">calling</a> or
@@ -2553,18 +2563,6 @@ <h3 id="Selectors">Selectors</h3>
25532563
</li>
25542564
</ol>
25552565

2556-
<p>
2557-
Selectors automatically <a href="#Address_operators">dereference</a>
2558-
pointers to structs.
2559-
If <code>x</code> is a pointer to a struct, <code>x.y</code>
2560-
is shorthand for <code>(*x).y</code>; if the field <code>y</code>
2561-
is also a pointer to a struct, <code>x.y.z</code> is shorthand
2562-
for <code>(*(*x).y).z</code>, and so on.
2563-
If <code>x</code> contains an anonymous field of type <code>*A</code>,
2564-
where <code>A</code> is also a struct type,
2565-
<code>x.f</code> is shorthand for <code>(*x.A).f</code>.
2566-
</p>
2567-
25682566
<p>
25692567
For example, given the declarations:
25702568
</p>
@@ -2574,37 +2572,55 @@ <h3 id="Selectors">Selectors</h3>
25742572
x int
25752573
}
25762574

2577-
func (recv *T0) M0()
2575+
func (*T0) M0()
25782576

25792577
type T1 struct {
25802578
y int
25812579
}
25822580

2583-
func (recv T1) M1()
2581+
func (T1) M1()
25842582

25852583
type T2 struct {
25862584
z int
25872585
T1
25882586
*T0
25892587
}
25902588

2591-
func (recv *T2) M2()
2589+
func (*T2) M2()
25922590

2593-
var p *T2 // with p != nil and p.T0 != nil
2591+
type Q *T2
2592+
2593+
var t T2 // with t.T0 != nil
2594+
var p *T2 // with p != nil and (*p).T0 != nil
2595+
var q Q = p
25942596
</pre>
25952597

25962598
<p>
25972599
one may write:
25982600
</p>
25992601

26002602
<pre>
2601-
p.z // (*p).z
2602-
p.y // ((*p).T1).y
2603-
p.x // (*(*p).T0).x
2603+
t.z // t.z
2604+
t.y // t.T1.y
2605+
t.x // (*t.TO).x
2606+
2607+
p.z // (*p).z
2608+
p.y // (*p).T1.y
2609+
p.x // (*(*p).T0).x
2610+
2611+
q.x // (*(*q).T0).x (*q).x is a valid field selector
2612+
2613+
p.M2() // p.M2() M2 expects *T2 receiver
2614+
p.M1() // ((*p).T1).M1() M1 expects T1 receiver
2615+
p.M0() // ((&(*p).T0)).M0() M0 expects *T0 receiver, see section on Calls
2616+
</pre>
26042617

2605-
p.M2() // (*p).M2()
2606-
p.M1() // ((*p).T1).M1()
2607-
p.M0() // ((*p).T0).M0()
2618+
<p>
2619+
but the following is invalid:
2620+
</p>
2621+
2622+
<pre>
2623+
q.M0() // (*q).M0 is valid but not a field selector
26082624
</pre>
26092625

26102626

doc/gopher/fiveyears.jpg

215 KB
Loading

doc/install.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ <h2 id="requirements">System requirements</h2>
4747
<tr><td>FreeBSD 8 or later</td> <td>amd64, 386, arm</td> <td>Debian GNU/kFreeBSD not supported; FreeBSD/ARM needs FreeBSD 10 or later</td></tr>
4848
<tr><td>Linux 2.6.23 or later with glibc</td> <td>amd64, 386, arm</td> <td>CentOS/RHEL 5.x not supported; no binary distribution for ARM yet</td></tr>
4949
<tr><td>Mac OS X 10.6 or later</td> <td>amd64, 386</td> <td>use the gcc<sup>&#8224;</sup> that comes with Xcode<sup>&#8225;</sup></td></tr>
50-
<tr><td>Windows XP or later</td> <td>amd64, 386</td> <td>use MinGW gcc<sup>&#8224;</sup>. No need for cgywin or msys.</td></tr>
50+
<tr><td>Windows XP or later</td> <td>amd64, 386</td> <td>use MinGW gcc<sup>&#8224;</sup>. No need for cygwin or msys.</td></tr>
5151
</table>
5252

5353
<p>

include/link.h

+8-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ struct Addr
6262
short type;
6363
uint8 index;
6464
int8 scale;
65-
int8 reg; // for 5l, 9l
65+
int8 reg; // for 5l, 9l; GPRs and FPRs both start at 0
6666
int8 name; // for 5l, 9l
6767
int8 class; // for 5l, 9l
6868
uint8 etype; // for 5g, 6g, 8g
@@ -94,6 +94,7 @@ struct Prog
9494
// operands
9595
Addr from;
9696
uchar reg; // arm, power64 only (e.g., ADD from, reg, to);
97+
// starts at 0 for both GPRs and FPRs;
9798
// also used for ADATA width on arm, power64
9899
Addr from3; // power64 only (e.g., RLWM/FMADD from, reg, from3, to)
99100
Addr to;
@@ -626,6 +627,11 @@ extern char* anames9[];
626627
extern char* cnames5[];
627628
extern char* cnames9[];
628629

630+
extern char* dnames5[];
631+
extern char* dnames6[];
632+
extern char* dnames8[];
633+
extern char* dnames9[];
634+
629635
extern LinkArch link386;
630636
extern LinkArch linkamd64;
631637
extern LinkArch linkamd64p32;
@@ -634,6 +640,7 @@ extern LinkArch linkpower64;
634640
extern LinkArch linkpower64le;
635641

636642
#pragma varargck type "A" int
643+
#pragma varargck type "E" uint
637644
#pragma varargck type "D" Addr*
638645
#pragma varargck type "lD" Addr*
639646
#pragma varargck type "P" Prog*

misc/makerelease/makerelease.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ const (
5656
blogPath = "golang.org/x/blog"
5757
toolPath = "golang.org/x/tools"
5858
tourPath = "code.google.com/p/go-tour"
59-
defaultToolTag = "release-branch.go1.3"
60-
defaultTourTag = "release-branch.go1.3"
59+
defaultToolTag = "release-branch.go1.4"
60+
defaultTourTag = "release-branch.go1.4"
6161
)
6262

6363
// Import paths for tool commands.

0 commit comments

Comments
 (0)