<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/go-git.git/src/cmd/api/testdata, branch dev.ssa</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>go/constant: switch to floating-point representation when fractions become too large</title>
<updated>2015-12-14T23:42:01+00:00</updated>
<author>
<name>Robert Griesemer</name>
<email>gri@golang.org</email>
</author>
<published>2015-12-03T01:41:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=d0c17461a785a03781e4cdbd18f7f3ba04d4b9db'/>
<id>d0c17461a785a03781e4cdbd18f7f3ba04d4b9db</id>
<content type='text'>
Use two internal representations for Float values (similar to what is done
for Int values). Transparently switch to a big.Float representation when
big.Rat values become unwieldy. This is almost never needed for real-world
programs but it is trivial to create test cases that cannot be handled with
rational arithmetic alone.

As a consequence, the go/constant API semantics changes slightly: Until now,
a value could always be represented in its "smallest" form (e.g., float values
that happened to be integers would be represented as integers). Now, constant
Kind depends on how the value was created, rather than its actual value. (The
reason why we cannot automatically "normalize" values to their smallest form
anymore is because floating-point numbers are not exact in general; and thus
normalization is often not possible in the first place, or would throw away
precision when it is not desired.) This has repercussions as to how constant
Values are used go/types and required corresponding adjustments.

Details of the changes:

go/constant package:
- use big.Rat and big.Float values to represent floating-point values
  (internal change)
- changed semantic of Value.Kind accordingly
- String now returns a short, human-readable form of a value
  (this leads to better error messages in go/types)
- added ToInt, ToFloat, and ToComplex conversion functions
- added ExactString to obtain an exact string form of a value

go/types:
- adjusted and simplified implementation of representableConst
- adjusted various places where Value.Kind was expected to be "smallest"
  by calling the respective ToInt/Float/Complex conversion functions
- enabled 5 disabled tests in stdlib_test.go that now work

api checker:
- print all constant values in a short human-readable form (floats are
  printed in floating-point form), but also print an exact form if it
  is different from the short form
- adjusted test golden file and go.1.1.text reference file

Fixes #11327.

Change-Id: I492b704aae5b0238e5b7cee13e18ffce61193587
Reviewed-on: https://go-review.googlesource.com/17360
Reviewed-by: Alan Donovan &lt;adonovan@google.com&gt;
Run-TryBot: Robert Griesemer &lt;gri@golang.org&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use two internal representations for Float values (similar to what is done
for Int values). Transparently switch to a big.Float representation when
big.Rat values become unwieldy. This is almost never needed for real-world
programs but it is trivial to create test cases that cannot be handled with
rational arithmetic alone.

As a consequence, the go/constant API semantics changes slightly: Until now,
a value could always be represented in its "smallest" form (e.g., float values
that happened to be integers would be represented as integers). Now, constant
Kind depends on how the value was created, rather than its actual value. (The
reason why we cannot automatically "normalize" values to their smallest form
anymore is because floating-point numbers are not exact in general; and thus
normalization is often not possible in the first place, or would throw away
precision when it is not desired.) This has repercussions as to how constant
Values are used go/types and required corresponding adjustments.

Details of the changes:

go/constant package:
- use big.Rat and big.Float values to represent floating-point values
  (internal change)
- changed semantic of Value.Kind accordingly
- String now returns a short, human-readable form of a value
  (this leads to better error messages in go/types)
- added ToInt, ToFloat, and ToComplex conversion functions
- added ExactString to obtain an exact string form of a value

go/types:
- adjusted and simplified implementation of representableConst
- adjusted various places where Value.Kind was expected to be "smallest"
  by calling the respective ToInt/Float/Complex conversion functions
- enabled 5 disabled tests in stdlib_test.go that now work

api checker:
- print all constant values in a short human-readable form (floats are
  printed in floating-point form), but also print an exact form if it
  is different from the short form
- adjusted test golden file and go.1.1.text reference file

Fixes #11327.

Change-Id: I492b704aae5b0238e5b7cee13e18ffce61193587
Reviewed-on: https://go-review.googlesource.com/17360
Reviewed-by: Alan Donovan &lt;adonovan@google.com&gt;
Run-TryBot: Robert Griesemer &lt;gri@golang.org&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd/api: include constant values</title>
<updated>2013-09-06T19:01:01+00:00</updated>
<author>
<name>Brad Fitzpatrick</name>
<email>bradfitz@golang.org</email>
</author>
<published>2013-09-06T19:01:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=8a70b50b1f486319a3e6c1707d49bd90192f32d8'/>
<id>8a70b50b1f486319a3e6c1707d49bd90192f32d8</id>
<content type='text'>
Update #5935

R=golang-dev, rsc, iant, dave
CC=golang-dev
https://golang.org/cl/13261050
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Update #5935

R=golang-dev, rsc, iant, dave
CC=golang-dev
https://golang.org/cl/13261050
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd/api: rewrite using go/types</title>
<updated>2013-08-08T21:10:59+00:00</updated>
<author>
<name>Robert Griesemer</name>
<email>gri@golang.org</email>
</author>
<published>2013-08-08T21:10:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=9449c18ac8c130df000283d5d533f4cecf6b3afe'/>
<id>9449c18ac8c130df000283d5d533f4cecf6b3afe</id>
<content type='text'>
- adjusted test files so that they actually type-check
- adjusted go1.txt, go1.1.txt, next.txt
- to run, provide build tag: api_tool

Fixes #4538.

R=bradfitz
CC=golang-dev
https://golang.org/cl/12300043
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- adjusted test files so that they actually type-check
- adjusted go1.txt, go1.1.txt, next.txt
- to run, provide build tag: api_tool

Fixes #4538.

R=bradfitz
CC=golang-dev
https://golang.org/cl/12300043
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd/api: normalize byte to uint8 and rune to int32</title>
<updated>2013-01-29T00:45:45+00:00</updated>
<author>
<name>Brad Fitzpatrick</name>
<email>bradfitz@golang.org</email>
</author>
<published>2013-01-29T00:45:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=0e1305abc2e1e7dad8af5a319779b393114931de'/>
<id>0e1305abc2e1e7dad8af5a319779b393114931de</id>
<content type='text'>
R=golang-dev, adg, mikioh.mikioh
CC=golang-dev
https://golang.org/cl/7195049
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
R=golang-dev, adg, mikioh.mikioh
CC=golang-dev
https://golang.org/cl/7195049
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd/api: fix type scrubbing</title>
<updated>2013-01-22T22:29:38+00:00</updated>
<author>
<name>Brad Fitzpatrick</name>
<email>bradfitz@golang.org</email>
</author>
<published>2013-01-22T22:29:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=93d92d51ddccbbc689f4b9adeded4f310ba0c363'/>
<id>93d92d51ddccbbc689f4b9adeded4f310ba0c363</id>
<content type='text'>
It wasn't removing names from func parameters for func types,
and it was handling "a, b string" as "string", not "string, string".

Fixes #4688

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/7181051
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It wasn't removing names from func parameters for func types,
and it was handling "a, b string" as "string", not "string, string".

Fixes #4688

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/7181051
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd/api: speed up API check by 2x, caching parser.ParseFile calls</title>
<updated>2012-11-19T21:50:20+00:00</updated>
<author>
<name>Brad Fitzpatrick</name>
<email>bradfitz@golang.org</email>
</author>
<published>2012-11-19T21:50:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=aeca7a7cd21cb512ac19fa2f8d0555fb13bdd8f3'/>
<id>aeca7a7cd21cb512ac19fa2f8d0555fb13bdd8f3</id>
<content type='text'>
Saves 5 seconds on my machine. If Issue 4380 is fixed this
clone can be removed.

Update #4380

R=golang-dev, remyoudompheng, minux.ma, gri
CC=golang-dev
https://golang.org/cl/6845058
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Saves 5 seconds on my machine. If Issue 4380 is fixed this
clone can be removed.

Update #4380

R=golang-dev, remyoudompheng, minux.ma, gri
CC=golang-dev
https://golang.org/cl/6845058
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd/api: bug fix for goapi's lame type checker</title>
<updated>2012-11-08T16:34:54+00:00</updated>
<author>
<name>Brad Fitzpatrick</name>
<email>bradfitz@golang.org</email>
</author>
<published>2012-11-08T16:34:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=a384b5b9c38289cb2b912d8c38a201fee6500663'/>
<id>a384b5b9c38289cb2b912d8c38a201fee6500663</id>
<content type='text'>
This is blocking me submitting the net fd timeout
CL, since goapi chokes on my constant.

The much more extensive fix to goapi's type checker
in pending review in https://golang.org/cl/6742050

But I'd rather get this quick fix in first.

R=golang-dev, mikioh.mikioh
CC=golang-dev
https://golang.org/cl/6818104
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is blocking me submitting the net fd timeout
CL, since goapi chokes on my constant.

The much more extensive fix to goapi's type checker
in pending review in https://golang.org/cl/6742050

But I'd rather get this quick fix in first.

R=golang-dev, mikioh.mikioh
CC=golang-dev
https://golang.org/cl/6818104
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd/api: fix signatures like func(x, y, z int)</title>
<updated>2012-09-18T22:04:12+00:00</updated>
<author>
<name>Mikio Hara</name>
<email>mikioh.mikioh@gmail.com</email>
</author>
<published>2012-09-18T22:04:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=1ad5f87635ee35b8b0053a1a4d2a05d0e892e4d0'/>
<id>1ad5f87635ee35b8b0053a1a4d2a05d0e892e4d0</id>
<content type='text'>
Fixes writing of function parameter, result lists which
consist of multiple named or unnamed items with same type.

Fixes #4011.

R=golang-dev, bsiegert, bradfitz, rsc
CC=golang-dev
https://golang.org/cl/6475062
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes writing of function parameter, result lists which
consist of multiple named or unnamed items with same type.

Fixes #4011.

R=golang-dev, bsiegert, bradfitz, rsc
CC=golang-dev
https://golang.org/cl/6475062
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd/api: allow extension of interfaces with unexported methods</title>
<updated>2012-09-18T19:57:03+00:00</updated>
<author>
<name>Russ Cox</name>
<email>rsc@golang.org</email>
</author>
<published>2012-09-18T19:57:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=a29f3136b40c5a3b5da4034fe5def863d4ad2733'/>
<id>a29f3136b40c5a3b5da4034fe5def863d4ad2733</id>
<content type='text'>
Fixes #4061.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/6525047
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes #4061.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/6525047
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd/api: work on Windows again, and make gccgo files work a bit more</title>
<updated>2012-03-12T00:55:15+00:00</updated>
<author>
<name>Brad Fitzpatrick</name>
<email>bradfitz@golang.org</email>
</author>
<published>2012-03-12T00:55:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=e31fa68a43d71efb73cf0745ab0f911400a40a5e'/>
<id>e31fa68a43d71efb73cf0745ab0f911400a40a5e</id>
<content type='text'>
handle string and []byte conversions.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5754082
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
handle string and []byte conversions.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5754082
</pre>
</div>
</content>
</entry>
</feed>
