mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-01 22:02:45 +01:00
Fixes link failures when referencing a symbol involving a fingerprint from a different package. Previously we included the `Namespace`'s `import_id` as part of its fingerprint, which caused local and imported namespaces to get different fingerprints. We now store the `import_id` on the `NameScope` instead of on the `Namespace` inst to avoid this problem. Also, when we reach a package-level `NameScopeId`, consistently fingerprint it as a (package name, library name) pair. Previously the fingerprinting depended on whether it was imported or not, as an imported `NameScopeId` had a parent scope (the current package). We need to include the library name here so that private entities with the same name in different libraries have different fingerprints.
1314 lines
96 KiB
Plaintext
1314 lines
96 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
|
|
//
|
|
// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon
|
|
// TODO: Add ranges and switch to "--dump-sem-ir-ranges=only".
|
|
// EXTRA-ARGS: --dump-sem-ir-ranges=if-present
|
|
//
|
|
// AUTOUPDATE
|
|
// TIP: To test this file alone, run:
|
|
// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/impl/import_builtin_call.carbon
|
|
// TIP: To dump output, run:
|
|
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/impl/import_builtin_call.carbon
|
|
|
|
// --- generic_impl.carbon
|
|
|
|
library "[[@TEST_NAME]]";
|
|
|
|
interface Add {
|
|
fn Op[self: Self](other: Self) -> Self;
|
|
}
|
|
|
|
fn IntLiteral() -> type = "int_literal.make_type";
|
|
fn Int(n: IntLiteral()) -> type = "int.make_type_signed";
|
|
|
|
class MyInt(N:! IntLiteral()) {
|
|
adapt Int(N);
|
|
}
|
|
|
|
impl forall [N:! IntLiteral()] MyInt(N) as Add {
|
|
fn Op[self: Self](other: Self) -> Self = "int.sadd";
|
|
}
|
|
|
|
fn Double[N:! IntLiteral()](x: MyInt(N)) -> MyInt(N) {
|
|
return x.(Add.Op)(x);
|
|
}
|
|
|
|
// --- use_generic_impl.carbon
|
|
|
|
library "[[@TEST_NAME]]";
|
|
|
|
import library "generic_impl";
|
|
|
|
fn CallImportedDouble(n: MyInt(64)) -> MyInt(64) {
|
|
return Double(n);
|
|
}
|
|
|
|
// --- convert_symbolic.carbon
|
|
|
|
library "[[@TEST_NAME]]";
|
|
|
|
fn IntLiteral() -> type = "int_literal.make_type";
|
|
fn Int(n: IntLiteral()) -> type = "int.make_type_signed";
|
|
fn ToLiteral(n: Int(32)) -> IntLiteral() = "int.convert_checked";
|
|
fn FromLiteral(n: IntLiteral()) -> Int(32) = "int.convert_checked";
|
|
|
|
fn Make(N:! Int(32)) -> Int(ToLiteral(N)) { return Make(N); }
|
|
|
|
class OtherInt {
|
|
adapt Int(32);
|
|
fn ToLiteral[self: Self]() -> IntLiteral();
|
|
};
|
|
|
|
fn OtherInt.ToLiteral[self: Self]() -> IntLiteral() = "int.convert_checked";
|
|
|
|
fn MakeFromClass(N:! OtherInt) -> Int(N.ToLiteral()) { return MakeFromClass(N); }
|
|
|
|
// --- use_convert_symbolic.carbon
|
|
|
|
library "[[@TEST_NAME]]";
|
|
|
|
import library "convert_symbolic";
|
|
|
|
var m: Int(64) = Make(FromLiteral(64));
|
|
var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt);
|
|
|
|
// CHECK:STDOUT: --- generic_impl.carbon
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: %Add.type: type = facet_type <@Add> [concrete]
|
|
// CHECK:STDOUT: %Self: %Add.type = symbolic_binding Self, 0 [symbolic]
|
|
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic]
|
|
// CHECK:STDOUT: %pattern_type.c53: type = pattern_type %Self.as_type [symbolic]
|
|
// CHECK:STDOUT: %.f10: Core.Form = init_form %Self.as_type [symbolic]
|
|
// CHECK:STDOUT: %Add.WithSelf.Op.type.366: type = fn_type @Add.WithSelf.Op, @Add.WithSelf(%Self) [symbolic]
|
|
// CHECK:STDOUT: %Add.WithSelf.Op.b28: %Add.WithSelf.Op.type.366 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %Add.assoc_type: type = assoc_entity_type @Add [concrete]
|
|
// CHECK:STDOUT: %assoc0: %Add.assoc_type = assoc_entity element0, @Add.WithSelf.%Add.WithSelf.Op.decl [concrete]
|
|
// CHECK:STDOUT: %.805: Core.Form = init_form type [concrete]
|
|
// CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete]
|
|
// CHECK:STDOUT: %IntLiteral.type: type = fn_type @IntLiteral [concrete]
|
|
// CHECK:STDOUT: %IntLiteral: %IntLiteral.type = struct_value () [concrete]
|
|
// CHECK:STDOUT: %pattern_type.dc0: type = pattern_type Core.IntLiteral [concrete]
|
|
// CHECK:STDOUT: %Int.type: type = fn_type @Int [concrete]
|
|
// CHECK:STDOUT: %Int: %Int.type = struct_value () [concrete]
|
|
// CHECK:STDOUT: %type: type = facet_type <type> [concrete]
|
|
// CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self]
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic]
|
|
// CHECK:STDOUT: %MyInt.type: type = generic_class_type @MyInt [concrete]
|
|
// CHECK:STDOUT: %MyInt.generic: %MyInt.type = struct_value () [concrete]
|
|
// CHECK:STDOUT: %MyInt: type = class_type @MyInt, @MyInt(%N) [symbolic]
|
|
// CHECK:STDOUT: %iN.builtin: type = int_type signed, %N [symbolic]
|
|
// CHECK:STDOUT: %require_complete.269: <witness> = require_complete_type %iN.builtin [symbolic]
|
|
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %iN.builtin [symbolic]
|
|
// CHECK:STDOUT: %Add.impl_witness: <witness> = impl_witness @MyInt.as.Add.impl.%Add.impl_witness_table, @MyInt.as.Add.impl(%N) [symbolic]
|
|
// CHECK:STDOUT: %pattern_type.d90: type = pattern_type %MyInt [symbolic]
|
|
// CHECK:STDOUT: %.ecf: Core.Form = init_form %MyInt [symbolic]
|
|
// CHECK:STDOUT: %MyInt.as.Add.impl.Op.type: type = fn_type @MyInt.as.Add.impl.Op, @MyInt.as.Add.impl(%N) [symbolic]
|
|
// CHECK:STDOUT: %MyInt.as.Add.impl.Op: %MyInt.as.Add.impl.Op.type = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %require_complete.f40: <witness> = require_complete_type %MyInt [symbolic]
|
|
// CHECK:STDOUT: %Add.facet.028: %Add.type = facet_value %MyInt, (%Add.impl_witness) [symbolic]
|
|
// CHECK:STDOUT: %Add.WithSelf.Op.type.5c0: type = fn_type @Add.WithSelf.Op, @Add.WithSelf(%Add.facet.028) [symbolic]
|
|
// CHECK:STDOUT: %Add.WithSelf.Op.777: %Add.WithSelf.Op.type.5c0 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %Double.type: type = fn_type @Double [concrete]
|
|
// CHECK:STDOUT: %Double: %Double.type = struct_value () [concrete]
|
|
// CHECK:STDOUT: %Add.lookup_impl_witness: <witness> = lookup_impl_witness %MyInt, @Add [symbolic]
|
|
// CHECK:STDOUT: %.a93: require_specific_def_type = require_specific_def @MyInt.as.Add.impl(%N) [symbolic]
|
|
// CHECK:STDOUT: %Add.facet.958: %Add.type = facet_value %MyInt, (%Add.lookup_impl_witness) [symbolic]
|
|
// CHECK:STDOUT: %Add.WithSelf.Op.type.32f: type = fn_type @Add.WithSelf.Op, @Add.WithSelf(%Add.facet.958) [symbolic]
|
|
// CHECK:STDOUT: %Add.WithSelf.Op.321: %Add.WithSelf.Op.type.32f = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %.f88: type = fn_type_with_self_type %Add.WithSelf.Op.type.32f, %Add.facet.958 [symbolic]
|
|
// CHECK:STDOUT: %impl.elem0: %.f88 = impl_witness_access %Add.lookup_impl_witness, element0 [symbolic]
|
|
// CHECK:STDOUT: %specific_impl_fn: <specific function> = specific_impl_function %impl.elem0, @Add.WithSelf.Op(%Add.facet.958) [symbolic]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: file {
|
|
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
|
|
// CHECK:STDOUT: .Add = %Add.decl
|
|
// CHECK:STDOUT: .IntLiteral = %IntLiteral.decl
|
|
// CHECK:STDOUT: .Int = %Int.decl
|
|
// CHECK:STDOUT: .MyInt = %MyInt.decl
|
|
// CHECK:STDOUT: .Double = %Double.decl
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %Add.decl: type = interface_decl @Add [concrete = constants.%Add.type] {} {}
|
|
// CHECK:STDOUT: %IntLiteral.decl: %IntLiteral.type = fn_decl @IntLiteral [concrete = constants.%IntLiteral] {
|
|
// CHECK:STDOUT: %return.param_patt: %pattern_type.98f = out_param_pattern [concrete]
|
|
// CHECK:STDOUT: %return.patt: %pattern_type.98f = return_slot_pattern %return.param_patt, %.loc8_20.1 [concrete]
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %.loc8_20.1: type = type_literal type [concrete = type]
|
|
// CHECK:STDOUT: %.loc8_20.2: Core.Form = init_form %.loc8_20.1 [concrete = constants.%.805]
|
|
// CHECK:STDOUT: %return.param: ref type = out_param call_param0
|
|
// CHECK:STDOUT: %return: ref type = return_slot %return.param
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %Int.decl: %Int.type = fn_decl @Int [concrete = constants.%Int] {
|
|
// CHECK:STDOUT: %n.param_patt: %pattern_type.dc0 = value_param_pattern [concrete]
|
|
// CHECK:STDOUT: %n.patt: %pattern_type.dc0 = at_binding_pattern n, %n.param_patt [concrete]
|
|
// CHECK:STDOUT: %return.param_patt: %pattern_type.98f = out_param_pattern [concrete]
|
|
// CHECK:STDOUT: %return.patt: %pattern_type.98f = return_slot_pattern %return.param_patt, %.loc9_28.1 [concrete]
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %.loc9_28.1: type = type_literal type [concrete = type]
|
|
// CHECK:STDOUT: %.loc9_28.2: Core.Form = init_form %.loc9_28.1 [concrete = constants.%.805]
|
|
// CHECK:STDOUT: %n.param: Core.IntLiteral = value_param call_param0
|
|
// CHECK:STDOUT: %.loc9_22.1: type = splice_block %.loc9_22.3 [concrete = Core.IntLiteral] {
|
|
// CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [concrete = constants.%IntLiteral]
|
|
// CHECK:STDOUT: %IntLiteral.call: init type = call %IntLiteral.ref() [concrete = Core.IntLiteral]
|
|
// CHECK:STDOUT: %.loc9_22.2: type = value_of_initializer %IntLiteral.call [concrete = Core.IntLiteral]
|
|
// CHECK:STDOUT: %.loc9_22.3: type = converted %IntLiteral.call, %.loc9_22.2 [concrete = Core.IntLiteral]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %n: Core.IntLiteral = value_binding n, %n.param
|
|
// CHECK:STDOUT: %return.param: ref type = out_param call_param1
|
|
// CHECK:STDOUT: %return: ref type = return_slot %return.param
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %MyInt.decl: %MyInt.type = class_decl @MyInt [concrete = constants.%MyInt.generic] {
|
|
// CHECK:STDOUT: %N.patt: %pattern_type.dc0 = symbolic_binding_pattern N, 0 [concrete]
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %.loc11_28.1: type = splice_block %.loc11_28.3 [concrete = Core.IntLiteral] {
|
|
// CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
|
|
// CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [concrete = constants.%IntLiteral]
|
|
// CHECK:STDOUT: %IntLiteral.call: init type = call %IntLiteral.ref() [concrete = Core.IntLiteral]
|
|
// CHECK:STDOUT: %.loc11_28.2: type = value_of_initializer %IntLiteral.call [concrete = Core.IntLiteral]
|
|
// CHECK:STDOUT: %.loc11_28.3: type = converted %IntLiteral.call, %.loc11_28.2 [concrete = Core.IntLiteral]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %N.loc11_14.2: Core.IntLiteral = symbolic_binding N, 0 [symbolic = %N.loc11_14.1 (constants.%N)]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: impl_decl @MyInt.as.Add.impl [concrete] {
|
|
// CHECK:STDOUT: %N.patt: %pattern_type.dc0 = symbolic_binding_pattern N, 0 [concrete]
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %MyInt.ref: %MyInt.type = name_ref MyInt, file.%MyInt.decl [concrete = constants.%MyInt.generic]
|
|
// CHECK:STDOUT: %N.ref: Core.IntLiteral = name_ref N, %N.loc15_15.2 [symbolic = %N.loc15_15.1 (constants.%N)]
|
|
// CHECK:STDOUT: %MyInt.loc15_39.2: type = class_type @MyInt, @MyInt(constants.%N) [symbolic = %MyInt.loc15_39.1 (constants.%MyInt)]
|
|
// CHECK:STDOUT: %Add.ref: type = name_ref Add, file.%Add.decl [concrete = constants.%Add.type]
|
|
// CHECK:STDOUT: %.loc15_29.1: type = splice_block %.loc15_29.3 [concrete = Core.IntLiteral] {
|
|
// CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
|
|
// CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [concrete = constants.%IntLiteral]
|
|
// CHECK:STDOUT: %IntLiteral.call: init type = call %IntLiteral.ref() [concrete = Core.IntLiteral]
|
|
// CHECK:STDOUT: %.loc15_29.2: type = value_of_initializer %IntLiteral.call [concrete = Core.IntLiteral]
|
|
// CHECK:STDOUT: %.loc15_29.3: type = converted %IntLiteral.call, %.loc15_29.2 [concrete = Core.IntLiteral]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %N.loc15_15.2: Core.IntLiteral = symbolic_binding N, 0 [symbolic = %N.loc15_15.1 (constants.%N)]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %Double.decl: %Double.type = fn_decl @Double [concrete = constants.%Double] {
|
|
// CHECK:STDOUT: %N.patt: %pattern_type.dc0 = symbolic_binding_pattern N, 0 [concrete]
|
|
// CHECK:STDOUT: %x.param_patt: @Double.%pattern_type (%pattern_type.d90) = value_param_pattern [concrete]
|
|
// CHECK:STDOUT: %x.patt: @Double.%pattern_type (%pattern_type.d90) = at_binding_pattern x, %x.param_patt [concrete]
|
|
// CHECK:STDOUT: %return.param_patt: @Double.%pattern_type (%pattern_type.d90) = out_param_pattern [concrete]
|
|
// CHECK:STDOUT: %return.patt: @Double.%pattern_type (%pattern_type.d90) = return_slot_pattern %return.param_patt, %MyInt.loc19_52 [concrete]
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %MyInt.ref.loc19_45: %MyInt.type = name_ref MyInt, file.%MyInt.decl [concrete = constants.%MyInt.generic]
|
|
// CHECK:STDOUT: %N.ref.loc19_51: Core.IntLiteral = name_ref N, %N.loc19_12.2 [symbolic = %N.loc19_12.1 (constants.%N)]
|
|
// CHECK:STDOUT: %MyInt.loc19_52: type = class_type @MyInt, @MyInt(constants.%N) [symbolic = %MyInt.loc19_39.1 (constants.%MyInt)]
|
|
// CHECK:STDOUT: %.loc19_52.2: Core.Form = init_form %MyInt.loc19_52 [symbolic = %.loc19_52.1 (constants.%.ecf)]
|
|
// CHECK:STDOUT: %.loc19_26.1: type = splice_block %.loc19_26.3 [concrete = Core.IntLiteral] {
|
|
// CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
|
|
// CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [concrete = constants.%IntLiteral]
|
|
// CHECK:STDOUT: %IntLiteral.call: init type = call %IntLiteral.ref() [concrete = Core.IntLiteral]
|
|
// CHECK:STDOUT: %.loc19_26.2: type = value_of_initializer %IntLiteral.call [concrete = Core.IntLiteral]
|
|
// CHECK:STDOUT: %.loc19_26.3: type = converted %IntLiteral.call, %.loc19_26.2 [concrete = Core.IntLiteral]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %N.loc19_12.2: Core.IntLiteral = symbolic_binding N, 0 [symbolic = %N.loc19_12.1 (constants.%N)]
|
|
// CHECK:STDOUT: %x.param: @Double.%MyInt.loc19_39.1 (%MyInt) = value_param call_param0
|
|
// CHECK:STDOUT: %.loc19_39: type = splice_block %MyInt.loc19_39.2 [symbolic = %MyInt.loc19_39.1 (constants.%MyInt)] {
|
|
// CHECK:STDOUT: %MyInt.ref.loc19_32: %MyInt.type = name_ref MyInt, file.%MyInt.decl [concrete = constants.%MyInt.generic]
|
|
// CHECK:STDOUT: %N.ref.loc19_38: Core.IntLiteral = name_ref N, %N.loc19_12.2 [symbolic = %N.loc19_12.1 (constants.%N)]
|
|
// CHECK:STDOUT: %MyInt.loc19_39.2: type = class_type @MyInt, @MyInt(constants.%N) [symbolic = %MyInt.loc19_39.1 (constants.%MyInt)]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %x: @Double.%MyInt.loc19_39.1 (%MyInt) = value_binding x, %x.param
|
|
// CHECK:STDOUT: %return.param: ref @Double.%MyInt.loc19_39.1 (%MyInt) = out_param call_param1
|
|
// CHECK:STDOUT: %return: ref @Double.%MyInt.loc19_39.1 (%MyInt) = return_slot %return.param
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: interface @Add {
|
|
// CHECK:STDOUT: %Self: %Add.type = symbolic_binding Self, 0 [symbolic = constants.%Self]
|
|
// CHECK:STDOUT: %Add.WithSelf.decl = interface_with_self_decl @Add [concrete]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !with Self:
|
|
// CHECK:STDOUT: %Add.WithSelf.Op.decl: @Add.WithSelf.%Add.WithSelf.Op.type (%Add.WithSelf.Op.type.366) = fn_decl @Add.WithSelf.Op [symbolic = @Add.WithSelf.%Add.WithSelf.Op (constants.%Add.WithSelf.Op.b28)] {
|
|
// CHECK:STDOUT: %self.param_patt: @Add.WithSelf.Op.%pattern_type (%pattern_type.c53) = value_param_pattern [concrete]
|
|
// CHECK:STDOUT: %self.patt: @Add.WithSelf.Op.%pattern_type (%pattern_type.c53) = at_binding_pattern self, %self.param_patt [concrete]
|
|
// CHECK:STDOUT: %other.param_patt: @Add.WithSelf.Op.%pattern_type (%pattern_type.c53) = value_param_pattern [concrete]
|
|
// CHECK:STDOUT: %other.patt: @Add.WithSelf.Op.%pattern_type (%pattern_type.c53) = at_binding_pattern other, %other.param_patt [concrete]
|
|
// CHECK:STDOUT: %return.param_patt: @Add.WithSelf.Op.%pattern_type (%pattern_type.c53) = out_param_pattern [concrete]
|
|
// CHECK:STDOUT: %return.patt: @Add.WithSelf.Op.%pattern_type (%pattern_type.c53) = return_slot_pattern %return.param_patt, %.loc5_37.2 [concrete]
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %Self.ref.loc5_37: %Add.type = name_ref Self, @Add.%Self [symbolic = %Self (constants.%Self)]
|
|
// CHECK:STDOUT: %Self.as_type.loc5_37: type = facet_access_type %Self.ref.loc5_37 [symbolic = %Self.as_type.loc5_15.1 (constants.%Self.as_type)]
|
|
// CHECK:STDOUT: %.loc5_37.2: type = converted %Self.ref.loc5_37, %Self.as_type.loc5_37 [symbolic = %Self.as_type.loc5_15.1 (constants.%Self.as_type)]
|
|
// CHECK:STDOUT: %.loc5_37.3: Core.Form = init_form %.loc5_37.2 [symbolic = %.loc5_37.1 (constants.%.f10)]
|
|
// CHECK:STDOUT: %self.param: @Add.WithSelf.Op.%Self.as_type.loc5_15.1 (%Self.as_type) = value_param call_param0
|
|
// CHECK:STDOUT: %.loc5_15.1: type = splice_block %.loc5_15.2 [symbolic = %Self.as_type.loc5_15.1 (constants.%Self.as_type)] {
|
|
// CHECK:STDOUT: %Self.ref.loc5_15: %Add.type = name_ref Self, @Add.%Self [symbolic = %Self (constants.%Self)]
|
|
// CHECK:STDOUT: %Self.as_type.loc5_15.2: type = facet_access_type %Self.ref.loc5_15 [symbolic = %Self.as_type.loc5_15.1 (constants.%Self.as_type)]
|
|
// CHECK:STDOUT: %.loc5_15.2: type = converted %Self.ref.loc5_15, %Self.as_type.loc5_15.2 [symbolic = %Self.as_type.loc5_15.1 (constants.%Self.as_type)]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %self: @Add.WithSelf.Op.%Self.as_type.loc5_15.1 (%Self.as_type) = value_binding self, %self.param
|
|
// CHECK:STDOUT: %other.param: @Add.WithSelf.Op.%Self.as_type.loc5_15.1 (%Self.as_type) = value_param call_param1
|
|
// CHECK:STDOUT: %.loc5_28.1: type = splice_block %.loc5_28.2 [symbolic = %Self.as_type.loc5_15.1 (constants.%Self.as_type)] {
|
|
// CHECK:STDOUT: %Self.ref.loc5_28: %Add.type = name_ref Self, @Add.%Self [symbolic = %Self (constants.%Self)]
|
|
// CHECK:STDOUT: %Self.as_type.loc5_28: type = facet_access_type %Self.ref.loc5_28 [symbolic = %Self.as_type.loc5_15.1 (constants.%Self.as_type)]
|
|
// CHECK:STDOUT: %.loc5_28.2: type = converted %Self.ref.loc5_28, %Self.as_type.loc5_28 [symbolic = %Self.as_type.loc5_15.1 (constants.%Self.as_type)]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %other: @Add.WithSelf.Op.%Self.as_type.loc5_15.1 (%Self.as_type) = value_binding other, %other.param
|
|
// CHECK:STDOUT: %return.param: ref @Add.WithSelf.Op.%Self.as_type.loc5_15.1 (%Self.as_type) = out_param call_param2
|
|
// CHECK:STDOUT: %return: ref @Add.WithSelf.Op.%Self.as_type.loc5_15.1 (%Self.as_type) = return_slot %return.param
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %assoc0: %Add.assoc_type = assoc_entity element0, %Add.WithSelf.Op.decl [concrete = constants.%assoc0]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: .Self = %Self
|
|
// CHECK:STDOUT: .Op = @Add.WithSelf.%assoc0
|
|
// CHECK:STDOUT: witness = (@Add.WithSelf.%Add.WithSelf.Op.decl)
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !requires:
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic impl @MyInt.as.Add.impl(%N.loc15_15.2: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N.loc15_15.1: Core.IntLiteral = symbolic_binding N, 0 [symbolic = %N.loc15_15.1 (constants.%N)]
|
|
// CHECK:STDOUT: %MyInt.loc15_39.1: type = class_type @MyInt, @MyInt(%N.loc15_15.1) [symbolic = %MyInt.loc15_39.1 (constants.%MyInt)]
|
|
// CHECK:STDOUT: %Add.impl_witness.loc15_48.2: <witness> = impl_witness %Add.impl_witness_table, @MyInt.as.Add.impl(%N.loc15_15.1) [symbolic = %Add.impl_witness.loc15_48.2 (constants.%Add.impl_witness)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %MyInt.as.Add.impl.Op.type: type = fn_type @MyInt.as.Add.impl.Op, @MyInt.as.Add.impl(%N.loc15_15.1) [symbolic = %MyInt.as.Add.impl.Op.type (constants.%MyInt.as.Add.impl.Op.type)]
|
|
// CHECK:STDOUT: %MyInt.as.Add.impl.Op: @MyInt.as.Add.impl.%MyInt.as.Add.impl.Op.type (%MyInt.as.Add.impl.Op.type) = struct_value () [symbolic = %MyInt.as.Add.impl.Op (constants.%MyInt.as.Add.impl.Op)]
|
|
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %MyInt.loc15_39.1 [symbolic = %require_complete (constants.%require_complete.f40)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: impl: %MyInt.loc15_39.2 as %Add.ref {
|
|
// CHECK:STDOUT: %MyInt.as.Add.impl.Op.decl: @MyInt.as.Add.impl.%MyInt.as.Add.impl.Op.type (%MyInt.as.Add.impl.Op.type) = fn_decl @MyInt.as.Add.impl.Op [symbolic = @MyInt.as.Add.impl.%MyInt.as.Add.impl.Op (constants.%MyInt.as.Add.impl.Op)] {
|
|
// CHECK:STDOUT: %self.param_patt: @MyInt.as.Add.impl.Op.%pattern_type (%pattern_type.d90) = value_param_pattern [concrete]
|
|
// CHECK:STDOUT: %self.patt: @MyInt.as.Add.impl.Op.%pattern_type (%pattern_type.d90) = at_binding_pattern self, %self.param_patt [concrete]
|
|
// CHECK:STDOUT: %other.param_patt: @MyInt.as.Add.impl.Op.%pattern_type (%pattern_type.d90) = value_param_pattern [concrete]
|
|
// CHECK:STDOUT: %other.patt: @MyInt.as.Add.impl.Op.%pattern_type (%pattern_type.d90) = at_binding_pattern other, %other.param_patt [concrete]
|
|
// CHECK:STDOUT: %return.param_patt: @MyInt.as.Add.impl.Op.%pattern_type (%pattern_type.d90) = out_param_pattern [concrete]
|
|
// CHECK:STDOUT: %return.patt: @MyInt.as.Add.impl.Op.%pattern_type (%pattern_type.d90) = return_slot_pattern %return.param_patt, %Self.ref.loc16_37 [concrete]
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %Self.ref.loc16_37: type = name_ref Self, @MyInt.as.Add.impl.%MyInt.loc15_39.2 [symbolic = %MyInt (constants.%MyInt)]
|
|
// CHECK:STDOUT: %.loc16_37.2: Core.Form = init_form %Self.ref.loc16_37 [symbolic = %.loc16_37.1 (constants.%.ecf)]
|
|
// CHECK:STDOUT: %self.param: @MyInt.as.Add.impl.Op.%MyInt (%MyInt) = value_param call_param0
|
|
// CHECK:STDOUT: %Self.ref.loc16_15: type = name_ref Self, @MyInt.as.Add.impl.%MyInt.loc15_39.2 [symbolic = %MyInt (constants.%MyInt)]
|
|
// CHECK:STDOUT: %self: @MyInt.as.Add.impl.Op.%MyInt (%MyInt) = value_binding self, %self.param
|
|
// CHECK:STDOUT: %other.param: @MyInt.as.Add.impl.Op.%MyInt (%MyInt) = value_param call_param1
|
|
// CHECK:STDOUT: %Self.ref.loc16_28: type = name_ref Self, @MyInt.as.Add.impl.%MyInt.loc15_39.2 [symbolic = %MyInt (constants.%MyInt)]
|
|
// CHECK:STDOUT: %other: @MyInt.as.Add.impl.Op.%MyInt (%MyInt) = value_binding other, %other.param
|
|
// CHECK:STDOUT: %return.param: ref @MyInt.as.Add.impl.Op.%MyInt (%MyInt) = out_param call_param2
|
|
// CHECK:STDOUT: %return: ref @MyInt.as.Add.impl.Op.%MyInt (%MyInt) = return_slot %return.param
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %Add.impl_witness_table = impl_witness_table (%MyInt.as.Add.impl.Op.decl), @MyInt.as.Add.impl [concrete]
|
|
// CHECK:STDOUT: %Add.impl_witness.loc15_48.1: <witness> = impl_witness %Add.impl_witness_table, @MyInt.as.Add.impl(constants.%N) [symbolic = %Add.impl_witness.loc15_48.2 (constants.%Add.impl_witness)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: .Op = %MyInt.as.Add.impl.Op.decl
|
|
// CHECK:STDOUT: extend %Add.ref
|
|
// CHECK:STDOUT: witness = %Add.impl_witness.loc15_48.1
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic class @MyInt(%N.loc11_14.2: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N.loc11_14.1: Core.IntLiteral = symbolic_binding N, 0 [symbolic = %N.loc11_14.1 (constants.%N)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %iN.builtin: type = int_type signed, %N.loc11_14.1 [symbolic = %iN.builtin (constants.%iN.builtin)]
|
|
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %iN.builtin [symbolic = %require_complete (constants.%require_complete.269)]
|
|
// CHECK:STDOUT: %complete_type.loc13_1.2: <witness> = complete_type_witness %iN.builtin [symbolic = %complete_type.loc13_1.2 (constants.%complete_type)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: class {
|
|
// CHECK:STDOUT: %Int.ref: %Int.type = name_ref Int, file.%Int.decl [concrete = constants.%Int]
|
|
// CHECK:STDOUT: %N.ref: Core.IntLiteral = name_ref N, %N.loc11_14.2 [symbolic = %N.loc11_14.1 (constants.%N)]
|
|
// CHECK:STDOUT: %Int.call: init type = call %Int.ref(%N.ref) [symbolic = %iN.builtin (constants.%iN.builtin)]
|
|
// CHECK:STDOUT: %.loc12_15.1: type = value_of_initializer %Int.call [symbolic = %iN.builtin (constants.%iN.builtin)]
|
|
// CHECK:STDOUT: %.loc12_15.2: type = converted %Int.call, %.loc12_15.1 [symbolic = %iN.builtin (constants.%iN.builtin)]
|
|
// CHECK:STDOUT: adapt_decl %.loc12_15.2 [concrete]
|
|
// CHECK:STDOUT: %complete_type.loc13_1.1: <witness> = complete_type_witness constants.%iN.builtin [symbolic = %complete_type.loc13_1.2 (constants.%complete_type)]
|
|
// CHECK:STDOUT: complete_type_witness = %complete_type.loc13_1.1
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: .Self = constants.%MyInt
|
|
// CHECK:STDOUT: .Int = <poisoned>
|
|
// CHECK:STDOUT: .N = <poisoned>
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @Add.WithSelf.Op(@Add.%Self: %Add.type) {
|
|
// CHECK:STDOUT: %Self: %Add.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)]
|
|
// CHECK:STDOUT: %Self.as_type.loc5_15.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc5_15.1 (constants.%Self.as_type)]
|
|
// CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc5_15.1 [symbolic = %pattern_type (constants.%pattern_type.c53)]
|
|
// CHECK:STDOUT: %.loc5_37.1: Core.Form = init_form %Self.as_type.loc5_15.1 [symbolic = %.loc5_37.1 (constants.%.f10)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn(%self.param: @Add.WithSelf.Op.%Self.as_type.loc5_15.1 (%Self.as_type), %other.param: @Add.WithSelf.Op.%Self.as_type.loc5_15.1 (%Self.as_type)) -> out %return.param: @Add.WithSelf.Op.%Self.as_type.loc5_15.1 (%Self.as_type);
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @IntLiteral() -> out %return.param: type = "int_literal.make_type";
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @Int(%n.param: Core.IntLiteral) -> out %return.param: type = "int.make_type_signed";
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @MyInt.as.Add.impl.Op(@MyInt.as.Add.impl.%N.loc15_15.2: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %MyInt: type = class_type @MyInt, @MyInt(%N) [symbolic = %MyInt (constants.%MyInt)]
|
|
// CHECK:STDOUT: %pattern_type: type = pattern_type %MyInt [symbolic = %pattern_type (constants.%pattern_type.d90)]
|
|
// CHECK:STDOUT: %.loc16_37.1: Core.Form = init_form %MyInt [symbolic = %.loc16_37.1 (constants.%.ecf)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn(%self.param: @MyInt.as.Add.impl.Op.%MyInt (%MyInt), %other.param: @MyInt.as.Add.impl.Op.%MyInt (%MyInt)) -> out %return.param: @MyInt.as.Add.impl.Op.%MyInt (%MyInt) = "int.sadd";
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @Double(%N.loc19_12.2: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N.loc19_12.1: Core.IntLiteral = symbolic_binding N, 0 [symbolic = %N.loc19_12.1 (constants.%N)]
|
|
// CHECK:STDOUT: %MyInt.loc19_39.1: type = class_type @MyInt, @MyInt(%N.loc19_12.1) [symbolic = %MyInt.loc19_39.1 (constants.%MyInt)]
|
|
// CHECK:STDOUT: %pattern_type: type = pattern_type %MyInt.loc19_39.1 [symbolic = %pattern_type (constants.%pattern_type.d90)]
|
|
// CHECK:STDOUT: %.loc19_52.1: Core.Form = init_form %MyInt.loc19_39.1 [symbolic = %.loc19_52.1 (constants.%.ecf)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %MyInt.loc19_39.1 [symbolic = %require_complete (constants.%require_complete.f40)]
|
|
// CHECK:STDOUT: %.loc20_11.1: require_specific_def_type = require_specific_def @MyInt.as.Add.impl(%N.loc19_12.1) [symbolic = %.loc20_11.1 (constants.%.a93)]
|
|
// CHECK:STDOUT: %Add.lookup_impl_witness: <witness> = lookup_impl_witness %MyInt.loc19_39.1, @Add [symbolic = %Add.lookup_impl_witness (constants.%Add.lookup_impl_witness)]
|
|
// CHECK:STDOUT: %Add.facet.loc20_11: %Add.type = facet_value %MyInt.loc19_39.1, (%Add.lookup_impl_witness) [symbolic = %Add.facet.loc20_11 (constants.%Add.facet.958)]
|
|
// CHECK:STDOUT: %Add.WithSelf.Op.type: type = fn_type @Add.WithSelf.Op, @Add.WithSelf(%Add.facet.loc20_11) [symbolic = %Add.WithSelf.Op.type (constants.%Add.WithSelf.Op.type.32f)]
|
|
// CHECK:STDOUT: %.loc20_11.2: type = fn_type_with_self_type %Add.WithSelf.Op.type, %Add.facet.loc20_11 [symbolic = %.loc20_11.2 (constants.%.f88)]
|
|
// CHECK:STDOUT: %impl.elem0.loc20_11.2: @Double.%.loc20_11.2 (%.f88) = impl_witness_access %Add.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc20_11.2 (constants.%impl.elem0)]
|
|
// CHECK:STDOUT: %specific_impl_fn.loc20_11.2: <specific function> = specific_impl_function %impl.elem0.loc20_11.2, @Add.WithSelf.Op(%Add.facet.loc20_11) [symbolic = %specific_impl_fn.loc20_11.2 (constants.%specific_impl_fn)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn(%x.param: @Double.%MyInt.loc19_39.1 (%MyInt)) -> out %return.param: @Double.%MyInt.loc19_39.1 (%MyInt) {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %x.ref.loc20_10: @Double.%MyInt.loc19_39.1 (%MyInt) = name_ref x, %x
|
|
// CHECK:STDOUT: %Add.ref: type = name_ref Add, file.%Add.decl [concrete = constants.%Add.type]
|
|
// CHECK:STDOUT: %Op.ref: %Add.assoc_type = name_ref Op, @Add.WithSelf.%assoc0 [concrete = constants.%assoc0]
|
|
// CHECK:STDOUT: %impl.elem0.loc20_11.1: @Double.%.loc20_11.2 (%.f88) = impl_witness_access constants.%Add.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc20_11.2 (constants.%impl.elem0)]
|
|
// CHECK:STDOUT: %bound_method.loc20_11: <bound method> = bound_method %x.ref.loc20_10, %impl.elem0.loc20_11.1
|
|
// CHECK:STDOUT: %x.ref.loc20_21: @Double.%MyInt.loc19_39.1 (%MyInt) = name_ref x, %x
|
|
// CHECK:STDOUT: %Add.facet.loc20_22: %Add.type = facet_value constants.%MyInt, (constants.%Add.lookup_impl_witness) [symbolic = %Add.facet.loc20_11 (constants.%Add.facet.958)]
|
|
// CHECK:STDOUT: %.loc20_22: %Add.type = converted constants.%MyInt, %Add.facet.loc20_22 [symbolic = %Add.facet.loc20_11 (constants.%Add.facet.958)]
|
|
// CHECK:STDOUT: %specific_impl_fn.loc20_11.1: <specific function> = specific_impl_function %impl.elem0.loc20_11.1, @Add.WithSelf.Op(constants.%Add.facet.958) [symbolic = %specific_impl_fn.loc20_11.2 (constants.%specific_impl_fn)]
|
|
// CHECK:STDOUT: %bound_method.loc20_22: <bound method> = bound_method %x.ref.loc20_10, %specific_impl_fn.loc20_11.1
|
|
// CHECK:STDOUT: %Add.WithSelf.Op.call: init @Double.%MyInt.loc19_39.1 (%MyInt) = call %bound_method.loc20_22(%x.ref.loc20_10, %x.ref.loc20_21)
|
|
// CHECK:STDOUT: return %Add.WithSelf.Op.call
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Add.WithSelf(constants.%Self) {
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %Self => constants.%Self
|
|
// CHECK:STDOUT: %Add.WithSelf.Op.type => constants.%Add.WithSelf.Op.type.366
|
|
// CHECK:STDOUT: %Add.WithSelf.Op => constants.%Add.WithSelf.Op.b28
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Add.WithSelf.Op(constants.%Self) {
|
|
// CHECK:STDOUT: %Self => constants.%Self
|
|
// CHECK:STDOUT: %Self.as_type.loc5_15.1 => constants.%Self.as_type
|
|
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.c53
|
|
// CHECK:STDOUT: %.loc5_37.1 => constants.%.f10
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @MyInt(constants.%N) {
|
|
// CHECK:STDOUT: %N.loc11_14.1 => constants.%N
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %iN.builtin => constants.%iN.builtin
|
|
// CHECK:STDOUT: %require_complete => constants.%require_complete.269
|
|
// CHECK:STDOUT: %complete_type.loc13_1.2 => constants.%complete_type
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @MyInt.as.Add.impl(constants.%N) {
|
|
// CHECK:STDOUT: %N.loc15_15.1 => constants.%N
|
|
// CHECK:STDOUT: %MyInt.loc15_39.1 => constants.%MyInt
|
|
// CHECK:STDOUT: %Add.impl_witness.loc15_48.2 => constants.%Add.impl_witness
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %MyInt.as.Add.impl.Op.type => constants.%MyInt.as.Add.impl.Op.type
|
|
// CHECK:STDOUT: %MyInt.as.Add.impl.Op => constants.%MyInt.as.Add.impl.Op
|
|
// CHECK:STDOUT: %require_complete => constants.%require_complete.f40
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @MyInt.as.Add.impl.Op(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %MyInt => constants.%MyInt
|
|
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.d90
|
|
// CHECK:STDOUT: %.loc16_37.1 => constants.%.ecf
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Add.WithSelf(constants.%Add.facet.028) {
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %Self => constants.%Add.facet.028
|
|
// CHECK:STDOUT: %Add.WithSelf.Op.type => constants.%Add.WithSelf.Op.type.5c0
|
|
// CHECK:STDOUT: %Add.WithSelf.Op => constants.%Add.WithSelf.Op.777
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Add.WithSelf.Op(constants.%Add.facet.028) {
|
|
// CHECK:STDOUT: %Self => constants.%Add.facet.028
|
|
// CHECK:STDOUT: %Self.as_type.loc5_15.1 => constants.%MyInt
|
|
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.d90
|
|
// CHECK:STDOUT: %.loc5_37.1 => constants.%.ecf
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Double(constants.%N) {
|
|
// CHECK:STDOUT: %N.loc19_12.1 => constants.%N
|
|
// CHECK:STDOUT: %MyInt.loc19_39.1 => constants.%MyInt
|
|
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.d90
|
|
// CHECK:STDOUT: %.loc19_52.1 => constants.%.ecf
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Add.WithSelf(constants.%Add.facet.958) {
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %Self => constants.%Add.facet.958
|
|
// CHECK:STDOUT: %Add.WithSelf.Op.type => constants.%Add.WithSelf.Op.type.32f
|
|
// CHECK:STDOUT: %Add.WithSelf.Op => constants.%Add.WithSelf.Op.321
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Add.WithSelf.Op(constants.%Add.facet.958) {
|
|
// CHECK:STDOUT: %Self => constants.%Add.facet.958
|
|
// CHECK:STDOUT: %Self.as_type.loc5_15.1 => constants.%MyInt
|
|
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.d90
|
|
// CHECK:STDOUT: %.loc5_37.1 => constants.%.ecf
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: --- use_generic_impl.carbon
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: %MyInt.type: type = generic_class_type @MyInt [concrete]
|
|
// CHECK:STDOUT: %MyInt.generic: %MyInt.type = struct_value () [concrete]
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic]
|
|
// CHECK:STDOUT: %iN.builtin: type = int_type signed, %N [symbolic]
|
|
// CHECK:STDOUT: %complete_type.d26: <witness> = complete_type_witness %iN.builtin [symbolic]
|
|
// CHECK:STDOUT: %MyInt.ace: type = class_type @MyInt, @MyInt(%N) [symbolic]
|
|
// CHECK:STDOUT: %require_complete.269: <witness> = require_complete_type %iN.builtin [symbolic]
|
|
// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [concrete]
|
|
// CHECK:STDOUT: %MyInt.237: type = class_type @MyInt, @MyInt(%int_64) [concrete]
|
|
// CHECK:STDOUT: %pattern_type.e32: type = pattern_type %MyInt.237 [concrete]
|
|
// CHECK:STDOUT: %.2e3: Core.Form = init_form %MyInt.237 [concrete]
|
|
// CHECK:STDOUT: %CallImportedDouble.type: type = fn_type @CallImportedDouble [concrete]
|
|
// CHECK:STDOUT: %CallImportedDouble: %CallImportedDouble.type = struct_value () [concrete]
|
|
// CHECK:STDOUT: %i64.builtin: type = int_type signed, %int_64 [concrete]
|
|
// CHECK:STDOUT: %complete_type.4a1: <witness> = complete_type_witness %i64.builtin [concrete]
|
|
// CHECK:STDOUT: %Double.type: type = fn_type @Double [concrete]
|
|
// CHECK:STDOUT: %Double: %Double.type = struct_value () [concrete]
|
|
// CHECK:STDOUT: %pattern_type.a71: type = pattern_type %MyInt.ace [symbolic]
|
|
// CHECK:STDOUT: %.137: Core.Form = init_form %MyInt.ace [symbolic]
|
|
// CHECK:STDOUT: %Add.type: type = facet_type <@Add> [concrete]
|
|
// CHECK:STDOUT: %Self: %Add.type = symbolic_binding Self, 0 [symbolic]
|
|
// CHECK:STDOUT: %Add.WithSelf.Op.type.041: type = fn_type @Add.WithSelf.Op, @Add.WithSelf(%Self) [symbolic]
|
|
// CHECK:STDOUT: %Add.WithSelf.Op.c38: %Add.WithSelf.Op.type.041 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic]
|
|
// CHECK:STDOUT: %pattern_type.342: type = pattern_type %Self.as_type [symbolic]
|
|
// CHECK:STDOUT: %.f66: Core.Form = init_form %Self.as_type [symbolic]
|
|
// CHECK:STDOUT: %Add.lookup_impl_witness: <witness> = lookup_impl_witness %MyInt.ace, @Add [symbolic]
|
|
// CHECK:STDOUT: %Add.facet.716: %Add.type = facet_value %MyInt.ace, (%Add.lookup_impl_witness) [symbolic]
|
|
// CHECK:STDOUT: %Add.WithSelf.Op.type.977: type = fn_type @Add.WithSelf.Op, @Add.WithSelf(%Add.facet.716) [symbolic]
|
|
// CHECK:STDOUT: %Add.WithSelf.Op.7ef: %Add.WithSelf.Op.type.977 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %.699: type = fn_type_with_self_type %Add.WithSelf.Op.type.977, %Add.facet.716 [symbolic]
|
|
// CHECK:STDOUT: %impl.elem0: %.699 = impl_witness_access %Add.lookup_impl_witness, element0 [symbolic]
|
|
// CHECK:STDOUT: %specific_impl_fn: <specific function> = specific_impl_function %impl.elem0, @Add.WithSelf.Op(%Add.facet.716) [symbolic]
|
|
// CHECK:STDOUT: %Add.impl_witness.037: <witness> = impl_witness imports.%Add.impl_witness_table, @MyInt.as.Add.impl(%N) [symbolic]
|
|
// CHECK:STDOUT: %require_complete.b5d: <witness> = require_complete_type %MyInt.ace [symbolic]
|
|
// CHECK:STDOUT: %MyInt.as.Add.impl.Op.type.aa2: type = fn_type @MyInt.as.Add.impl.Op, @MyInt.as.Add.impl(%N) [symbolic]
|
|
// CHECK:STDOUT: %MyInt.as.Add.impl.Op.fa4: %MyInt.as.Add.impl.Op.type.aa2 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %.5d0: require_specific_def_type = require_specific_def @MyInt.as.Add.impl(%N) [symbolic]
|
|
// CHECK:STDOUT: %Double.specific_fn: <specific function> = specific_function %Double, @Double(%int_64) [concrete]
|
|
// CHECK:STDOUT: %Add.impl_witness.837: <witness> = impl_witness imports.%Add.impl_witness_table, @MyInt.as.Add.impl(%int_64) [concrete]
|
|
// CHECK:STDOUT: %MyInt.as.Add.impl.Op.type.e64: type = fn_type @MyInt.as.Add.impl.Op, @MyInt.as.Add.impl(%int_64) [concrete]
|
|
// CHECK:STDOUT: %MyInt.as.Add.impl.Op.8aa: %MyInt.as.Add.impl.Op.type.e64 = struct_value () [concrete]
|
|
// CHECK:STDOUT: %.040: require_specific_def_type = require_specific_def @MyInt.as.Add.impl(%int_64) [concrete]
|
|
// CHECK:STDOUT: %Add.facet.85a: %Add.type = facet_value %MyInt.237, (%Add.impl_witness.837) [concrete]
|
|
// CHECK:STDOUT: %Add.WithSelf.Op.type.c81: type = fn_type @Add.WithSelf.Op, @Add.WithSelf(%Add.facet.85a) [concrete]
|
|
// CHECK:STDOUT: %.e95: type = fn_type_with_self_type %Add.WithSelf.Op.type.c81, %Add.facet.85a [concrete]
|
|
// CHECK:STDOUT: %MyInt.as.Add.impl.Op.specific_fn: <specific function> = specific_function %MyInt.as.Add.impl.Op.8aa, @MyInt.as.Add.impl.Op(%int_64) [concrete]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: imports {
|
|
// CHECK:STDOUT: %Main.Add = import_ref Main//generic_impl, Add, unloaded
|
|
// CHECK:STDOUT: %Main.IntLiteral = import_ref Main//generic_impl, IntLiteral, unloaded
|
|
// CHECK:STDOUT: %Main.Int = import_ref Main//generic_impl, Int, unloaded
|
|
// CHECK:STDOUT: %Main.MyInt: %MyInt.type = import_ref Main//generic_impl, MyInt, loaded [concrete = constants.%MyInt.generic]
|
|
// CHECK:STDOUT: %Main.Double: %Double.type = import_ref Main//generic_impl, Double, loaded [concrete = constants.%Double]
|
|
// CHECK:STDOUT: %Main.import_ref.f9e: <witness> = import_ref Main//generic_impl, loc13_1, loaded [symbolic = @MyInt.%complete_type (constants.%complete_type.d26)]
|
|
// CHECK:STDOUT: %Main.import_ref.6a0 = import_ref Main//generic_impl, inst{{[0-9A-F]+}} [no loc], unloaded
|
|
// CHECK:STDOUT: %Main.import_ref.6b552a.1: Core.IntLiteral = import_ref Main//generic_impl, loc11_14, loaded [symbolic = @MyInt.%N (constants.%N)]
|
|
// CHECK:STDOUT: %Main.import_ref.6b552a.2: Core.IntLiteral = import_ref Main//generic_impl, loc19_12, loaded [symbolic = @Double.%N (constants.%N)]
|
|
// CHECK:STDOUT: %Main.import_ref.d62 = import_ref Main//generic_impl, loc5_41, unloaded
|
|
// CHECK:STDOUT: %Main.Op = import_ref Main//generic_impl, Op, unloaded
|
|
// CHECK:STDOUT: %Main.import_ref.1d7038.2: %Add.type = import_ref Main//generic_impl, loc4_15, loaded [symbolic = constants.%Self]
|
|
// CHECK:STDOUT: %Main.import_ref.8d5 = import_ref Main//generic_impl, loc4_15, unloaded
|
|
// CHECK:STDOUT: %Main.import_ref.bda: <witness> = import_ref Main//generic_impl, loc15_48, loaded [symbolic = @MyInt.as.Add.impl.%Add.impl_witness (constants.%Add.impl_witness.037)]
|
|
// CHECK:STDOUT: %Main.import_ref.a23: @MyInt.as.Add.impl.%MyInt.as.Add.impl.Op.type (%MyInt.as.Add.impl.Op.type.aa2) = import_ref Main//generic_impl, loc16_42, loaded [symbolic = @MyInt.as.Add.impl.%MyInt.as.Add.impl.Op (constants.%MyInt.as.Add.impl.Op.fa4)]
|
|
// CHECK:STDOUT: %Add.impl_witness_table = impl_witness_table (%Main.import_ref.a23), @MyInt.as.Add.impl [concrete]
|
|
// CHECK:STDOUT: %Main.import_ref.6b552a.3: Core.IntLiteral = import_ref Main//generic_impl, loc15_15, loaded [symbolic = @MyInt.as.Add.impl.%N (constants.%N)]
|
|
// CHECK:STDOUT: %Main.import_ref.9e99dc.2: type = import_ref Main//generic_impl, loc15_39, loaded [symbolic = @MyInt.as.Add.impl.%MyInt (constants.%MyInt.ace)]
|
|
// CHECK:STDOUT: %Main.import_ref.d8c: type = import_ref Main//generic_impl, loc15_44, loaded [concrete = constants.%Add.type]
|
|
// CHECK:STDOUT: %Main.import_ref.6b552a.4: Core.IntLiteral = import_ref Main//generic_impl, loc15_15, loaded [symbolic = @MyInt.as.Add.impl.%N (constants.%N)]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: file {
|
|
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
|
|
// CHECK:STDOUT: .Add = imports.%Main.Add
|
|
// CHECK:STDOUT: .IntLiteral = imports.%Main.IntLiteral
|
|
// CHECK:STDOUT: .Int = imports.%Main.Int
|
|
// CHECK:STDOUT: .MyInt = imports.%Main.MyInt
|
|
// CHECK:STDOUT: .Double = imports.%Main.Double
|
|
// CHECK:STDOUT: .CallImportedDouble = %CallImportedDouble.decl
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %default.import = import <none>
|
|
// CHECK:STDOUT: %CallImportedDouble.decl: %CallImportedDouble.type = fn_decl @CallImportedDouble [concrete = constants.%CallImportedDouble] {
|
|
// CHECK:STDOUT: %n.param_patt: %pattern_type.e32 = value_param_pattern [concrete]
|
|
// CHECK:STDOUT: %n.patt: %pattern_type.e32 = at_binding_pattern n, %n.param_patt [concrete]
|
|
// CHECK:STDOUT: %return.param_patt: %pattern_type.e32 = out_param_pattern [concrete]
|
|
// CHECK:STDOUT: %return.patt: %pattern_type.e32 = return_slot_pattern %return.param_patt, %MyInt.loc6_48 [concrete]
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %MyInt.ref.loc6_40: %MyInt.type = name_ref MyInt, imports.%Main.MyInt [concrete = constants.%MyInt.generic]
|
|
// CHECK:STDOUT: %int_64.loc6_46: Core.IntLiteral = int_value 64 [concrete = constants.%int_64]
|
|
// CHECK:STDOUT: %MyInt.loc6_48: type = class_type @MyInt, @MyInt(constants.%int_64) [concrete = constants.%MyInt.237]
|
|
// CHECK:STDOUT: %.loc6_48: Core.Form = init_form %MyInt.loc6_48 [concrete = constants.%.2e3]
|
|
// CHECK:STDOUT: %n.param: %MyInt.237 = value_param call_param0
|
|
// CHECK:STDOUT: %.loc6_34: type = splice_block %MyInt.loc6_34 [concrete = constants.%MyInt.237] {
|
|
// CHECK:STDOUT: %MyInt.ref.loc6_26: %MyInt.type = name_ref MyInt, imports.%Main.MyInt [concrete = constants.%MyInt.generic]
|
|
// CHECK:STDOUT: %int_64.loc6_32: Core.IntLiteral = int_value 64 [concrete = constants.%int_64]
|
|
// CHECK:STDOUT: %MyInt.loc6_34: type = class_type @MyInt, @MyInt(constants.%int_64) [concrete = constants.%MyInt.237]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %n: %MyInt.237 = value_binding n, %n.param
|
|
// CHECK:STDOUT: %return.param: ref %MyInt.237 = out_param call_param1
|
|
// CHECK:STDOUT: %return: ref %MyInt.237 = return_slot %return.param
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: interface @Add [from "generic_impl.carbon"] {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: .Self = imports.%Main.import_ref.8d5
|
|
// CHECK:STDOUT: .Op = imports.%Main.import_ref.d62
|
|
// CHECK:STDOUT: witness = (imports.%Main.Op)
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !requires:
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic impl @MyInt.as.Add.impl(imports.%Main.import_ref.6b552a.4: Core.IntLiteral) [from "generic_impl.carbon"] {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %MyInt: type = class_type @MyInt, @MyInt(%N) [symbolic = %MyInt (constants.%MyInt.ace)]
|
|
// CHECK:STDOUT: %Add.impl_witness: <witness> = impl_witness imports.%Add.impl_witness_table, @MyInt.as.Add.impl(%N) [symbolic = %Add.impl_witness (constants.%Add.impl_witness.037)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %MyInt.as.Add.impl.Op.type: type = fn_type @MyInt.as.Add.impl.Op, @MyInt.as.Add.impl(%N) [symbolic = %MyInt.as.Add.impl.Op.type (constants.%MyInt.as.Add.impl.Op.type.aa2)]
|
|
// CHECK:STDOUT: %MyInt.as.Add.impl.Op: @MyInt.as.Add.impl.%MyInt.as.Add.impl.Op.type (%MyInt.as.Add.impl.Op.type.aa2) = struct_value () [symbolic = %MyInt.as.Add.impl.Op (constants.%MyInt.as.Add.impl.Op.fa4)]
|
|
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %MyInt [symbolic = %require_complete (constants.%require_complete.b5d)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: impl: imports.%Main.import_ref.9e99dc.2 as imports.%Main.import_ref.d8c {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: witness = imports.%Main.import_ref.bda
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic class @MyInt(imports.%Main.import_ref.6b552a.1: Core.IntLiteral) [from "generic_impl.carbon"] {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %iN.builtin: type = int_type signed, %N [symbolic = %iN.builtin (constants.%iN.builtin)]
|
|
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %iN.builtin [symbolic = %require_complete (constants.%require_complete.269)]
|
|
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %iN.builtin [symbolic = %complete_type (constants.%complete_type.d26)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: class {
|
|
// CHECK:STDOUT: complete_type_witness = imports.%Main.import_ref.f9e
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: .Self = imports.%Main.import_ref.6a0
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @CallImportedDouble(%n.param: %MyInt.237) -> out %return.param: %MyInt.237 {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %Double.ref: %Double.type = name_ref Double, imports.%Main.Double [concrete = constants.%Double]
|
|
// CHECK:STDOUT: %n.ref: %MyInt.237 = name_ref n, %n
|
|
// CHECK:STDOUT: %Double.specific_fn: <specific function> = specific_function %Double.ref, @Double(constants.%int_64) [concrete = constants.%Double.specific_fn]
|
|
// CHECK:STDOUT: %Double.call: init %MyInt.237 = call %Double.specific_fn(%n.ref)
|
|
// CHECK:STDOUT: return %Double.call
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @Double(imports.%Main.import_ref.6b552a.2: Core.IntLiteral) [from "generic_impl.carbon"] {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %MyInt: type = class_type @MyInt, @MyInt(%N) [symbolic = %MyInt (constants.%MyInt.ace)]
|
|
// CHECK:STDOUT: %pattern_type: type = pattern_type %MyInt [symbolic = %pattern_type (constants.%pattern_type.a71)]
|
|
// CHECK:STDOUT: %.1: Core.Form = init_form %MyInt [symbolic = %.1 (constants.%.137)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %MyInt [symbolic = %require_complete (constants.%require_complete.b5d)]
|
|
// CHECK:STDOUT: %.2: require_specific_def_type = require_specific_def @MyInt.as.Add.impl(%N) [symbolic = %.2 (constants.%.5d0)]
|
|
// CHECK:STDOUT: %Add.lookup_impl_witness: <witness> = lookup_impl_witness %MyInt, @Add [symbolic = %Add.lookup_impl_witness (constants.%Add.lookup_impl_witness)]
|
|
// CHECK:STDOUT: %Add.facet: %Add.type = facet_value %MyInt, (%Add.lookup_impl_witness) [symbolic = %Add.facet (constants.%Add.facet.716)]
|
|
// CHECK:STDOUT: %Add.WithSelf.Op.type: type = fn_type @Add.WithSelf.Op, @Add.WithSelf(%Add.facet) [symbolic = %Add.WithSelf.Op.type (constants.%Add.WithSelf.Op.type.977)]
|
|
// CHECK:STDOUT: %.3: type = fn_type_with_self_type %Add.WithSelf.Op.type, %Add.facet [symbolic = %.3 (constants.%.699)]
|
|
// CHECK:STDOUT: %impl.elem0: @Double.%.3 (%.699) = impl_witness_access %Add.lookup_impl_witness, element0 [symbolic = %impl.elem0 (constants.%impl.elem0)]
|
|
// CHECK:STDOUT: %specific_impl_fn: <specific function> = specific_impl_function %impl.elem0, @Add.WithSelf.Op(%Add.facet) [symbolic = %specific_impl_fn (constants.%specific_impl_fn)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn;
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @Add.WithSelf.Op(imports.%Main.import_ref.1d7038.2: %Add.type) [from "generic_impl.carbon"] {
|
|
// CHECK:STDOUT: %Self: %Add.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)]
|
|
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type)]
|
|
// CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type [symbolic = %pattern_type (constants.%pattern_type.342)]
|
|
// CHECK:STDOUT: %.1: Core.Form = init_form %Self.as_type [symbolic = %.1 (constants.%.f66)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn;
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @MyInt.as.Add.impl.Op(imports.%Main.import_ref.6b552a.3: Core.IntLiteral) [from "generic_impl.carbon"] {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %MyInt: type = class_type @MyInt, @MyInt(%N) [symbolic = %MyInt (constants.%MyInt.ace)]
|
|
// CHECK:STDOUT: %pattern_type: type = pattern_type %MyInt [symbolic = %pattern_type (constants.%pattern_type.a71)]
|
|
// CHECK:STDOUT: %.1: Core.Form = init_form %MyInt [symbolic = %.1 (constants.%.137)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn = "int.sadd";
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @MyInt(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %iN.builtin => constants.%iN.builtin
|
|
// CHECK:STDOUT: %require_complete => constants.%require_complete.269
|
|
// CHECK:STDOUT: %complete_type => constants.%complete_type.d26
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @MyInt(constants.%int_64) {
|
|
// CHECK:STDOUT: %N => constants.%int_64
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %iN.builtin => constants.%i64.builtin
|
|
// CHECK:STDOUT: %require_complete => constants.%complete_type.4a1
|
|
// CHECK:STDOUT: %complete_type => constants.%complete_type.4a1
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Add.WithSelf(constants.%Self) {
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %Self => constants.%Self
|
|
// CHECK:STDOUT: %Add.WithSelf.Op.type => constants.%Add.WithSelf.Op.type.041
|
|
// CHECK:STDOUT: %Add.WithSelf.Op => constants.%Add.WithSelf.Op.c38
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Add.WithSelf.Op(constants.%Self) {
|
|
// CHECK:STDOUT: %Self => constants.%Self
|
|
// CHECK:STDOUT: %Self.as_type => constants.%Self.as_type
|
|
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.342
|
|
// CHECK:STDOUT: %.1 => constants.%.f66
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Add.WithSelf(constants.%Add.facet.716) {
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %Self => constants.%Add.facet.716
|
|
// CHECK:STDOUT: %Add.WithSelf.Op.type => constants.%Add.WithSelf.Op.type.977
|
|
// CHECK:STDOUT: %Add.WithSelf.Op => constants.%Add.WithSelf.Op.7ef
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Add.WithSelf.Op(constants.%Add.facet.716) {
|
|
// CHECK:STDOUT: %Self => constants.%Add.facet.716
|
|
// CHECK:STDOUT: %Self.as_type => constants.%MyInt.ace
|
|
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.a71
|
|
// CHECK:STDOUT: %.1 => constants.%.137
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @MyInt.as.Add.impl(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %MyInt => constants.%MyInt.ace
|
|
// CHECK:STDOUT: %Add.impl_witness => constants.%Add.impl_witness.037
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %MyInt.as.Add.impl.Op.type => constants.%MyInt.as.Add.impl.Op.type.aa2
|
|
// CHECK:STDOUT: %MyInt.as.Add.impl.Op => constants.%MyInt.as.Add.impl.Op.fa4
|
|
// CHECK:STDOUT: %require_complete => constants.%require_complete.b5d
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @MyInt.as.Add.impl.Op(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %MyInt => constants.%MyInt.ace
|
|
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.a71
|
|
// CHECK:STDOUT: %.1 => constants.%.137
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Double(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %MyInt => constants.%MyInt.ace
|
|
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.a71
|
|
// CHECK:STDOUT: %.1 => constants.%.137
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Double(constants.%int_64) {
|
|
// CHECK:STDOUT: %N => constants.%int_64
|
|
// CHECK:STDOUT: %MyInt => constants.%MyInt.237
|
|
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.e32
|
|
// CHECK:STDOUT: %.1 => constants.%.2e3
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %require_complete => constants.%complete_type.4a1
|
|
// CHECK:STDOUT: %.2 => constants.%.040
|
|
// CHECK:STDOUT: %Add.lookup_impl_witness => constants.%Add.impl_witness.837
|
|
// CHECK:STDOUT: %Add.facet => constants.%Add.facet.85a
|
|
// CHECK:STDOUT: %Add.WithSelf.Op.type => constants.%Add.WithSelf.Op.type.c81
|
|
// CHECK:STDOUT: %.3 => constants.%.e95
|
|
// CHECK:STDOUT: %impl.elem0 => constants.%MyInt.as.Add.impl.Op.8aa
|
|
// CHECK:STDOUT: %specific_impl_fn => constants.%MyInt.as.Add.impl.Op.specific_fn
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @MyInt.as.Add.impl(constants.%int_64) {
|
|
// CHECK:STDOUT: %N => constants.%int_64
|
|
// CHECK:STDOUT: %MyInt => constants.%MyInt.237
|
|
// CHECK:STDOUT: %Add.impl_witness => constants.%Add.impl_witness.837
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %MyInt.as.Add.impl.Op.type => constants.%MyInt.as.Add.impl.Op.type.e64
|
|
// CHECK:STDOUT: %MyInt.as.Add.impl.Op => constants.%MyInt.as.Add.impl.Op.8aa
|
|
// CHECK:STDOUT: %require_complete => constants.%complete_type.4a1
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Add.WithSelf(constants.%Add.facet.85a) {}
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Add.WithSelf.Op(constants.%Add.facet.85a) {
|
|
// CHECK:STDOUT: %Self => constants.%Add.facet.85a
|
|
// CHECK:STDOUT: %Self.as_type => constants.%MyInt.237
|
|
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.e32
|
|
// CHECK:STDOUT: %.1 => constants.%.2e3
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @MyInt.as.Add.impl.Op(constants.%int_64) {
|
|
// CHECK:STDOUT: %N => constants.%int_64
|
|
// CHECK:STDOUT: %MyInt => constants.%MyInt.237
|
|
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.e32
|
|
// CHECK:STDOUT: %.1 => constants.%.2e3
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: --- convert_symbolic.carbon
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: %.805: Core.Form = init_form type [concrete]
|
|
// CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete]
|
|
// CHECK:STDOUT: %IntLiteral.type: type = fn_type @IntLiteral [concrete]
|
|
// CHECK:STDOUT: %IntLiteral: %IntLiteral.type = struct_value () [concrete]
|
|
// CHECK:STDOUT: %pattern_type.dc0: type = pattern_type Core.IntLiteral [concrete]
|
|
// CHECK:STDOUT: %Int.type: type = fn_type @Int [concrete]
|
|
// CHECK:STDOUT: %Int: %Int.type = struct_value () [concrete]
|
|
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
|
|
// CHECK:STDOUT: %i32.builtin: type = int_type signed, %int_32 [concrete]
|
|
// CHECK:STDOUT: %pattern_type.956: type = pattern_type %i32.builtin [concrete]
|
|
// CHECK:STDOUT: %.f7d: Core.Form = init_form Core.IntLiteral [concrete]
|
|
// CHECK:STDOUT: %ToLiteral.type: type = fn_type @ToLiteral [concrete]
|
|
// CHECK:STDOUT: %ToLiteral: %ToLiteral.type = struct_value () [concrete]
|
|
// CHECK:STDOUT: %.9cb: Core.Form = init_form %i32.builtin [concrete]
|
|
// CHECK:STDOUT: %FromLiteral.type: type = fn_type @FromLiteral [concrete]
|
|
// CHECK:STDOUT: %FromLiteral: %FromLiteral.type = struct_value () [concrete]
|
|
// CHECK:STDOUT: %type: type = facet_type <type> [concrete]
|
|
// CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self]
|
|
// CHECK:STDOUT: %N.7e8: %i32.builtin = symbolic_binding N, 0 [symbolic]
|
|
// CHECK:STDOUT: %ToLiteral.call: init Core.IntLiteral = call %ToLiteral(%N.7e8) [symbolic]
|
|
// CHECK:STDOUT: %iN.builtin.f6f: type = int_type signed, %ToLiteral.call [symbolic]
|
|
// CHECK:STDOUT: %.b95: Core.Form = init_form %iN.builtin.f6f [symbolic]
|
|
// CHECK:STDOUT: %pattern_type.acd: type = pattern_type %iN.builtin.f6f [symbolic]
|
|
// CHECK:STDOUT: %Make.type: type = fn_type @Make [concrete]
|
|
// CHECK:STDOUT: %Make: %Make.type = struct_value () [concrete]
|
|
// CHECK:STDOUT: %require_complete.1d3: <witness> = require_complete_type %iN.builtin.f6f [symbolic]
|
|
// CHECK:STDOUT: %Make.specific_fn: <specific function> = specific_function %Make, @Make(%N.7e8) [symbolic]
|
|
// CHECK:STDOUT: %OtherInt: type = class_type @OtherInt [concrete]
|
|
// CHECK:STDOUT: %pattern_type.90f: type = pattern_type %OtherInt [concrete]
|
|
// CHECK:STDOUT: %OtherInt.ToLiteral.type: type = fn_type @OtherInt.ToLiteral [concrete]
|
|
// CHECK:STDOUT: %OtherInt.ToLiteral: %OtherInt.ToLiteral.type = struct_value () [concrete]
|
|
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %i32.builtin [concrete]
|
|
// CHECK:STDOUT: %N.683: %OtherInt = symbolic_binding N, 0 [symbolic]
|
|
// CHECK:STDOUT: %OtherInt.ToLiteral.bound: <bound method> = bound_method %N.683, %OtherInt.ToLiteral [symbolic]
|
|
// CHECK:STDOUT: %OtherInt.ToLiteral.call: init Core.IntLiteral = call %OtherInt.ToLiteral.bound(%N.683) [symbolic]
|
|
// CHECK:STDOUT: %iN.builtin.886: type = int_type signed, %OtherInt.ToLiteral.call [symbolic]
|
|
// CHECK:STDOUT: %.f59: Core.Form = init_form %iN.builtin.886 [symbolic]
|
|
// CHECK:STDOUT: %pattern_type.f41: type = pattern_type %iN.builtin.886 [symbolic]
|
|
// CHECK:STDOUT: %MakeFromClass.type: type = fn_type @MakeFromClass [concrete]
|
|
// CHECK:STDOUT: %MakeFromClass: %MakeFromClass.type = struct_value () [concrete]
|
|
// CHECK:STDOUT: %require_complete.1f5: <witness> = require_complete_type %iN.builtin.886 [symbolic]
|
|
// CHECK:STDOUT: %MakeFromClass.specific_fn: <specific function> = specific_function %MakeFromClass, @MakeFromClass(%N.683) [symbolic]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: file {
|
|
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
|
|
// CHECK:STDOUT: .IntLiteral = %IntLiteral.decl
|
|
// CHECK:STDOUT: .Int = %Int.decl
|
|
// CHECK:STDOUT: .ToLiteral = %ToLiteral.decl
|
|
// CHECK:STDOUT: .FromLiteral = %FromLiteral.decl
|
|
// CHECK:STDOUT: .Make = %Make.decl
|
|
// CHECK:STDOUT: .OtherInt = %OtherInt.decl
|
|
// CHECK:STDOUT: .MakeFromClass = %MakeFromClass.decl
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %IntLiteral.decl: %IntLiteral.type = fn_decl @IntLiteral [concrete = constants.%IntLiteral] {
|
|
// CHECK:STDOUT: %return.param_patt: %pattern_type.98f = out_param_pattern [concrete]
|
|
// CHECK:STDOUT: %return.patt: %pattern_type.98f = return_slot_pattern %return.param_patt, %.loc4_20.1 [concrete]
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %.loc4_20.1: type = type_literal type [concrete = type]
|
|
// CHECK:STDOUT: %.loc4_20.2: Core.Form = init_form %.loc4_20.1 [concrete = constants.%.805]
|
|
// CHECK:STDOUT: %return.param: ref type = out_param call_param0
|
|
// CHECK:STDOUT: %return: ref type = return_slot %return.param
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %Int.decl: %Int.type = fn_decl @Int [concrete = constants.%Int] {
|
|
// CHECK:STDOUT: %n.param_patt: %pattern_type.dc0 = value_param_pattern [concrete]
|
|
// CHECK:STDOUT: %n.patt: %pattern_type.dc0 = at_binding_pattern n, %n.param_patt [concrete]
|
|
// CHECK:STDOUT: %return.param_patt: %pattern_type.98f = out_param_pattern [concrete]
|
|
// CHECK:STDOUT: %return.patt: %pattern_type.98f = return_slot_pattern %return.param_patt, %.loc5_28.1 [concrete]
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %.loc5_28.1: type = type_literal type [concrete = type]
|
|
// CHECK:STDOUT: %.loc5_28.2: Core.Form = init_form %.loc5_28.1 [concrete = constants.%.805]
|
|
// CHECK:STDOUT: %n.param: Core.IntLiteral = value_param call_param0
|
|
// CHECK:STDOUT: %.loc5_22.1: type = splice_block %.loc5_22.3 [concrete = Core.IntLiteral] {
|
|
// CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [concrete = constants.%IntLiteral]
|
|
// CHECK:STDOUT: %IntLiteral.call: init type = call %IntLiteral.ref() [concrete = Core.IntLiteral]
|
|
// CHECK:STDOUT: %.loc5_22.2: type = value_of_initializer %IntLiteral.call [concrete = Core.IntLiteral]
|
|
// CHECK:STDOUT: %.loc5_22.3: type = converted %IntLiteral.call, %.loc5_22.2 [concrete = Core.IntLiteral]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %n: Core.IntLiteral = value_binding n, %n.param
|
|
// CHECK:STDOUT: %return.param: ref type = out_param call_param1
|
|
// CHECK:STDOUT: %return: ref type = return_slot %return.param
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %ToLiteral.decl: %ToLiteral.type = fn_decl @ToLiteral [concrete = constants.%ToLiteral] {
|
|
// CHECK:STDOUT: %n.param_patt: %pattern_type.956 = value_param_pattern [concrete]
|
|
// CHECK:STDOUT: %n.patt: %pattern_type.956 = at_binding_pattern n, %n.param_patt [concrete]
|
|
// CHECK:STDOUT: %return.param_patt: %pattern_type.dc0 = out_param_pattern [concrete]
|
|
// CHECK:STDOUT: %return.patt: %pattern_type.dc0 = return_slot_pattern %return.param_patt, %.loc6_40.2 [concrete]
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [concrete = constants.%IntLiteral]
|
|
// CHECK:STDOUT: %IntLiteral.call: init type = call %IntLiteral.ref() [concrete = Core.IntLiteral]
|
|
// CHECK:STDOUT: %.loc6_40.1: type = value_of_initializer %IntLiteral.call [concrete = Core.IntLiteral]
|
|
// CHECK:STDOUT: %.loc6_40.2: type = converted %IntLiteral.call, %.loc6_40.1 [concrete = Core.IntLiteral]
|
|
// CHECK:STDOUT: %.loc6_40.3: Core.Form = init_form %.loc6_40.2 [concrete = constants.%.f7d]
|
|
// CHECK:STDOUT: %n.param: %i32.builtin = value_param call_param0
|
|
// CHECK:STDOUT: %.loc6_23.1: type = splice_block %.loc6_23.3 [concrete = constants.%i32.builtin] {
|
|
// CHECK:STDOUT: %Int.ref: %Int.type = name_ref Int, file.%Int.decl [concrete = constants.%Int]
|
|
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
|
|
// CHECK:STDOUT: %Int.call: init type = call %Int.ref(%int_32) [concrete = constants.%i32.builtin]
|
|
// CHECK:STDOUT: %.loc6_23.2: type = value_of_initializer %Int.call [concrete = constants.%i32.builtin]
|
|
// CHECK:STDOUT: %.loc6_23.3: type = converted %Int.call, %.loc6_23.2 [concrete = constants.%i32.builtin]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %n: %i32.builtin = value_binding n, %n.param
|
|
// CHECK:STDOUT: %return.param: ref Core.IntLiteral = out_param call_param1
|
|
// CHECK:STDOUT: %return: ref Core.IntLiteral = return_slot %return.param
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %FromLiteral.decl: %FromLiteral.type = fn_decl @FromLiteral [concrete = constants.%FromLiteral] {
|
|
// CHECK:STDOUT: %n.param_patt: %pattern_type.dc0 = value_param_pattern [concrete]
|
|
// CHECK:STDOUT: %n.patt: %pattern_type.dc0 = at_binding_pattern n, %n.param_patt [concrete]
|
|
// CHECK:STDOUT: %return.param_patt: %pattern_type.956 = out_param_pattern [concrete]
|
|
// CHECK:STDOUT: %return.patt: %pattern_type.956 = return_slot_pattern %return.param_patt, %.loc7_42.2 [concrete]
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %Int.ref: %Int.type = name_ref Int, file.%Int.decl [concrete = constants.%Int]
|
|
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
|
|
// CHECK:STDOUT: %Int.call: init type = call %Int.ref(%int_32) [concrete = constants.%i32.builtin]
|
|
// CHECK:STDOUT: %.loc7_42.1: type = value_of_initializer %Int.call [concrete = constants.%i32.builtin]
|
|
// CHECK:STDOUT: %.loc7_42.2: type = converted %Int.call, %.loc7_42.1 [concrete = constants.%i32.builtin]
|
|
// CHECK:STDOUT: %.loc7_42.3: Core.Form = init_form %.loc7_42.2 [concrete = constants.%.9cb]
|
|
// CHECK:STDOUT: %n.param: Core.IntLiteral = value_param call_param0
|
|
// CHECK:STDOUT: %.loc7_30.1: type = splice_block %.loc7_30.3 [concrete = Core.IntLiteral] {
|
|
// CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [concrete = constants.%IntLiteral]
|
|
// CHECK:STDOUT: %IntLiteral.call: init type = call %IntLiteral.ref() [concrete = Core.IntLiteral]
|
|
// CHECK:STDOUT: %.loc7_30.2: type = value_of_initializer %IntLiteral.call [concrete = Core.IntLiteral]
|
|
// CHECK:STDOUT: %.loc7_30.3: type = converted %IntLiteral.call, %.loc7_30.2 [concrete = Core.IntLiteral]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %n: Core.IntLiteral = value_binding n, %n.param
|
|
// CHECK:STDOUT: %return.param: ref %i32.builtin = out_param call_param1
|
|
// CHECK:STDOUT: %return: ref %i32.builtin = return_slot %return.param
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %Make.decl: %Make.type = fn_decl @Make [concrete = constants.%Make] {
|
|
// CHECK:STDOUT: %N.patt: %pattern_type.956 = symbolic_binding_pattern N, 0 [concrete]
|
|
// CHECK:STDOUT: %return.param_patt: @Make.%pattern_type (%pattern_type.acd) = out_param_pattern [concrete]
|
|
// CHECK:STDOUT: %return.patt: @Make.%pattern_type (%pattern_type.acd) = return_slot_pattern %return.param_patt, %.loc9_41.3 [concrete]
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %Int.ref.loc9_25: %Int.type = name_ref Int, file.%Int.decl [concrete = constants.%Int]
|
|
// CHECK:STDOUT: %ToLiteral.ref: %ToLiteral.type = name_ref ToLiteral, file.%ToLiteral.decl [concrete = constants.%ToLiteral]
|
|
// CHECK:STDOUT: %N.ref.loc9_39: %i32.builtin = name_ref N, %N.loc9_10.2 [symbolic = %N.loc9_10.1 (constants.%N.7e8)]
|
|
// CHECK:STDOUT: %ToLiteral.call.loc9_40.2: init Core.IntLiteral = call %ToLiteral.ref(%N.ref.loc9_39) [symbolic = %ToLiteral.call.loc9_40.1 (constants.%ToLiteral.call)]
|
|
// CHECK:STDOUT: %.loc9_40.1: Core.IntLiteral = value_of_initializer %ToLiteral.call.loc9_40.2 [symbolic = %ToLiteral.call.loc9_40.1 (constants.%ToLiteral.call)]
|
|
// CHECK:STDOUT: %.loc9_40.2: Core.IntLiteral = converted %ToLiteral.call.loc9_40.2, %.loc9_40.1 [symbolic = %ToLiteral.call.loc9_40.1 (constants.%ToLiteral.call)]
|
|
// CHECK:STDOUT: %Int.call.loc9_41: init type = call %Int.ref.loc9_25(%.loc9_40.2) [symbolic = %iN.builtin (constants.%iN.builtin.f6f)]
|
|
// CHECK:STDOUT: %.loc9_41.2: type = value_of_initializer %Int.call.loc9_41 [symbolic = %iN.builtin (constants.%iN.builtin.f6f)]
|
|
// CHECK:STDOUT: %.loc9_41.3: type = converted %Int.call.loc9_41, %.loc9_41.2 [symbolic = %iN.builtin (constants.%iN.builtin.f6f)]
|
|
// CHECK:STDOUT: %.loc9_41.4: Core.Form = init_form %.loc9_41.3 [symbolic = %.loc9_41.1 (constants.%.b95)]
|
|
// CHECK:STDOUT: %.loc9_19.1: type = splice_block %.loc9_19.3 [concrete = constants.%i32.builtin] {
|
|
// CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
|
|
// CHECK:STDOUT: %Int.ref.loc9_13: %Int.type = name_ref Int, file.%Int.decl [concrete = constants.%Int]
|
|
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
|
|
// CHECK:STDOUT: %Int.call.loc9_19: init type = call %Int.ref.loc9_13(%int_32) [concrete = constants.%i32.builtin]
|
|
// CHECK:STDOUT: %.loc9_19.2: type = value_of_initializer %Int.call.loc9_19 [concrete = constants.%i32.builtin]
|
|
// CHECK:STDOUT: %.loc9_19.3: type = converted %Int.call.loc9_19, %.loc9_19.2 [concrete = constants.%i32.builtin]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %N.loc9_10.2: %i32.builtin = symbolic_binding N, 0 [symbolic = %N.loc9_10.1 (constants.%N.7e8)]
|
|
// CHECK:STDOUT: %return.param: ref @Make.%iN.builtin (%iN.builtin.f6f) = out_param call_param0
|
|
// CHECK:STDOUT: %return: ref @Make.%iN.builtin (%iN.builtin.f6f) = return_slot %return.param
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %OtherInt.decl: type = class_decl @OtherInt [concrete = constants.%OtherInt] {} {}
|
|
// CHECK:STDOUT: %OtherInt.ToLiteral.decl: %OtherInt.ToLiteral.type = fn_decl @OtherInt.ToLiteral [concrete = constants.%OtherInt.ToLiteral] {
|
|
// CHECK:STDOUT: %self.param_patt: %pattern_type.90f = value_param_pattern [concrete]
|
|
// CHECK:STDOUT: %self.patt: %pattern_type.90f = at_binding_pattern self, %self.param_patt [concrete]
|
|
// CHECK:STDOUT: %return.param_patt: %pattern_type.dc0 = out_param_pattern [concrete]
|
|
// CHECK:STDOUT: %return.patt: %pattern_type.dc0 = return_slot_pattern %return.param_patt, %.loc16_51.2 [concrete]
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %IntLiteral.ref.loc16: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [concrete = constants.%IntLiteral]
|
|
// CHECK:STDOUT: %IntLiteral.call.loc16: init type = call %IntLiteral.ref.loc16() [concrete = Core.IntLiteral]
|
|
// CHECK:STDOUT: %.loc16_51.1: type = value_of_initializer %IntLiteral.call.loc16 [concrete = Core.IntLiteral]
|
|
// CHECK:STDOUT: %.loc16_51.2: type = converted %IntLiteral.call.loc16, %.loc16_51.1 [concrete = Core.IntLiteral]
|
|
// CHECK:STDOUT: %.loc16_51.3: Core.Form = init_form %.loc16_51.2 [concrete = constants.%.f7d]
|
|
// CHECK:STDOUT: %self.param.loc16: %OtherInt = value_param call_param0
|
|
// CHECK:STDOUT: %Self.ref.loc16: type = name_ref Self, constants.%OtherInt [concrete = constants.%OtherInt]
|
|
// CHECK:STDOUT: %self.loc16: %OtherInt = value_binding self, %self.param.loc16
|
|
// CHECK:STDOUT: %return.param.loc16: ref Core.IntLiteral = out_param call_param1
|
|
// CHECK:STDOUT: %return.loc16: ref Core.IntLiteral = return_slot %return.param.loc16
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %MakeFromClass.decl: %MakeFromClass.type = fn_decl @MakeFromClass [concrete = constants.%MakeFromClass] {
|
|
// CHECK:STDOUT: %N.patt: %pattern_type.90f = symbolic_binding_pattern N, 0 [concrete]
|
|
// CHECK:STDOUT: %return.param_patt: @MakeFromClass.%pattern_type (%pattern_type.f41) = out_param_pattern [concrete]
|
|
// CHECK:STDOUT: %return.patt: @MakeFromClass.%pattern_type (%pattern_type.f41) = return_slot_pattern %return.param_patt, %.loc18_52.3 [concrete]
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %Int.ref: %Int.type = name_ref Int, file.%Int.decl [concrete = constants.%Int]
|
|
// CHECK:STDOUT: %N.ref.loc18_39: %OtherInt = name_ref N, %N.loc18_19.2 [symbolic = %N.loc18_19.1 (constants.%N.683)]
|
|
// CHECK:STDOUT: %ToLiteral.ref: %OtherInt.ToLiteral.type = name_ref ToLiteral, @OtherInt.%OtherInt.ToLiteral.decl [concrete = constants.%OtherInt.ToLiteral]
|
|
// CHECK:STDOUT: %OtherInt.ToLiteral.bound.loc18_40.2: <bound method> = bound_method %N.ref.loc18_39, %ToLiteral.ref [symbolic = %OtherInt.ToLiteral.bound.loc18_40.1 (constants.%OtherInt.ToLiteral.bound)]
|
|
// CHECK:STDOUT: %OtherInt.ToLiteral.call.loc18_51.2: init Core.IntLiteral = call %OtherInt.ToLiteral.bound.loc18_40.2(%N.ref.loc18_39) [symbolic = %OtherInt.ToLiteral.call.loc18_51.1 (constants.%OtherInt.ToLiteral.call)]
|
|
// CHECK:STDOUT: %.loc18_51.1: Core.IntLiteral = value_of_initializer %OtherInt.ToLiteral.call.loc18_51.2 [symbolic = %OtherInt.ToLiteral.call.loc18_51.1 (constants.%OtherInt.ToLiteral.call)]
|
|
// CHECK:STDOUT: %.loc18_51.2: Core.IntLiteral = converted %OtherInt.ToLiteral.call.loc18_51.2, %.loc18_51.1 [symbolic = %OtherInt.ToLiteral.call.loc18_51.1 (constants.%OtherInt.ToLiteral.call)]
|
|
// CHECK:STDOUT: %Int.call: init type = call %Int.ref(%.loc18_51.2) [symbolic = %iN.builtin (constants.%iN.builtin.886)]
|
|
// CHECK:STDOUT: %.loc18_52.2: type = value_of_initializer %Int.call [symbolic = %iN.builtin (constants.%iN.builtin.886)]
|
|
// CHECK:STDOUT: %.loc18_52.3: type = converted %Int.call, %.loc18_52.2 [symbolic = %iN.builtin (constants.%iN.builtin.886)]
|
|
// CHECK:STDOUT: %.loc18_52.4: Core.Form = init_form %.loc18_52.3 [symbolic = %.loc18_52.1 (constants.%.f59)]
|
|
// CHECK:STDOUT: %.loc18_22: type = splice_block %OtherInt.ref [concrete = constants.%OtherInt] {
|
|
// CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
|
|
// CHECK:STDOUT: %OtherInt.ref: type = name_ref OtherInt, file.%OtherInt.decl [concrete = constants.%OtherInt]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %N.loc18_19.2: %OtherInt = symbolic_binding N, 0 [symbolic = %N.loc18_19.1 (constants.%N.683)]
|
|
// CHECK:STDOUT: %return.param: ref @MakeFromClass.%iN.builtin (%iN.builtin.886) = out_param call_param0
|
|
// CHECK:STDOUT: %return: ref @MakeFromClass.%iN.builtin (%iN.builtin.886) = return_slot %return.param
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: class @OtherInt {
|
|
// CHECK:STDOUT: %Int.ref: %Int.type = name_ref Int, file.%Int.decl [concrete = constants.%Int]
|
|
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
|
|
// CHECK:STDOUT: %Int.call: init type = call %Int.ref(%int_32) [concrete = constants.%i32.builtin]
|
|
// CHECK:STDOUT: %.loc12_16.1: type = value_of_initializer %Int.call [concrete = constants.%i32.builtin]
|
|
// CHECK:STDOUT: %.loc12_16.2: type = converted %Int.call, %.loc12_16.1 [concrete = constants.%i32.builtin]
|
|
// CHECK:STDOUT: adapt_decl %.loc12_16.2 [concrete]
|
|
// CHECK:STDOUT: %OtherInt.ToLiteral.decl: %OtherInt.ToLiteral.type = fn_decl @OtherInt.ToLiteral [concrete = constants.%OtherInt.ToLiteral] {
|
|
// CHECK:STDOUT: %self.param_patt: %pattern_type.90f = value_param_pattern [concrete]
|
|
// CHECK:STDOUT: %self.patt: %pattern_type.90f = at_binding_pattern self, %self.param_patt [concrete]
|
|
// CHECK:STDOUT: %return.param_patt: %pattern_type.dc0 = out_param_pattern [concrete]
|
|
// CHECK:STDOUT: %return.patt: %pattern_type.dc0 = return_slot_pattern %return.param_patt, %.loc16_51.2 [concrete]
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %IntLiteral.ref.loc13: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [concrete = constants.%IntLiteral]
|
|
// CHECK:STDOUT: %IntLiteral.call.loc13: init type = call %IntLiteral.ref.loc13() [concrete = Core.IntLiteral]
|
|
// CHECK:STDOUT: %.loc13_44.1: type = value_of_initializer %IntLiteral.call.loc13 [concrete = Core.IntLiteral]
|
|
// CHECK:STDOUT: %.loc13_44.2: type = converted %IntLiteral.call.loc13, %.loc13_44.1 [concrete = Core.IntLiteral]
|
|
// CHECK:STDOUT: %.loc13_44.3: Core.Form = init_form %.loc13_44.2 [concrete = constants.%.f7d]
|
|
// CHECK:STDOUT: %self.param.loc13: %OtherInt = value_param call_param0
|
|
// CHECK:STDOUT: %Self.ref.loc13: type = name_ref Self, constants.%OtherInt [concrete = constants.%OtherInt]
|
|
// CHECK:STDOUT: %self.loc13: %OtherInt = value_binding self, %self.param.loc13
|
|
// CHECK:STDOUT: %return.param.loc13: ref Core.IntLiteral = out_param call_param1
|
|
// CHECK:STDOUT: %return.loc13: ref Core.IntLiteral = return_slot %return.param.loc13
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%i32.builtin [concrete = constants.%complete_type]
|
|
// CHECK:STDOUT: complete_type_witness = %complete_type
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: .Self = constants.%OtherInt
|
|
// CHECK:STDOUT: .Int = <poisoned>
|
|
// CHECK:STDOUT: .IntLiteral = <poisoned>
|
|
// CHECK:STDOUT: .ToLiteral = %OtherInt.ToLiteral.decl
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @IntLiteral() -> out %return.param: type = "int_literal.make_type";
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @Int(%n.param: Core.IntLiteral) -> out %return.param: type = "int.make_type_signed";
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @ToLiteral(%n.param: %i32.builtin) -> out %return.param: Core.IntLiteral = "int.convert_checked";
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @FromLiteral(%n.param: Core.IntLiteral) -> out %return.param: %i32.builtin = "int.convert_checked";
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @Make(%N.loc9_10.2: %i32.builtin) {
|
|
// CHECK:STDOUT: %N.loc9_10.1: %i32.builtin = symbolic_binding N, 0 [symbolic = %N.loc9_10.1 (constants.%N.7e8)]
|
|
// CHECK:STDOUT: %ToLiteral.call.loc9_40.1: init Core.IntLiteral = call constants.%ToLiteral(%N.loc9_10.1) [symbolic = %ToLiteral.call.loc9_40.1 (constants.%ToLiteral.call)]
|
|
// CHECK:STDOUT: %iN.builtin: type = int_type signed, %ToLiteral.call.loc9_40.1 [symbolic = %iN.builtin (constants.%iN.builtin.f6f)]
|
|
// CHECK:STDOUT: %.loc9_41.1: Core.Form = init_form %iN.builtin [symbolic = %.loc9_41.1 (constants.%.b95)]
|
|
// CHECK:STDOUT: %pattern_type: type = pattern_type %iN.builtin [symbolic = %pattern_type (constants.%pattern_type.acd)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %iN.builtin [symbolic = %require_complete (constants.%require_complete.1d3)]
|
|
// CHECK:STDOUT: %Make.specific_fn.loc9_52.2: <specific function> = specific_function constants.%Make, @Make(%N.loc9_10.1) [symbolic = %Make.specific_fn.loc9_52.2 (constants.%Make.specific_fn)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn() -> out %return.param: @Make.%iN.builtin (%iN.builtin.f6f) {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %Make.ref: %Make.type = name_ref Make, file.%Make.decl [concrete = constants.%Make]
|
|
// CHECK:STDOUT: %N.ref.loc9_57: %i32.builtin = name_ref N, %N.loc9_10.2 [symbolic = %N.loc9_10.1 (constants.%N.7e8)]
|
|
// CHECK:STDOUT: %Make.specific_fn.loc9_52.1: <specific function> = specific_function %Make.ref, @Make(constants.%N.7e8) [symbolic = %Make.specific_fn.loc9_52.2 (constants.%Make.specific_fn)]
|
|
// CHECK:STDOUT: %Make.call: init @Make.%iN.builtin (%iN.builtin.f6f) = call %Make.specific_fn.loc9_52.1()
|
|
// CHECK:STDOUT: return %Make.call
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @OtherInt.ToLiteral(%self.param.loc16: %OtherInt) -> out %return.param.loc16: Core.IntLiteral = "int.convert_checked";
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @MakeFromClass(%N.loc18_19.2: %OtherInt) {
|
|
// CHECK:STDOUT: %N.loc18_19.1: %OtherInt = symbolic_binding N, 0 [symbolic = %N.loc18_19.1 (constants.%N.683)]
|
|
// CHECK:STDOUT: %OtherInt.ToLiteral.bound.loc18_40.1: <bound method> = bound_method %N.loc18_19.1, constants.%OtherInt.ToLiteral [symbolic = %OtherInt.ToLiteral.bound.loc18_40.1 (constants.%OtherInt.ToLiteral.bound)]
|
|
// CHECK:STDOUT: %OtherInt.ToLiteral.call.loc18_51.1: init Core.IntLiteral = call %OtherInt.ToLiteral.bound.loc18_40.1(%N.loc18_19.1) [symbolic = %OtherInt.ToLiteral.call.loc18_51.1 (constants.%OtherInt.ToLiteral.call)]
|
|
// CHECK:STDOUT: %iN.builtin: type = int_type signed, %OtherInt.ToLiteral.call.loc18_51.1 [symbolic = %iN.builtin (constants.%iN.builtin.886)]
|
|
// CHECK:STDOUT: %.loc18_52.1: Core.Form = init_form %iN.builtin [symbolic = %.loc18_52.1 (constants.%.f59)]
|
|
// CHECK:STDOUT: %pattern_type: type = pattern_type %iN.builtin [symbolic = %pattern_type (constants.%pattern_type.f41)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %iN.builtin [symbolic = %require_complete (constants.%require_complete.1f5)]
|
|
// CHECK:STDOUT: %MakeFromClass.specific_fn.loc18_63.2: <specific function> = specific_function constants.%MakeFromClass, @MakeFromClass(%N.loc18_19.1) [symbolic = %MakeFromClass.specific_fn.loc18_63.2 (constants.%MakeFromClass.specific_fn)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn() -> out %return.param: @MakeFromClass.%iN.builtin (%iN.builtin.886) {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %MakeFromClass.ref: %MakeFromClass.type = name_ref MakeFromClass, file.%MakeFromClass.decl [concrete = constants.%MakeFromClass]
|
|
// CHECK:STDOUT: %N.ref.loc18_77: %OtherInt = name_ref N, %N.loc18_19.2 [symbolic = %N.loc18_19.1 (constants.%N.683)]
|
|
// CHECK:STDOUT: %MakeFromClass.specific_fn.loc18_63.1: <specific function> = specific_function %MakeFromClass.ref, @MakeFromClass(constants.%N.683) [symbolic = %MakeFromClass.specific_fn.loc18_63.2 (constants.%MakeFromClass.specific_fn)]
|
|
// CHECK:STDOUT: %MakeFromClass.call: init @MakeFromClass.%iN.builtin (%iN.builtin.886) = call %MakeFromClass.specific_fn.loc18_63.1()
|
|
// CHECK:STDOUT: return %MakeFromClass.call
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Make(constants.%N.7e8) {
|
|
// CHECK:STDOUT: %N.loc9_10.1 => constants.%N.7e8
|
|
// CHECK:STDOUT: %ToLiteral.call.loc9_40.1 => constants.%ToLiteral.call
|
|
// CHECK:STDOUT: %iN.builtin => constants.%iN.builtin.f6f
|
|
// CHECK:STDOUT: %.loc9_41.1 => constants.%.b95
|
|
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.acd
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %require_complete => constants.%require_complete.1d3
|
|
// CHECK:STDOUT: %Make.specific_fn.loc9_52.2 => constants.%Make.specific_fn
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @MakeFromClass(constants.%N.683) {
|
|
// CHECK:STDOUT: %N.loc18_19.1 => constants.%N.683
|
|
// CHECK:STDOUT: %OtherInt.ToLiteral.bound.loc18_40.1 => constants.%OtherInt.ToLiteral.bound
|
|
// CHECK:STDOUT: %OtherInt.ToLiteral.call.loc18_51.1 => constants.%OtherInt.ToLiteral.call
|
|
// CHECK:STDOUT: %iN.builtin => constants.%iN.builtin.886
|
|
// CHECK:STDOUT: %.loc18_52.1 => constants.%.f59
|
|
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.f41
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %require_complete => constants.%require_complete.1f5
|
|
// CHECK:STDOUT: %MakeFromClass.specific_fn.loc18_63.2 => constants.%MakeFromClass.specific_fn
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: --- use_convert_symbolic.carbon
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: %Int.type: type = fn_type @Int [concrete]
|
|
// CHECK:STDOUT: %Int: %Int.type = struct_value () [concrete]
|
|
// CHECK:STDOUT: %int_64.fab: Core.IntLiteral = int_value 64 [concrete]
|
|
// CHECK:STDOUT: %i64.builtin: type = int_type signed, %int_64.fab [concrete]
|
|
// CHECK:STDOUT: %pattern_type.e13: type = pattern_type %i64.builtin [concrete]
|
|
// CHECK:STDOUT: %Make.type: type = fn_type @Make [concrete]
|
|
// CHECK:STDOUT: %Make: %Make.type = struct_value () [concrete]
|
|
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
|
|
// CHECK:STDOUT: %i32.builtin: type = int_type signed, %int_32 [concrete]
|
|
// CHECK:STDOUT: %N.7e8: %i32.builtin = symbolic_binding N, 0 [symbolic]
|
|
// CHECK:STDOUT: %ToLiteral.type: type = fn_type @ToLiteral [concrete]
|
|
// CHECK:STDOUT: %ToLiteral: %ToLiteral.type = struct_value () [concrete]
|
|
// CHECK:STDOUT: %ToLiteral.call: init Core.IntLiteral = call %ToLiteral(%N.7e8) [symbolic]
|
|
// CHECK:STDOUT: %iN.builtin.bb6: type = int_type signed, %ToLiteral.call [symbolic]
|
|
// CHECK:STDOUT: %pattern_type.87b: type = pattern_type %iN.builtin.bb6 [symbolic]
|
|
// CHECK:STDOUT: %.fe5: Core.Form = init_form %iN.builtin.bb6 [symbolic]
|
|
// CHECK:STDOUT: %Make.specific_fn.121: <specific function> = specific_function %Make, @Make(%N.7e8) [symbolic]
|
|
// CHECK:STDOUT: %require_complete.2a4: <witness> = require_complete_type %iN.builtin.bb6 [symbolic]
|
|
// CHECK:STDOUT: %FromLiteral.type: type = fn_type @FromLiteral [concrete]
|
|
// CHECK:STDOUT: %FromLiteral: %FromLiteral.type = struct_value () [concrete]
|
|
// CHECK:STDOUT: %int_64.f82: %i32.builtin = int_value 64 [concrete]
|
|
// CHECK:STDOUT: %.df2: Core.Form = init_form %i64.builtin [concrete]
|
|
// CHECK:STDOUT: %Make.specific_fn.7de: <specific function> = specific_function %Make, @Make(%int_64.f82) [concrete]
|
|
// CHECK:STDOUT: %MakeFromClass.type: type = fn_type @MakeFromClass [concrete]
|
|
// CHECK:STDOUT: %MakeFromClass: %MakeFromClass.type = struct_value () [concrete]
|
|
// CHECK:STDOUT: %OtherInt: type = class_type @OtherInt [concrete]
|
|
// CHECK:STDOUT: %complete_type.f8a: <witness> = complete_type_witness %i32.builtin [concrete]
|
|
// CHECK:STDOUT: %N.1fd: %OtherInt = symbolic_binding N, 0 [symbolic]
|
|
// CHECK:STDOUT: %OtherInt.ToLiteral.type: type = fn_type @OtherInt.ToLiteral [concrete]
|
|
// CHECK:STDOUT: %OtherInt.ToLiteral: %OtherInt.ToLiteral.type = struct_value () [concrete]
|
|
// CHECK:STDOUT: %OtherInt.ToLiteral.bound.59b: <bound method> = bound_method %N.1fd, %OtherInt.ToLiteral [symbolic]
|
|
// CHECK:STDOUT: %OtherInt.ToLiteral.call: init Core.IntLiteral = call %OtherInt.ToLiteral.bound.59b(%N.1fd) [symbolic]
|
|
// CHECK:STDOUT: %iN.builtin.7b8: type = int_type signed, %OtherInt.ToLiteral.call [symbolic]
|
|
// CHECK:STDOUT: %pattern_type.b42: type = pattern_type %iN.builtin.7b8 [symbolic]
|
|
// CHECK:STDOUT: %.de0: Core.Form = init_form %iN.builtin.7b8 [symbolic]
|
|
// CHECK:STDOUT: %MakeFromClass.specific_fn.f05: <specific function> = specific_function %MakeFromClass, @MakeFromClass(%N.1fd) [symbolic]
|
|
// CHECK:STDOUT: %require_complete.a33: <witness> = require_complete_type %iN.builtin.7b8 [symbolic]
|
|
// CHECK:STDOUT: %int_64.6ae: %OtherInt = int_value 64 [concrete]
|
|
// CHECK:STDOUT: %OtherInt.ToLiteral.bound.397: <bound method> = bound_method %int_64.6ae, %OtherInt.ToLiteral [concrete]
|
|
// CHECK:STDOUT: %MakeFromClass.specific_fn.b8d: <specific function> = specific_function %MakeFromClass, @MakeFromClass(%int_64.6ae) [concrete]
|
|
// CHECK:STDOUT: %complete_type.4a1: <witness> = complete_type_witness %i64.builtin [concrete]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: imports {
|
|
// CHECK:STDOUT: %Main.IntLiteral = import_ref Main//convert_symbolic, IntLiteral, unloaded
|
|
// CHECK:STDOUT: %Main.Int: %Int.type = import_ref Main//convert_symbolic, Int, loaded [concrete = constants.%Int]
|
|
// CHECK:STDOUT: %Main.ToLiteral = import_ref Main//convert_symbolic, ToLiteral, unloaded
|
|
// CHECK:STDOUT: %Main.FromLiteral: %FromLiteral.type = import_ref Main//convert_symbolic, FromLiteral, loaded [concrete = constants.%FromLiteral]
|
|
// CHECK:STDOUT: %Main.Make: %Make.type = import_ref Main//convert_symbolic, Make, loaded [concrete = constants.%Make]
|
|
// CHECK:STDOUT: %Main.OtherInt: type = import_ref Main//convert_symbolic, OtherInt, loaded [concrete = constants.%OtherInt]
|
|
// CHECK:STDOUT: %Main.MakeFromClass: %MakeFromClass.type = import_ref Main//convert_symbolic, MakeFromClass, loaded [concrete = constants.%MakeFromClass]
|
|
// CHECK:STDOUT: %Main.import_ref.87d: %i32.builtin = import_ref Main//convert_symbolic, loc9_10, loaded [symbolic = @Make.%N (constants.%N.7e8)]
|
|
// CHECK:STDOUT: %Main.import_ref.b03: <witness> = import_ref Main//convert_symbolic, loc14_1, loaded [concrete = constants.%complete_type.f8a]
|
|
// CHECK:STDOUT: %Main.import_ref.47a = import_ref Main//convert_symbolic, inst{{[0-9A-F]+}} [no loc], unloaded
|
|
// CHECK:STDOUT: %Main.import_ref.5cf = import_ref Main//convert_symbolic, loc13_45, unloaded
|
|
// CHECK:STDOUT: %Main.import_ref.db9: %OtherInt = import_ref Main//convert_symbolic, loc18_19, loaded [symbolic = @MakeFromClass.%N (constants.%N.1fd)]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: file {
|
|
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
|
|
// CHECK:STDOUT: .IntLiteral = imports.%Main.IntLiteral
|
|
// CHECK:STDOUT: .Int = imports.%Main.Int
|
|
// CHECK:STDOUT: .ToLiteral = imports.%Main.ToLiteral
|
|
// CHECK:STDOUT: .FromLiteral = imports.%Main.FromLiteral
|
|
// CHECK:STDOUT: .Make = imports.%Main.Make
|
|
// CHECK:STDOUT: .OtherInt = imports.%Main.OtherInt
|
|
// CHECK:STDOUT: .MakeFromClass = imports.%Main.MakeFromClass
|
|
// CHECK:STDOUT: .m = %m
|
|
// CHECK:STDOUT: .n = %n
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %default.import = import <none>
|
|
// CHECK:STDOUT: name_binding_decl {
|
|
// CHECK:STDOUT: %m.patt: %pattern_type.e13 = ref_binding_pattern m [concrete]
|
|
// CHECK:STDOUT: %m.var_patt: %pattern_type.e13 = var_pattern %m.patt [concrete]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %m.var: ref %i64.builtin = var %m.var_patt [concrete]
|
|
// CHECK:STDOUT: %.loc6_14.1: type = splice_block %.loc6_14.3 [concrete = constants.%i64.builtin] {
|
|
// CHECK:STDOUT: %Int.ref.loc6: %Int.type = name_ref Int, imports.%Main.Int [concrete = constants.%Int]
|
|
// CHECK:STDOUT: %int_64.loc6: Core.IntLiteral = int_value 64 [concrete = constants.%int_64.fab]
|
|
// CHECK:STDOUT: %Int.call.loc6: init type = call %Int.ref.loc6(%int_64.loc6) [concrete = constants.%i64.builtin]
|
|
// CHECK:STDOUT: %.loc6_14.2: type = value_of_initializer %Int.call.loc6 [concrete = constants.%i64.builtin]
|
|
// CHECK:STDOUT: %.loc6_14.3: type = converted %Int.call.loc6, %.loc6_14.2 [concrete = constants.%i64.builtin]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %m: ref %i64.builtin = ref_binding m, %m.var [concrete = %m.var]
|
|
// CHECK:STDOUT: name_binding_decl {
|
|
// CHECK:STDOUT: %n.patt: %pattern_type.e13 = ref_binding_pattern n [concrete]
|
|
// CHECK:STDOUT: %n.var_patt: %pattern_type.e13 = var_pattern %n.patt [concrete]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %n.var: ref %i64.builtin = var %n.var_patt [concrete]
|
|
// CHECK:STDOUT: %.loc7_14.1: type = splice_block %.loc7_14.3 [concrete = constants.%i64.builtin] {
|
|
// CHECK:STDOUT: %Int.ref.loc7: %Int.type = name_ref Int, imports.%Main.Int [concrete = constants.%Int]
|
|
// CHECK:STDOUT: %int_64.loc7: Core.IntLiteral = int_value 64 [concrete = constants.%int_64.fab]
|
|
// CHECK:STDOUT: %Int.call.loc7: init type = call %Int.ref.loc7(%int_64.loc7) [concrete = constants.%i64.builtin]
|
|
// CHECK:STDOUT: %.loc7_14.2: type = value_of_initializer %Int.call.loc7 [concrete = constants.%i64.builtin]
|
|
// CHECK:STDOUT: %.loc7_14.3: type = converted %Int.call.loc7, %.loc7_14.2 [concrete = constants.%i64.builtin]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %n: ref %i64.builtin = ref_binding n, %n.var [concrete = %n.var]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: class @OtherInt [from "convert_symbolic.carbon"] {
|
|
// CHECK:STDOUT: complete_type_witness = imports.%Main.import_ref.b03
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: .Self = imports.%Main.import_ref.47a
|
|
// CHECK:STDOUT: .ToLiteral = imports.%Main.import_ref.5cf
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @Int = "int.make_type_signed" [from "convert_symbolic.carbon"];
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @Make(imports.%Main.import_ref.87d: %i32.builtin) [from "convert_symbolic.carbon"] {
|
|
// CHECK:STDOUT: %N: %i32.builtin = symbolic_binding N, 0 [symbolic = %N (constants.%N.7e8)]
|
|
// CHECK:STDOUT: %ToLiteral.call: init Core.IntLiteral = call constants.%ToLiteral(%N) [symbolic = %ToLiteral.call (constants.%ToLiteral.call)]
|
|
// CHECK:STDOUT: %iN.builtin: type = int_type signed, %ToLiteral.call [symbolic = %iN.builtin (constants.%iN.builtin.bb6)]
|
|
// CHECK:STDOUT: %.1: Core.Form = init_form %iN.builtin [symbolic = %.1 (constants.%.fe5)]
|
|
// CHECK:STDOUT: %pattern_type: type = pattern_type %iN.builtin [symbolic = %pattern_type (constants.%pattern_type.87b)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %iN.builtin [symbolic = %require_complete (constants.%require_complete.2a4)]
|
|
// CHECK:STDOUT: %Make.specific_fn: <specific function> = specific_function constants.%Make, @Make(%N) [symbolic = %Make.specific_fn (constants.%Make.specific_fn.121)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn;
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @ToLiteral = "int.convert_checked" [from "convert_symbolic.carbon"];
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @FromLiteral = "int.convert_checked" [from "convert_symbolic.carbon"];
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @MakeFromClass(imports.%Main.import_ref.db9: %OtherInt) [from "convert_symbolic.carbon"] {
|
|
// CHECK:STDOUT: %N: %OtherInt = symbolic_binding N, 0 [symbolic = %N (constants.%N.1fd)]
|
|
// CHECK:STDOUT: %OtherInt.ToLiteral.bound: <bound method> = bound_method %N, constants.%OtherInt.ToLiteral [symbolic = %OtherInt.ToLiteral.bound (constants.%OtherInt.ToLiteral.bound.59b)]
|
|
// CHECK:STDOUT: %OtherInt.ToLiteral.call: init Core.IntLiteral = call %OtherInt.ToLiteral.bound(%N) [symbolic = %OtherInt.ToLiteral.call (constants.%OtherInt.ToLiteral.call)]
|
|
// CHECK:STDOUT: %iN.builtin: type = int_type signed, %OtherInt.ToLiteral.call [symbolic = %iN.builtin (constants.%iN.builtin.7b8)]
|
|
// CHECK:STDOUT: %.1: Core.Form = init_form %iN.builtin [symbolic = %.1 (constants.%.de0)]
|
|
// CHECK:STDOUT: %pattern_type: type = pattern_type %iN.builtin [symbolic = %pattern_type (constants.%pattern_type.b42)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %iN.builtin [symbolic = %require_complete (constants.%require_complete.a33)]
|
|
// CHECK:STDOUT: %MakeFromClass.specific_fn: <specific function> = specific_function constants.%MakeFromClass, @MakeFromClass(%N) [symbolic = %MakeFromClass.specific_fn (constants.%MakeFromClass.specific_fn.f05)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn;
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @OtherInt.ToLiteral = "int.convert_checked" [from "convert_symbolic.carbon"];
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @__global_init() {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %Make.ref: %Make.type = name_ref Make, imports.%Main.Make [concrete = constants.%Make]
|
|
// CHECK:STDOUT: %FromLiteral.ref.loc6: %FromLiteral.type = name_ref FromLiteral, imports.%Main.FromLiteral [concrete = constants.%FromLiteral]
|
|
// CHECK:STDOUT: %int_64.loc6: Core.IntLiteral = int_value 64 [concrete = constants.%int_64.fab]
|
|
// CHECK:STDOUT: %FromLiteral.call.loc6: init %i32.builtin = call %FromLiteral.ref.loc6(%int_64.loc6) [concrete = constants.%int_64.f82]
|
|
// CHECK:STDOUT: %.loc6_38.1: %i32.builtin = value_of_initializer %FromLiteral.call.loc6 [concrete = constants.%int_64.f82]
|
|
// CHECK:STDOUT: %.loc6_38.2: %i32.builtin = converted %FromLiteral.call.loc6, %.loc6_38.1 [concrete = constants.%int_64.f82]
|
|
// CHECK:STDOUT: %Make.specific_fn: <specific function> = specific_function %Make.ref, @Make(constants.%int_64.f82) [concrete = constants.%Make.specific_fn.7de]
|
|
// CHECK:STDOUT: %Make.call: init %i64.builtin = call %Make.specific_fn()
|
|
// CHECK:STDOUT: assign file.%m.var, %Make.call
|
|
// CHECK:STDOUT: %MakeFromClass.ref: %MakeFromClass.type = name_ref MakeFromClass, imports.%Main.MakeFromClass [concrete = constants.%MakeFromClass]
|
|
// CHECK:STDOUT: %FromLiteral.ref.loc7: %FromLiteral.type = name_ref FromLiteral, imports.%Main.FromLiteral [concrete = constants.%FromLiteral]
|
|
// CHECK:STDOUT: %int_64.loc7: Core.IntLiteral = int_value 64 [concrete = constants.%int_64.fab]
|
|
// CHECK:STDOUT: %FromLiteral.call.loc7: init %i32.builtin = call %FromLiteral.ref.loc7(%int_64.loc7) [concrete = constants.%int_64.f82]
|
|
// CHECK:STDOUT: %OtherInt.ref: type = name_ref OtherInt, imports.%Main.OtherInt [concrete = constants.%OtherInt]
|
|
// CHECK:STDOUT: %.loc7_48.1: init %OtherInt = as_compatible %FromLiteral.call.loc7 [concrete = constants.%int_64.6ae]
|
|
// CHECK:STDOUT: %.loc7_48.2: init %OtherInt = converted %FromLiteral.call.loc7, %.loc7_48.1 [concrete = constants.%int_64.6ae]
|
|
// CHECK:STDOUT: %.loc7_59.1: %OtherInt = value_of_initializer %.loc7_48.2 [concrete = constants.%int_64.6ae]
|
|
// CHECK:STDOUT: %.loc7_59.2: %OtherInt = converted %.loc7_48.2, %.loc7_59.1 [concrete = constants.%int_64.6ae]
|
|
// CHECK:STDOUT: %MakeFromClass.specific_fn: <specific function> = specific_function %MakeFromClass.ref, @MakeFromClass(constants.%int_64.6ae) [concrete = constants.%MakeFromClass.specific_fn.b8d]
|
|
// CHECK:STDOUT: %MakeFromClass.call: init %i64.builtin = call %MakeFromClass.specific_fn()
|
|
// CHECK:STDOUT: assign file.%n.var, %MakeFromClass.call
|
|
// CHECK:STDOUT: return
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Make(constants.%N.7e8) {
|
|
// CHECK:STDOUT: %N => constants.%N.7e8
|
|
// CHECK:STDOUT: %ToLiteral.call => constants.%ToLiteral.call
|
|
// CHECK:STDOUT: %iN.builtin => constants.%iN.builtin.bb6
|
|
// CHECK:STDOUT: %.1 => constants.%.fe5
|
|
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.87b
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %require_complete => constants.%require_complete.2a4
|
|
// CHECK:STDOUT: %Make.specific_fn => constants.%Make.specific_fn.121
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Make(constants.%int_64.f82) {
|
|
// CHECK:STDOUT: %N => constants.%int_64.f82
|
|
// CHECK:STDOUT: %ToLiteral.call => constants.%int_64.fab
|
|
// CHECK:STDOUT: %iN.builtin => constants.%i64.builtin
|
|
// CHECK:STDOUT: %.1 => constants.%.df2
|
|
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.e13
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %require_complete => constants.%complete_type.4a1
|
|
// CHECK:STDOUT: %Make.specific_fn => constants.%Make.specific_fn.7de
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @MakeFromClass(constants.%N.1fd) {
|
|
// CHECK:STDOUT: %N => constants.%N.1fd
|
|
// CHECK:STDOUT: %OtherInt.ToLiteral.bound => constants.%OtherInt.ToLiteral.bound.59b
|
|
// CHECK:STDOUT: %OtherInt.ToLiteral.call => constants.%OtherInt.ToLiteral.call
|
|
// CHECK:STDOUT: %iN.builtin => constants.%iN.builtin.7b8
|
|
// CHECK:STDOUT: %.1 => constants.%.de0
|
|
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.b42
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %require_complete => constants.%require_complete.a33
|
|
// CHECK:STDOUT: %MakeFromClass.specific_fn => constants.%MakeFromClass.specific_fn.f05
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @MakeFromClass(constants.%int_64.6ae) {
|
|
// CHECK:STDOUT: %N => constants.%int_64.6ae
|
|
// CHECK:STDOUT: %OtherInt.ToLiteral.bound => constants.%OtherInt.ToLiteral.bound.397
|
|
// CHECK:STDOUT: %OtherInt.ToLiteral.call => constants.%int_64.fab
|
|
// CHECK:STDOUT: %iN.builtin => constants.%i64.builtin
|
|
// CHECK:STDOUT: %.1 => constants.%.df2
|
|
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.e13
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %require_complete => constants.%complete_type.4a1
|
|
// CHECK:STDOUT: %MakeFromClass.specific_fn => constants.%MakeFromClass.specific_fn.b8d
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|