MCPcopy Create free account
hub / github.com/google/gapid / ty

Method ty

gapil/bapi/decode.go:1320–1346  ·  view source on GitHub ↗
(p *Type)

Source from the content-addressed store, hash-verified

1318}
1319
1320func (d *decoder) ty(p *Type) semantic.Type {
1321 if p == nil {
1322 return nil
1323 }
1324 switch p := protoutil.OneOf(p).(type) {
1325 case *Type_Builtin:
1326 return d.builtin(p.Builtin)
1327 case *Type_Class:
1328 return d.class(p.Class)
1329 case *Type_Enum:
1330 return d.enum(p.Enum)
1331 case *Type_Map:
1332 return d.map_(p.Map)
1333 case *Type_Pointer:
1334 return d.pointer(p.Pointer)
1335 case *Type_Pseudonym:
1336 return d.pseudonym(p.Pseudonym)
1337 case *Type_Reference:
1338 return d.reference(p.Reference)
1339 case *Type_Slice:
1340 return d.slice(p.Slice)
1341 case *Type_StaticArray:
1342 return d.array(p.StaticArray)
1343 default:
1344 panic(fmt.Errorf("Unhandled type %T", p))
1345 }
1346}
1347
1348func (d *decoder) uint8Value(uint8ValueID uint64) semantic.Uint8Value {
1349 return semantic.Uint8Value(d.content.Instances.Uint8Value[uint8ValueID-1].Value)

Callers 15

arrayMethod · 0.95
arrayInitMethod · 0.95
binaryOpMethod · 0.95
callMethod · 0.95
castMethod · 0.95
enumMethod · 0.95
fieldMethod · 0.95
globalMethod · 0.95
lengthMethod · 0.95
localMethod · 0.95
map_Method · 0.95
nullMethod · 0.95

Calls 9

builtinMethod · 0.95
classMethod · 0.95
enumMethod · 0.95
map_Method · 0.95
pointerMethod · 0.95
pseudonymMethod · 0.95
referenceMethod · 0.95
sliceMethod · 0.95
arrayMethod · 0.95

Tested by

no test coverage detected