| 382 | } |
| 383 | |
| 384 | func (d *decoder) builtin(p Builtin) *semantic.Builtin { |
| 385 | switch p { |
| 386 | case Builtin_AnyType: |
| 387 | return semantic.AnyType |
| 388 | case Builtin_BoolType: |
| 389 | return semantic.BoolType |
| 390 | case Builtin_CharType: |
| 391 | return semantic.CharType |
| 392 | case Builtin_Float32Type: |
| 393 | return semantic.Float32Type |
| 394 | case Builtin_Float64Type: |
| 395 | return semantic.Float64Type |
| 396 | case Builtin_IntType: |
| 397 | return semantic.IntType |
| 398 | case Builtin_Int8Type: |
| 399 | return semantic.Int8Type |
| 400 | case Builtin_Int16Type: |
| 401 | return semantic.Int16Type |
| 402 | case Builtin_Int32Type: |
| 403 | return semantic.Int32Type |
| 404 | case Builtin_Int64Type: |
| 405 | return semantic.Int64Type |
| 406 | case Builtin_MessageType: |
| 407 | return semantic.MessageType |
| 408 | case Builtin_SizeType: |
| 409 | return semantic.SizeType |
| 410 | case Builtin_StringType: |
| 411 | return semantic.StringType |
| 412 | case Builtin_UintType: |
| 413 | return semantic.UintType |
| 414 | case Builtin_Uint8Type: |
| 415 | return semantic.Uint8Type |
| 416 | case Builtin_Uint16Type: |
| 417 | return semantic.Uint16Type |
| 418 | case Builtin_Uint32Type: |
| 419 | return semantic.Uint32Type |
| 420 | case Builtin_Uint64Type: |
| 421 | return semantic.Uint64Type |
| 422 | case Builtin_VoidType: |
| 423 | return semantic.VoidType |
| 424 | default: |
| 425 | panic(fmt.Errorf("Unhandled builtin %v", p)) |
| 426 | } |
| 427 | } |
| 428 | |
| 429 | func (d *decoder) call(callID uint64) (out *semantic.Call) { |
| 430 | d.build(d.content.Instances.Call, &d.inst.Call, callID, &out, |