<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/go-git.git/src/cmd/compile, branch dev.cmdgo</title>
<subtitle>github.com: golang/go
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/'/>
<entry>
<title>cmd/compile/internal/syntax: make valid type parameter list in presence of errors</title>
<updated>2021-08-27T05:13:44+00:00</updated>
<author>
<name>Robert Griesemer</name>
<email>gri@golang.org</email>
</author>
<published>2021-08-26T21:52:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=2c60a99f723e779a39664b5f12cb41878fd4a700'/>
<id>2c60a99f723e779a39664b5f12cb41878fd4a700</id>
<content type='text'>
Make sure the parser fills in names and types for type parameter
lists, even in the case of errors.

While at it, adjust some of the test functions to accept generic
code and report all syntax errors.

Added offending source as test for types2.

Fixes #47996.

Change-Id: I449bcf5e2cb80fa2a24cdd3945f484bfca218a06
Reviewed-on: https://go-review.googlesource.com/c/go/+/345476
Trust: Robert Griesemer &lt;gri@golang.org&gt;
Reviewed-by: Matthew Dempsky &lt;mdempsky@google.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make sure the parser fills in names and types for type parameter
lists, even in the case of errors.

While at it, adjust some of the test functions to accept generic
code and report all syntax errors.

Added offending source as test for types2.

Fixes #47996.

Change-Id: I449bcf5e2cb80fa2a24cdd3945f484bfca218a06
Reviewed-on: https://go-review.googlesource.com/c/go/+/345476
Trust: Robert Griesemer &lt;gri@golang.org&gt;
Reviewed-by: Matthew Dempsky &lt;mdempsky@google.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd/compile: eagerly CalcStructSize for synthetic ABI types</title>
<updated>2021-08-27T03:24:35+00:00</updated>
<author>
<name>Matthew Dempsky</name>
<email>mdempsky@google.com</email>
</author>
<published>2021-08-26T23:57:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=d350a6653252fe1f698ac00be99964fa31d06e89'/>
<id>d350a6653252fe1f698ac00be99964fa31d06e89</id>
<content type='text'>
The next CL is going to replace Type.Width with Type.Size(), but
Type.Size() isn't safe to call concurrently. So this CL calls
CalcStructSize, which *is* allowed to be used concurrently, but then
it's the caller's responsibility to ensure it's called right after
NewStruct.

Change-Id: If9cd81650ccb3a867b4449af757375fa56227901
Reviewed-on: https://go-review.googlesource.com/c/go/+/345483
Trust: Matthew Dempsky &lt;mdempsky@google.com&gt;
Run-TryBot: Matthew Dempsky &lt;mdempsky@google.com&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
Reviewed-by: Robert Griesemer &lt;gri@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The next CL is going to replace Type.Width with Type.Size(), but
Type.Size() isn't safe to call concurrently. So this CL calls
CalcStructSize, which *is* allowed to be used concurrently, but then
it's the caller's responsibility to ensure it's called right after
NewStruct.

Change-Id: If9cd81650ccb3a867b4449af757375fa56227901
Reviewed-on: https://go-review.googlesource.com/c/go/+/345483
Trust: Matthew Dempsky &lt;mdempsky@google.com&gt;
Run-TryBot: Matthew Dempsky &lt;mdempsky@google.com&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
Reviewed-by: Robert Griesemer &lt;gri@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd/compile: delay fillinMethods to deal with mutually-recursive types</title>
<updated>2021-08-27T01:42:38+00:00</updated>
<author>
<name>Dan Scales</name>
<email>danscales@google.com</email>
</author>
<published>2021-08-18T13:28:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=d7e2e2ec2b2a11c2bfb98a27c03d0dccba62c4fb'/>
<id>d7e2e2ec2b2a11c2bfb98a27c03d0dccba62c4fb</id>
<content type='text'>
We need to delay fillinMethods until we get to a top-level type, so we
know all the TFORW types have been filled in, and we can do the
substitutions required by fillinMethods.

Fixes #47710

Change-Id: I298de7e7753ed31a2c2b1ff04f35177a8afc7a66
Reviewed-on: https://go-review.googlesource.com/c/go/+/345149
Trust: Dan Scales &lt;danscales@google.com&gt;
Reviewed-by: Keith Randall &lt;khr@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We need to delay fillinMethods until we get to a top-level type, so we
know all the TFORW types have been filled in, and we can do the
substitutions required by fillinMethods.

Fixes #47710

Change-Id: I298de7e7753ed31a2c2b1ff04f35177a8afc7a66
Reviewed-on: https://go-review.googlesource.com/c/go/+/345149
Trust: Dan Scales &lt;danscales@google.com&gt;
Reviewed-by: Keith Randall &lt;khr@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd/compile: eliminate repetitive code</title>
<updated>2021-08-27T01:08:12+00:00</updated>
<author>
<name>wangyuntao</name>
<email>ytcoode@gmail.com</email>
</author>
<published>2021-07-16T10:29:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=c92759978372ffc354f83e08b1dd6fa496e9b545'/>
<id>c92759978372ffc354f83e08b1dd6fa496e9b545</id>
<content type='text'>
Change-Id: I02c8b65f7c1c1606c9964ab6c54d5ab5f1b444a5
GitHub-Last-Rev: 3d740b9ac129d38981ee295456d2d7f803a79b77
GitHub-Pull-Request: golang/go#47242
Reviewed-on: https://go-review.googlesource.com/c/go/+/334990
Run-TryBot: Cuong Manh Le &lt;cuong.manhle.vn@gmail.com&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
Reviewed-by: Matthew Dempsky &lt;mdempsky@google.com&gt;
Trust: Cuong Manh Le &lt;cuong.manhle.vn@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: I02c8b65f7c1c1606c9964ab6c54d5ab5f1b444a5
GitHub-Last-Rev: 3d740b9ac129d38981ee295456d2d7f803a79b77
GitHub-Pull-Request: golang/go#47242
Reviewed-on: https://go-review.googlesource.com/c/go/+/334990
Run-TryBot: Cuong Manh Le &lt;cuong.manhle.vn@gmail.com&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
Reviewed-by: Matthew Dempsky &lt;mdempsky@google.com&gt;
Trust: Cuong Manh Le &lt;cuong.manhle.vn@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd/compile: add types.RecalcSize</title>
<updated>2021-08-27T00:36:54+00:00</updated>
<author>
<name>Matthew Dempsky</name>
<email>mdempsky@google.com</email>
</author>
<published>2021-08-26T22:54:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=62f88b6dc8782cedf1a945e4992abda3bc0ad67d'/>
<id>62f88b6dc8782cedf1a945e4992abda3bc0ad67d</id>
<content type='text'>
This is the only case where Align is assigned outside of package
types. Rather than adding a SetAlign method, adding a RecalcSize
function is a bit more descriptive.

Change-Id: I1b3c01ebd0e41183665baa63c926592865bbbd0b
Reviewed-on: https://go-review.googlesource.com/c/go/+/345479
Trust: Matthew Dempsky &lt;mdempsky@google.com&gt;
Run-TryBot: Matthew Dempsky &lt;mdempsky@google.com&gt;
Reviewed-by: Robert Griesemer &lt;gri@golang.org&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is the only case where Align is assigned outside of package
types. Rather than adding a SetAlign method, adding a RecalcSize
function is a bit more descriptive.

Change-Id: I1b3c01ebd0e41183665baa63c926592865bbbd0b
Reviewed-on: https://go-review.googlesource.com/c/go/+/345479
Trust: Matthew Dempsky &lt;mdempsky@google.com&gt;
Run-TryBot: Matthew Dempsky &lt;mdempsky@google.com&gt;
Reviewed-by: Robert Griesemer &lt;gri@golang.org&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd/compile: remove ssagen/pgen_test.go</title>
<updated>2021-08-27T00:36:45+00:00</updated>
<author>
<name>Matthew Dempsky</name>
<email>mdempsky@google.com</email>
</author>
<published>2021-08-26T22:30:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=e7eee5e265440b0ed3b76093ccdfd776facc767a'/>
<id>e7eee5e265440b0ed3b76093ccdfd776facc767a</id>
<content type='text'>
This test was written in 2015, and hasn't had any meaningful changes
to it since. However, it's very ad hoc and pokes into internals that
it shouldn't, and it keeps getting in the way of more meaningful
refactorings. It doesn't even catch bugs; e.g., it didn't catch that
cmpstackvarlt wasn't asymmetric (CL 19778), and a bunch of its test
cases are bogus because we never actually use it to sort ir.PFUNC
nodes (assert added in this CL).

The compiler is woefully lacking in unit tests like these, but I
strongly feel this test is more of a hinderance than a help at the
moment.

Change-Id: I3ac7a3e533947aa95f325626c6eec13a43789f9d
Reviewed-on: https://go-review.googlesource.com/c/go/+/345478
Trust: Matthew Dempsky &lt;mdempsky@google.com&gt;
Run-TryBot: Matthew Dempsky &lt;mdempsky@google.com&gt;
Reviewed-by: Robert Griesemer &lt;gri@golang.org&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This test was written in 2015, and hasn't had any meaningful changes
to it since. However, it's very ad hoc and pokes into internals that
it shouldn't, and it keeps getting in the way of more meaningful
refactorings. It doesn't even catch bugs; e.g., it didn't catch that
cmpstackvarlt wasn't asymmetric (CL 19778), and a bunch of its test
cases are bogus because we never actually use it to sort ir.PFUNC
nodes (assert added in this CL).

The compiler is woefully lacking in unit tests like these, but I
strongly feel this test is more of a hinderance than a help at the
moment.

Change-Id: I3ac7a3e533947aa95f325626c6eec13a43789f9d
Reviewed-on: https://go-review.googlesource.com/c/go/+/345478
Trust: Matthew Dempsky &lt;mdempsky@google.com&gt;
Run-TryBot: Matthew Dempsky &lt;mdempsky@google.com&gt;
Reviewed-by: Robert Griesemer &lt;gri@golang.org&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd/compile: use typecheck.InitUniverse in unit tests</title>
<updated>2021-08-27T00:36:19+00:00</updated>
<author>
<name>Matthew Dempsky</name>
<email>mdempsky@google.com</email>
</author>
<published>2021-08-26T21:16:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=f153b6739b30c1e99f8646f2dafc77a92204f10d'/>
<id>f153b6739b30c1e99f8646f2dafc77a92204f10d</id>
<content type='text'>
Rather than ad hoc setting up the universe, just initialize it
properly.

Change-Id: I18484b952321f55eb3e1e48fd383068a4ee75f66
Reviewed-on: https://go-review.googlesource.com/c/go/+/345475
Trust: Matthew Dempsky &lt;mdempsky@google.com&gt;
Run-TryBot: Matthew Dempsky &lt;mdempsky@google.com&gt;
Reviewed-by: Robert Griesemer &lt;gri@golang.org&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Rather than ad hoc setting up the universe, just initialize it
properly.

Change-Id: I18484b952321f55eb3e1e48fd383068a4ee75f66
Reviewed-on: https://go-review.googlesource.com/c/go/+/345475
Trust: Matthew Dempsky &lt;mdempsky@google.com&gt;
Run-TryBot: Matthew Dempsky &lt;mdempsky@google.com&gt;
Reviewed-by: Robert Griesemer &lt;gri@golang.org&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd/compile: move types init code into package types</title>
<updated>2021-08-26T22:37:54+00:00</updated>
<author>
<name>Matthew Dempsky</name>
<email>mdempsky@google.com</email>
</author>
<published>2021-08-26T20:17:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=967a8017f7d41717335ee020e46e2c55c5c9e96e'/>
<id>967a8017f7d41717335ee020e46e2c55c5c9e96e</id>
<content type='text'>
This moves the package types setup code from package typecheck into
package types itself. This is a prereq for making types.Type more
opaque, because some unit tests depend on being able to init the basic
universal types.

A few notable details of this CL:

1. Creating the builtin types requires being able to create the
ir.Name/ir.OTYPE that represents it, but package types can't depend on
package ir. So we add a callback function to handle creating the
ir.Name.

2. This CL moves ir.Pkgs.Unsafe to types.UnsafePkg. Package unsafe is
part of the language, not like the other ir.Pkgs packages that are
purely implementation details.

3. This CL also moves typecheck.FakeRecv to types.FakeRecv, addressing
an outstanding TODO.

Change-Id: I64de04ce82fbcd1bb59f547e2eea3cda52d89429
Reviewed-on: https://go-review.googlesource.com/c/go/+/345474
Trust: Matthew Dempsky &lt;mdempsky@google.com&gt;
Run-TryBot: Matthew Dempsky &lt;mdempsky@google.com&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
Reviewed-by: Robert Griesemer &lt;gri@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This moves the package types setup code from package typecheck into
package types itself. This is a prereq for making types.Type more
opaque, because some unit tests depend on being able to init the basic
universal types.

A few notable details of this CL:

1. Creating the builtin types requires being able to create the
ir.Name/ir.OTYPE that represents it, but package types can't depend on
package ir. So we add a callback function to handle creating the
ir.Name.

2. This CL moves ir.Pkgs.Unsafe to types.UnsafePkg. Package unsafe is
part of the language, not like the other ir.Pkgs packages that are
purely implementation details.

3. This CL also moves typecheck.FakeRecv to types.FakeRecv, addressing
an outstanding TODO.

Change-Id: I64de04ce82fbcd1bb59f547e2eea3cda52d89429
Reviewed-on: https://go-review.googlesource.com/c/go/+/345474
Trust: Matthew Dempsky &lt;mdempsky@google.com&gt;
Run-TryBot: Matthew Dempsky &lt;mdempsky@google.com&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
Reviewed-by: Robert Griesemer &lt;gri@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd/compile/internal/types2: do not declare new methods on instantiated types</title>
<updated>2021-08-26T20:39:56+00:00</updated>
<author>
<name>Robert Griesemer</name>
<email>gri@golang.org</email>
</author>
<published>2021-08-26T19:27:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=af80af22b507ae23ae04372f30b98f7720c85f8a'/>
<id>af80af22b507ae23ae04372f30b98f7720c85f8a</id>
<content type='text'>
Report an error if an alias is used to declare a method on an
instantiated type.

Also, when resolving the receiver type, don't use asNamed to
avoid premature expansion of the type.

Fixes #47968.

Change-Id: Ie5acc4cfb1944deaaeeaee98707f31e256f8ef5e
Reviewed-on: https://go-review.googlesource.com/c/go/+/345472
Trust: Robert Griesemer &lt;gri@golang.org&gt;
Reviewed-by: Matthew Dempsky &lt;mdempsky@google.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Report an error if an alias is used to declare a method on an
instantiated type.

Also, when resolving the receiver type, don't use asNamed to
avoid premature expansion of the type.

Fixes #47968.

Change-Id: Ie5acc4cfb1944deaaeeaee98707f31e256f8ef5e
Reviewed-on: https://go-review.googlesource.com/c/go/+/345472
Trust: Robert Griesemer &lt;gri@golang.org&gt;
Reviewed-by: Matthew Dempsky &lt;mdempsky@google.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd/compile/internal/types2: implement TypeList.String (debugging support)</title>
<updated>2021-08-26T20:39:50+00:00</updated>
<author>
<name>Robert Griesemer</name>
<email>gri@golang.org</email>
</author>
<published>2021-08-26T18:56:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=03db2c24136939416903b284a19905d97ceea40d'/>
<id>03db2c24136939416903b284a19905d97ceea40d</id>
<content type='text'>
Change-Id: Iaa203def3dac94a7d5ff6120e89315c3d7977ee1
Reviewed-on: https://go-review.googlesource.com/c/go/+/345471
Trust: Robert Griesemer &lt;gri@golang.org&gt;
Reviewed-by: Matthew Dempsky &lt;mdempsky@google.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: Iaa203def3dac94a7d5ff6120e89315c3d7977ee1
Reviewed-on: https://go-review.googlesource.com/c/go/+/345471
Trust: Robert Griesemer &lt;gri@golang.org&gt;
Reviewed-by: Matthew Dempsky &lt;mdempsky@google.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
