aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/compiler/compiler.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2017-09-04 19:52:51 +0200
committerDmitry Vyukov <dvyukov@google.com>2017-09-04 20:25:22 +0200
commit4ee497d22e8872462ee1aad5aa96b68e27b4657e (patch)
tree019349c74acb1dfc4af1a580a9cba9ad31945358 /pkg/compiler/compiler.go
parent8c64b078d1c954972b9f0132a753cdcec1b80d9b (diff)
pkg/compiler: use correct arch ptr size
Diffstat (limited to 'pkg/compiler/compiler.go')
-rw-r--r--pkg/compiler/compiler.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/compiler/compiler.go b/pkg/compiler/compiler.go
index fe3f28d77..f08a32987 100644
--- a/pkg/compiler/compiler.go
+++ b/pkg/compiler/compiler.go
@@ -43,14 +43,14 @@ type Prog struct {
}
// Compile compiles sys description.
-func Compile(desc *ast.Description, consts map[string]uint64, eh ast.ErrorHandler) *Prog {
+func Compile(desc *ast.Description, consts map[string]uint64, ptrSize uint64, eh ast.ErrorHandler) *Prog {
if eh == nil {
eh = ast.LoggingHandler
}
comp := &compiler{
desc: ast.Clone(desc),
eh: eh,
- ptrSize: 8, // TODO(dvyukov): must be provided by target
+ ptrSize: ptrSize,
unsupported: make(map[string]bool),
resources: make(map[string]*ast.Resource),
structs: make(map[string]*ast.Struct),