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

Issue 12689046: code review 12689046: cmd/cc, cmd/gc, runtime: Uniquely encode iface and efac... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 10 months ago by cshapiro1
Modified:
11 years, 10 months ago
Reviewers:
rsc
CC:
golang-dev, rsc
Visibility:
Public.

Description

cmd/cc, cmd/gc, runtime: Uniquely encode iface and eface pointers in the pointer map. Prior to this change, pointer maps encoded the disposition of a word using a single bit. A zero signaled a non-pointer value and a one signaled a pointer value. Interface values, which are a effectively a union type, were conservatively labeled as a pointer. This change widens the logical element size of the pointer map to two bits per word. As before, zero signals a non-pointer value and one signals a pointer value. Additionally, a two signals an iface pointer and a three signals an eface pointer. Following other changes to the runtime, values two and three will allow a type information to drive interpretation of the subsequent word so only those interface values containing a pointer value will be scanned.

Patch Set 1 #

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

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

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

Unified diffs Side-by-side diffs Delta from patch set Stats (+24 lines, -12 lines) Patch
M src/cmd/cc/pgen.c View 1 4 chunks +6 lines, -2 lines 0 comments Download
M src/cmd/gc/pgen.c View 1 7 chunks +11 lines, -7 lines 0 comments Download
M src/pkg/runtime/mgc0.c View 1 3 chunks +7 lines, -3 lines 0 comments Download

Messages

Total messages: 3
cshapiro1
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go/
11 years, 10 months ago (2013-08-09 22:34:24 UTC) #1
rsc
LGTM
11 years, 10 months ago (2013-08-09 23:36:16 UTC) #2
cshapiro1
11 years, 10 months ago (2013-08-09 23:48:15 UTC) #3
*** Submitted as https://code.google.com/p/go/source/detail?r=578fe4324aac ***

cmd/cc, cmd/gc, runtime: Uniquely encode iface and eface pointers in the pointer
map.

Prior to this change, pointer maps encoded the disposition of
a word using a single bit.  A zero signaled a non-pointer
value and a one signaled a pointer value.  Interface values,
which are a effectively a union type, were conservatively
labeled as a pointer.

This change widens the logical element size of the pointer map
to two bits per word.  As before, zero signals a non-pointer
value and one signals a pointer value.  Additionally, a two
signals an iface pointer and a three signals an eface pointer.

Following other changes to the runtime, values two and three
will allow a type information to drive interpretation of the
subsequent word so only those interface values containing a
pointer value will be scanned.

R=golang-dev, rsc
CC=golang-dev
https://codereview.appspot.com/12689046
Sign in to reply to this message.

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