builtins.carbon 4.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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. // INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon
  6. // EXTRA-ARGS: --dump-raw-sem-ir --builtin-sem-ir
  7. //
  8. // AUTOUPDATE
  9. // TIP: To test this file alone, run:
  10. // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/basics/raw_sem_ir/builtins.carbon
  11. // TIP: To dump output, run:
  12. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/basics/raw_sem_ir/builtins.carbon
  13. // CHECK:STDOUT: ---
  14. // CHECK:STDOUT: filename: builtins.carbon
  15. // CHECK:STDOUT: sem_ir:
  16. // CHECK:STDOUT: import_irs:
  17. // CHECK:STDOUT: ir0: {decl_id: inst<none>, is_export: false}
  18. // CHECK:STDOUT: ir1: {decl_id: inst<none>, is_export: false}
  19. // CHECK:STDOUT: import_ir_insts: {}
  20. // CHECK:STDOUT: name_scopes:
  21. // CHECK:STDOUT: name_scope0: {inst: inst15, parent_scope: name_scope<none>, has_error: false, extended_scopes: [], names: {}}
  22. // CHECK:STDOUT: entity_names: {}
  23. // CHECK:STDOUT: functions: {}
  24. // CHECK:STDOUT: classes: {}
  25. // CHECK:STDOUT: generics: {}
  26. // CHECK:STDOUT: specifics: {}
  27. // CHECK:STDOUT: struct_type_fields:
  28. // CHECK:STDOUT: struct_type_fields0: {}
  29. // CHECK:STDOUT: types:
  30. // CHECK:STDOUT: 'type(TypeType)':
  31. // CHECK:STDOUT: value_repr: {kind: copy, type: type(TypeType)}
  32. // CHECK:STDOUT: 'type(Error)':
  33. // CHECK:STDOUT: value_repr: {kind: copy, type: type(Error)}
  34. // CHECK:STDOUT: 'type(inst(NamespaceType))':
  35. // CHECK:STDOUT: value_repr: {kind: copy, type: type(inst(NamespaceType))}
  36. // CHECK:STDOUT: insts:
  37. // CHECK:STDOUT: 'inst(TypeType)': {kind: TypeType, type: type(TypeType)}
  38. // CHECK:STDOUT: 'inst(AutoType)': {kind: AutoType, type: type(TypeType)}
  39. // CHECK:STDOUT: 'inst(BoolType)': {kind: BoolType, type: type(TypeType)}
  40. // CHECK:STDOUT: 'inst(BoundMethodType)': {kind: BoundMethodType, type: type(TypeType)}
  41. // CHECK:STDOUT: 'inst(CharLiteralType)': {kind: CharLiteralType, type: type(TypeType)}
  42. // CHECK:STDOUT: 'inst(ErrorInst)': {kind: ErrorInst, type: type(Error)}
  43. // CHECK:STDOUT: 'inst(ImplWitnessTablePlaceholder)': {kind: ImplWitnessTablePlaceholder, type: type(TypeType)}
  44. // CHECK:STDOUT: 'inst(InstType)': {kind: InstType, type: type(TypeType)}
  45. // CHECK:STDOUT: 'inst(IntLiteralType)': {kind: IntLiteralType, type: type(TypeType)}
  46. // CHECK:STDOUT: 'inst(LegacyFloatType)': {kind: LegacyFloatType, type: type(TypeType)}
  47. // CHECK:STDOUT: 'inst(NamespaceType)': {kind: NamespaceType, type: type(TypeType)}
  48. // CHECK:STDOUT: 'inst(SpecificFunctionType)': {kind: SpecificFunctionType, type: type(TypeType)}
  49. // CHECK:STDOUT: 'inst(StringType)': {kind: StringType, type: type(TypeType)}
  50. // CHECK:STDOUT: 'inst(VtableType)': {kind: VtableType, type: type(TypeType)}
  51. // CHECK:STDOUT: 'inst(WitnessType)': {kind: WitnessType, type: type(TypeType)}
  52. // CHECK:STDOUT: inst15: {kind: Namespace, arg0: name_scope0, arg1: inst<none>, type: type(inst(NamespaceType))}
  53. // CHECK:STDOUT: constant_values:
  54. // CHECK:STDOUT: values:
  55. // CHECK:STDOUT: 'inst(TypeType)': concrete_constant(inst(TypeType))
  56. // CHECK:STDOUT: 'inst(AutoType)': concrete_constant(inst(AutoType))
  57. // CHECK:STDOUT: 'inst(BoolType)': concrete_constant(inst(BoolType))
  58. // CHECK:STDOUT: 'inst(BoundMethodType)': concrete_constant(inst(BoundMethodType))
  59. // CHECK:STDOUT: 'inst(CharLiteralType)': concrete_constant(inst(CharLiteralType))
  60. // CHECK:STDOUT: 'inst(ErrorInst)': concrete_constant(inst(ErrorInst))
  61. // CHECK:STDOUT: 'inst(ImplWitnessTablePlaceholder)': concrete_constant(inst(ImplWitnessTablePlaceholder))
  62. // CHECK:STDOUT: 'inst(InstType)': concrete_constant(inst(InstType))
  63. // CHECK:STDOUT: 'inst(IntLiteralType)': concrete_constant(inst(IntLiteralType))
  64. // CHECK:STDOUT: 'inst(LegacyFloatType)': concrete_constant(inst(LegacyFloatType))
  65. // CHECK:STDOUT: 'inst(NamespaceType)': concrete_constant(inst(NamespaceType))
  66. // CHECK:STDOUT: 'inst(SpecificFunctionType)': concrete_constant(inst(SpecificFunctionType))
  67. // CHECK:STDOUT: 'inst(StringType)': concrete_constant(inst(StringType))
  68. // CHECK:STDOUT: 'inst(VtableType)': concrete_constant(inst(VtableType))
  69. // CHECK:STDOUT: 'inst(WitnessType)': concrete_constant(inst(WitnessType))
  70. // CHECK:STDOUT: inst15: concrete_constant(inst15)
  71. // CHECK:STDOUT: symbolic_constants: {}
  72. // CHECK:STDOUT: inst_blocks:
  73. // CHECK:STDOUT: inst_block_empty: {}
  74. // CHECK:STDOUT: exports: {}
  75. // CHECK:STDOUT: imports: {}
  76. // CHECK:STDOUT: global_init: {}
  77. // CHECK:STDOUT: inst_block4:
  78. // CHECK:STDOUT: 0: inst15
  79. // CHECK:STDOUT: ...