]> Cypherpunks repositories - gostls13.git/commit
go/types: support for customizable Alignof, Sizeof
authorRobert Griesemer <gri@golang.org>
Wed, 20 Feb 2013 19:10:17 +0000 (11:10 -0800)
committerRobert Griesemer <gri@golang.org>
Wed, 20 Feb 2013 19:10:17 +0000 (11:10 -0800)
commit75e7308be8dc13e53b4f39aad67f286e79ac5313
treefa564754c8754c542ea2bae88f2f2716bb2cd5f9
parent1e063eea38fe3ecc8bea4e35bc0482fa8100ea80
go/types: support for customizable Alignof, Sizeof

(Offsetof is a function of Alignof and Sizeof.)

- removed IntSize, PtrSize from Context (set Sizeof instead)
- GcImporter needs a Context now (it needs to have
  access to Sizeof/Alignof)
- removed exported Size field from Basic (use Sizeof)
- added Offset to Field
- added Alignment, Size to Struct

R=adonovan
CC=golang-dev
https://golang.org/cl/7357046
15 files changed:
src/pkg/exp/ssa/builder.go
src/pkg/exp/ssa/importer.go
src/pkg/go/types/api.go
src/pkg/go/types/builtins.go
src/pkg/go/types/check.go
src/pkg/go/types/check_test.go
src/pkg/go/types/const.go
src/pkg/go/types/expr.go
src/pkg/go/types/gcimporter.go
src/pkg/go/types/gcimporter_test.go
src/pkg/go/types/operand.go
src/pkg/go/types/predicates.go
src/pkg/go/types/resolver_test.go
src/pkg/go/types/testdata/builtins.src
src/pkg/go/types/types.go