github.com/llvm-mirror/llgo@v0.0.0-20190322182713-bf6f0a60fce1/third_party/gotools/go/importer/predefined.go (about) 1 // Copyright 2014 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 package importer 6 7 import "llvm.org/llgo/third_party/gotools/go/types" 8 9 const ( 10 magic = "\n$$ exports $$\n" 11 version = "v0" 12 ) 13 14 // Tags. Must be < 0. 15 const ( 16 // Packages 17 packageTag = -(iota + 1) 18 19 // Objects 20 constTag 21 typeTag 22 varTag 23 funcTag 24 25 // Types 26 arrayTag 27 sliceTag 28 structTag 29 pointerTag 30 signatureTag 31 interfaceTag 32 mapTag 33 chanTag 34 namedTag 35 36 // Values 37 falseTag 38 trueTag 39 int64Tag 40 floatTag 41 fractionTag 42 complexTag 43 stringTag 44 ) 45 46 var predeclared = []types.Type{ 47 // basic types 48 types.Typ[types.Bool], 49 types.Typ[types.Int], 50 types.Typ[types.Int8], 51 types.Typ[types.Int16], 52 types.Typ[types.Int32], 53 types.Typ[types.Int64], 54 types.Typ[types.Uint], 55 types.Typ[types.Uint8], 56 types.Typ[types.Uint16], 57 types.Typ[types.Uint32], 58 types.Typ[types.Uint64], 59 types.Typ[types.Uintptr], 60 types.Typ[types.Float32], 61 types.Typ[types.Float64], 62 types.Typ[types.Complex64], 63 types.Typ[types.Complex128], 64 types.Typ[types.String], 65 66 // untyped types 67 types.Typ[types.UntypedBool], 68 types.Typ[types.UntypedInt], 69 types.Typ[types.UntypedRune], 70 types.Typ[types.UntypedFloat], 71 types.Typ[types.UntypedComplex], 72 types.Typ[types.UntypedString], 73 types.Typ[types.UntypedNil], 74 75 // package unsafe 76 types.Typ[types.UnsafePointer], 77 78 // aliases 79 types.UniverseByte, 80 types.UniverseRune, 81 82 types.Universe.Lookup("error").Type(), 83 }