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

Issue 7363054: code review 7363054: go/types: fix sizeof computations (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years ago by gri
Modified:
12 years ago
Reviewers:
CC:
adonovan, axw, golang-dev
Visibility:
Public.

Description

go/types: fix sizeof computations Context.Alignof/Offsetsof/Sizeof now provide means to customize the type checker for a given platform. - provide Context.Offsetsof to specify the offsets of struct fields - use the correct sizes for ints, uint, uintptrs in constant computations - moved all size computations into separate file (sizes.go) - fixed a bug with string constant slicing

Patch Set 1 #

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

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

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

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

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

Patch Set 7 : diff -r a7ea286f5569 https://code.google.com/p/go #

Total comments: 12

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

Unified diffs Side-by-side diffs Delta from patch set Stats (+339 lines, -250 lines) Patch
M src/pkg/exp/ssa/importer.go View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/go/types/api.go View 1 2 3 4 5 6 7 1 chunk +13 lines, -10 lines 0 comments Download
M src/pkg/go/types/builtins.go View 1 2 3 4 chunks +9 lines, -94 lines 0 comments Download
M src/pkg/go/types/check.go View 1 2 3 1 chunk +1 line, -3 lines 0 comments Download
M src/pkg/go/types/const.go View 1 7 chunks +27 lines, -43 lines 0 comments Download
M src/pkg/go/types/conversions.go View 1 2 chunks +3 lines, -3 lines 0 comments Download
M src/pkg/go/types/expr.go View 1 2 3 4 5 6 7 17 chunks +20 lines, -39 lines 0 comments Download
M src/pkg/go/types/gcimporter.go View 1 2 3 7 chunks +6 lines, -8 lines 0 comments Download
M src/pkg/go/types/gcimporter_test.go View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M src/pkg/go/types/operand.go View 1 2 3 4 5 6 7 13 chunks +28 lines, -22 lines 0 comments Download
A src/pkg/go/types/sizes.go View 1 2 3 4 5 6 7 1 chunk +162 lines, -0 lines 0 comments Download
M src/pkg/go/types/stmt.go View 1 2 chunks +2 lines, -2 lines 0 comments Download
M src/pkg/go/types/testdata/builtins.src View 1 2 3 4 5 chunks +49 lines, -15 lines 0 comments Download
M src/pkg/go/types/testdata/decls1.src View 1 1 chunk +2 lines, -2 lines 0 comments Download
M src/pkg/go/types/testdata/expr3.src View 1 2 3 4 1 chunk +10 lines, -0 lines 0 comments Download
M src/pkg/go/types/types.go View 1 2 3 4 5 6 7 1 chunk +4 lines, -6 lines 0 comments Download

Messages

Total messages: 5
gri
Hello adonovan@google.com, axwalk@gmail.com (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go
12 years ago (2013-02-25 22:36:25 UTC) #1
adonovan
LGTM https://codereview.appspot.com/7363054/diff/17001/src/pkg/go/types/types.go File src/pkg/go/types/types.go (right): https://codereview.appspot.com/7363054/diff/17001/src/pkg/go/types/types.go#newcode125 src/pkg/go/types/types.go:125: offsets []int64 // field offsets in bytes, lazily ...
12 years ago (2013-02-26 04:56:49 UTC) #2
axw
A few quibbles, but otherwise LGTM. https://codereview.appspot.com/7363054/diff/17001/src/pkg/go/types/api.go File src/pkg/go/types/api.go (right): https://codereview.appspot.com/7363054/diff/17001/src/pkg/go/types/api.go#newcode64 src/pkg/go/types/api.go:64: // of the ...
12 years ago (2013-02-26 05:02:09 UTC) #3
gri
Thanks for the careful review. - gri https://codereview.appspot.com/7363054/diff/17001/src/pkg/go/types/api.go File src/pkg/go/types/api.go (right): https://codereview.appspot.com/7363054/diff/17001/src/pkg/go/types/api.go#newcode64 src/pkg/go/types/api.go:64: // of ...
12 years ago (2013-02-26 06:00:12 UTC) #4
gri
12 years ago (2013-02-26 06:07:13 UTC) #5
*** Submitted as https://code.google.com/p/go/source/detail?r=512627a9cdb8 ***

go/types: fix sizeof computations

Context.Alignof/Offsetsof/Sizeof now provide means
to customize the type checker for a given platform.

- provide Context.Offsetsof to specify the
  offsets of struct fields
- use the correct sizes for ints, uint, uintptrs
  in constant computations
- moved all size computations into separate file
  (sizes.go)
- fixed a bug with string constant slicing

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

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