mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-03 22:02:51 +01:00
When an `IntLiteral` appears as an operand of an `if` expression, convert it to `i32` for now, so that we don't reject things like `if cond then 1 else 2` due to having a non-constant value of type `IntLiteral`. For tuple indexing expressions such as `(a, b).0`, convert the index to type `IntLiteral`, not to type `i32`. This isn't strictly necessary to do in this PR, but avoids the need to provide an `IntLiteral` -> `i32` implicit conversion for `no_prelude` tests using this syntax.
2653 lines
150 KiB
Plaintext
2653 lines
150 KiB
Plaintext
// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
|
|
// Exceptions. See /LICENSE for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
// AUTOUPDATE
|
|
// TIP: To test this file alone, run:
|
|
// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/struct/import.carbon
|
|
// TIP: To dump output, run:
|
|
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/struct/import.carbon
|
|
|
|
// --- implicit.carbon
|
|
|
|
package Implicit;
|
|
|
|
var a_ref: {.a: i32} = {.a = 0};
|
|
var b_ref: {.a: {.b: i32, .c: (i32,)}, .d: i32} =
|
|
{.a = {.b = 0, .c = (0,)}, .d = 0};
|
|
|
|
class C(S:! {.a: i32, .b: i32}) {}
|
|
fn F() -> C({.a = 1, .b = 2});
|
|
|
|
// --- implicit.impl.carbon
|
|
|
|
impl package Implicit;
|
|
|
|
var a: {.a: i32} = a_ref;
|
|
var b: {.a: {.b: i32, .c: (i32,)}, .d: i32} = b_ref;
|
|
var c: C({.a = 1, .b = 2}) = F();
|
|
|
|
// --- fail_bad_type.impl.carbon
|
|
|
|
impl package Implicit;
|
|
// CHECK:STDERR: fail_bad_type.impl.carbon:[[@LINE+8]]:14: error: missing value for field `a` in struct initialization [StructInitMissingFieldInLiteral]
|
|
// CHECK:STDERR: var c_bad: C({.c = 1, .d = 2}) = F();
|
|
// CHECK:STDERR: ^~~~~~~~~~~~~~~~
|
|
// CHECK:STDERR: fail_bad_type.impl.carbon:[[@LINE-4]]:6: in import [InImport]
|
|
// CHECK:STDERR: implicit.carbon:8:1: note: while deducing parameters of generic declared here [DeductionGenericHere]
|
|
// CHECK:STDERR: class C(S:! {.a: i32, .b: i32}) {}
|
|
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
// CHECK:STDERR:
|
|
var c_bad: C({.c = 1, .d = 2}) = F();
|
|
|
|
// --- fail_bad_value.impl.carbon
|
|
|
|
impl package Implicit;
|
|
// CHECK:STDERR: fail_bad_value.impl.carbon:[[@LINE+6]]:1: error: cannot implicitly convert from `C(<cannot stringify inst+419>)` to `C(<cannot stringify inst+407>)` [ImplicitAsConversionFailure]
|
|
// CHECK:STDERR: var c_bad: C({.a = 3, .b = 4}) = F();
|
|
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
// CHECK:STDERR: fail_bad_value.impl.carbon:[[@LINE+3]]:1: note: type `C(<cannot stringify inst+419>)` does not implement interface `ImplicitAs(C(<cannot stringify inst+407>))` [MissingImplInMemberAccessNote]
|
|
// CHECK:STDERR: var c_bad: C({.a = 3, .b = 4}) = F();
|
|
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
var c_bad: C({.a = 3, .b = 4}) = F();
|
|
|
|
// CHECK:STDOUT: --- implicit.carbon
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
|
|
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
|
|
// CHECK:STDOUT: %.1: type = struct_type {.a: i32} [template]
|
|
// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 0 [template]
|
|
// CHECK:STDOUT: %.3: type = struct_type {.a: Core.IntLiteral} [template]
|
|
// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(i32) [template]
|
|
// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.11 [template]
|
|
// CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template]
|
|
// CHECK:STDOUT: %.27: <witness> = interface_witness (%Convert.15) [template]
|
|
// CHECK:STDOUT: %.28: <bound method> = bound_method %.2, %Convert.15 [template]
|
|
// CHECK:STDOUT: %.29: i32 = int_value 0 [template]
|
|
// CHECK:STDOUT: %struct.1: %.1 = struct_value (%.29) [template]
|
|
// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template]
|
|
// CHECK:STDOUT: %tuple.type.2: type = tuple_type (i32) [template]
|
|
// CHECK:STDOUT: %.30: type = struct_type {.b: i32, .c: %tuple.type.2} [template]
|
|
// CHECK:STDOUT: %.31: type = struct_type {.a: %.30, .d: i32} [template]
|
|
// CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral) [template]
|
|
// CHECK:STDOUT: %.35: type = struct_type {.b: Core.IntLiteral, .c: %tuple.type.3} [template]
|
|
// CHECK:STDOUT: %.36: type = struct_type {.a: %.35, .d: Core.IntLiteral} [template]
|
|
// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.29) [template]
|
|
// CHECK:STDOUT: %struct.2: %.30 = struct_value (%.29, %tuple) [template]
|
|
// CHECK:STDOUT: %struct.3: %.31 = struct_value (%struct.2, %.29) [template]
|
|
// CHECK:STDOUT: %.37: type = struct_type {.a: i32, .b: i32} [template]
|
|
// CHECK:STDOUT: %S: %.37 = bind_symbolic_name S, 0 [symbolic]
|
|
// CHECK:STDOUT: %S.patt: %.37 = symbolic_binding_pattern S, 0 [symbolic]
|
|
// CHECK:STDOUT: %C.type: type = generic_class_type @C [template]
|
|
// CHECK:STDOUT: %C.1: %C.type = struct_value () [template]
|
|
// CHECK:STDOUT: %C.2: type = class_type @C, @C(%S) [symbolic]
|
|
// CHECK:STDOUT: %.38: type = struct_type {} [template]
|
|
// CHECK:STDOUT: %.39: <witness> = complete_type_witness %.38 [template]
|
|
// CHECK:STDOUT: %.40: Core.IntLiteral = int_value 1 [template]
|
|
// CHECK:STDOUT: %.41: Core.IntLiteral = int_value 2 [template]
|
|
// CHECK:STDOUT: %.42: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [template]
|
|
// CHECK:STDOUT: %.44: <bound method> = bound_method %.40, %Convert.15 [template]
|
|
// CHECK:STDOUT: %.45: i32 = int_value 1 [template]
|
|
// CHECK:STDOUT: %.46: <bound method> = bound_method %.41, %Convert.15 [template]
|
|
// CHECK:STDOUT: %.47: i32 = int_value 2 [template]
|
|
// CHECK:STDOUT: %struct.4: %.37 = struct_value (%.45, %.47) [template]
|
|
// CHECK:STDOUT: %C.3: type = class_type @C, @C(%struct.4) [template]
|
|
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
|
|
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: imports {
|
|
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
|
|
// CHECK:STDOUT: .Int32 = %import_ref.1
|
|
// CHECK:STDOUT: .ImplicitAs = %import_ref.2
|
|
// CHECK:STDOUT: import Core//prelude
|
|
// CHECK:STDOUT: import Core//prelude/...
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: file {
|
|
// CHECK:STDOUT: package: <namespace> = namespace [template] {
|
|
// CHECK:STDOUT: .Core = imports.%Core
|
|
// CHECK:STDOUT: .a_ref = %a_ref
|
|
// CHECK:STDOUT: .b_ref = %b_ref
|
|
// CHECK:STDOUT: .C = %C.decl
|
|
// CHECK:STDOUT: .F = %F.decl
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %Core.import = import Core
|
|
// CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32]
|
|
// CHECK:STDOUT: %.loc4_17.1: type = value_of_initializer %int.make_type_32.loc4 [template = i32]
|
|
// CHECK:STDOUT: %.loc4_17.2: type = converted %int.make_type_32.loc4, %.loc4_17.1 [template = i32]
|
|
// CHECK:STDOUT: %.loc4_20: type = struct_type {.a: i32} [template = constants.%.1]
|
|
// CHECK:STDOUT: %a_ref.var: ref %.1 = var a_ref
|
|
// CHECK:STDOUT: %a_ref: ref %.1 = bind_name a_ref, %a_ref.var
|
|
// CHECK:STDOUT: %int.make_type_32.loc5_22: init type = call constants.%Int32() [template = i32]
|
|
// CHECK:STDOUT: %.loc5_22.1: type = value_of_initializer %int.make_type_32.loc5_22 [template = i32]
|
|
// CHECK:STDOUT: %.loc5_22.2: type = converted %int.make_type_32.loc5_22, %.loc5_22.1 [template = i32]
|
|
// CHECK:STDOUT: %int.make_type_32.loc5_32: init type = call constants.%Int32() [template = i32]
|
|
// CHECK:STDOUT: %.loc5_36.1: %tuple.type.1 = tuple_literal (%int.make_type_32.loc5_32)
|
|
// CHECK:STDOUT: %.loc5_36.2: type = value_of_initializer %int.make_type_32.loc5_32 [template = i32]
|
|
// CHECK:STDOUT: %.loc5_36.3: type = converted %int.make_type_32.loc5_32, %.loc5_36.2 [template = i32]
|
|
// CHECK:STDOUT: %.loc5_36.4: type = converted %.loc5_36.1, constants.%tuple.type.2 [template = constants.%tuple.type.2]
|
|
// CHECK:STDOUT: %.loc5_37: type = struct_type {.b: i32, .c: %tuple.type.2} [template = constants.%.30]
|
|
// CHECK:STDOUT: %int.make_type_32.loc5_44: init type = call constants.%Int32() [template = i32]
|
|
// CHECK:STDOUT: %.loc5_44.1: type = value_of_initializer %int.make_type_32.loc5_44 [template = i32]
|
|
// CHECK:STDOUT: %.loc5_44.2: type = converted %int.make_type_32.loc5_44, %.loc5_44.1 [template = i32]
|
|
// CHECK:STDOUT: %.loc5_47: type = struct_type {.a: %.30, .d: i32} [template = constants.%.31]
|
|
// CHECK:STDOUT: %b_ref.var: ref %.31 = var b_ref
|
|
// CHECK:STDOUT: %b_ref: ref %.31 = bind_name b_ref, %b_ref.var
|
|
// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [template = constants.%C.1] {
|
|
// CHECK:STDOUT: %S.patt.loc8_9.1: %.37 = symbolic_binding_pattern S, 0 [symbolic = %S.patt.loc8_9.2 (constants.%S.patt)]
|
|
// CHECK:STDOUT: %S.param_patt: %.37 = value_param_pattern %S.patt.loc8_9.1, runtime_param<invalid> [symbolic = %S.patt.loc8_9.2 (constants.%S.patt)]
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %int.make_type_32.loc8_18: init type = call constants.%Int32() [template = i32]
|
|
// CHECK:STDOUT: %.loc8_18.1: type = value_of_initializer %int.make_type_32.loc8_18 [template = i32]
|
|
// CHECK:STDOUT: %.loc8_18.2: type = converted %int.make_type_32.loc8_18, %.loc8_18.1 [template = i32]
|
|
// CHECK:STDOUT: %int.make_type_32.loc8_27: init type = call constants.%Int32() [template = i32]
|
|
// CHECK:STDOUT: %.loc8_27.1: type = value_of_initializer %int.make_type_32.loc8_27 [template = i32]
|
|
// CHECK:STDOUT: %.loc8_27.2: type = converted %int.make_type_32.loc8_27, %.loc8_27.1 [template = i32]
|
|
// CHECK:STDOUT: %.loc8_30: type = struct_type {.a: i32, .b: i32} [template = constants.%.37]
|
|
// CHECK:STDOUT: %S.param: %.37 = value_param runtime_param<invalid>
|
|
// CHECK:STDOUT: %S.loc8_9.1: %.37 = bind_symbolic_name S, 0, %S.param [symbolic = %S.loc8_9.2 (constants.%S)]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {
|
|
// CHECK:STDOUT: %return.patt: %C.3 = return_slot_pattern
|
|
// CHECK:STDOUT: %return.param_patt: %C.3 = out_param_pattern %return.patt, runtime_param0
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1]
|
|
// CHECK:STDOUT: %.loc9_19: Core.IntLiteral = int_value 1 [template = constants.%.40]
|
|
// CHECK:STDOUT: %.loc9_27: Core.IntLiteral = int_value 2 [template = constants.%.41]
|
|
// CHECK:STDOUT: %.loc9_28.1: %.42 = struct_literal (%.loc9_19, %.loc9_27)
|
|
// CHECK:STDOUT: %.loc9_28.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.15]
|
|
// CHECK:STDOUT: %.loc9_28.3: <bound method> = bound_method %.loc9_19, %.loc9_28.2 [template = constants.%.44]
|
|
// CHECK:STDOUT: %int.convert_checked.loc9_28.1: init i32 = call %.loc9_28.3(%.loc9_19) [template = constants.%.45]
|
|
// CHECK:STDOUT: %.loc9_28.4: i32 = value_of_initializer %int.convert_checked.loc9_28.1 [template = constants.%.45]
|
|
// CHECK:STDOUT: %.loc9_28.5: i32 = converted %.loc9_19, %.loc9_28.4 [template = constants.%.45]
|
|
// CHECK:STDOUT: %.loc9_28.6: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.15]
|
|
// CHECK:STDOUT: %.loc9_28.7: <bound method> = bound_method %.loc9_27, %.loc9_28.6 [template = constants.%.46]
|
|
// CHECK:STDOUT: %int.convert_checked.loc9_28.2: init i32 = call %.loc9_28.7(%.loc9_27) [template = constants.%.47]
|
|
// CHECK:STDOUT: %.loc9_28.8: i32 = value_of_initializer %int.convert_checked.loc9_28.2 [template = constants.%.47]
|
|
// CHECK:STDOUT: %.loc9_28.9: i32 = converted %.loc9_27, %.loc9_28.8 [template = constants.%.47]
|
|
// CHECK:STDOUT: %struct: %.37 = struct_value (%.loc9_28.5, %.loc9_28.9) [template = constants.%struct.4]
|
|
// CHECK:STDOUT: %.loc9_12: %.37 = converted %.loc9_28.1, %struct [template = constants.%struct.4]
|
|
// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%struct.4) [template = constants.%C.3]
|
|
// CHECK:STDOUT: %return.param: ref %C.3 = out_param runtime_param0
|
|
// CHECK:STDOUT: %return: ref %C.3 = return_slot %return.param
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic class @C(%S.loc8_9.1: %.37) {
|
|
// CHECK:STDOUT: %S.loc8_9.2: %.37 = bind_symbolic_name S, 0 [symbolic = %S.loc8_9.2 (constants.%S)]
|
|
// CHECK:STDOUT: %S.patt.loc8_9.2: %.37 = symbolic_binding_pattern S, 0 [symbolic = %S.patt.loc8_9.2 (constants.%S.patt)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: class {
|
|
// CHECK:STDOUT: %.loc8_34: <witness> = complete_type_witness %.38 [template = constants.%.39]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: .Self = constants.%C.2
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @F() -> %C.3;
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @__global_init() {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %.loc4_30: Core.IntLiteral = int_value 0 [template = constants.%.2]
|
|
// CHECK:STDOUT: %.loc4_31.1: %.3 = struct_literal (%.loc4_30)
|
|
// CHECK:STDOUT: %.loc4_31.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.15]
|
|
// CHECK:STDOUT: %.loc4_31.3: <bound method> = bound_method %.loc4_30, %.loc4_31.2 [template = constants.%.28]
|
|
// CHECK:STDOUT: %int.convert_checked.loc4: init i32 = call %.loc4_31.3(%.loc4_30) [template = constants.%.29]
|
|
// CHECK:STDOUT: %.loc4_31.4: init i32 = converted %.loc4_30, %int.convert_checked.loc4 [template = constants.%.29]
|
|
// CHECK:STDOUT: %.loc4_31.5: init %.1 = struct_init (%.loc4_31.4) to file.%a_ref.var [template = constants.%struct.1]
|
|
// CHECK:STDOUT: %.loc4_32: init %.1 = converted %.loc4_31.1, %.loc4_31.5 [template = constants.%struct.1]
|
|
// CHECK:STDOUT: assign file.%a_ref.var, %.loc4_32
|
|
// CHECK:STDOUT: %.loc6_17: Core.IntLiteral = int_value 0 [template = constants.%.2]
|
|
// CHECK:STDOUT: %.loc6_26: Core.IntLiteral = int_value 0 [template = constants.%.2]
|
|
// CHECK:STDOUT: %.loc6_28.1: %tuple.type.3 = tuple_literal (%.loc6_26)
|
|
// CHECK:STDOUT: %.loc6_29.1: %.35 = struct_literal (%.loc6_17, %.loc6_28.1)
|
|
// CHECK:STDOUT: %.loc6_37: Core.IntLiteral = int_value 0 [template = constants.%.2]
|
|
// CHECK:STDOUT: %.loc6_38.1: %.36 = struct_literal (%.loc6_29.1, %.loc6_37)
|
|
// CHECK:STDOUT: %.loc6_29.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.15]
|
|
// CHECK:STDOUT: %.loc6_29.3: <bound method> = bound_method %.loc6_17, %.loc6_29.2 [template = constants.%.28]
|
|
// CHECK:STDOUT: %int.convert_checked.loc6_29: init i32 = call %.loc6_29.3(%.loc6_17) [template = constants.%.29]
|
|
// CHECK:STDOUT: %.loc6_29.4: init i32 = converted %.loc6_17, %int.convert_checked.loc6_29 [template = constants.%.29]
|
|
// CHECK:STDOUT: %.loc6_38.2: ref %.30 = struct_access file.%b_ref.var, element0
|
|
// CHECK:STDOUT: %.loc6_29.5: ref i32 = struct_access %.loc6_38.2, element0
|
|
// CHECK:STDOUT: %.loc6_29.6: init i32 = initialize_from %.loc6_29.4 to %.loc6_29.5 [template = constants.%.29]
|
|
// CHECK:STDOUT: %.loc6_28.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.15]
|
|
// CHECK:STDOUT: %.loc6_28.3: <bound method> = bound_method %.loc6_26, %.loc6_28.2 [template = constants.%.28]
|
|
// CHECK:STDOUT: %int.convert_checked.loc6_28: init i32 = call %.loc6_28.3(%.loc6_26) [template = constants.%.29]
|
|
// CHECK:STDOUT: %.loc6_28.4: init i32 = converted %.loc6_26, %int.convert_checked.loc6_28 [template = constants.%.29]
|
|
// CHECK:STDOUT: %.loc6_29.7: ref %tuple.type.2 = struct_access %.loc6_38.2, element1
|
|
// CHECK:STDOUT: %.loc6_28.5: init %tuple.type.2 = tuple_init (%.loc6_28.4) to %.loc6_29.7 [template = constants.%tuple]
|
|
// CHECK:STDOUT: %.loc6_29.8: init %tuple.type.2 = converted %.loc6_28.1, %.loc6_28.5 [template = constants.%tuple]
|
|
// CHECK:STDOUT: %.loc6_29.9: init %tuple.type.2 = initialize_from %.loc6_29.8 to %.loc6_29.7 [template = constants.%tuple]
|
|
// CHECK:STDOUT: %.loc6_29.10: init %.30 = struct_init (%.loc6_29.6, %.loc6_29.9) to %.loc6_38.2 [template = constants.%struct.2]
|
|
// CHECK:STDOUT: %.loc6_38.3: init %.30 = converted %.loc6_29.1, %.loc6_29.10 [template = constants.%struct.2]
|
|
// CHECK:STDOUT: %.loc6_38.4: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.15]
|
|
// CHECK:STDOUT: %.loc6_38.5: <bound method> = bound_method %.loc6_37, %.loc6_38.4 [template = constants.%.28]
|
|
// CHECK:STDOUT: %int.convert_checked.loc6_38: init i32 = call %.loc6_38.5(%.loc6_37) [template = constants.%.29]
|
|
// CHECK:STDOUT: %.loc6_38.6: init i32 = converted %.loc6_37, %int.convert_checked.loc6_38 [template = constants.%.29]
|
|
// CHECK:STDOUT: %.loc6_38.7: ref i32 = struct_access file.%b_ref.var, element1
|
|
// CHECK:STDOUT: %.loc6_38.8: init i32 = initialize_from %.loc6_38.6 to %.loc6_38.7 [template = constants.%.29]
|
|
// CHECK:STDOUT: %.loc6_38.9: init %.31 = struct_init (%.loc6_38.3, %.loc6_38.8) to file.%b_ref.var [template = constants.%struct.3]
|
|
// CHECK:STDOUT: %.loc6_39: init %.31 = converted %.loc6_38.1, %.loc6_38.9 [template = constants.%struct.3]
|
|
// CHECK:STDOUT: assign file.%b_ref.var, %.loc6_39
|
|
// CHECK:STDOUT: return
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @C(constants.%S) {
|
|
// CHECK:STDOUT: %S.loc8_9.2 => constants.%S
|
|
// CHECK:STDOUT: %S.patt.loc8_9.2 => constants.%S
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @C(constants.%struct.4) {
|
|
// CHECK:STDOUT: %S.loc8_9.2 => constants.%struct.4
|
|
// CHECK:STDOUT: %S.patt.loc8_9.2 => constants.%struct.4
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: --- implicit.impl.carbon
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic]
|
|
// CHECK:STDOUT: %ImplicitAs.type.2: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic]
|
|
// CHECK:STDOUT: %Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2) = bind_symbolic_name Self, 1 [symbolic]
|
|
// CHECK:STDOUT: %Dest.patt: type = symbolic_binding_pattern Dest, 0 [symbolic]
|
|
// CHECK:STDOUT: %ImplicitAs.type.3: type = facet_type <@ImplicitAs, @ImplicitAs(i32)> [template]
|
|
// CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic]
|
|
// CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic]
|
|
// CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %.1: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic]
|
|
// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, imports.%import_ref.11 [symbolic]
|
|
// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(i32) [template]
|
|
// CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template]
|
|
// CHECK:STDOUT: %.3: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template]
|
|
// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, imports.%import_ref.12 [template]
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic]
|
|
// CHECK:STDOUT: %.5: type = int_type signed, %N [symbolic]
|
|
// CHECK:STDOUT: %ImplicitAs.type.4: type = facet_type <@ImplicitAs, @ImplicitAs(%.5)> [symbolic]
|
|
// CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic]
|
|
// CHECK:STDOUT: %Convert.type.3: type = fn_type @Convert.2, @impl.2(%N) [symbolic]
|
|
// CHECK:STDOUT: %Convert.3: %Convert.type.3 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %.6: <witness> = interface_witness (%Convert.3) [symbolic]
|
|
// CHECK:STDOUT: %.7: type = int_type unsigned, %N [symbolic]
|
|
// CHECK:STDOUT: %ImplicitAs.type.5: type = facet_type <@ImplicitAs, @ImplicitAs(%.7)> [symbolic]
|
|
// CHECK:STDOUT: %Convert.type.4: type = fn_type @Convert.3, @impl.3(%N) [symbolic]
|
|
// CHECK:STDOUT: %Convert.4: %Convert.type.4 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %.8: <witness> = interface_witness (%Convert.4) [symbolic]
|
|
// CHECK:STDOUT: %ImplicitAs.type.6: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [template]
|
|
// CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template]
|
|
// CHECK:STDOUT: %Convert.5: %Convert.type.5 = struct_value () [template]
|
|
// CHECK:STDOUT: %.9: type = assoc_entity_type %ImplicitAs.type.6, %Convert.type.5 [template]
|
|
// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.22 [template]
|
|
// CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.4, @impl.5(%N) [symbolic]
|
|
// CHECK:STDOUT: %Convert.6: %Convert.type.6 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %.11: <witness> = interface_witness (%Convert.6) [symbolic]
|
|
// CHECK:STDOUT: %Convert.type.7: type = fn_type @Convert.5, @impl.6(%N) [symbolic]
|
|
// CHECK:STDOUT: %Convert.7: %Convert.type.7 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %.12: <witness> = interface_witness (%Convert.7) [symbolic]
|
|
// CHECK:STDOUT: %As.type.2: type = facet_type <@As, @As(%Dest)> [symbolic]
|
|
// CHECK:STDOUT: %Self.3: @As.%As.type (%As.type.2) = bind_symbolic_name Self, 1 [symbolic]
|
|
// CHECK:STDOUT: %As.type.3: type = facet_type <@As, @As(i32)> [template]
|
|
// CHECK:STDOUT: %Self.4: %As.type.2 = bind_symbolic_name Self, 1 [symbolic]
|
|
// CHECK:STDOUT: %Convert.type.8: type = fn_type @Convert.6, @As(%Dest) [symbolic]
|
|
// CHECK:STDOUT: %Convert.8: %Convert.type.8 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %.13: type = assoc_entity_type %As.type.2, %Convert.type.8 [symbolic]
|
|
// CHECK:STDOUT: %.14: %.13 = assoc_entity element0, imports.%import_ref.35 [symbolic]
|
|
// CHECK:STDOUT: %Convert.type.9: type = fn_type @Convert.6, @As(i32) [template]
|
|
// CHECK:STDOUT: %Convert.9: %Convert.type.9 = struct_value () [template]
|
|
// CHECK:STDOUT: %.15: type = assoc_entity_type %As.type.3, %Convert.type.9 [template]
|
|
// CHECK:STDOUT: %.16: %.15 = assoc_entity element0, imports.%import_ref.36 [template]
|
|
// CHECK:STDOUT: %As.type.4: type = facet_type <@As, @As(%.5)> [symbolic]
|
|
// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.7, @impl.8(%N) [symbolic]
|
|
// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %.17: <witness> = interface_witness (%Convert.10) [symbolic]
|
|
// CHECK:STDOUT: %As.type.5: type = facet_type <@As, @As(%.7)> [symbolic]
|
|
// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.8, @impl.9(%N) [symbolic]
|
|
// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %.18: <witness> = interface_witness (%Convert.11) [symbolic]
|
|
// CHECK:STDOUT: %As.type.6: type = facet_type <@As, @As(Core.IntLiteral)> [template]
|
|
// CHECK:STDOUT: %Convert.type.12: type = fn_type @Convert.6, @As(Core.IntLiteral) [template]
|
|
// CHECK:STDOUT: %Convert.12: %Convert.type.12 = struct_value () [template]
|
|
// CHECK:STDOUT: %.19: type = assoc_entity_type %As.type.6, %Convert.type.12 [template]
|
|
// CHECK:STDOUT: %.20: %.19 = assoc_entity element0, imports.%import_ref.46 [template]
|
|
// CHECK:STDOUT: %Convert.type.13: type = fn_type @Convert.9, @impl.11(%N) [symbolic]
|
|
// CHECK:STDOUT: %Convert.13: %Convert.type.13 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %.21: <witness> = interface_witness (%Convert.13) [symbolic]
|
|
// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.10, @impl.12(%N) [symbolic]
|
|
// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %.22: <witness> = interface_witness (%Convert.14) [symbolic]
|
|
// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
|
|
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
|
|
// CHECK:STDOUT: %.23: type = struct_type {.a: i32} [template]
|
|
// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template]
|
|
// CHECK:STDOUT: %tuple.type.2: type = tuple_type (i32) [template]
|
|
// CHECK:STDOUT: %.24: type = struct_type {.b: i32, .c: %tuple.type.2} [template]
|
|
// CHECK:STDOUT: %.25: type = struct_type {.a: %.24, .d: i32} [template]
|
|
// CHECK:STDOUT: %C.type: type = generic_class_type @C [template]
|
|
// CHECK:STDOUT: %C.1: %C.type = struct_value () [template]
|
|
// CHECK:STDOUT: %.31: type = struct_type {.a: i32, .b: i32} [template]
|
|
// CHECK:STDOUT: %S: %.31 = bind_symbolic_name S, 0 [symbolic]
|
|
// CHECK:STDOUT: %S.patt: %.31 = symbolic_binding_pattern S, 0 [symbolic]
|
|
// CHECK:STDOUT: %.32: Core.IntLiteral = int_value 1 [template]
|
|
// CHECK:STDOUT: %.33: Core.IntLiteral = int_value 2 [template]
|
|
// CHECK:STDOUT: %.34: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [template]
|
|
// CHECK:STDOUT: %.36: %.1 = assoc_entity element0, imports.%import_ref.56 [symbolic]
|
|
// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.11 [template]
|
|
// CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template]
|
|
// CHECK:STDOUT: %.37: <witness> = interface_witness (%Convert.15) [template]
|
|
// CHECK:STDOUT: %.38: <bound method> = bound_method %.32, %Convert.15 [template]
|
|
// CHECK:STDOUT: %.39: i32 = int_value 1 [template]
|
|
// CHECK:STDOUT: %.40: <bound method> = bound_method %.33, %Convert.15 [template]
|
|
// CHECK:STDOUT: %.41: i32 = int_value 2 [template]
|
|
// CHECK:STDOUT: %struct: %.31 = struct_value (%.39, %.41) [template]
|
|
// CHECK:STDOUT: %C.3: type = class_type @C, @C(%struct) [template]
|
|
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
|
|
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: imports {
|
|
// CHECK:STDOUT: %import_ref.1: ref %.23 = import_ref Implicit//default, inst+17, loaded
|
|
// CHECK:STDOUT: %import_ref.2: ref %.25 = import_ref Implicit//default, inst+411, loaded
|
|
// CHECK:STDOUT: %import_ref.3: %C.type = import_ref Implicit//default, inst+465, loaded [template = constants.%C.1]
|
|
// CHECK:STDOUT: %import_ref.4: %F.type = import_ref Implicit//default, inst+505, loaded [template = constants.%F]
|
|
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
|
|
// CHECK:STDOUT: .Int32 = %import_ref.53
|
|
// CHECK:STDOUT: .ImplicitAs = %import_ref.55
|
|
// CHECK:STDOUT: import Core//prelude
|
|
// CHECK:STDOUT: import Core//prelude/...
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %import_ref.5 = import_ref Implicit//default, inst+35, unloaded
|
|
// CHECK:STDOUT: %import_ref.6: @ImplicitAs.%.1 (%.1) = import_ref Implicit//default, inst+36, loaded [symbolic = @ImplicitAs.%.2 (constants.%.36)]
|
|
// CHECK:STDOUT: %import_ref.7 = import_ref Implicit//default, inst+37, unloaded
|
|
// CHECK:STDOUT: %import_ref.8: type = import_ref Implicit//default, inst+71, loaded [template = Core.IntLiteral]
|
|
// CHECK:STDOUT: %import_ref.9: type = import_ref Implicit//default, inst+72, loaded [template = constants.%ImplicitAs.type.3]
|
|
// CHECK:STDOUT: %import_ref.10: <witness> = import_ref Implicit//default, inst+73, loaded [template = constants.%.37]
|
|
// CHECK:STDOUT: %import_ref.11 = import_ref Implicit//default, inst+52, unloaded
|
|
// CHECK:STDOUT: %import_ref.13: type = import_ref Implicit//default, inst+83, loaded [template = Core.IntLiteral]
|
|
// CHECK:STDOUT: %import_ref.14: type = import_ref Implicit//default, inst+84, loaded [symbolic = @impl.2.%ImplicitAs.type (constants.%ImplicitAs.type.4)]
|
|
// CHECK:STDOUT: %import_ref.15 = import_ref Implicit//default, inst+85, unloaded
|
|
// CHECK:STDOUT: %import_ref.16: type = import_ref Implicit//default, inst+113, loaded [template = Core.IntLiteral]
|
|
// CHECK:STDOUT: %import_ref.17: type = import_ref Implicit//default, inst+114, loaded [symbolic = @impl.3.%ImplicitAs.type (constants.%ImplicitAs.type.5)]
|
|
// CHECK:STDOUT: %import_ref.18 = import_ref Implicit//default, inst+115, unloaded
|
|
// CHECK:STDOUT: %import_ref.19: type = import_ref Implicit//default, inst+138, loaded [template = i32]
|
|
// CHECK:STDOUT: %import_ref.20: type = import_ref Implicit//default, inst+139, loaded [template = constants.%ImplicitAs.type.6]
|
|
// CHECK:STDOUT: %import_ref.21 = import_ref Implicit//default, inst+140, unloaded
|
|
// CHECK:STDOUT: %import_ref.23: type = import_ref Implicit//default, inst+151, loaded [symbolic = @impl.5.%.1 (constants.%.5)]
|
|
// CHECK:STDOUT: %import_ref.24: type = import_ref Implicit//default, inst+152, loaded [template = constants.%ImplicitAs.type.6]
|
|
// CHECK:STDOUT: %import_ref.25 = import_ref Implicit//default, inst+153, unloaded
|
|
// CHECK:STDOUT: %import_ref.26: type = import_ref Implicit//default, inst+178, loaded [symbolic = @impl.6.%.1 (constants.%.7)]
|
|
// CHECK:STDOUT: %import_ref.27: type = import_ref Implicit//default, inst+179, loaded [template = constants.%ImplicitAs.type.6]
|
|
// CHECK:STDOUT: %import_ref.28 = import_ref Implicit//default, inst+180, unloaded
|
|
// CHECK:STDOUT: %import_ref.29 = import_ref Implicit//default, inst+210, unloaded
|
|
// CHECK:STDOUT: %import_ref.30 = import_ref Implicit//default, inst+211, unloaded
|
|
// CHECK:STDOUT: %import_ref.31 = import_ref Implicit//default, inst+212, unloaded
|
|
// CHECK:STDOUT: %import_ref.32: type = import_ref Implicit//default, inst+214, loaded [template = Core.IntLiteral]
|
|
// CHECK:STDOUT: %import_ref.33: type = import_ref Implicit//default, inst+215, loaded [template = constants.%As.type.3]
|
|
// CHECK:STDOUT: %import_ref.34 = import_ref Implicit//default, inst+216, unloaded
|
|
// CHECK:STDOUT: %import_ref.35 = import_ref Implicit//default, inst+231, unloaded
|
|
// CHECK:STDOUT: %import_ref.37: type = import_ref Implicit//default, inst+253, loaded [template = Core.IntLiteral]
|
|
// CHECK:STDOUT: %import_ref.38: type = import_ref Implicit//default, inst+254, loaded [symbolic = @impl.8.%As.type (constants.%As.type.4)]
|
|
// CHECK:STDOUT: %import_ref.39 = import_ref Implicit//default, inst+255, unloaded
|
|
// CHECK:STDOUT: %import_ref.40: type = import_ref Implicit//default, inst+282, loaded [template = Core.IntLiteral]
|
|
// CHECK:STDOUT: %import_ref.41: type = import_ref Implicit//default, inst+283, loaded [symbolic = @impl.9.%As.type (constants.%As.type.5)]
|
|
// CHECK:STDOUT: %import_ref.42 = import_ref Implicit//default, inst+284, unloaded
|
|
// CHECK:STDOUT: %import_ref.43: type = import_ref Implicit//default, inst+307, loaded [template = i32]
|
|
// CHECK:STDOUT: %import_ref.44: type = import_ref Implicit//default, inst+308, loaded [template = constants.%As.type.6]
|
|
// CHECK:STDOUT: %import_ref.45 = import_ref Implicit//default, inst+309, unloaded
|
|
// CHECK:STDOUT: %import_ref.47: type = import_ref Implicit//default, inst+320, loaded [symbolic = @impl.11.%.1 (constants.%.5)]
|
|
// CHECK:STDOUT: %import_ref.48: type = import_ref Implicit//default, inst+321, loaded [template = constants.%As.type.6]
|
|
// CHECK:STDOUT: %import_ref.49 = import_ref Implicit//default, inst+322, unloaded
|
|
// CHECK:STDOUT: %import_ref.50: type = import_ref Implicit//default, inst+347, loaded [symbolic = @impl.12.%.1 (constants.%.7)]
|
|
// CHECK:STDOUT: %import_ref.51: type = import_ref Implicit//default, inst+348, loaded [template = constants.%As.type.6]
|
|
// CHECK:STDOUT: %import_ref.52 = import_ref Implicit//default, inst+349, unloaded
|
|
// CHECK:STDOUT: %import_ref.54 = import_ref Implicit//default, inst+470, unloaded
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: file {
|
|
// CHECK:STDOUT: package: <namespace> = namespace [template] {
|
|
// CHECK:STDOUT: .a_ref = imports.%import_ref.1
|
|
// CHECK:STDOUT: .b_ref = imports.%import_ref.2
|
|
// CHECK:STDOUT: .C = imports.%import_ref.3
|
|
// CHECK:STDOUT: .F = imports.%import_ref.4
|
|
// CHECK:STDOUT: .Core = imports.%Core
|
|
// CHECK:STDOUT: .a = %a
|
|
// CHECK:STDOUT: .b = %b
|
|
// CHECK:STDOUT: .c = %c
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %Implicit.import = import Implicit
|
|
// CHECK:STDOUT: %default.import = import <invalid>
|
|
// CHECK:STDOUT: %Core.import = import Core
|
|
// CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32]
|
|
// CHECK:STDOUT: %.loc4_13.1: type = value_of_initializer %int.make_type_32.loc4 [template = i32]
|
|
// CHECK:STDOUT: %.loc4_13.2: type = converted %int.make_type_32.loc4, %.loc4_13.1 [template = i32]
|
|
// CHECK:STDOUT: %.loc4_16: type = struct_type {.a: i32} [template = constants.%.23]
|
|
// CHECK:STDOUT: %a.var: ref %.23 = var a
|
|
// CHECK:STDOUT: %a: ref %.23 = bind_name a, %a.var
|
|
// CHECK:STDOUT: %int.make_type_32.loc5_18: init type = call constants.%Int32() [template = i32]
|
|
// CHECK:STDOUT: %.loc5_18.1: type = value_of_initializer %int.make_type_32.loc5_18 [template = i32]
|
|
// CHECK:STDOUT: %.loc5_18.2: type = converted %int.make_type_32.loc5_18, %.loc5_18.1 [template = i32]
|
|
// CHECK:STDOUT: %int.make_type_32.loc5_28: init type = call constants.%Int32() [template = i32]
|
|
// CHECK:STDOUT: %.loc5_32.1: %tuple.type.1 = tuple_literal (%int.make_type_32.loc5_28)
|
|
// CHECK:STDOUT: %.loc5_32.2: type = value_of_initializer %int.make_type_32.loc5_28 [template = i32]
|
|
// CHECK:STDOUT: %.loc5_32.3: type = converted %int.make_type_32.loc5_28, %.loc5_32.2 [template = i32]
|
|
// CHECK:STDOUT: %.loc5_32.4: type = converted %.loc5_32.1, constants.%tuple.type.2 [template = constants.%tuple.type.2]
|
|
// CHECK:STDOUT: %.loc5_33: type = struct_type {.b: i32, .c: %tuple.type.2} [template = constants.%.24]
|
|
// CHECK:STDOUT: %int.make_type_32.loc5_40: init type = call constants.%Int32() [template = i32]
|
|
// CHECK:STDOUT: %.loc5_40.1: type = value_of_initializer %int.make_type_32.loc5_40 [template = i32]
|
|
// CHECK:STDOUT: %.loc5_40.2: type = converted %int.make_type_32.loc5_40, %.loc5_40.1 [template = i32]
|
|
// CHECK:STDOUT: %.loc5_43: type = struct_type {.a: %.24, .d: i32} [template = constants.%.25]
|
|
// CHECK:STDOUT: %b.var: ref %.25 = var b
|
|
// CHECK:STDOUT: %b: ref %.25 = bind_name b, %b.var
|
|
// CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.3 [template = constants.%C.1]
|
|
// CHECK:STDOUT: %.loc6_16: Core.IntLiteral = int_value 1 [template = constants.%.32]
|
|
// CHECK:STDOUT: %.loc6_24: Core.IntLiteral = int_value 2 [template = constants.%.33]
|
|
// CHECK:STDOUT: %.loc6_25.1: %.34 = struct_literal (%.loc6_16, %.loc6_24)
|
|
// CHECK:STDOUT: %.loc6_25.2: %Convert.type.2 = interface_witness_access constants.%.37, element0 [template = constants.%Convert.15]
|
|
// CHECK:STDOUT: %.loc6_25.3: <bound method> = bound_method %.loc6_16, %.loc6_25.2 [template = constants.%.38]
|
|
// CHECK:STDOUT: %int.convert_checked.loc6_25.1: init i32 = call %.loc6_25.3(%.loc6_16) [template = constants.%.39]
|
|
// CHECK:STDOUT: %.loc6_25.4: i32 = value_of_initializer %int.convert_checked.loc6_25.1 [template = constants.%.39]
|
|
// CHECK:STDOUT: %.loc6_25.5: i32 = converted %.loc6_16, %.loc6_25.4 [template = constants.%.39]
|
|
// CHECK:STDOUT: %.loc6_25.6: %Convert.type.2 = interface_witness_access constants.%.37, element0 [template = constants.%Convert.15]
|
|
// CHECK:STDOUT: %.loc6_25.7: <bound method> = bound_method %.loc6_24, %.loc6_25.6 [template = constants.%.40]
|
|
// CHECK:STDOUT: %int.convert_checked.loc6_25.2: init i32 = call %.loc6_25.7(%.loc6_24) [template = constants.%.41]
|
|
// CHECK:STDOUT: %.loc6_25.8: i32 = value_of_initializer %int.convert_checked.loc6_25.2 [template = constants.%.41]
|
|
// CHECK:STDOUT: %.loc6_25.9: i32 = converted %.loc6_24, %.loc6_25.8 [template = constants.%.41]
|
|
// CHECK:STDOUT: %struct: %.31 = struct_value (%.loc6_25.5, %.loc6_25.9) [template = constants.%struct]
|
|
// CHECK:STDOUT: %.loc6_9: %.31 = converted %.loc6_25.1, %struct [template = constants.%struct]
|
|
// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%struct) [template = constants.%C.3]
|
|
// CHECK:STDOUT: %c.var: ref %C.3 = var c
|
|
// CHECK:STDOUT: %c: ref %C.3 = bind_name c, %c.var
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic interface @ImplicitAs(constants.%Dest: type) {
|
|
// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
|
|
// CHECK:STDOUT: %Dest.patt: type = symbolic_binding_pattern Dest, 0 [symbolic = %Dest.patt (constants.%Dest.patt)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)]
|
|
// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)]
|
|
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)]
|
|
// CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)]
|
|
// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.1)]
|
|
// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.1) = assoc_entity element0, imports.%import_ref.11 [symbolic = %.2 (constants.%.2)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: interface {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: .Self = imports.%import_ref.5
|
|
// CHECK:STDOUT: .Convert = imports.%import_ref.6
|
|
// CHECK:STDOUT: witness = (imports.%import_ref.7)
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic interface @As(constants.%Dest: type) {
|
|
// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
|
|
// CHECK:STDOUT: %Dest.patt: type = symbolic_binding_pattern Dest, 0 [symbolic = %Dest.patt (constants.%Dest.patt)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%Dest)> [symbolic = %As.type (constants.%As.type.2)]
|
|
// CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.4)]
|
|
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.6, @As(%Dest) [symbolic = %Convert.type (constants.%Convert.type.8)]
|
|
// CHECK:STDOUT: %Convert: @As.%Convert.type (%Convert.type.8) = struct_value () [symbolic = %Convert (constants.%Convert.8)]
|
|
// CHECK:STDOUT: %.1: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.8) [symbolic = %.1 (constants.%.13)]
|
|
// CHECK:STDOUT: %.2: @As.%.1 (%.13) = assoc_entity element0, imports.%import_ref.35 [symbolic = %.2 (constants.%.14)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: interface {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: .Self = imports.%import_ref.29
|
|
// CHECK:STDOUT: .Convert = imports.%import_ref.30
|
|
// CHECK:STDOUT: witness = (imports.%import_ref.31)
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: impl @impl.1: imports.%import_ref.8 as imports.%import_ref.9 {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: witness = imports.%import_ref.10
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic impl @impl.2(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
|
|
// CHECK:STDOUT: %.1: type = int_type signed, %N [symbolic = %.1 (constants.%.5)]
|
|
// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%.1)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.4)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.2, @impl.2(%N) [symbolic = %Convert.type (constants.%Convert.type.3)]
|
|
// CHECK:STDOUT: %Convert: @impl.2.%Convert.type (%Convert.type.3) = struct_value () [symbolic = %Convert (constants.%Convert.3)]
|
|
// CHECK:STDOUT: %.2: <witness> = interface_witness (%Convert) [symbolic = %.2 (constants.%.6)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: impl: imports.%import_ref.13 as imports.%import_ref.14 {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: witness = imports.%import_ref.15
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic impl @impl.3(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
|
|
// CHECK:STDOUT: %.1: type = int_type unsigned, %N [symbolic = %.1 (constants.%.7)]
|
|
// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%.1)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.5)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.3, @impl.3(%N) [symbolic = %Convert.type (constants.%Convert.type.4)]
|
|
// CHECK:STDOUT: %Convert: @impl.3.%Convert.type (%Convert.type.4) = struct_value () [symbolic = %Convert (constants.%Convert.4)]
|
|
// CHECK:STDOUT: %.2: <witness> = interface_witness (%Convert) [symbolic = %.2 (constants.%.8)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: impl: imports.%import_ref.16 as imports.%import_ref.17 {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: witness = imports.%import_ref.18
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: impl @impl.4: imports.%import_ref.19 as imports.%import_ref.20 {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: witness = imports.%import_ref.21
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic impl @impl.5(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
|
|
// CHECK:STDOUT: %.1: type = int_type signed, %N [symbolic = %.1 (constants.%.5)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.4, @impl.5(%N) [symbolic = %Convert.type (constants.%Convert.type.6)]
|
|
// CHECK:STDOUT: %Convert: @impl.5.%Convert.type (%Convert.type.6) = struct_value () [symbolic = %Convert (constants.%Convert.6)]
|
|
// CHECK:STDOUT: %.2: <witness> = interface_witness (%Convert) [symbolic = %.2 (constants.%.11)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: impl: imports.%import_ref.23 as imports.%import_ref.24 {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: witness = imports.%import_ref.25
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic impl @impl.6(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
|
|
// CHECK:STDOUT: %.1: type = int_type unsigned, %N [symbolic = %.1 (constants.%.7)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.5, @impl.6(%N) [symbolic = %Convert.type (constants.%Convert.type.7)]
|
|
// CHECK:STDOUT: %Convert: @impl.6.%Convert.type (%Convert.type.7) = struct_value () [symbolic = %Convert (constants.%Convert.7)]
|
|
// CHECK:STDOUT: %.2: <witness> = interface_witness (%Convert) [symbolic = %.2 (constants.%.12)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: impl: imports.%import_ref.26 as imports.%import_ref.27 {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: witness = imports.%import_ref.28
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: impl @impl.7: imports.%import_ref.32 as imports.%import_ref.33 {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: witness = imports.%import_ref.34
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic impl @impl.8(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
|
|
// CHECK:STDOUT: %.1: type = int_type signed, %N [symbolic = %.1 (constants.%.5)]
|
|
// CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%.1)> [symbolic = %As.type (constants.%As.type.4)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.7, @impl.8(%N) [symbolic = %Convert.type (constants.%Convert.type.10)]
|
|
// CHECK:STDOUT: %Convert: @impl.8.%Convert.type (%Convert.type.10) = struct_value () [symbolic = %Convert (constants.%Convert.10)]
|
|
// CHECK:STDOUT: %.2: <witness> = interface_witness (%Convert) [symbolic = %.2 (constants.%.17)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: impl: imports.%import_ref.37 as imports.%import_ref.38 {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: witness = imports.%import_ref.39
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic impl @impl.9(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
|
|
// CHECK:STDOUT: %.1: type = int_type unsigned, %N [symbolic = %.1 (constants.%.7)]
|
|
// CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%.1)> [symbolic = %As.type (constants.%As.type.5)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.8, @impl.9(%N) [symbolic = %Convert.type (constants.%Convert.type.11)]
|
|
// CHECK:STDOUT: %Convert: @impl.9.%Convert.type (%Convert.type.11) = struct_value () [symbolic = %Convert (constants.%Convert.11)]
|
|
// CHECK:STDOUT: %.2: <witness> = interface_witness (%Convert) [symbolic = %.2 (constants.%.18)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: impl: imports.%import_ref.40 as imports.%import_ref.41 {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: witness = imports.%import_ref.42
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: impl @impl.10: imports.%import_ref.43 as imports.%import_ref.44 {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: witness = imports.%import_ref.45
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic impl @impl.11(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
|
|
// CHECK:STDOUT: %.1: type = int_type signed, %N [symbolic = %.1 (constants.%.5)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.9, @impl.11(%N) [symbolic = %Convert.type (constants.%Convert.type.13)]
|
|
// CHECK:STDOUT: %Convert: @impl.11.%Convert.type (%Convert.type.13) = struct_value () [symbolic = %Convert (constants.%Convert.13)]
|
|
// CHECK:STDOUT: %.2: <witness> = interface_witness (%Convert) [symbolic = %.2 (constants.%.21)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: impl: imports.%import_ref.47 as imports.%import_ref.48 {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: witness = imports.%import_ref.49
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic impl @impl.12(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
|
|
// CHECK:STDOUT: %.1: type = int_type unsigned, %N [symbolic = %.1 (constants.%.7)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.10, @impl.12(%N) [symbolic = %Convert.type (constants.%Convert.type.14)]
|
|
// CHECK:STDOUT: %Convert: @impl.12.%Convert.type (%Convert.type.14) = struct_value () [symbolic = %Convert (constants.%Convert.14)]
|
|
// CHECK:STDOUT: %.2: <witness> = interface_witness (%Convert) [symbolic = %.2 (constants.%.22)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: impl: imports.%import_ref.50 as imports.%import_ref.51 {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: witness = imports.%import_ref.52
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic class @C(constants.%S: %.31) {
|
|
// CHECK:STDOUT: %S: %.31 = bind_symbolic_name S, 0 [symbolic = %S (constants.%S)]
|
|
// CHECK:STDOUT: %S.patt: %.31 = symbolic_binding_pattern S, 0 [symbolic = %S.patt (constants.%S.patt)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: class {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: .Self = imports.%import_ref.54
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @Convert.1(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2)) {
|
|
// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
|
|
// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)]
|
|
// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%Self (%Self.2)]() -> @Convert.1.%Dest (%Dest);
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @Convert.2(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %.1: type = int_type signed, %N [symbolic = %.1 (constants.%.5)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn[%self.param_patt: Core.IntLiteral]() -> @Convert.2.%.1 (%.5) = "int.convert_checked";
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @Convert.3(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %.1: type = int_type unsigned, %N [symbolic = %.1 (constants.%.7)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn[%self.param_patt: Core.IntLiteral]() -> @Convert.3.%.1 (%.7) = "int.convert_checked";
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @Convert.4(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %.1: type = int_type signed, %N [symbolic = %.1 (constants.%.5)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn[%self.param_patt: @Convert.4.%.1 (%.5)]() -> Core.IntLiteral = "int.convert_checked";
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @Convert.5(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %.1: type = int_type unsigned, %N [symbolic = %.1 (constants.%.7)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn[%self.param_patt: @Convert.5.%.1 (%.7)]() -> Core.IntLiteral = "int.convert_checked";
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @Convert.6(constants.%Dest: type, constants.%Self.3: @As.%As.type (%As.type.2)) {
|
|
// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
|
|
// CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%Dest)> [symbolic = %As.type (constants.%As.type.2)]
|
|
// CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.4)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn[%self.param_patt: @Convert.6.%Self (%Self.4)]() -> @Convert.6.%Dest (%Dest);
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @Convert.7(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %.1: type = int_type signed, %N [symbolic = %.1 (constants.%.5)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn[%self.param_patt: Core.IntLiteral]() -> @Convert.7.%.1 (%.5) = "int.convert_checked";
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @Convert.8(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %.1: type = int_type unsigned, %N [symbolic = %.1 (constants.%.7)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn[%self.param_patt: Core.IntLiteral]() -> @Convert.8.%.1 (%.7) = "int.convert_checked";
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @Convert.9(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %.1: type = int_type signed, %N [symbolic = %.1 (constants.%.5)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn[%self.param_patt: @Convert.9.%.1 (%.5)]() -> Core.IntLiteral = "int.convert_checked";
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @Convert.10(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %.1: type = int_type unsigned, %N [symbolic = %.1 (constants.%.7)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn[%self.param_patt: @Convert.10.%.1 (%.7)]() -> Core.IntLiteral = "int.convert_checked";
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @Convert.11[%self.param_patt: Core.IntLiteral]() -> i32 = "int.convert_checked";
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @F() -> %C.3;
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @__global_init() {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %a_ref.ref: ref %.23 = name_ref a_ref, imports.%import_ref.1
|
|
// CHECK:STDOUT: %.loc4_20.1: ref i32 = struct_access %a_ref.ref, element0
|
|
// CHECK:STDOUT: %.loc4_20.2: i32 = bind_value %.loc4_20.1
|
|
// CHECK:STDOUT: %.loc4_20.3: init %.23 = struct_init (%.loc4_20.2) to file.%a.var
|
|
// CHECK:STDOUT: %.loc4_25: init %.23 = converted %a_ref.ref, %.loc4_20.3
|
|
// CHECK:STDOUT: assign file.%a.var, %.loc4_25
|
|
// CHECK:STDOUT: %b_ref.ref: ref %.25 = name_ref b_ref, imports.%import_ref.2
|
|
// CHECK:STDOUT: %.loc5_47.1: ref %.24 = struct_access %b_ref.ref, element0
|
|
// CHECK:STDOUT: %.loc5_47.2: ref i32 = struct_access %.loc5_47.1, element0
|
|
// CHECK:STDOUT: %.loc5_47.3: i32 = bind_value %.loc5_47.2
|
|
// CHECK:STDOUT: %.loc5_47.4: ref %.24 = struct_access file.%b.var, element0
|
|
// CHECK:STDOUT: %.loc5_47.5: ref i32 = struct_access %.loc5_47.4, element0
|
|
// CHECK:STDOUT: %.loc5_47.6: init i32 = initialize_from %.loc5_47.3 to %.loc5_47.5
|
|
// CHECK:STDOUT: %.loc5_47.7: ref %tuple.type.2 = struct_access %.loc5_47.1, element1
|
|
// CHECK:STDOUT: %.loc5_47.8: ref i32 = tuple_access %.loc5_47.7, element0
|
|
// CHECK:STDOUT: %.loc5_47.9: i32 = bind_value %.loc5_47.8
|
|
// CHECK:STDOUT: %.loc5_47.10: ref %tuple.type.2 = struct_access %.loc5_47.4, element1
|
|
// CHECK:STDOUT: %.loc5_47.11: init %tuple.type.2 = tuple_init (%.loc5_47.9) to %.loc5_47.10
|
|
// CHECK:STDOUT: %.loc5_47.12: init %tuple.type.2 = converted %.loc5_47.7, %.loc5_47.11
|
|
// CHECK:STDOUT: %.loc5_47.13: init %tuple.type.2 = initialize_from %.loc5_47.12 to %.loc5_47.10
|
|
// CHECK:STDOUT: %.loc5_47.14: init %.24 = struct_init (%.loc5_47.6, %.loc5_47.13) to %.loc5_47.4
|
|
// CHECK:STDOUT: %.loc5_47.15: init %.24 = converted %.loc5_47.1, %.loc5_47.14
|
|
// CHECK:STDOUT: %.loc5_47.16: ref i32 = struct_access %b_ref.ref, element1
|
|
// CHECK:STDOUT: %.loc5_47.17: i32 = bind_value %.loc5_47.16
|
|
// CHECK:STDOUT: %.loc5_47.18: ref i32 = struct_access file.%b.var, element1
|
|
// CHECK:STDOUT: %.loc5_47.19: init i32 = initialize_from %.loc5_47.17 to %.loc5_47.18
|
|
// CHECK:STDOUT: %.loc5_47.20: init %.25 = struct_init (%.loc5_47.15, %.loc5_47.19) to file.%b.var
|
|
// CHECK:STDOUT: %.loc5_52: init %.25 = converted %b_ref.ref, %.loc5_47.20
|
|
// CHECK:STDOUT: assign file.%b.var, %.loc5_52
|
|
// CHECK:STDOUT: %F.ref: %F.type = name_ref F, imports.%import_ref.4 [template = constants.%F]
|
|
// CHECK:STDOUT: %.loc6: ref %C.3 = splice_block file.%c.var {}
|
|
// CHECK:STDOUT: %F.call: init %C.3 = call %F.ref() to %.loc6
|
|
// CHECK:STDOUT: assign file.%c.var, %F.call
|
|
// CHECK:STDOUT: return
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) {
|
|
// CHECK:STDOUT: %Dest => constants.%Dest
|
|
// CHECK:STDOUT: %Dest.patt => constants.%Dest
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @ImplicitAs(i32) {
|
|
// CHECK:STDOUT: %Dest => i32
|
|
// CHECK:STDOUT: %Dest.patt => i32
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3
|
|
// CHECK:STDOUT: %Self => constants.%Self.2
|
|
// CHECK:STDOUT: %Convert.type => constants.%Convert.type.2
|
|
// CHECK:STDOUT: %Convert => constants.%Convert.2
|
|
// CHECK:STDOUT: %.1 => constants.%.3
|
|
// CHECK:STDOUT: %.2 => constants.%.4
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @ImplicitAs(%Dest) {
|
|
// CHECK:STDOUT: %Dest => constants.%Dest
|
|
// CHECK:STDOUT: %Dest.patt => constants.%Dest
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @ImplicitAs(@Convert.1.%Dest) {
|
|
// CHECK:STDOUT: %Dest => constants.%Dest
|
|
// CHECK:STDOUT: %Dest.patt => constants.%Dest
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Convert.1(constants.%Dest, constants.%Self.1) {
|
|
// CHECK:STDOUT: %Dest => constants.%Dest
|
|
// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2
|
|
// CHECK:STDOUT: %Self => constants.%Self.1
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @ImplicitAs(constants.%.5) {
|
|
// CHECK:STDOUT: %Dest => constants.%.5
|
|
// CHECK:STDOUT: %Dest.patt => constants.%.5
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @ImplicitAs(@impl.2.%.1) {
|
|
// CHECK:STDOUT: %Dest => constants.%.5
|
|
// CHECK:STDOUT: %Dest.patt => constants.%.5
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.2(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.5
|
|
// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.4
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.2(%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.5
|
|
// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.4
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Convert.2(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.5
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @ImplicitAs(constants.%.7) {
|
|
// CHECK:STDOUT: %Dest => constants.%.7
|
|
// CHECK:STDOUT: %Dest.patt => constants.%.7
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @ImplicitAs(@impl.3.%.1) {
|
|
// CHECK:STDOUT: %Dest => constants.%.7
|
|
// CHECK:STDOUT: %Dest.patt => constants.%.7
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.3(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.7
|
|
// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.5
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.3(%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.7
|
|
// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.5
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Convert.3(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.7
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @ImplicitAs(Core.IntLiteral) {
|
|
// CHECK:STDOUT: %Dest => Core.IntLiteral
|
|
// CHECK:STDOUT: %Dest.patt => Core.IntLiteral
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.6
|
|
// CHECK:STDOUT: %Self => constants.%Self.2
|
|
// CHECK:STDOUT: %Convert.type => constants.%Convert.type.5
|
|
// CHECK:STDOUT: %Convert => constants.%Convert.5
|
|
// CHECK:STDOUT: %.1 => constants.%.9
|
|
// CHECK:STDOUT: %.2 => constants.%.10
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.5(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.5
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.5(%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.5
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Convert.4(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.5
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.6(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.7
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.6(%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.7
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Convert.5(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.7
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @As(constants.%Dest) {
|
|
// CHECK:STDOUT: %Dest => constants.%Dest
|
|
// CHECK:STDOUT: %Dest.patt => constants.%Dest
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @As(i32) {
|
|
// CHECK:STDOUT: %Dest => i32
|
|
// CHECK:STDOUT: %Dest.patt => i32
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %As.type => constants.%As.type.3
|
|
// CHECK:STDOUT: %Self => constants.%Self.4
|
|
// CHECK:STDOUT: %Convert.type => constants.%Convert.type.9
|
|
// CHECK:STDOUT: %Convert => constants.%Convert.9
|
|
// CHECK:STDOUT: %.1 => constants.%.15
|
|
// CHECK:STDOUT: %.2 => constants.%.16
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @As(%Dest) {
|
|
// CHECK:STDOUT: %Dest => constants.%Dest
|
|
// CHECK:STDOUT: %Dest.patt => constants.%Dest
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @As(@Convert.6.%Dest) {
|
|
// CHECK:STDOUT: %Dest => constants.%Dest
|
|
// CHECK:STDOUT: %Dest.patt => constants.%Dest
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Convert.6(constants.%Dest, constants.%Self.3) {
|
|
// CHECK:STDOUT: %Dest => constants.%Dest
|
|
// CHECK:STDOUT: %As.type => constants.%As.type.2
|
|
// CHECK:STDOUT: %Self => constants.%Self.3
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @As(constants.%.5) {
|
|
// CHECK:STDOUT: %Dest => constants.%.5
|
|
// CHECK:STDOUT: %Dest.patt => constants.%.5
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @As(@impl.8.%.1) {
|
|
// CHECK:STDOUT: %Dest => constants.%.5
|
|
// CHECK:STDOUT: %Dest.patt => constants.%.5
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.8(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.5
|
|
// CHECK:STDOUT: %As.type => constants.%As.type.4
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.8(%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.5
|
|
// CHECK:STDOUT: %As.type => constants.%As.type.4
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Convert.7(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.5
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @As(constants.%.7) {
|
|
// CHECK:STDOUT: %Dest => constants.%.7
|
|
// CHECK:STDOUT: %Dest.patt => constants.%.7
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @As(@impl.9.%.1) {
|
|
// CHECK:STDOUT: %Dest => constants.%.7
|
|
// CHECK:STDOUT: %Dest.patt => constants.%.7
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.9(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.7
|
|
// CHECK:STDOUT: %As.type => constants.%As.type.5
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.9(%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.7
|
|
// CHECK:STDOUT: %As.type => constants.%As.type.5
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Convert.8(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.7
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @As(Core.IntLiteral) {
|
|
// CHECK:STDOUT: %Dest => Core.IntLiteral
|
|
// CHECK:STDOUT: %Dest.patt => Core.IntLiteral
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %As.type => constants.%As.type.6
|
|
// CHECK:STDOUT: %Self => constants.%Self.4
|
|
// CHECK:STDOUT: %Convert.type => constants.%Convert.type.12
|
|
// CHECK:STDOUT: %Convert => constants.%Convert.12
|
|
// CHECK:STDOUT: %.1 => constants.%.19
|
|
// CHECK:STDOUT: %.2 => constants.%.20
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.11(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.5
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.11(%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.5
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Convert.9(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.5
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.12(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.7
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.12(%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.7
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Convert.10(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.7
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @C(constants.%S) {
|
|
// CHECK:STDOUT: %S => constants.%S
|
|
// CHECK:STDOUT: %S.patt => constants.%S
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @C(constants.%struct) {
|
|
// CHECK:STDOUT: %S => constants.%struct
|
|
// CHECK:STDOUT: %S.patt => constants.%struct
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: --- fail_bad_type.impl.carbon
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic]
|
|
// CHECK:STDOUT: %ImplicitAs.type.2: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic]
|
|
// CHECK:STDOUT: %Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2) = bind_symbolic_name Self, 1 [symbolic]
|
|
// CHECK:STDOUT: %Dest.patt: type = symbolic_binding_pattern Dest, 0 [symbolic]
|
|
// CHECK:STDOUT: %ImplicitAs.type.3: type = facet_type <@ImplicitAs, @ImplicitAs(i32)> [template]
|
|
// CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic]
|
|
// CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic]
|
|
// CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %.1: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic]
|
|
// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, imports.%import_ref.11 [symbolic]
|
|
// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(i32) [template]
|
|
// CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template]
|
|
// CHECK:STDOUT: %.3: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template]
|
|
// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, imports.%import_ref.12 [template]
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic]
|
|
// CHECK:STDOUT: %.5: type = int_type signed, %N [symbolic]
|
|
// CHECK:STDOUT: %ImplicitAs.type.4: type = facet_type <@ImplicitAs, @ImplicitAs(%.5)> [symbolic]
|
|
// CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic]
|
|
// CHECK:STDOUT: %Convert.type.3: type = fn_type @Convert.2, @impl.2(%N) [symbolic]
|
|
// CHECK:STDOUT: %Convert.3: %Convert.type.3 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %.6: <witness> = interface_witness (%Convert.3) [symbolic]
|
|
// CHECK:STDOUT: %.7: type = int_type unsigned, %N [symbolic]
|
|
// CHECK:STDOUT: %ImplicitAs.type.5: type = facet_type <@ImplicitAs, @ImplicitAs(%.7)> [symbolic]
|
|
// CHECK:STDOUT: %Convert.type.4: type = fn_type @Convert.3, @impl.3(%N) [symbolic]
|
|
// CHECK:STDOUT: %Convert.4: %Convert.type.4 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %.8: <witness> = interface_witness (%Convert.4) [symbolic]
|
|
// CHECK:STDOUT: %ImplicitAs.type.6: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [template]
|
|
// CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template]
|
|
// CHECK:STDOUT: %Convert.5: %Convert.type.5 = struct_value () [template]
|
|
// CHECK:STDOUT: %.9: type = assoc_entity_type %ImplicitAs.type.6, %Convert.type.5 [template]
|
|
// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.22 [template]
|
|
// CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.4, @impl.5(%N) [symbolic]
|
|
// CHECK:STDOUT: %Convert.6: %Convert.type.6 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %.11: <witness> = interface_witness (%Convert.6) [symbolic]
|
|
// CHECK:STDOUT: %Convert.type.7: type = fn_type @Convert.5, @impl.6(%N) [symbolic]
|
|
// CHECK:STDOUT: %Convert.7: %Convert.type.7 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %.12: <witness> = interface_witness (%Convert.7) [symbolic]
|
|
// CHECK:STDOUT: %As.type.2: type = facet_type <@As, @As(%Dest)> [symbolic]
|
|
// CHECK:STDOUT: %Self.3: @As.%As.type (%As.type.2) = bind_symbolic_name Self, 1 [symbolic]
|
|
// CHECK:STDOUT: %As.type.3: type = facet_type <@As, @As(i32)> [template]
|
|
// CHECK:STDOUT: %Self.4: %As.type.2 = bind_symbolic_name Self, 1 [symbolic]
|
|
// CHECK:STDOUT: %Convert.type.8: type = fn_type @Convert.6, @As(%Dest) [symbolic]
|
|
// CHECK:STDOUT: %Convert.8: %Convert.type.8 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %.13: type = assoc_entity_type %As.type.2, %Convert.type.8 [symbolic]
|
|
// CHECK:STDOUT: %.14: %.13 = assoc_entity element0, imports.%import_ref.35 [symbolic]
|
|
// CHECK:STDOUT: %Convert.type.9: type = fn_type @Convert.6, @As(i32) [template]
|
|
// CHECK:STDOUT: %Convert.9: %Convert.type.9 = struct_value () [template]
|
|
// CHECK:STDOUT: %.15: type = assoc_entity_type %As.type.3, %Convert.type.9 [template]
|
|
// CHECK:STDOUT: %.16: %.15 = assoc_entity element0, imports.%import_ref.36 [template]
|
|
// CHECK:STDOUT: %As.type.4: type = facet_type <@As, @As(%.5)> [symbolic]
|
|
// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.7, @impl.8(%N) [symbolic]
|
|
// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %.17: <witness> = interface_witness (%Convert.10) [symbolic]
|
|
// CHECK:STDOUT: %As.type.5: type = facet_type <@As, @As(%.7)> [symbolic]
|
|
// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.8, @impl.9(%N) [symbolic]
|
|
// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %.18: <witness> = interface_witness (%Convert.11) [symbolic]
|
|
// CHECK:STDOUT: %As.type.6: type = facet_type <@As, @As(Core.IntLiteral)> [template]
|
|
// CHECK:STDOUT: %Convert.type.12: type = fn_type @Convert.6, @As(Core.IntLiteral) [template]
|
|
// CHECK:STDOUT: %Convert.12: %Convert.type.12 = struct_value () [template]
|
|
// CHECK:STDOUT: %.19: type = assoc_entity_type %As.type.6, %Convert.type.12 [template]
|
|
// CHECK:STDOUT: %.20: %.19 = assoc_entity element0, imports.%import_ref.46 [template]
|
|
// CHECK:STDOUT: %Convert.type.13: type = fn_type @Convert.9, @impl.11(%N) [symbolic]
|
|
// CHECK:STDOUT: %Convert.13: %Convert.type.13 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %.21: <witness> = interface_witness (%Convert.13) [symbolic]
|
|
// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.10, @impl.12(%N) [symbolic]
|
|
// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %.22: <witness> = interface_witness (%Convert.14) [symbolic]
|
|
// CHECK:STDOUT: %C.type: type = generic_class_type @C [template]
|
|
// CHECK:STDOUT: %C.1: %C.type = struct_value () [template]
|
|
// CHECK:STDOUT: %.25: type = struct_type {.a: i32, .b: i32} [template]
|
|
// CHECK:STDOUT: %S: %.25 = bind_symbolic_name S, 0 [symbolic]
|
|
// CHECK:STDOUT: %S.patt: %.25 = symbolic_binding_pattern S, 0 [symbolic]
|
|
// CHECK:STDOUT: %.26: Core.IntLiteral = int_value 1 [template]
|
|
// CHECK:STDOUT: %.27: Core.IntLiteral = int_value 2 [template]
|
|
// CHECK:STDOUT: %.28: type = struct_type {.c: Core.IntLiteral, .d: Core.IntLiteral} [template]
|
|
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
|
|
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
|
|
// CHECK:STDOUT: %.30: i32 = int_value 2 [template]
|
|
// CHECK:STDOUT: %.31: i32 = int_value 1 [template]
|
|
// CHECK:STDOUT: %struct: %.25 = struct_value (%.31, %.30) [template]
|
|
// CHECK:STDOUT: %C.3: type = class_type @C, @C(%struct) [template]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: imports {
|
|
// CHECK:STDOUT: %import_ref.1 = import_ref Implicit//default, inst+17, unloaded
|
|
// CHECK:STDOUT: %import_ref.2 = import_ref Implicit//default, inst+411, unloaded
|
|
// CHECK:STDOUT: %import_ref.3: %C.type = import_ref Implicit//default, inst+465, loaded [template = constants.%C.1]
|
|
// CHECK:STDOUT: %import_ref.4: %F.type = import_ref Implicit//default, inst+505, loaded [template = constants.%F]
|
|
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
|
|
// CHECK:STDOUT: import Core//prelude
|
|
// CHECK:STDOUT: import Core//prelude/...
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %import_ref.5 = import_ref Implicit//default, inst+35, unloaded
|
|
// CHECK:STDOUT: %import_ref.6 = import_ref Implicit//default, inst+36, unloaded
|
|
// CHECK:STDOUT: %import_ref.7 = import_ref Implicit//default, inst+37, unloaded
|
|
// CHECK:STDOUT: %import_ref.8: type = import_ref Implicit//default, inst+71, loaded [template = Core.IntLiteral]
|
|
// CHECK:STDOUT: %import_ref.9: type = import_ref Implicit//default, inst+72, loaded [template = constants.%ImplicitAs.type.3]
|
|
// CHECK:STDOUT: %import_ref.10 = import_ref Implicit//default, inst+73, unloaded
|
|
// CHECK:STDOUT: %import_ref.11 = import_ref Implicit//default, inst+52, unloaded
|
|
// CHECK:STDOUT: %import_ref.13: type = import_ref Implicit//default, inst+83, loaded [template = Core.IntLiteral]
|
|
// CHECK:STDOUT: %import_ref.14: type = import_ref Implicit//default, inst+84, loaded [symbolic = @impl.2.%ImplicitAs.type (constants.%ImplicitAs.type.4)]
|
|
// CHECK:STDOUT: %import_ref.15 = import_ref Implicit//default, inst+85, unloaded
|
|
// CHECK:STDOUT: %import_ref.16: type = import_ref Implicit//default, inst+113, loaded [template = Core.IntLiteral]
|
|
// CHECK:STDOUT: %import_ref.17: type = import_ref Implicit//default, inst+114, loaded [symbolic = @impl.3.%ImplicitAs.type (constants.%ImplicitAs.type.5)]
|
|
// CHECK:STDOUT: %import_ref.18 = import_ref Implicit//default, inst+115, unloaded
|
|
// CHECK:STDOUT: %import_ref.19: type = import_ref Implicit//default, inst+138, loaded [template = i32]
|
|
// CHECK:STDOUT: %import_ref.20: type = import_ref Implicit//default, inst+139, loaded [template = constants.%ImplicitAs.type.6]
|
|
// CHECK:STDOUT: %import_ref.21 = import_ref Implicit//default, inst+140, unloaded
|
|
// CHECK:STDOUT: %import_ref.23: type = import_ref Implicit//default, inst+151, loaded [symbolic = @impl.5.%.1 (constants.%.5)]
|
|
// CHECK:STDOUT: %import_ref.24: type = import_ref Implicit//default, inst+152, loaded [template = constants.%ImplicitAs.type.6]
|
|
// CHECK:STDOUT: %import_ref.25 = import_ref Implicit//default, inst+153, unloaded
|
|
// CHECK:STDOUT: %import_ref.26: type = import_ref Implicit//default, inst+178, loaded [symbolic = @impl.6.%.1 (constants.%.7)]
|
|
// CHECK:STDOUT: %import_ref.27: type = import_ref Implicit//default, inst+179, loaded [template = constants.%ImplicitAs.type.6]
|
|
// CHECK:STDOUT: %import_ref.28 = import_ref Implicit//default, inst+180, unloaded
|
|
// CHECK:STDOUT: %import_ref.29 = import_ref Implicit//default, inst+210, unloaded
|
|
// CHECK:STDOUT: %import_ref.30 = import_ref Implicit//default, inst+211, unloaded
|
|
// CHECK:STDOUT: %import_ref.31 = import_ref Implicit//default, inst+212, unloaded
|
|
// CHECK:STDOUT: %import_ref.32: type = import_ref Implicit//default, inst+214, loaded [template = Core.IntLiteral]
|
|
// CHECK:STDOUT: %import_ref.33: type = import_ref Implicit//default, inst+215, loaded [template = constants.%As.type.3]
|
|
// CHECK:STDOUT: %import_ref.34 = import_ref Implicit//default, inst+216, unloaded
|
|
// CHECK:STDOUT: %import_ref.35 = import_ref Implicit//default, inst+231, unloaded
|
|
// CHECK:STDOUT: %import_ref.37: type = import_ref Implicit//default, inst+253, loaded [template = Core.IntLiteral]
|
|
// CHECK:STDOUT: %import_ref.38: type = import_ref Implicit//default, inst+254, loaded [symbolic = @impl.8.%As.type (constants.%As.type.4)]
|
|
// CHECK:STDOUT: %import_ref.39 = import_ref Implicit//default, inst+255, unloaded
|
|
// CHECK:STDOUT: %import_ref.40: type = import_ref Implicit//default, inst+282, loaded [template = Core.IntLiteral]
|
|
// CHECK:STDOUT: %import_ref.41: type = import_ref Implicit//default, inst+283, loaded [symbolic = @impl.9.%As.type (constants.%As.type.5)]
|
|
// CHECK:STDOUT: %import_ref.42 = import_ref Implicit//default, inst+284, unloaded
|
|
// CHECK:STDOUT: %import_ref.43: type = import_ref Implicit//default, inst+307, loaded [template = i32]
|
|
// CHECK:STDOUT: %import_ref.44: type = import_ref Implicit//default, inst+308, loaded [template = constants.%As.type.6]
|
|
// CHECK:STDOUT: %import_ref.45 = import_ref Implicit//default, inst+309, unloaded
|
|
// CHECK:STDOUT: %import_ref.47: type = import_ref Implicit//default, inst+320, loaded [symbolic = @impl.11.%.1 (constants.%.5)]
|
|
// CHECK:STDOUT: %import_ref.48: type = import_ref Implicit//default, inst+321, loaded [template = constants.%As.type.6]
|
|
// CHECK:STDOUT: %import_ref.49 = import_ref Implicit//default, inst+322, unloaded
|
|
// CHECK:STDOUT: %import_ref.50: type = import_ref Implicit//default, inst+347, loaded [symbolic = @impl.12.%.1 (constants.%.7)]
|
|
// CHECK:STDOUT: %import_ref.51: type = import_ref Implicit//default, inst+348, loaded [template = constants.%As.type.6]
|
|
// CHECK:STDOUT: %import_ref.52 = import_ref Implicit//default, inst+349, unloaded
|
|
// CHECK:STDOUT: %import_ref.53 = import_ref Implicit//default, inst+470, unloaded
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: file {
|
|
// CHECK:STDOUT: package: <namespace> = namespace [template] {
|
|
// CHECK:STDOUT: .a_ref = imports.%import_ref.1
|
|
// CHECK:STDOUT: .b_ref = imports.%import_ref.2
|
|
// CHECK:STDOUT: .C = imports.%import_ref.3
|
|
// CHECK:STDOUT: .F = imports.%import_ref.4
|
|
// CHECK:STDOUT: .Core = imports.%Core
|
|
// CHECK:STDOUT: .c_bad = %c_bad
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %Implicit.import = import Implicit
|
|
// CHECK:STDOUT: %default.import = import <invalid>
|
|
// CHECK:STDOUT: %Core.import = import Core
|
|
// CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.3 [template = constants.%C.1]
|
|
// CHECK:STDOUT: %.loc11_20: Core.IntLiteral = int_value 1 [template = constants.%.26]
|
|
// CHECK:STDOUT: %.loc11_28: Core.IntLiteral = int_value 2 [template = constants.%.27]
|
|
// CHECK:STDOUT: %.loc11_29: %.28 = struct_literal (%.loc11_20, %.loc11_28)
|
|
// CHECK:STDOUT: %c_bad.var: ref <error> = var c_bad
|
|
// CHECK:STDOUT: %c_bad: ref <error> = bind_name c_bad, %c_bad.var
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic interface @ImplicitAs(constants.%Dest: type) {
|
|
// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
|
|
// CHECK:STDOUT: %Dest.patt: type = symbolic_binding_pattern Dest, 0 [symbolic = %Dest.patt (constants.%Dest.patt)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)]
|
|
// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)]
|
|
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)]
|
|
// CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)]
|
|
// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.1)]
|
|
// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.1) = assoc_entity element0, imports.%import_ref.11 [symbolic = %.2 (constants.%.2)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: interface {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: .Self = imports.%import_ref.5
|
|
// CHECK:STDOUT: .Convert = imports.%import_ref.6
|
|
// CHECK:STDOUT: witness = (imports.%import_ref.7)
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic interface @As(constants.%Dest: type) {
|
|
// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
|
|
// CHECK:STDOUT: %Dest.patt: type = symbolic_binding_pattern Dest, 0 [symbolic = %Dest.patt (constants.%Dest.patt)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%Dest)> [symbolic = %As.type (constants.%As.type.2)]
|
|
// CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.4)]
|
|
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.6, @As(%Dest) [symbolic = %Convert.type (constants.%Convert.type.8)]
|
|
// CHECK:STDOUT: %Convert: @As.%Convert.type (%Convert.type.8) = struct_value () [symbolic = %Convert (constants.%Convert.8)]
|
|
// CHECK:STDOUT: %.1: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.8) [symbolic = %.1 (constants.%.13)]
|
|
// CHECK:STDOUT: %.2: @As.%.1 (%.13) = assoc_entity element0, imports.%import_ref.35 [symbolic = %.2 (constants.%.14)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: interface {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: .Self = imports.%import_ref.29
|
|
// CHECK:STDOUT: .Convert = imports.%import_ref.30
|
|
// CHECK:STDOUT: witness = (imports.%import_ref.31)
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: impl @impl.1: imports.%import_ref.8 as imports.%import_ref.9 {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: witness = imports.%import_ref.10
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic impl @impl.2(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
|
|
// CHECK:STDOUT: %.1: type = int_type signed, %N [symbolic = %.1 (constants.%.5)]
|
|
// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%.1)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.4)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.2, @impl.2(%N) [symbolic = %Convert.type (constants.%Convert.type.3)]
|
|
// CHECK:STDOUT: %Convert: @impl.2.%Convert.type (%Convert.type.3) = struct_value () [symbolic = %Convert (constants.%Convert.3)]
|
|
// CHECK:STDOUT: %.2: <witness> = interface_witness (%Convert) [symbolic = %.2 (constants.%.6)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: impl: imports.%import_ref.13 as imports.%import_ref.14 {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: witness = imports.%import_ref.15
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic impl @impl.3(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
|
|
// CHECK:STDOUT: %.1: type = int_type unsigned, %N [symbolic = %.1 (constants.%.7)]
|
|
// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%.1)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.5)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.3, @impl.3(%N) [symbolic = %Convert.type (constants.%Convert.type.4)]
|
|
// CHECK:STDOUT: %Convert: @impl.3.%Convert.type (%Convert.type.4) = struct_value () [symbolic = %Convert (constants.%Convert.4)]
|
|
// CHECK:STDOUT: %.2: <witness> = interface_witness (%Convert) [symbolic = %.2 (constants.%.8)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: impl: imports.%import_ref.16 as imports.%import_ref.17 {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: witness = imports.%import_ref.18
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: impl @impl.4: imports.%import_ref.19 as imports.%import_ref.20 {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: witness = imports.%import_ref.21
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic impl @impl.5(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
|
|
// CHECK:STDOUT: %.1: type = int_type signed, %N [symbolic = %.1 (constants.%.5)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.4, @impl.5(%N) [symbolic = %Convert.type (constants.%Convert.type.6)]
|
|
// CHECK:STDOUT: %Convert: @impl.5.%Convert.type (%Convert.type.6) = struct_value () [symbolic = %Convert (constants.%Convert.6)]
|
|
// CHECK:STDOUT: %.2: <witness> = interface_witness (%Convert) [symbolic = %.2 (constants.%.11)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: impl: imports.%import_ref.23 as imports.%import_ref.24 {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: witness = imports.%import_ref.25
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic impl @impl.6(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
|
|
// CHECK:STDOUT: %.1: type = int_type unsigned, %N [symbolic = %.1 (constants.%.7)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.5, @impl.6(%N) [symbolic = %Convert.type (constants.%Convert.type.7)]
|
|
// CHECK:STDOUT: %Convert: @impl.6.%Convert.type (%Convert.type.7) = struct_value () [symbolic = %Convert (constants.%Convert.7)]
|
|
// CHECK:STDOUT: %.2: <witness> = interface_witness (%Convert) [symbolic = %.2 (constants.%.12)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: impl: imports.%import_ref.26 as imports.%import_ref.27 {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: witness = imports.%import_ref.28
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: impl @impl.7: imports.%import_ref.32 as imports.%import_ref.33 {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: witness = imports.%import_ref.34
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic impl @impl.8(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
|
|
// CHECK:STDOUT: %.1: type = int_type signed, %N [symbolic = %.1 (constants.%.5)]
|
|
// CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%.1)> [symbolic = %As.type (constants.%As.type.4)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.7, @impl.8(%N) [symbolic = %Convert.type (constants.%Convert.type.10)]
|
|
// CHECK:STDOUT: %Convert: @impl.8.%Convert.type (%Convert.type.10) = struct_value () [symbolic = %Convert (constants.%Convert.10)]
|
|
// CHECK:STDOUT: %.2: <witness> = interface_witness (%Convert) [symbolic = %.2 (constants.%.17)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: impl: imports.%import_ref.37 as imports.%import_ref.38 {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: witness = imports.%import_ref.39
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic impl @impl.9(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
|
|
// CHECK:STDOUT: %.1: type = int_type unsigned, %N [symbolic = %.1 (constants.%.7)]
|
|
// CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%.1)> [symbolic = %As.type (constants.%As.type.5)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.8, @impl.9(%N) [symbolic = %Convert.type (constants.%Convert.type.11)]
|
|
// CHECK:STDOUT: %Convert: @impl.9.%Convert.type (%Convert.type.11) = struct_value () [symbolic = %Convert (constants.%Convert.11)]
|
|
// CHECK:STDOUT: %.2: <witness> = interface_witness (%Convert) [symbolic = %.2 (constants.%.18)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: impl: imports.%import_ref.40 as imports.%import_ref.41 {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: witness = imports.%import_ref.42
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: impl @impl.10: imports.%import_ref.43 as imports.%import_ref.44 {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: witness = imports.%import_ref.45
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic impl @impl.11(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
|
|
// CHECK:STDOUT: %.1: type = int_type signed, %N [symbolic = %.1 (constants.%.5)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.9, @impl.11(%N) [symbolic = %Convert.type (constants.%Convert.type.13)]
|
|
// CHECK:STDOUT: %Convert: @impl.11.%Convert.type (%Convert.type.13) = struct_value () [symbolic = %Convert (constants.%Convert.13)]
|
|
// CHECK:STDOUT: %.2: <witness> = interface_witness (%Convert) [symbolic = %.2 (constants.%.21)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: impl: imports.%import_ref.47 as imports.%import_ref.48 {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: witness = imports.%import_ref.49
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic impl @impl.12(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
|
|
// CHECK:STDOUT: %.1: type = int_type unsigned, %N [symbolic = %.1 (constants.%.7)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.10, @impl.12(%N) [symbolic = %Convert.type (constants.%Convert.type.14)]
|
|
// CHECK:STDOUT: %Convert: @impl.12.%Convert.type (%Convert.type.14) = struct_value () [symbolic = %Convert (constants.%Convert.14)]
|
|
// CHECK:STDOUT: %.2: <witness> = interface_witness (%Convert) [symbolic = %.2 (constants.%.22)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: impl: imports.%import_ref.50 as imports.%import_ref.51 {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: witness = imports.%import_ref.52
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic class @C(constants.%S: %.25) {
|
|
// CHECK:STDOUT: %S: %.25 = bind_symbolic_name S, 0 [symbolic = %S (constants.%S)]
|
|
// CHECK:STDOUT: %S.patt: %.25 = symbolic_binding_pattern S, 0 [symbolic = %S.patt (constants.%S.patt)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: class {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: .Self = imports.%import_ref.53
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @Convert.1(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2)) {
|
|
// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
|
|
// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)]
|
|
// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%Self (%Self.2)]() -> @Convert.1.%Dest (%Dest);
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @Convert.2(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %.1: type = int_type signed, %N [symbolic = %.1 (constants.%.5)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn[%self.param_patt: Core.IntLiteral]() -> @Convert.2.%.1 (%.5) = "int.convert_checked";
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @Convert.3(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %.1: type = int_type unsigned, %N [symbolic = %.1 (constants.%.7)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn[%self.param_patt: Core.IntLiteral]() -> @Convert.3.%.1 (%.7) = "int.convert_checked";
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @Convert.4(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %.1: type = int_type signed, %N [symbolic = %.1 (constants.%.5)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn[%self.param_patt: @Convert.4.%.1 (%.5)]() -> Core.IntLiteral = "int.convert_checked";
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @Convert.5(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %.1: type = int_type unsigned, %N [symbolic = %.1 (constants.%.7)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn[%self.param_patt: @Convert.5.%.1 (%.7)]() -> Core.IntLiteral = "int.convert_checked";
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @Convert.6(constants.%Dest: type, constants.%Self.3: @As.%As.type (%As.type.2)) {
|
|
// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
|
|
// CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%Dest)> [symbolic = %As.type (constants.%As.type.2)]
|
|
// CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.4)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn[%self.param_patt: @Convert.6.%Self (%Self.4)]() -> @Convert.6.%Dest (%Dest);
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @Convert.7(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %.1: type = int_type signed, %N [symbolic = %.1 (constants.%.5)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn[%self.param_patt: Core.IntLiteral]() -> @Convert.7.%.1 (%.5) = "int.convert_checked";
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @Convert.8(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %.1: type = int_type unsigned, %N [symbolic = %.1 (constants.%.7)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn[%self.param_patt: Core.IntLiteral]() -> @Convert.8.%.1 (%.7) = "int.convert_checked";
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @Convert.9(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %.1: type = int_type signed, %N [symbolic = %.1 (constants.%.5)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn[%self.param_patt: @Convert.9.%.1 (%.5)]() -> Core.IntLiteral = "int.convert_checked";
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @Convert.10(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %.1: type = int_type unsigned, %N [symbolic = %.1 (constants.%.7)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn[%self.param_patt: @Convert.10.%.1 (%.7)]() -> Core.IntLiteral = "int.convert_checked";
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @F() -> %C.3;
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @__global_init() {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %F.ref: %F.type = name_ref F, imports.%import_ref.4 [template = constants.%F]
|
|
// CHECK:STDOUT: %.loc11: ref %C.3 = temporary_storage
|
|
// CHECK:STDOUT: %F.call: init %C.3 = call %F.ref() to %.loc11
|
|
// CHECK:STDOUT: assign file.%c_bad.var, <error>
|
|
// CHECK:STDOUT: return
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) {
|
|
// CHECK:STDOUT: %Dest => constants.%Dest
|
|
// CHECK:STDOUT: %Dest.patt => constants.%Dest
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @ImplicitAs(i32) {
|
|
// CHECK:STDOUT: %Dest => i32
|
|
// CHECK:STDOUT: %Dest.patt => i32
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3
|
|
// CHECK:STDOUT: %Self => constants.%Self.2
|
|
// CHECK:STDOUT: %Convert.type => constants.%Convert.type.2
|
|
// CHECK:STDOUT: %Convert => constants.%Convert.2
|
|
// CHECK:STDOUT: %.1 => constants.%.3
|
|
// CHECK:STDOUT: %.2 => constants.%.4
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @ImplicitAs(%Dest) {
|
|
// CHECK:STDOUT: %Dest => constants.%Dest
|
|
// CHECK:STDOUT: %Dest.patt => constants.%Dest
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @ImplicitAs(@Convert.1.%Dest) {
|
|
// CHECK:STDOUT: %Dest => constants.%Dest
|
|
// CHECK:STDOUT: %Dest.patt => constants.%Dest
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Convert.1(constants.%Dest, constants.%Self.1) {
|
|
// CHECK:STDOUT: %Dest => constants.%Dest
|
|
// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2
|
|
// CHECK:STDOUT: %Self => constants.%Self.1
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @ImplicitAs(constants.%.5) {
|
|
// CHECK:STDOUT: %Dest => constants.%.5
|
|
// CHECK:STDOUT: %Dest.patt => constants.%.5
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @ImplicitAs(@impl.2.%.1) {
|
|
// CHECK:STDOUT: %Dest => constants.%.5
|
|
// CHECK:STDOUT: %Dest.patt => constants.%.5
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.2(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.5
|
|
// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.4
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.2(%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.5
|
|
// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.4
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Convert.2(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.5
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @ImplicitAs(constants.%.7) {
|
|
// CHECK:STDOUT: %Dest => constants.%.7
|
|
// CHECK:STDOUT: %Dest.patt => constants.%.7
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @ImplicitAs(@impl.3.%.1) {
|
|
// CHECK:STDOUT: %Dest => constants.%.7
|
|
// CHECK:STDOUT: %Dest.patt => constants.%.7
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.3(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.7
|
|
// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.5
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.3(%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.7
|
|
// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.5
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Convert.3(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.7
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @ImplicitAs(Core.IntLiteral) {
|
|
// CHECK:STDOUT: %Dest => Core.IntLiteral
|
|
// CHECK:STDOUT: %Dest.patt => Core.IntLiteral
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.6
|
|
// CHECK:STDOUT: %Self => constants.%Self.2
|
|
// CHECK:STDOUT: %Convert.type => constants.%Convert.type.5
|
|
// CHECK:STDOUT: %Convert => constants.%Convert.5
|
|
// CHECK:STDOUT: %.1 => constants.%.9
|
|
// CHECK:STDOUT: %.2 => constants.%.10
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.5(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.5
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.5(%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.5
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Convert.4(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.5
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.6(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.7
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.6(%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.7
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Convert.5(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.7
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @As(constants.%Dest) {
|
|
// CHECK:STDOUT: %Dest => constants.%Dest
|
|
// CHECK:STDOUT: %Dest.patt => constants.%Dest
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @As(i32) {
|
|
// CHECK:STDOUT: %Dest => i32
|
|
// CHECK:STDOUT: %Dest.patt => i32
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %As.type => constants.%As.type.3
|
|
// CHECK:STDOUT: %Self => constants.%Self.4
|
|
// CHECK:STDOUT: %Convert.type => constants.%Convert.type.9
|
|
// CHECK:STDOUT: %Convert => constants.%Convert.9
|
|
// CHECK:STDOUT: %.1 => constants.%.15
|
|
// CHECK:STDOUT: %.2 => constants.%.16
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @As(%Dest) {
|
|
// CHECK:STDOUT: %Dest => constants.%Dest
|
|
// CHECK:STDOUT: %Dest.patt => constants.%Dest
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @As(@Convert.6.%Dest) {
|
|
// CHECK:STDOUT: %Dest => constants.%Dest
|
|
// CHECK:STDOUT: %Dest.patt => constants.%Dest
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Convert.6(constants.%Dest, constants.%Self.3) {
|
|
// CHECK:STDOUT: %Dest => constants.%Dest
|
|
// CHECK:STDOUT: %As.type => constants.%As.type.2
|
|
// CHECK:STDOUT: %Self => constants.%Self.3
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @As(constants.%.5) {
|
|
// CHECK:STDOUT: %Dest => constants.%.5
|
|
// CHECK:STDOUT: %Dest.patt => constants.%.5
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @As(@impl.8.%.1) {
|
|
// CHECK:STDOUT: %Dest => constants.%.5
|
|
// CHECK:STDOUT: %Dest.patt => constants.%.5
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.8(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.5
|
|
// CHECK:STDOUT: %As.type => constants.%As.type.4
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.8(%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.5
|
|
// CHECK:STDOUT: %As.type => constants.%As.type.4
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Convert.7(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.5
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @As(constants.%.7) {
|
|
// CHECK:STDOUT: %Dest => constants.%.7
|
|
// CHECK:STDOUT: %Dest.patt => constants.%.7
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @As(@impl.9.%.1) {
|
|
// CHECK:STDOUT: %Dest => constants.%.7
|
|
// CHECK:STDOUT: %Dest.patt => constants.%.7
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.9(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.7
|
|
// CHECK:STDOUT: %As.type => constants.%As.type.5
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.9(%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.7
|
|
// CHECK:STDOUT: %As.type => constants.%As.type.5
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Convert.8(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.7
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @As(Core.IntLiteral) {
|
|
// CHECK:STDOUT: %Dest => Core.IntLiteral
|
|
// CHECK:STDOUT: %Dest.patt => Core.IntLiteral
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %As.type => constants.%As.type.6
|
|
// CHECK:STDOUT: %Self => constants.%Self.4
|
|
// CHECK:STDOUT: %Convert.type => constants.%Convert.type.12
|
|
// CHECK:STDOUT: %Convert => constants.%Convert.12
|
|
// CHECK:STDOUT: %.1 => constants.%.19
|
|
// CHECK:STDOUT: %.2 => constants.%.20
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.11(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.5
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.11(%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.5
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Convert.9(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.5
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.12(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.7
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.12(%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.7
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Convert.10(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.7
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @C(constants.%S) {
|
|
// CHECK:STDOUT: %S => constants.%S
|
|
// CHECK:STDOUT: %S.patt => constants.%S
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @C(constants.%struct) {
|
|
// CHECK:STDOUT: %S => constants.%struct
|
|
// CHECK:STDOUT: %S.patt => constants.%struct
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: --- fail_bad_value.impl.carbon
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic]
|
|
// CHECK:STDOUT: %ImplicitAs.type.2: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic]
|
|
// CHECK:STDOUT: %Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2) = bind_symbolic_name Self, 1 [symbolic]
|
|
// CHECK:STDOUT: %Dest.patt: type = symbolic_binding_pattern Dest, 0 [symbolic]
|
|
// CHECK:STDOUT: %ImplicitAs.type.3: type = facet_type <@ImplicitAs, @ImplicitAs(i32)> [template]
|
|
// CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic]
|
|
// CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic]
|
|
// CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %.1: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic]
|
|
// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, imports.%import_ref.11 [symbolic]
|
|
// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(i32) [template]
|
|
// CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template]
|
|
// CHECK:STDOUT: %.3: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template]
|
|
// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, imports.%import_ref.12 [template]
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic]
|
|
// CHECK:STDOUT: %.5: type = int_type signed, %N [symbolic]
|
|
// CHECK:STDOUT: %ImplicitAs.type.4: type = facet_type <@ImplicitAs, @ImplicitAs(%.5)> [symbolic]
|
|
// CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic]
|
|
// CHECK:STDOUT: %Convert.type.3: type = fn_type @Convert.2, @impl.2(%N) [symbolic]
|
|
// CHECK:STDOUT: %Convert.3: %Convert.type.3 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %.6: <witness> = interface_witness (%Convert.3) [symbolic]
|
|
// CHECK:STDOUT: %.7: type = int_type unsigned, %N [symbolic]
|
|
// CHECK:STDOUT: %ImplicitAs.type.5: type = facet_type <@ImplicitAs, @ImplicitAs(%.7)> [symbolic]
|
|
// CHECK:STDOUT: %Convert.type.4: type = fn_type @Convert.3, @impl.3(%N) [symbolic]
|
|
// CHECK:STDOUT: %Convert.4: %Convert.type.4 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %.8: <witness> = interface_witness (%Convert.4) [symbolic]
|
|
// CHECK:STDOUT: %ImplicitAs.type.6: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [template]
|
|
// CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template]
|
|
// CHECK:STDOUT: %Convert.5: %Convert.type.5 = struct_value () [template]
|
|
// CHECK:STDOUT: %.9: type = assoc_entity_type %ImplicitAs.type.6, %Convert.type.5 [template]
|
|
// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.22 [template]
|
|
// CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.4, @impl.5(%N) [symbolic]
|
|
// CHECK:STDOUT: %Convert.6: %Convert.type.6 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %.11: <witness> = interface_witness (%Convert.6) [symbolic]
|
|
// CHECK:STDOUT: %Convert.type.7: type = fn_type @Convert.5, @impl.6(%N) [symbolic]
|
|
// CHECK:STDOUT: %Convert.7: %Convert.type.7 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %.12: <witness> = interface_witness (%Convert.7) [symbolic]
|
|
// CHECK:STDOUT: %As.type.2: type = facet_type <@As, @As(%Dest)> [symbolic]
|
|
// CHECK:STDOUT: %Self.3: @As.%As.type (%As.type.2) = bind_symbolic_name Self, 1 [symbolic]
|
|
// CHECK:STDOUT: %As.type.3: type = facet_type <@As, @As(i32)> [template]
|
|
// CHECK:STDOUT: %Self.4: %As.type.2 = bind_symbolic_name Self, 1 [symbolic]
|
|
// CHECK:STDOUT: %Convert.type.8: type = fn_type @Convert.6, @As(%Dest) [symbolic]
|
|
// CHECK:STDOUT: %Convert.8: %Convert.type.8 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %.13: type = assoc_entity_type %As.type.2, %Convert.type.8 [symbolic]
|
|
// CHECK:STDOUT: %.14: %.13 = assoc_entity element0, imports.%import_ref.35 [symbolic]
|
|
// CHECK:STDOUT: %Convert.type.9: type = fn_type @Convert.6, @As(i32) [template]
|
|
// CHECK:STDOUT: %Convert.9: %Convert.type.9 = struct_value () [template]
|
|
// CHECK:STDOUT: %.15: type = assoc_entity_type %As.type.3, %Convert.type.9 [template]
|
|
// CHECK:STDOUT: %.16: %.15 = assoc_entity element0, imports.%import_ref.36 [template]
|
|
// CHECK:STDOUT: %As.type.4: type = facet_type <@As, @As(%.5)> [symbolic]
|
|
// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.7, @impl.8(%N) [symbolic]
|
|
// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %.17: <witness> = interface_witness (%Convert.10) [symbolic]
|
|
// CHECK:STDOUT: %As.type.5: type = facet_type <@As, @As(%.7)> [symbolic]
|
|
// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.8, @impl.9(%N) [symbolic]
|
|
// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %.18: <witness> = interface_witness (%Convert.11) [symbolic]
|
|
// CHECK:STDOUT: %As.type.6: type = facet_type <@As, @As(Core.IntLiteral)> [template]
|
|
// CHECK:STDOUT: %Convert.type.12: type = fn_type @Convert.6, @As(Core.IntLiteral) [template]
|
|
// CHECK:STDOUT: %Convert.12: %Convert.type.12 = struct_value () [template]
|
|
// CHECK:STDOUT: %.19: type = assoc_entity_type %As.type.6, %Convert.type.12 [template]
|
|
// CHECK:STDOUT: %.20: %.19 = assoc_entity element0, imports.%import_ref.46 [template]
|
|
// CHECK:STDOUT: %Convert.type.13: type = fn_type @Convert.9, @impl.11(%N) [symbolic]
|
|
// CHECK:STDOUT: %Convert.13: %Convert.type.13 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %.21: <witness> = interface_witness (%Convert.13) [symbolic]
|
|
// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.10, @impl.12(%N) [symbolic]
|
|
// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %.22: <witness> = interface_witness (%Convert.14) [symbolic]
|
|
// CHECK:STDOUT: %C.type: type = generic_class_type @C [template]
|
|
// CHECK:STDOUT: %C.1: %C.type = struct_value () [template]
|
|
// CHECK:STDOUT: %.25: type = struct_type {.a: i32, .b: i32} [template]
|
|
// CHECK:STDOUT: %S: %.25 = bind_symbolic_name S, 0 [symbolic]
|
|
// CHECK:STDOUT: %S.patt: %.25 = symbolic_binding_pattern S, 0 [symbolic]
|
|
// CHECK:STDOUT: %.26: Core.IntLiteral = int_value 3 [template]
|
|
// CHECK:STDOUT: %.27: Core.IntLiteral = int_value 4 [template]
|
|
// CHECK:STDOUT: %.28: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [template]
|
|
// CHECK:STDOUT: %.30: %.1 = assoc_entity element0, imports.%import_ref.55 [symbolic]
|
|
// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.11 [template]
|
|
// CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template]
|
|
// CHECK:STDOUT: %.31: <witness> = interface_witness (%Convert.15) [template]
|
|
// CHECK:STDOUT: %.32: <bound method> = bound_method %.26, %Convert.15 [template]
|
|
// CHECK:STDOUT: %.33: i32 = int_value 3 [template]
|
|
// CHECK:STDOUT: %.34: <bound method> = bound_method %.27, %Convert.15 [template]
|
|
// CHECK:STDOUT: %.35: i32 = int_value 4 [template]
|
|
// CHECK:STDOUT: %struct.1: %.25 = struct_value (%.33, %.35) [template]
|
|
// CHECK:STDOUT: %C.3: type = class_type @C, @C(%struct.1) [template]
|
|
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
|
|
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
|
|
// CHECK:STDOUT: %.37: i32 = int_value 2 [template]
|
|
// CHECK:STDOUT: %.38: i32 = int_value 1 [template]
|
|
// CHECK:STDOUT: %struct.2: %.25 = struct_value (%.38, %.37) [template]
|
|
// CHECK:STDOUT: %C.4: type = class_type @C, @C(%struct.2) [template]
|
|
// CHECK:STDOUT: %ImplicitAs.type.7: type = facet_type <@ImplicitAs, @ImplicitAs(%C.3)> [template]
|
|
// CHECK:STDOUT: %Convert.type.16: type = fn_type @Convert.1, @ImplicitAs(%C.3) [template]
|
|
// CHECK:STDOUT: %Convert.16: %Convert.type.16 = struct_value () [template]
|
|
// CHECK:STDOUT: %.39: type = assoc_entity_type %ImplicitAs.type.7, %Convert.type.16 [template]
|
|
// CHECK:STDOUT: %.40: %.39 = assoc_entity element0, imports.%import_ref.11 [template]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: imports {
|
|
// CHECK:STDOUT: %import_ref.1 = import_ref Implicit//default, inst+17, unloaded
|
|
// CHECK:STDOUT: %import_ref.2 = import_ref Implicit//default, inst+411, unloaded
|
|
// CHECK:STDOUT: %import_ref.3: %C.type = import_ref Implicit//default, inst+465, loaded [template = constants.%C.1]
|
|
// CHECK:STDOUT: %import_ref.4: %F.type = import_ref Implicit//default, inst+505, loaded [template = constants.%F]
|
|
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
|
|
// CHECK:STDOUT: .ImplicitAs = %import_ref.54
|
|
// CHECK:STDOUT: import Core//prelude
|
|
// CHECK:STDOUT: import Core//prelude/...
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %import_ref.5 = import_ref Implicit//default, inst+35, unloaded
|
|
// CHECK:STDOUT: %import_ref.6: @ImplicitAs.%.1 (%.1) = import_ref Implicit//default, inst+36, loaded [symbolic = @ImplicitAs.%.2 (constants.%.30)]
|
|
// CHECK:STDOUT: %import_ref.7 = import_ref Implicit//default, inst+37, unloaded
|
|
// CHECK:STDOUT: %import_ref.8: type = import_ref Implicit//default, inst+71, loaded [template = Core.IntLiteral]
|
|
// CHECK:STDOUT: %import_ref.9: type = import_ref Implicit//default, inst+72, loaded [template = constants.%ImplicitAs.type.3]
|
|
// CHECK:STDOUT: %import_ref.10: <witness> = import_ref Implicit//default, inst+73, loaded [template = constants.%.31]
|
|
// CHECK:STDOUT: %import_ref.11 = import_ref Implicit//default, inst+52, unloaded
|
|
// CHECK:STDOUT: %import_ref.13: type = import_ref Implicit//default, inst+83, loaded [template = Core.IntLiteral]
|
|
// CHECK:STDOUT: %import_ref.14: type = import_ref Implicit//default, inst+84, loaded [symbolic = @impl.2.%ImplicitAs.type (constants.%ImplicitAs.type.4)]
|
|
// CHECK:STDOUT: %import_ref.15 = import_ref Implicit//default, inst+85, unloaded
|
|
// CHECK:STDOUT: %import_ref.16: type = import_ref Implicit//default, inst+113, loaded [template = Core.IntLiteral]
|
|
// CHECK:STDOUT: %import_ref.17: type = import_ref Implicit//default, inst+114, loaded [symbolic = @impl.3.%ImplicitAs.type (constants.%ImplicitAs.type.5)]
|
|
// CHECK:STDOUT: %import_ref.18 = import_ref Implicit//default, inst+115, unloaded
|
|
// CHECK:STDOUT: %import_ref.19: type = import_ref Implicit//default, inst+138, loaded [template = i32]
|
|
// CHECK:STDOUT: %import_ref.20: type = import_ref Implicit//default, inst+139, loaded [template = constants.%ImplicitAs.type.6]
|
|
// CHECK:STDOUT: %import_ref.21 = import_ref Implicit//default, inst+140, unloaded
|
|
// CHECK:STDOUT: %import_ref.23: type = import_ref Implicit//default, inst+151, loaded [symbolic = @impl.5.%.1 (constants.%.5)]
|
|
// CHECK:STDOUT: %import_ref.24: type = import_ref Implicit//default, inst+152, loaded [template = constants.%ImplicitAs.type.6]
|
|
// CHECK:STDOUT: %import_ref.25 = import_ref Implicit//default, inst+153, unloaded
|
|
// CHECK:STDOUT: %import_ref.26: type = import_ref Implicit//default, inst+178, loaded [symbolic = @impl.6.%.1 (constants.%.7)]
|
|
// CHECK:STDOUT: %import_ref.27: type = import_ref Implicit//default, inst+179, loaded [template = constants.%ImplicitAs.type.6]
|
|
// CHECK:STDOUT: %import_ref.28 = import_ref Implicit//default, inst+180, unloaded
|
|
// CHECK:STDOUT: %import_ref.29 = import_ref Implicit//default, inst+210, unloaded
|
|
// CHECK:STDOUT: %import_ref.30 = import_ref Implicit//default, inst+211, unloaded
|
|
// CHECK:STDOUT: %import_ref.31 = import_ref Implicit//default, inst+212, unloaded
|
|
// CHECK:STDOUT: %import_ref.32: type = import_ref Implicit//default, inst+214, loaded [template = Core.IntLiteral]
|
|
// CHECK:STDOUT: %import_ref.33: type = import_ref Implicit//default, inst+215, loaded [template = constants.%As.type.3]
|
|
// CHECK:STDOUT: %import_ref.34 = import_ref Implicit//default, inst+216, unloaded
|
|
// CHECK:STDOUT: %import_ref.35 = import_ref Implicit//default, inst+231, unloaded
|
|
// CHECK:STDOUT: %import_ref.37: type = import_ref Implicit//default, inst+253, loaded [template = Core.IntLiteral]
|
|
// CHECK:STDOUT: %import_ref.38: type = import_ref Implicit//default, inst+254, loaded [symbolic = @impl.8.%As.type (constants.%As.type.4)]
|
|
// CHECK:STDOUT: %import_ref.39 = import_ref Implicit//default, inst+255, unloaded
|
|
// CHECK:STDOUT: %import_ref.40: type = import_ref Implicit//default, inst+282, loaded [template = Core.IntLiteral]
|
|
// CHECK:STDOUT: %import_ref.41: type = import_ref Implicit//default, inst+283, loaded [symbolic = @impl.9.%As.type (constants.%As.type.5)]
|
|
// CHECK:STDOUT: %import_ref.42 = import_ref Implicit//default, inst+284, unloaded
|
|
// CHECK:STDOUT: %import_ref.43: type = import_ref Implicit//default, inst+307, loaded [template = i32]
|
|
// CHECK:STDOUT: %import_ref.44: type = import_ref Implicit//default, inst+308, loaded [template = constants.%As.type.6]
|
|
// CHECK:STDOUT: %import_ref.45 = import_ref Implicit//default, inst+309, unloaded
|
|
// CHECK:STDOUT: %import_ref.47: type = import_ref Implicit//default, inst+320, loaded [symbolic = @impl.11.%.1 (constants.%.5)]
|
|
// CHECK:STDOUT: %import_ref.48: type = import_ref Implicit//default, inst+321, loaded [template = constants.%As.type.6]
|
|
// CHECK:STDOUT: %import_ref.49 = import_ref Implicit//default, inst+322, unloaded
|
|
// CHECK:STDOUT: %import_ref.50: type = import_ref Implicit//default, inst+347, loaded [symbolic = @impl.12.%.1 (constants.%.7)]
|
|
// CHECK:STDOUT: %import_ref.51: type = import_ref Implicit//default, inst+348, loaded [template = constants.%As.type.6]
|
|
// CHECK:STDOUT: %import_ref.52 = import_ref Implicit//default, inst+349, unloaded
|
|
// CHECK:STDOUT: %import_ref.53 = import_ref Implicit//default, inst+470, unloaded
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: file {
|
|
// CHECK:STDOUT: package: <namespace> = namespace [template] {
|
|
// CHECK:STDOUT: .a_ref = imports.%import_ref.1
|
|
// CHECK:STDOUT: .b_ref = imports.%import_ref.2
|
|
// CHECK:STDOUT: .C = imports.%import_ref.3
|
|
// CHECK:STDOUT: .F = imports.%import_ref.4
|
|
// CHECK:STDOUT: .Core = imports.%Core
|
|
// CHECK:STDOUT: .c_bad = %c_bad
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %Implicit.import = import Implicit
|
|
// CHECK:STDOUT: %default.import = import <invalid>
|
|
// CHECK:STDOUT: %Core.import = import Core
|
|
// CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.3 [template = constants.%C.1]
|
|
// CHECK:STDOUT: %.loc9_20: Core.IntLiteral = int_value 3 [template = constants.%.26]
|
|
// CHECK:STDOUT: %.loc9_28: Core.IntLiteral = int_value 4 [template = constants.%.27]
|
|
// CHECK:STDOUT: %.loc9_29.1: %.28 = struct_literal (%.loc9_20, %.loc9_28)
|
|
// CHECK:STDOUT: %.loc9_29.2: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.15]
|
|
// CHECK:STDOUT: %.loc9_29.3: <bound method> = bound_method %.loc9_20, %.loc9_29.2 [template = constants.%.32]
|
|
// CHECK:STDOUT: %int.convert_checked.loc9_29.1: init i32 = call %.loc9_29.3(%.loc9_20) [template = constants.%.33]
|
|
// CHECK:STDOUT: %.loc9_29.4: i32 = value_of_initializer %int.convert_checked.loc9_29.1 [template = constants.%.33]
|
|
// CHECK:STDOUT: %.loc9_29.5: i32 = converted %.loc9_20, %.loc9_29.4 [template = constants.%.33]
|
|
// CHECK:STDOUT: %.loc9_29.6: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.15]
|
|
// CHECK:STDOUT: %.loc9_29.7: <bound method> = bound_method %.loc9_28, %.loc9_29.6 [template = constants.%.34]
|
|
// CHECK:STDOUT: %int.convert_checked.loc9_29.2: init i32 = call %.loc9_29.7(%.loc9_28) [template = constants.%.35]
|
|
// CHECK:STDOUT: %.loc9_29.8: i32 = value_of_initializer %int.convert_checked.loc9_29.2 [template = constants.%.35]
|
|
// CHECK:STDOUT: %.loc9_29.9: i32 = converted %.loc9_28, %.loc9_29.8 [template = constants.%.35]
|
|
// CHECK:STDOUT: %struct: %.25 = struct_value (%.loc9_29.5, %.loc9_29.9) [template = constants.%struct.1]
|
|
// CHECK:STDOUT: %.loc9_13: %.25 = converted %.loc9_29.1, %struct [template = constants.%struct.1]
|
|
// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%struct.1) [template = constants.%C.3]
|
|
// CHECK:STDOUT: %c_bad.var: ref %C.3 = var c_bad
|
|
// CHECK:STDOUT: %c_bad: ref %C.3 = bind_name c_bad, %c_bad.var
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic interface @ImplicitAs(constants.%Dest: type) {
|
|
// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
|
|
// CHECK:STDOUT: %Dest.patt: type = symbolic_binding_pattern Dest, 0 [symbolic = %Dest.patt (constants.%Dest.patt)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)]
|
|
// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)]
|
|
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)]
|
|
// CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)]
|
|
// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.1)]
|
|
// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.1) = assoc_entity element0, imports.%import_ref.11 [symbolic = %.2 (constants.%.2)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: interface {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: .Self = imports.%import_ref.5
|
|
// CHECK:STDOUT: .Convert = imports.%import_ref.6
|
|
// CHECK:STDOUT: witness = (imports.%import_ref.7)
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic interface @As(constants.%Dest: type) {
|
|
// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
|
|
// CHECK:STDOUT: %Dest.patt: type = symbolic_binding_pattern Dest, 0 [symbolic = %Dest.patt (constants.%Dest.patt)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%Dest)> [symbolic = %As.type (constants.%As.type.2)]
|
|
// CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.4)]
|
|
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.6, @As(%Dest) [symbolic = %Convert.type (constants.%Convert.type.8)]
|
|
// CHECK:STDOUT: %Convert: @As.%Convert.type (%Convert.type.8) = struct_value () [symbolic = %Convert (constants.%Convert.8)]
|
|
// CHECK:STDOUT: %.1: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.8) [symbolic = %.1 (constants.%.13)]
|
|
// CHECK:STDOUT: %.2: @As.%.1 (%.13) = assoc_entity element0, imports.%import_ref.35 [symbolic = %.2 (constants.%.14)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: interface {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: .Self = imports.%import_ref.29
|
|
// CHECK:STDOUT: .Convert = imports.%import_ref.30
|
|
// CHECK:STDOUT: witness = (imports.%import_ref.31)
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: impl @impl.1: imports.%import_ref.8 as imports.%import_ref.9 {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: witness = imports.%import_ref.10
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic impl @impl.2(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
|
|
// CHECK:STDOUT: %.1: type = int_type signed, %N [symbolic = %.1 (constants.%.5)]
|
|
// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%.1)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.4)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.2, @impl.2(%N) [symbolic = %Convert.type (constants.%Convert.type.3)]
|
|
// CHECK:STDOUT: %Convert: @impl.2.%Convert.type (%Convert.type.3) = struct_value () [symbolic = %Convert (constants.%Convert.3)]
|
|
// CHECK:STDOUT: %.2: <witness> = interface_witness (%Convert) [symbolic = %.2 (constants.%.6)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: impl: imports.%import_ref.13 as imports.%import_ref.14 {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: witness = imports.%import_ref.15
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic impl @impl.3(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
|
|
// CHECK:STDOUT: %.1: type = int_type unsigned, %N [symbolic = %.1 (constants.%.7)]
|
|
// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%.1)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.5)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.3, @impl.3(%N) [symbolic = %Convert.type (constants.%Convert.type.4)]
|
|
// CHECK:STDOUT: %Convert: @impl.3.%Convert.type (%Convert.type.4) = struct_value () [symbolic = %Convert (constants.%Convert.4)]
|
|
// CHECK:STDOUT: %.2: <witness> = interface_witness (%Convert) [symbolic = %.2 (constants.%.8)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: impl: imports.%import_ref.16 as imports.%import_ref.17 {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: witness = imports.%import_ref.18
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: impl @impl.4: imports.%import_ref.19 as imports.%import_ref.20 {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: witness = imports.%import_ref.21
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic impl @impl.5(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
|
|
// CHECK:STDOUT: %.1: type = int_type signed, %N [symbolic = %.1 (constants.%.5)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.4, @impl.5(%N) [symbolic = %Convert.type (constants.%Convert.type.6)]
|
|
// CHECK:STDOUT: %Convert: @impl.5.%Convert.type (%Convert.type.6) = struct_value () [symbolic = %Convert (constants.%Convert.6)]
|
|
// CHECK:STDOUT: %.2: <witness> = interface_witness (%Convert) [symbolic = %.2 (constants.%.11)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: impl: imports.%import_ref.23 as imports.%import_ref.24 {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: witness = imports.%import_ref.25
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic impl @impl.6(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
|
|
// CHECK:STDOUT: %.1: type = int_type unsigned, %N [symbolic = %.1 (constants.%.7)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.5, @impl.6(%N) [symbolic = %Convert.type (constants.%Convert.type.7)]
|
|
// CHECK:STDOUT: %Convert: @impl.6.%Convert.type (%Convert.type.7) = struct_value () [symbolic = %Convert (constants.%Convert.7)]
|
|
// CHECK:STDOUT: %.2: <witness> = interface_witness (%Convert) [symbolic = %.2 (constants.%.12)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: impl: imports.%import_ref.26 as imports.%import_ref.27 {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: witness = imports.%import_ref.28
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: impl @impl.7: imports.%import_ref.32 as imports.%import_ref.33 {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: witness = imports.%import_ref.34
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic impl @impl.8(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
|
|
// CHECK:STDOUT: %.1: type = int_type signed, %N [symbolic = %.1 (constants.%.5)]
|
|
// CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%.1)> [symbolic = %As.type (constants.%As.type.4)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.7, @impl.8(%N) [symbolic = %Convert.type (constants.%Convert.type.10)]
|
|
// CHECK:STDOUT: %Convert: @impl.8.%Convert.type (%Convert.type.10) = struct_value () [symbolic = %Convert (constants.%Convert.10)]
|
|
// CHECK:STDOUT: %.2: <witness> = interface_witness (%Convert) [symbolic = %.2 (constants.%.17)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: impl: imports.%import_ref.37 as imports.%import_ref.38 {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: witness = imports.%import_ref.39
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic impl @impl.9(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
|
|
// CHECK:STDOUT: %.1: type = int_type unsigned, %N [symbolic = %.1 (constants.%.7)]
|
|
// CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%.1)> [symbolic = %As.type (constants.%As.type.5)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.8, @impl.9(%N) [symbolic = %Convert.type (constants.%Convert.type.11)]
|
|
// CHECK:STDOUT: %Convert: @impl.9.%Convert.type (%Convert.type.11) = struct_value () [symbolic = %Convert (constants.%Convert.11)]
|
|
// CHECK:STDOUT: %.2: <witness> = interface_witness (%Convert) [symbolic = %.2 (constants.%.18)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: impl: imports.%import_ref.40 as imports.%import_ref.41 {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: witness = imports.%import_ref.42
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: impl @impl.10: imports.%import_ref.43 as imports.%import_ref.44 {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: witness = imports.%import_ref.45
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic impl @impl.11(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
|
|
// CHECK:STDOUT: %.1: type = int_type signed, %N [symbolic = %.1 (constants.%.5)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.9, @impl.11(%N) [symbolic = %Convert.type (constants.%Convert.type.13)]
|
|
// CHECK:STDOUT: %Convert: @impl.11.%Convert.type (%Convert.type.13) = struct_value () [symbolic = %Convert (constants.%Convert.13)]
|
|
// CHECK:STDOUT: %.2: <witness> = interface_witness (%Convert) [symbolic = %.2 (constants.%.21)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: impl: imports.%import_ref.47 as imports.%import_ref.48 {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: witness = imports.%import_ref.49
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic impl @impl.12(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
|
|
// CHECK:STDOUT: %.1: type = int_type unsigned, %N [symbolic = %.1 (constants.%.7)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.10, @impl.12(%N) [symbolic = %Convert.type (constants.%Convert.type.14)]
|
|
// CHECK:STDOUT: %Convert: @impl.12.%Convert.type (%Convert.type.14) = struct_value () [symbolic = %Convert (constants.%Convert.14)]
|
|
// CHECK:STDOUT: %.2: <witness> = interface_witness (%Convert) [symbolic = %.2 (constants.%.22)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: impl: imports.%import_ref.50 as imports.%import_ref.51 {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: witness = imports.%import_ref.52
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic class @C(constants.%S: %.25) {
|
|
// CHECK:STDOUT: %S: %.25 = bind_symbolic_name S, 0 [symbolic = %S (constants.%S)]
|
|
// CHECK:STDOUT: %S.patt: %.25 = symbolic_binding_pattern S, 0 [symbolic = %S.patt (constants.%S.patt)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: class {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: .Self = imports.%import_ref.53
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @Convert.1(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2)) {
|
|
// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
|
|
// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)]
|
|
// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%Self (%Self.2)]() -> @Convert.1.%Dest (%Dest);
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @Convert.2(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %.1: type = int_type signed, %N [symbolic = %.1 (constants.%.5)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn[%self.param_patt: Core.IntLiteral]() -> @Convert.2.%.1 (%.5) = "int.convert_checked";
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @Convert.3(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %.1: type = int_type unsigned, %N [symbolic = %.1 (constants.%.7)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn[%self.param_patt: Core.IntLiteral]() -> @Convert.3.%.1 (%.7) = "int.convert_checked";
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @Convert.4(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %.1: type = int_type signed, %N [symbolic = %.1 (constants.%.5)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn[%self.param_patt: @Convert.4.%.1 (%.5)]() -> Core.IntLiteral = "int.convert_checked";
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @Convert.5(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %.1: type = int_type unsigned, %N [symbolic = %.1 (constants.%.7)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn[%self.param_patt: @Convert.5.%.1 (%.7)]() -> Core.IntLiteral = "int.convert_checked";
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @Convert.6(constants.%Dest: type, constants.%Self.3: @As.%As.type (%As.type.2)) {
|
|
// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
|
|
// CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%Dest)> [symbolic = %As.type (constants.%As.type.2)]
|
|
// CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.4)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn[%self.param_patt: @Convert.6.%Self (%Self.4)]() -> @Convert.6.%Dest (%Dest);
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @Convert.7(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %.1: type = int_type signed, %N [symbolic = %.1 (constants.%.5)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn[%self.param_patt: Core.IntLiteral]() -> @Convert.7.%.1 (%.5) = "int.convert_checked";
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @Convert.8(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %.1: type = int_type unsigned, %N [symbolic = %.1 (constants.%.7)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn[%self.param_patt: Core.IntLiteral]() -> @Convert.8.%.1 (%.7) = "int.convert_checked";
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @Convert.9(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %.1: type = int_type signed, %N [symbolic = %.1 (constants.%.5)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn[%self.param_patt: @Convert.9.%.1 (%.5)]() -> Core.IntLiteral = "int.convert_checked";
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @Convert.10(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %.1: type = int_type unsigned, %N [symbolic = %.1 (constants.%.7)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn[%self.param_patt: @Convert.10.%.1 (%.7)]() -> Core.IntLiteral = "int.convert_checked";
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @Convert.11[%self.param_patt: Core.IntLiteral]() -> i32 = "int.convert_checked";
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @F() -> %C.4;
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @__global_init() {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %F.ref: %F.type = name_ref F, imports.%import_ref.4 [template = constants.%F]
|
|
// CHECK:STDOUT: %.loc9_35: ref %C.4 = temporary_storage
|
|
// CHECK:STDOUT: %F.call: init %C.4 = call %F.ref() to %.loc9_35
|
|
// CHECK:STDOUT: %.loc9_37: %C.3 = converted %F.call, <error> [template = <error>]
|
|
// CHECK:STDOUT: assign file.%c_bad.var, <error>
|
|
// CHECK:STDOUT: return
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) {
|
|
// CHECK:STDOUT: %Dest => constants.%Dest
|
|
// CHECK:STDOUT: %Dest.patt => constants.%Dest
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @ImplicitAs(i32) {
|
|
// CHECK:STDOUT: %Dest => i32
|
|
// CHECK:STDOUT: %Dest.patt => i32
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3
|
|
// CHECK:STDOUT: %Self => constants.%Self.2
|
|
// CHECK:STDOUT: %Convert.type => constants.%Convert.type.2
|
|
// CHECK:STDOUT: %Convert => constants.%Convert.2
|
|
// CHECK:STDOUT: %.1 => constants.%.3
|
|
// CHECK:STDOUT: %.2 => constants.%.4
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @ImplicitAs(%Dest) {
|
|
// CHECK:STDOUT: %Dest => constants.%Dest
|
|
// CHECK:STDOUT: %Dest.patt => constants.%Dest
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @ImplicitAs(@Convert.1.%Dest) {
|
|
// CHECK:STDOUT: %Dest => constants.%Dest
|
|
// CHECK:STDOUT: %Dest.patt => constants.%Dest
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Convert.1(constants.%Dest, constants.%Self.1) {
|
|
// CHECK:STDOUT: %Dest => constants.%Dest
|
|
// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2
|
|
// CHECK:STDOUT: %Self => constants.%Self.1
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @ImplicitAs(constants.%.5) {
|
|
// CHECK:STDOUT: %Dest => constants.%.5
|
|
// CHECK:STDOUT: %Dest.patt => constants.%.5
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @ImplicitAs(@impl.2.%.1) {
|
|
// CHECK:STDOUT: %Dest => constants.%.5
|
|
// CHECK:STDOUT: %Dest.patt => constants.%.5
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.2(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.5
|
|
// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.4
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.2(%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.5
|
|
// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.4
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Convert.2(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.5
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @ImplicitAs(constants.%.7) {
|
|
// CHECK:STDOUT: %Dest => constants.%.7
|
|
// CHECK:STDOUT: %Dest.patt => constants.%.7
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @ImplicitAs(@impl.3.%.1) {
|
|
// CHECK:STDOUT: %Dest => constants.%.7
|
|
// CHECK:STDOUT: %Dest.patt => constants.%.7
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.3(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.7
|
|
// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.5
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.3(%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.7
|
|
// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.5
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Convert.3(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.7
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @ImplicitAs(Core.IntLiteral) {
|
|
// CHECK:STDOUT: %Dest => Core.IntLiteral
|
|
// CHECK:STDOUT: %Dest.patt => Core.IntLiteral
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.6
|
|
// CHECK:STDOUT: %Self => constants.%Self.2
|
|
// CHECK:STDOUT: %Convert.type => constants.%Convert.type.5
|
|
// CHECK:STDOUT: %Convert => constants.%Convert.5
|
|
// CHECK:STDOUT: %.1 => constants.%.9
|
|
// CHECK:STDOUT: %.2 => constants.%.10
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.5(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.5
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.5(%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.5
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Convert.4(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.5
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.6(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.7
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.6(%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.7
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Convert.5(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.7
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @As(constants.%Dest) {
|
|
// CHECK:STDOUT: %Dest => constants.%Dest
|
|
// CHECK:STDOUT: %Dest.patt => constants.%Dest
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @As(i32) {
|
|
// CHECK:STDOUT: %Dest => i32
|
|
// CHECK:STDOUT: %Dest.patt => i32
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %As.type => constants.%As.type.3
|
|
// CHECK:STDOUT: %Self => constants.%Self.4
|
|
// CHECK:STDOUT: %Convert.type => constants.%Convert.type.9
|
|
// CHECK:STDOUT: %Convert => constants.%Convert.9
|
|
// CHECK:STDOUT: %.1 => constants.%.15
|
|
// CHECK:STDOUT: %.2 => constants.%.16
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @As(%Dest) {
|
|
// CHECK:STDOUT: %Dest => constants.%Dest
|
|
// CHECK:STDOUT: %Dest.patt => constants.%Dest
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @As(@Convert.6.%Dest) {
|
|
// CHECK:STDOUT: %Dest => constants.%Dest
|
|
// CHECK:STDOUT: %Dest.patt => constants.%Dest
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Convert.6(constants.%Dest, constants.%Self.3) {
|
|
// CHECK:STDOUT: %Dest => constants.%Dest
|
|
// CHECK:STDOUT: %As.type => constants.%As.type.2
|
|
// CHECK:STDOUT: %Self => constants.%Self.3
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @As(constants.%.5) {
|
|
// CHECK:STDOUT: %Dest => constants.%.5
|
|
// CHECK:STDOUT: %Dest.patt => constants.%.5
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @As(@impl.8.%.1) {
|
|
// CHECK:STDOUT: %Dest => constants.%.5
|
|
// CHECK:STDOUT: %Dest.patt => constants.%.5
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.8(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.5
|
|
// CHECK:STDOUT: %As.type => constants.%As.type.4
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.8(%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.5
|
|
// CHECK:STDOUT: %As.type => constants.%As.type.4
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Convert.7(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.5
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @As(constants.%.7) {
|
|
// CHECK:STDOUT: %Dest => constants.%.7
|
|
// CHECK:STDOUT: %Dest.patt => constants.%.7
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @As(@impl.9.%.1) {
|
|
// CHECK:STDOUT: %Dest => constants.%.7
|
|
// CHECK:STDOUT: %Dest.patt => constants.%.7
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.9(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.7
|
|
// CHECK:STDOUT: %As.type => constants.%As.type.5
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.9(%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.7
|
|
// CHECK:STDOUT: %As.type => constants.%As.type.5
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Convert.8(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.7
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @As(Core.IntLiteral) {
|
|
// CHECK:STDOUT: %Dest => Core.IntLiteral
|
|
// CHECK:STDOUT: %Dest.patt => Core.IntLiteral
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %As.type => constants.%As.type.6
|
|
// CHECK:STDOUT: %Self => constants.%Self.4
|
|
// CHECK:STDOUT: %Convert.type => constants.%Convert.type.12
|
|
// CHECK:STDOUT: %Convert => constants.%Convert.12
|
|
// CHECK:STDOUT: %.1 => constants.%.19
|
|
// CHECK:STDOUT: %.2 => constants.%.20
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.11(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.5
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.11(%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.5
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Convert.9(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.5
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.12(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.7
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.12(%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.7
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Convert.10(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %.1 => constants.%.7
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @C(constants.%S) {
|
|
// CHECK:STDOUT: %S => constants.%S
|
|
// CHECK:STDOUT: %S.patt => constants.%S
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @C(constants.%struct.1) {
|
|
// CHECK:STDOUT: %S => constants.%struct.1
|
|
// CHECK:STDOUT: %S.patt => constants.%struct.1
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @C(constants.%struct.2) {
|
|
// CHECK:STDOUT: %S => constants.%struct.2
|
|
// CHECK:STDOUT: %S.patt => constants.%struct.2
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @ImplicitAs(constants.%C.3) {
|
|
// CHECK:STDOUT: %Dest => constants.%C.3
|
|
// CHECK:STDOUT: %Dest.patt => constants.%C.3
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.7
|
|
// CHECK:STDOUT: %Self => constants.%Self.2
|
|
// CHECK:STDOUT: %Convert.type => constants.%Convert.type.16
|
|
// CHECK:STDOUT: %Convert => constants.%Convert.16
|
|
// CHECK:STDOUT: %.1 => constants.%.39
|
|
// CHECK:STDOUT: %.2 => constants.%.40
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|