diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2018-01-07 20:07:51 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2018-01-08 12:52:31 +0100 |
| commit | f01cb93788a4efb4a69309a84774de5427da71ad (patch) | |
| tree | 26f948329d4a13bdb5a3fde82cb9ff79b63ee7eb /pkg | |
| parent | 402a0dc87e7d51812a18fa76feeb46d66efda175 (diff) | |
pkg/compiler: make signalno a type alias
We don't need compiler support for such things anymore,
now we simply can do:
type signalno int32[0:65]
Diffstat (limited to 'pkg')
| -rw-r--r-- | pkg/compiler/types.go | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/pkg/compiler/types.go b/pkg/compiler/types.go index fbd44c0fa..6174bb193 100644 --- a/pkg/compiler/types.go +++ b/pkg/compiler/types.go @@ -278,24 +278,6 @@ var typeVMA = &typeDesc{ }, } -// TODO(dvyukov): perhaps, we need something like typedefs for such types. -// So that users can introduce them as necessary without modifying compiler: -// type signalno int32[0:64] -var typeSignalno = &typeDesc{ - Names: []string{"signalno"}, - CanBeArg: true, - CantBeOpt: true, - Gen: func(comp *compiler, t *ast.Type, args []*ast.Type, base prog.IntTypeCommon) prog.Type { - base.TypeSize = 4 - return &prog.IntType{ - IntTypeCommon: base, - Kind: prog.IntRange, - RangeBegin: 0, - RangeEnd: 65, - } - }, -} - var typeCsum = &typeDesc{ Names: []string{"csum"}, NeedBase: true, @@ -678,7 +660,6 @@ func init() { typeFilename, typeFileoff, // make a type alias typeVMA, - typeSignalno, // make a type alias typeCsum, typeProc, typeText, |
