From f01cb93788a4efb4a69309a84774de5427da71ad Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Sun, 7 Jan 2018 20:07:51 +0100 Subject: 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] --- pkg/compiler/types.go | 19 ------------------- 1 file changed, 19 deletions(-) (limited to 'pkg') 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, -- cgit mrf-deployment