Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(55)

Issue 6551067: code review 6551067: runtime: prepare for 64-bit ints (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 6 months ago by rsc
Modified:
12 years, 6 months ago
Reviewers:
CC:
iant, r, dave_cheney.net, remyoudompheng, golang-dev
Visibility:
Public.

Description

runtime: prepare for 64-bit ints This CL makes the runtime understand that the type of the len or cap of a map, slice, or string is 'int', not 'int32', and it is also careful to distinguish between function arguments and results of type 'int' vs type 'int32'. In the runtime, the new typedefs 'intgo' and 'uintgo' refer to Go int and uint. The C types int and uint continue to be unavailable (cause intentional compile errors). This CL does not change the meaning of int, but it should make the eventual change of the meaning of int on amd64 a bit smoother. Update issue 2188.

Patch Set 1 #

Patch Set 2 : diff -r 29cff1e8de4e https://code.google.com/p/go/ #

Patch Set 3 : diff -r 6fdbfbfa8813 https://code.google.com/p/go/ #

Total comments: 2

Patch Set 4 : diff -r 9821ce07edde https://code.google.com/p/go/ #

Total comments: 28

Patch Set 5 : diff -r 4fc7066facc4 https://go.googlecode.com/hg/ #

Patch Set 6 : diff -r e0a3e88ff2ae https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+161 lines, -112 lines) Patch
M src/cmd/dist/goc2c.c View 1 2 6 chunks +40 lines, -16 lines 0 comments Download
M src/pkg/reflect/value.go View 1 2 3 4 5 4 chunks +8 lines, -8 lines 0 comments Download
M src/pkg/runtime/alg.c View 1 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/runtime/chan.c View 1 2 3 4 5 8 chunks +22 lines, -16 lines 0 comments Download
M src/pkg/runtime/cpuprof.c View 1 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/runtime/hashmap.c View 1 2 3 4 3 chunks +3 lines, -4 lines 0 comments Download
M src/pkg/runtime/iface.c View 1 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/runtime/malloc.h View 1 2 3 4 5 2 chunks +10 lines, -1 line 0 comments Download
M src/pkg/runtime/malloc.goc View 1 2 3 4 5 4 chunks +6 lines, -4 lines 0 comments Download
M src/pkg/runtime/mfinal.c View 1 2 3 4 5 4 chunks +4 lines, -4 lines 0 comments Download
M src/pkg/runtime/mgc0.c View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M src/pkg/runtime/mprof.goc View 1 4 chunks +4 lines, -4 lines 0 comments Download
M src/pkg/runtime/print.c View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/runtime/proc.c View 1 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/runtime/runtime.h View 1 2 3 4 5 7 chunks +13 lines, -10 lines 0 comments Download
M src/pkg/runtime/runtime.c View 1 2 chunks +2 lines, -2 lines 0 comments Download
M src/pkg/runtime/runtime1.goc View 1 1 chunk +2 lines, -2 lines 0 comments Download
M src/pkg/runtime/slice.c View 1 8 chunks +22 lines, -16 lines 0 comments Download
M src/pkg/runtime/string.goc View 1 2 3 4 5 13 chunks +17 lines, -17 lines 0 comments Download
M src/pkg/runtime/symtab.c View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 10
rsc
Hello iant, r (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go/
12 years, 6 months ago (2012-09-24 02:49:40 UTC) #1
r
LGTM but wait for iant i like the exposed symmetry break via intgo and uintgo ...
12 years, 6 months ago (2012-09-24 03:28:40 UTC) #2
dave_cheney.net
LGTM. I agree with r, intgo and friends grow on you after a while. http://codereview.appspot.com/6551067/diff/1002/src/pkg/runtime/malloc.h ...
12 years, 6 months ago (2012-09-24 03:58:31 UTC) #3
rsc
> This is an additional place to update when addressing issue 2142. I > think ...
12 years, 6 months ago (2012-09-24 04:08:18 UTC) #4
rsc
> might as well do "Go's uint" for parallelism. Done. Will wait for iant.
12 years, 6 months ago (2012-09-24 04:09:14 UTC) #5
remyoudompheng
http://codereview.appspot.com/6551067/diff/2019/src/pkg/runtime/hashmap.c File src/pkg/runtime/hashmap.c (right): http://codereview.appspot.com/6551067/diff/2019/src/pkg/runtime/hashmap.c#newcode731 src/pkg/runtime/hashmap.c:731: // makemap(typ *Type, hint uint32) (hmap *map[any]any); this seems ...
12 years, 6 months ago (2012-09-24 05:58:12 UTC) #6
rsc
> http://codereview.appspot.com/6551067/diff/2019/src/pkg/runtime/hashmap.c#newcode731 > src/pkg/runtime/hashmap.c:731: // makemap(typ *Type, hint uint32) (hmap > *map[any]any); > this seems ...
12 years, 6 months ago (2012-09-24 16:38:39 UTC) #7
iant
LGTM https://codereview.appspot.com/6551067/diff/2019/src/pkg/reflect/value.go File src/pkg/reflect/value.go (right): https://codereview.appspot.com/6551067/diff/2019/src/pkg/reflect/value.go#newcode2238 src/pkg/reflect/value.go:2238: func chancap(ch iword) int32 s/int32/int/ https://codereview.appspot.com/6551067/diff/2019/src/pkg/reflect/value.go#newcode2240 src/pkg/reflect/value.go:2240: func ...
12 years, 6 months ago (2012-09-24 17:17:07 UTC) #8
rsc
Thank you for all the bug fixes. :-) https://codereview.appspot.com/6551067/diff/2019/src/pkg/reflect/value.go File src/pkg/reflect/value.go (right): https://codereview.appspot.com/6551067/diff/2019/src/pkg/reflect/value.go#newcode2238 src/pkg/reflect/value.go:2238: func ...
12 years, 6 months ago (2012-09-24 18:56:42 UTC) #9
rsc
12 years, 6 months ago (2012-09-24 18:58:38 UTC) #10
*** Submitted as http://code.google.com/p/go/source/detail?r=c341dd763471 ***

runtime: prepare for 64-bit ints

This CL makes the runtime understand that the type of
the len or cap of a map, slice, or string is 'int', not 'int32',
and it is also careful to distinguish between function arguments
and results of type 'int' vs type 'int32'.

In the runtime, the new typedefs 'intgo' and 'uintgo' refer
to Go int and uint. The C types int and uint continue to be
unavailable (cause intentional compile errors).

This CL does not change the meaning of int, but it should make
the eventual change of the meaning of int on amd64 a bit
smoother.

Update issue 2188.

R=iant, r, dave, remyoudompheng
CC=golang-dev
http://codereview.appspot.com/6551067
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b