aboutsummaryrefslogtreecommitdiff
path: root/libgo/go/exp/eval/compiler.go
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2011-01-21 18:19:03 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2011-01-21 18:19:03 +0000
commitff5f50c52c421d75940ef9392211e3ab24d71332 (patch)
tree27d8768fb1d25696d3c40b42535eb5e073c278da /libgo/go/exp/eval/compiler.go
parentd6ed1c8903e728f4233122554bab5910853338bd (diff)
downloadgcc-ff5f50c52c421d75940ef9392211e3ab24d71332.zip
gcc-ff5f50c52c421d75940ef9392211e3ab24d71332.tar.gz
gcc-ff5f50c52c421d75940ef9392211e3ab24d71332.tar.bz2
Remove the types float and complex.
Update to current version of Go library. Update testsuite for removed types. * go-lang.c (go_langhook_init): Omit float_type_size when calling go_create_gogo. * go-c.h: Update declaration of go_create_gogo. From-SVN: r169098
Diffstat (limited to 'libgo/go/exp/eval/compiler.go')
-rw-r--r--libgo/go/exp/eval/compiler.go14
1 files changed, 5 insertions, 9 deletions
diff --git a/libgo/go/exp/eval/compiler.go b/libgo/go/exp/eval/compiler.go
index 764df8e..9d2923b 100644
--- a/libgo/go/exp/eval/compiler.go
+++ b/libgo/go/exp/eval/compiler.go
@@ -11,24 +11,20 @@ import (
)
-type positioned interface {
- Pos() token.Position
-}
-
-
// A compiler captures information used throughout an entire
// compilation. Currently it includes only the error handler.
//
// TODO(austin) This might actually represent package level, in which
// case it should be package compiler.
type compiler struct {
+ fset *token.FileSet
errors scanner.ErrorHandler
numErrors int
silentErrors int
}
-func (a *compiler) diagAt(pos positioned, format string, args ...interface{}) {
- a.errors.Error(pos.Pos(), fmt.Sprintf(format, args...))
+func (a *compiler) diagAt(pos token.Pos, format string, args ...interface{}) {
+ a.errors.Error(a.fset.Position(pos), fmt.Sprintf(format, args...))
a.numErrors++
}
@@ -64,9 +60,9 @@ type label struct {
continuePC *uint
// The position where this label was resolved. If it has not
// been resolved yet, an invalid position.
- resolved token.Position
+ resolved token.Pos
// The position where this label was first jumped to.
- used token.Position
+ used token.Pos
}
// A funcCompiler captures information used throughout the compilation