builtin_insts.carbon 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. // Exceptions. See /LICENSE for license information.
  3. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. //
  5. // ARGS: compile --no-prelude-import --phase=check --dump-raw-sem-ir --builtin-sem-ir %s
  6. //
  7. // AUTOUPDATE
  8. // TIP: To test this file alone, run:
  9. // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/basics/builtin_insts.carbon
  10. // TIP: To dump output, run:
  11. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/basics/builtin_insts.carbon
  12. // CHECK:STDOUT: ---
  13. // CHECK:STDOUT: filename: builtin_insts.carbon
  14. // CHECK:STDOUT: sem_ir:
  15. // CHECK:STDOUT: import_irs:
  16. // CHECK:STDOUT: ir0: {decl_id: inst<invalid>, is_export: false}
  17. // CHECK:STDOUT: import_ir_insts: {}
  18. // CHECK:STDOUT: name_scopes:
  19. // CHECK:STDOUT: name_scope0: {inst: inst+0, parent_scope: name_scope<invalid>, has_error: false, extended_scopes: [], names: {}}
  20. // CHECK:STDOUT: entity_names: {}
  21. // CHECK:STDOUT: functions: {}
  22. // CHECK:STDOUT: classes: {}
  23. // CHECK:STDOUT: generics: {}
  24. // CHECK:STDOUT: specifics: {}
  25. // CHECK:STDOUT: types:
  26. // CHECK:STDOUT: typeTypeType: {kind: copy, type: typeTypeType}
  27. // CHECK:STDOUT: typeError: {kind: copy, type: typeError}
  28. // CHECK:STDOUT: 'type(instNamespaceType)': {kind: copy, type: type(instNamespaceType)}
  29. // CHECK:STDOUT: type_blocks: {}
  30. // CHECK:STDOUT: insts:
  31. // CHECK:STDOUT: instTypeType: {kind: BuiltinInst, arg0: TypeType, type: typeTypeType}
  32. // CHECK:STDOUT: instError: {kind: BuiltinInst, arg0: Error, type: typeError}
  33. // CHECK:STDOUT: instAutoType: {kind: BuiltinInst, arg0: AutoType, type: typeTypeType}
  34. // CHECK:STDOUT: instBoolType: {kind: BuiltinInst, arg0: BoolType, type: typeTypeType}
  35. // CHECK:STDOUT: instIntLiteralType: {kind: BuiltinInst, arg0: IntLiteralType, type: typeTypeType}
  36. // CHECK:STDOUT: instIntType: {kind: BuiltinInst, arg0: IntType, type: typeTypeType}
  37. // CHECK:STDOUT: instFloatType: {kind: BuiltinInst, arg0: FloatType, type: typeTypeType}
  38. // CHECK:STDOUT: instStringType: {kind: BuiltinInst, arg0: StringType, type: typeTypeType}
  39. // CHECK:STDOUT: instBoundMethodType: {kind: BuiltinInst, arg0: BoundMethodType, type: typeTypeType}
  40. // CHECK:STDOUT: instSpecificFunctionType: {kind: BuiltinInst, arg0: SpecificFunctionType, type: typeTypeType}
  41. // CHECK:STDOUT: instNamespaceType: {kind: BuiltinInst, arg0: NamespaceType, type: typeTypeType}
  42. // CHECK:STDOUT: instWitnessType: {kind: BuiltinInst, arg0: WitnessType, type: typeTypeType}
  43. // CHECK:STDOUT: instVtableType: {kind: BuiltinInst, arg0: VtableType, type: typeTypeType}
  44. // CHECK:STDOUT: 'inst+0': {kind: Namespace, arg0: name_scope0, arg1: inst<invalid>, type: type(instNamespaceType)}
  45. // CHECK:STDOUT: constant_values:
  46. // CHECK:STDOUT: instTypeType: templateConstant(instTypeType)
  47. // CHECK:STDOUT: instError: templateConstant(instError)
  48. // CHECK:STDOUT: instAutoType: templateConstant(instAutoType)
  49. // CHECK:STDOUT: instBoolType: templateConstant(instBoolType)
  50. // CHECK:STDOUT: instIntLiteralType: templateConstant(instIntLiteralType)
  51. // CHECK:STDOUT: instIntType: templateConstant(instIntType)
  52. // CHECK:STDOUT: instFloatType: templateConstant(instFloatType)
  53. // CHECK:STDOUT: instStringType: templateConstant(instStringType)
  54. // CHECK:STDOUT: instBoundMethodType: templateConstant(instBoundMethodType)
  55. // CHECK:STDOUT: instSpecificFunctionType: templateConstant(instSpecificFunctionType)
  56. // CHECK:STDOUT: instNamespaceType: templateConstant(instNamespaceType)
  57. // CHECK:STDOUT: instWitnessType: templateConstant(instWitnessType)
  58. // CHECK:STDOUT: instVtableType: templateConstant(instVtableType)
  59. // CHECK:STDOUT: 'inst+0': templateConstant(inst+0)
  60. // CHECK:STDOUT: symbolic_constants: {}
  61. // CHECK:STDOUT: inst_blocks:
  62. // CHECK:STDOUT: empty: {}
  63. // CHECK:STDOUT: exports: {}
  64. // CHECK:STDOUT: import_refs: {}
  65. // CHECK:STDOUT: global_init: {}
  66. // CHECK:STDOUT: block4:
  67. // CHECK:STDOUT: 0: inst+0
  68. // CHECK:STDOUT: ...