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

Issue 5453043: code review 5453043: runtime: prep for type-specific algorithms (Closed)

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

Description

runtime: prep for type-specific algorithms Equality on structs will require arbitrary code for type equality, so change algorithm in type data from uint8 to table pointer. In the process, trim top-level map structure from 104/80 bytes (64-bit/32-bit) to 24/12. Equality on structs will require being able to call code generated by the Go compiler, and C code has no way to access Go return values, so change the hash and equal algorithm functions to take a pointer to a result instead of returning the result.

Patch Set 1 #

Patch Set 2 : diff -r adff3701bfc7 https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r adff3701bfc7 https://go.googlecode.com/hg/ #

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

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

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

Patch Set 7 : diff -r adff3701bfc7 https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+669 lines, -721 lines) Patch
M src/cmd/gc/builtin.c.boot View 1 1 chunk +105 lines, -105 lines 0 comments Download
M src/cmd/gc/go.h View 1 1 chunk +0 lines, -29 lines 0 comments Download
M src/cmd/gc/range.c View 1 1 chunk +3 lines, -1 line 0 comments Download
M src/cmd/gc/reflect.c View 1 3 chunks +8 lines, -2 lines 0 comments Download
M src/cmd/gc/runtime.go View 1 1 chunk +1 line, -1 line 0 comments Download
M src/cmd/gc/walk.c View 1 1 chunk +1 line, -1 line 0 comments Download
M src/cmd/ld/dwarf.c View 1 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/reflect/type.go View 1 1 chunk +2 lines, -1 line 0 comments Download
M src/pkg/runtime/Makefile View 1 1 chunk +1 line, -0 lines 0 comments Download
A src/pkg/runtime/alg.c View 1 2 3 5 6 1 chunk +345 lines, -0 lines 0 comments Download
M src/pkg/runtime/chan.c View 1 2 chunks +2 lines, -7 lines 0 comments Download
M src/pkg/runtime/hashmap.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M src/pkg/runtime/hashmap.c View 1 37 chunks +103 lines, -188 lines 0 comments Download
M src/pkg/runtime/iface.c View 1 7 chunks +37 lines, -26 lines 0 comments Download
M src/pkg/runtime/runtime.h View 1 6 chunks +44 lines, -14 lines 0 comments Download
M src/pkg/runtime/runtime.c View 1 1 chunk +0 lines, -332 lines 0 comments Download
M src/pkg/runtime/slice.c View 1 2 chunks +3 lines, -3 lines 0 comments Download
M src/pkg/runtime/type.h View 1 1 chunk +2 lines, -1 line 0 comments Download
M src/pkg/runtime/type.go View 1 1 chunk +10 lines, -9 lines 0 comments Download

Messages

Total messages: 2
rsc
Hello ken2 (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
13 years, 3 months ago (2011-12-05 14:37:03 UTC) #1
rsc
13 years, 3 months ago (2011-12-05 14:40:32 UTC) #2
*** Submitted as http://code.google.com/p/go/source/detail?r=90ea2b3effcf ***

runtime: prep for type-specific algorithms

Equality on structs will require arbitrary code for type equality,
so change algorithm in type data from uint8 to table pointer.
In the process, trim top-level map structure from
104/80 bytes (64-bit/32-bit) to 24/12.

Equality on structs will require being able to call code generated
by the Go compiler, and C code has no way to access Go return
values, so change the hash and equal algorithm functions to take
a pointer to a result instead of returning the result.

R=ken
CC=golang-dev
http://codereview.appspot.com/5453043
Sign in to reply to this message.

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