mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-24 20:00:12 +01:00
* Rewrite constraints are stored in a facet type, substituted, imported, and formatted. * We now distinguish `.Self` from other symbolic bindings in two ways: * `.Self` itself now has an invalid compile time binding index (since it doesn't bind to any of the generic parameters). As a result, we no longer need to create a generic region in `handle_where.cpp`. * There is a new phase tracking values that are only symbolic because they transitively depend on `.Self`. This allows us to give the result of a `where` expression template phase as long as it doesn't use any symbolic constants other than `.Self` or other designators. * `AddConstant` has been removed from `check/context` since it was only used from `eval`. This meant less plumbing of the phase change. * Evaluation of `BindSymbolicName` now also performs substitution into its type. * Include a bit more information in some diagnostics. * `StringifyTypeExpr` outputs rewrites, which required adding support for associated entities as well. * Associated entities now have an entity name set when importing. * Adds tests for some interesting cases with rewrites and uses of `.Self` mixed with other symbolic constants. Still to do: * There is no validation that any particular type satisfies rewrite constraints. * Access to members of a facet type do not see the rewritten values. * Impls don't recognize whether associated constants have rewrites setting their values. * No support for resolving facet types. --------- Co-authored-by: Josh L <josh11b@users.noreply.github.com> Co-authored-by: Richard Smith <richard@metafoo.co.uk>
2579 lines
154 KiB
Plaintext
2579 lines
154 KiB
Plaintext
// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
|
|
// Exceptions. See /LICENSE for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
// AUTOUPDATE
|
|
// TIP: To test this file alone, run:
|
|
// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/struct/import.carbon
|
|
// TIP: To dump output, run:
|
|
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/struct/import.carbon
|
|
|
|
// --- implicit.carbon
|
|
|
|
package Implicit;
|
|
|
|
var a_ref: {.a: i32} = {.a = 0};
|
|
var b_ref: {.a: {.b: i32, .c: (i32,)}, .d: i32} =
|
|
{.a = {.b = 0, .c = (0,)}, .d = 0};
|
|
|
|
class C(S:! {.a: i32, .b: i32}) {}
|
|
fn F() -> C({.a = 1, .b = 2});
|
|
|
|
// --- implicit.impl.carbon
|
|
|
|
impl package Implicit;
|
|
|
|
var a: {.a: i32} = a_ref;
|
|
var b: {.a: {.b: i32, .c: (i32,)}, .d: i32} = b_ref;
|
|
var c: C({.a = 1, .b = 2}) = F();
|
|
|
|
// --- fail_bad_type.impl.carbon
|
|
|
|
impl package Implicit;
|
|
// CHECK:STDERR: fail_bad_type.impl.carbon:[[@LINE+8]]:14: error: missing value for field `a` in struct initialization [StructInitMissingFieldInLiteral]
|
|
// CHECK:STDERR: var c_bad: C({.c = 1, .d = 2}) = F();
|
|
// CHECK:STDERR: ^~~~~~~~~~~~~~~~
|
|
// CHECK:STDERR: fail_bad_type.impl.carbon:[[@LINE-4]]:6: in import [InImport]
|
|
// CHECK:STDERR: implicit.carbon:8:1: note: while deducing parameters of generic declared here [DeductionGenericHere]
|
|
// CHECK:STDERR: class C(S:! {.a: i32, .b: i32}) {}
|
|
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
// CHECK:STDERR:
|
|
var c_bad: C({.c = 1, .d = 2}) = F();
|
|
|
|
// --- fail_bad_value.impl.carbon
|
|
|
|
impl package Implicit;
|
|
// CHECK:STDERR: fail_bad_value.impl.carbon:[[@LINE+6]]:1: error: cannot implicitly convert from `C(<cannot stringify inst+355 kind StructValue>)` to `C(<cannot stringify inst+343 kind StructValue>)` [ImplicitAsConversionFailure]
|
|
// CHECK:STDERR: var c_bad: C({.a = 3, .b = 4}) = F();
|
|
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
// CHECK:STDERR: fail_bad_value.impl.carbon:[[@LINE+3]]:1: note: type `C(<cannot stringify inst+355 kind StructValue>)` does not implement interface `ImplicitAs(C(<cannot stringify inst+343 kind StructValue>))` [MissingImplInMemberAccessNote]
|
|
// CHECK:STDERR: var c_bad: C({.a = 3, .b = 4}) = F();
|
|
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
var c_bad: C({.a = 3, .b = 4}) = F();
|
|
|
|
// CHECK:STDOUT: --- implicit.carbon
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template]
|
|
// CHECK:STDOUT: %Int.type: type = fn_type @Int [template]
|
|
// CHECK:STDOUT: %Int: %Int.type = struct_value () [template]
|
|
// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template]
|
|
// CHECK:STDOUT: %struct_type.a.1: type = struct_type {.a: %i32} [template]
|
|
// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template]
|
|
// CHECK:STDOUT: %struct_type.a.2: type = struct_type {.a: Core.IntLiteral} [template]
|
|
// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template]
|
|
// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template]
|
|
// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template]
|
|
// CHECK:STDOUT: %interface.9: <witness> = interface_witness (%Convert.14) [template]
|
|
// CHECK:STDOUT: %Convert.bound.1: <bound method> = bound_method %int_0.1, %Convert.14 [template]
|
|
// CHECK:STDOUT: %Convert.specific_fn.1: <specific function> = specific_function %Convert.bound.1, @Convert.2(%int_32) [template]
|
|
// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template]
|
|
// CHECK:STDOUT: %struct.1: %struct_type.a.1 = struct_value (%int_0.2) [template]
|
|
// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template]
|
|
// CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32) [template]
|
|
// CHECK:STDOUT: %struct_type.b.c.1: type = struct_type {.b: %i32, .c: %tuple.type.2} [template]
|
|
// CHECK:STDOUT: %struct_type.a.d.1: type = struct_type {.a: %struct_type.b.c.1, .d: %i32} [template]
|
|
// CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral) [template]
|
|
// CHECK:STDOUT: %struct_type.b.c.2: type = struct_type {.b: Core.IntLiteral, .c: %tuple.type.3} [template]
|
|
// CHECK:STDOUT: %struct_type.a.d.3: type = struct_type {.a: %struct_type.b.c.2, .d: Core.IntLiteral} [template]
|
|
// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%int_0.2) [template]
|
|
// CHECK:STDOUT: %struct.2: %struct_type.b.c.1 = struct_value (%int_0.2, %tuple) [template]
|
|
// CHECK:STDOUT: %struct.3: %struct_type.a.d.1 = struct_value (%struct.2, %int_0.2) [template]
|
|
// CHECK:STDOUT: %struct_type.a.b.1: type = struct_type {.a: %i32, .b: %i32} [template]
|
|
// CHECK:STDOUT: %S: %struct_type.a.b.1 = bind_symbolic_name S, 0 [symbolic]
|
|
// CHECK:STDOUT: %S.patt: %struct_type.a.b.1 = symbolic_binding_pattern S, 0 [symbolic]
|
|
// CHECK:STDOUT: %C.type: type = generic_class_type @C [template]
|
|
// CHECK:STDOUT: %C.generic: %C.type = struct_value () [template]
|
|
// CHECK:STDOUT: %C.1: type = class_type @C, @C(%S) [symbolic]
|
|
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template]
|
|
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [template]
|
|
// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template]
|
|
// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template]
|
|
// CHECK:STDOUT: %struct_type.a.b.2: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [template]
|
|
// CHECK:STDOUT: %Convert.bound.2: <bound method> = bound_method %int_1.1, %Convert.14 [template]
|
|
// CHECK:STDOUT: %Convert.specific_fn.2: <specific function> = specific_function %Convert.bound.2, @Convert.2(%int_32) [template]
|
|
// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template]
|
|
// CHECK:STDOUT: %Convert.bound.3: <bound method> = bound_method %int_2.1, %Convert.14 [template]
|
|
// CHECK:STDOUT: %Convert.specific_fn.3: <specific function> = specific_function %Convert.bound.3, @Convert.2(%int_32) [template]
|
|
// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template]
|
|
// CHECK:STDOUT: %struct.4: %struct_type.a.b.1 = struct_value (%int_1.2, %int_2.2) [template]
|
|
// CHECK:STDOUT: %C.2: type = class_type @C, @C(%struct.4) [template]
|
|
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
|
|
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: imports {
|
|
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
|
|
// CHECK:STDOUT: .Int = %import_ref.1
|
|
// CHECK:STDOUT: .ImplicitAs = %import_ref.2
|
|
// CHECK:STDOUT: import Core//prelude
|
|
// CHECK:STDOUT: import Core//prelude/...
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: file {
|
|
// CHECK:STDOUT: package: <namespace> = namespace [template] {
|
|
// CHECK:STDOUT: .Core = imports.%Core
|
|
// CHECK:STDOUT: .a_ref = %a_ref
|
|
// CHECK:STDOUT: .b_ref = %b_ref
|
|
// CHECK:STDOUT: .C = %C.decl
|
|
// CHECK:STDOUT: .F = %F.decl
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %Core.import = import Core
|
|
// CHECK:STDOUT: %int_32.loc4: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
|
// CHECK:STDOUT: %int.make_type_signed.loc4: init type = call constants.%Int(%int_32.loc4) [template = constants.%i32]
|
|
// CHECK:STDOUT: %.loc4_17.1: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32]
|
|
// CHECK:STDOUT: %.loc4_17.2: type = converted %int.make_type_signed.loc4, %.loc4_17.1 [template = constants.%i32]
|
|
// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [template = constants.%struct_type.a.1]
|
|
// CHECK:STDOUT: %a_ref.var: ref %struct_type.a.1 = var a_ref
|
|
// CHECK:STDOUT: %a_ref: ref %struct_type.a.1 = bind_name a_ref, %a_ref.var
|
|
// CHECK:STDOUT: %int_32.loc5_22: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
|
// CHECK:STDOUT: %int.make_type_signed.loc5_22: init type = call constants.%Int(%int_32.loc5_22) [template = constants.%i32]
|
|
// CHECK:STDOUT: %.loc5_22.1: type = value_of_initializer %int.make_type_signed.loc5_22 [template = constants.%i32]
|
|
// CHECK:STDOUT: %.loc5_22.2: type = converted %int.make_type_signed.loc5_22, %.loc5_22.1 [template = constants.%i32]
|
|
// CHECK:STDOUT: %int_32.loc5_32: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
|
// CHECK:STDOUT: %int.make_type_signed.loc5_32: init type = call constants.%Int(%int_32.loc5_32) [template = constants.%i32]
|
|
// CHECK:STDOUT: %.loc5_36.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc5_32)
|
|
// CHECK:STDOUT: %.loc5_36.2: type = value_of_initializer %int.make_type_signed.loc5_32 [template = constants.%i32]
|
|
// CHECK:STDOUT: %.loc5_36.3: type = converted %int.make_type_signed.loc5_32, %.loc5_36.2 [template = constants.%i32]
|
|
// CHECK:STDOUT: %.loc5_36.4: type = converted %.loc5_36.1, constants.%tuple.type.2 [template = constants.%tuple.type.2]
|
|
// CHECK:STDOUT: %struct_type.b.c: type = struct_type {.b: %i32, .c: %tuple.type.2} [template = constants.%struct_type.b.c.1]
|
|
// CHECK:STDOUT: %int_32.loc5_44: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
|
// CHECK:STDOUT: %int.make_type_signed.loc5_44: init type = call constants.%Int(%int_32.loc5_44) [template = constants.%i32]
|
|
// CHECK:STDOUT: %.loc5_44.1: type = value_of_initializer %int.make_type_signed.loc5_44 [template = constants.%i32]
|
|
// CHECK:STDOUT: %.loc5_44.2: type = converted %int.make_type_signed.loc5_44, %.loc5_44.1 [template = constants.%i32]
|
|
// CHECK:STDOUT: %struct_type.a.d: type = struct_type {.a: %struct_type.b.c.1, .d: %i32} [template = constants.%struct_type.a.d.1]
|
|
// CHECK:STDOUT: %b_ref.var: ref %struct_type.a.d.1 = var b_ref
|
|
// CHECK:STDOUT: %b_ref: ref %struct_type.a.d.1 = bind_name b_ref, %b_ref.var
|
|
// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [template = constants.%C.generic] {
|
|
// CHECK:STDOUT: %S.patt.loc8_9.1: %struct_type.a.b.1 = symbolic_binding_pattern S, 0 [symbolic = %S.patt.loc8_9.2 (constants.%S.patt)]
|
|
// CHECK:STDOUT: %S.param_patt: %struct_type.a.b.1 = value_param_pattern %S.patt.loc8_9.1, runtime_param<invalid> [symbolic = %S.patt.loc8_9.2 (constants.%S.patt)]
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %int_32.loc8_18: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
|
// CHECK:STDOUT: %int.make_type_signed.loc8_18: init type = call constants.%Int(%int_32.loc8_18) [template = constants.%i32]
|
|
// CHECK:STDOUT: %.loc8_18.1: type = value_of_initializer %int.make_type_signed.loc8_18 [template = constants.%i32]
|
|
// CHECK:STDOUT: %.loc8_18.2: type = converted %int.make_type_signed.loc8_18, %.loc8_18.1 [template = constants.%i32]
|
|
// CHECK:STDOUT: %int_32.loc8_27: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
|
// CHECK:STDOUT: %int.make_type_signed.loc8_27: init type = call constants.%Int(%int_32.loc8_27) [template = constants.%i32]
|
|
// CHECK:STDOUT: %.loc8_27.1: type = value_of_initializer %int.make_type_signed.loc8_27 [template = constants.%i32]
|
|
// CHECK:STDOUT: %.loc8_27.2: type = converted %int.make_type_signed.loc8_27, %.loc8_27.1 [template = constants.%i32]
|
|
// CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %i32, .b: %i32} [template = constants.%struct_type.a.b.1]
|
|
// CHECK:STDOUT: %S.param: %struct_type.a.b.1 = value_param runtime_param<invalid>
|
|
// CHECK:STDOUT: %S.loc8_9.1: %struct_type.a.b.1 = bind_symbolic_name S, 0, %S.param [symbolic = %S.loc8_9.2 (constants.%S)]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {
|
|
// CHECK:STDOUT: %return.patt: %C.2 = return_slot_pattern
|
|
// CHECK:STDOUT: %return.param_patt: %C.2 = out_param_pattern %return.patt, runtime_param0
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.generic]
|
|
// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1]
|
|
// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1]
|
|
// CHECK:STDOUT: %.loc9_28.1: %struct_type.a.b.2 = struct_literal (%int_1, %int_2)
|
|
// CHECK:STDOUT: %impl.elem0.loc9_28.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14]
|
|
// CHECK:STDOUT: %Convert.bound.loc9_28.1: <bound method> = bound_method %int_1, %impl.elem0.loc9_28.1 [template = constants.%Convert.bound.2]
|
|
// CHECK:STDOUT: %Convert.specific_fn.loc9_28.1: <specific function> = specific_function %Convert.bound.loc9_28.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2]
|
|
// CHECK:STDOUT: %int.convert_checked.loc9_28.1: init %i32 = call %Convert.specific_fn.loc9_28.1(%int_1) [template = constants.%int_1.2]
|
|
// CHECK:STDOUT: %.loc9_28.2: %i32 = value_of_initializer %int.convert_checked.loc9_28.1 [template = constants.%int_1.2]
|
|
// CHECK:STDOUT: %.loc9_28.3: %i32 = converted %int_1, %.loc9_28.2 [template = constants.%int_1.2]
|
|
// CHECK:STDOUT: %impl.elem0.loc9_28.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14]
|
|
// CHECK:STDOUT: %Convert.bound.loc9_28.2: <bound method> = bound_method %int_2, %impl.elem0.loc9_28.2 [template = constants.%Convert.bound.3]
|
|
// CHECK:STDOUT: %Convert.specific_fn.loc9_28.2: <specific function> = specific_function %Convert.bound.loc9_28.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3]
|
|
// CHECK:STDOUT: %int.convert_checked.loc9_28.2: init %i32 = call %Convert.specific_fn.loc9_28.2(%int_2) [template = constants.%int_2.2]
|
|
// CHECK:STDOUT: %.loc9_28.4: %i32 = value_of_initializer %int.convert_checked.loc9_28.2 [template = constants.%int_2.2]
|
|
// CHECK:STDOUT: %.loc9_28.5: %i32 = converted %int_2, %.loc9_28.4 [template = constants.%int_2.2]
|
|
// CHECK:STDOUT: %struct: %struct_type.a.b.1 = struct_value (%.loc9_28.3, %.loc9_28.5) [template = constants.%struct.4]
|
|
// CHECK:STDOUT: %.loc9_29: %struct_type.a.b.1 = converted %.loc9_28.1, %struct [template = constants.%struct.4]
|
|
// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%struct.4) [template = constants.%C.2]
|
|
// CHECK:STDOUT: %return.param: ref %C.2 = out_param runtime_param0
|
|
// CHECK:STDOUT: %return: ref %C.2 = return_slot %return.param
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic class @C(%S.loc8_9.1: %struct_type.a.b.1) {
|
|
// CHECK:STDOUT: %S.loc8_9.2: %struct_type.a.b.1 = bind_symbolic_name S, 0 [symbolic = %S.loc8_9.2 (constants.%S)]
|
|
// CHECK:STDOUT: %S.patt.loc8_9.2: %struct_type.a.b.1 = symbolic_binding_pattern S, 0 [symbolic = %S.patt.loc8_9.2 (constants.%S.patt)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: class {
|
|
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [template = constants.%complete_type]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: .Self = constants.%C.1
|
|
// CHECK:STDOUT: complete_type_witness = %complete_type
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @F() -> %C.2;
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @__global_init() {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %int_0.loc4: Core.IntLiteral = int_value 0 [template = constants.%int_0.1]
|
|
// CHECK:STDOUT: %.loc4_31.1: %struct_type.a.2 = struct_literal (%int_0.loc4)
|
|
// CHECK:STDOUT: %impl.elem0.loc4: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14]
|
|
// CHECK:STDOUT: %Convert.bound.loc4: <bound method> = bound_method %int_0.loc4, %impl.elem0.loc4 [template = constants.%Convert.bound.1]
|
|
// CHECK:STDOUT: %Convert.specific_fn.loc4: <specific function> = specific_function %Convert.bound.loc4, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1]
|
|
// CHECK:STDOUT: %int.convert_checked.loc4: init %i32 = call %Convert.specific_fn.loc4(%int_0.loc4) [template = constants.%int_0.2]
|
|
// CHECK:STDOUT: %.loc4_31.2: init %i32 = converted %int_0.loc4, %int.convert_checked.loc4 [template = constants.%int_0.2]
|
|
// CHECK:STDOUT: %.loc4_31.3: init %struct_type.a.1 = struct_init (%.loc4_31.2) to file.%a_ref.var [template = constants.%struct.1]
|
|
// CHECK:STDOUT: %.loc4_32: init %struct_type.a.1 = converted %.loc4_31.1, %.loc4_31.3 [template = constants.%struct.1]
|
|
// CHECK:STDOUT: assign file.%a_ref.var, %.loc4_32
|
|
// CHECK:STDOUT: %int_0.loc6_17: Core.IntLiteral = int_value 0 [template = constants.%int_0.1]
|
|
// CHECK:STDOUT: %int_0.loc6_26: Core.IntLiteral = int_value 0 [template = constants.%int_0.1]
|
|
// CHECK:STDOUT: %.loc6_28.1: %tuple.type.3 = tuple_literal (%int_0.loc6_26)
|
|
// CHECK:STDOUT: %.loc6_29.1: %struct_type.b.c.2 = struct_literal (%int_0.loc6_17, %.loc6_28.1)
|
|
// CHECK:STDOUT: %int_0.loc6_37: Core.IntLiteral = int_value 0 [template = constants.%int_0.1]
|
|
// CHECK:STDOUT: %.loc6_38.1: %struct_type.a.d.3 = struct_literal (%.loc6_29.1, %int_0.loc6_37)
|
|
// CHECK:STDOUT: %impl.elem0.loc6_29: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14]
|
|
// CHECK:STDOUT: %Convert.bound.loc6_29: <bound method> = bound_method %int_0.loc6_17, %impl.elem0.loc6_29 [template = constants.%Convert.bound.1]
|
|
// CHECK:STDOUT: %Convert.specific_fn.loc6_29: <specific function> = specific_function %Convert.bound.loc6_29, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1]
|
|
// CHECK:STDOUT: %int.convert_checked.loc6_29: init %i32 = call %Convert.specific_fn.loc6_29(%int_0.loc6_17) [template = constants.%int_0.2]
|
|
// CHECK:STDOUT: %.loc6_29.2: init %i32 = converted %int_0.loc6_17, %int.convert_checked.loc6_29 [template = constants.%int_0.2]
|
|
// CHECK:STDOUT: %.loc6_38.2: ref %struct_type.b.c.1 = struct_access file.%b_ref.var, element0
|
|
// CHECK:STDOUT: %.loc6_29.3: ref %i32 = struct_access %.loc6_38.2, element0
|
|
// CHECK:STDOUT: %.loc6_29.4: init %i32 = initialize_from %.loc6_29.2 to %.loc6_29.3 [template = constants.%int_0.2]
|
|
// CHECK:STDOUT: %impl.elem0.loc6_28: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14]
|
|
// CHECK:STDOUT: %Convert.bound.loc6_28: <bound method> = bound_method %int_0.loc6_26, %impl.elem0.loc6_28 [template = constants.%Convert.bound.1]
|
|
// CHECK:STDOUT: %Convert.specific_fn.loc6_28: <specific function> = specific_function %Convert.bound.loc6_28, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1]
|
|
// CHECK:STDOUT: %int.convert_checked.loc6_28: init %i32 = call %Convert.specific_fn.loc6_28(%int_0.loc6_26) [template = constants.%int_0.2]
|
|
// CHECK:STDOUT: %.loc6_28.2: init %i32 = converted %int_0.loc6_26, %int.convert_checked.loc6_28 [template = constants.%int_0.2]
|
|
// CHECK:STDOUT: %.loc6_29.5: ref %tuple.type.2 = struct_access %.loc6_38.2, element1
|
|
// CHECK:STDOUT: %.loc6_28.3: init %tuple.type.2 = tuple_init (%.loc6_28.2) to %.loc6_29.5 [template = constants.%tuple]
|
|
// CHECK:STDOUT: %.loc6_29.6: init %tuple.type.2 = converted %.loc6_28.1, %.loc6_28.3 [template = constants.%tuple]
|
|
// CHECK:STDOUT: %.loc6_29.7: init %tuple.type.2 = initialize_from %.loc6_29.6 to %.loc6_29.5 [template = constants.%tuple]
|
|
// CHECK:STDOUT: %.loc6_29.8: init %struct_type.b.c.1 = struct_init (%.loc6_29.4, %.loc6_29.7) to %.loc6_38.2 [template = constants.%struct.2]
|
|
// CHECK:STDOUT: %.loc6_38.3: init %struct_type.b.c.1 = converted %.loc6_29.1, %.loc6_29.8 [template = constants.%struct.2]
|
|
// CHECK:STDOUT: %impl.elem0.loc6_38: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14]
|
|
// CHECK:STDOUT: %Convert.bound.loc6_38: <bound method> = bound_method %int_0.loc6_37, %impl.elem0.loc6_38 [template = constants.%Convert.bound.1]
|
|
// CHECK:STDOUT: %Convert.specific_fn.loc6_38: <specific function> = specific_function %Convert.bound.loc6_38, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1]
|
|
// CHECK:STDOUT: %int.convert_checked.loc6_38: init %i32 = call %Convert.specific_fn.loc6_38(%int_0.loc6_37) [template = constants.%int_0.2]
|
|
// CHECK:STDOUT: %.loc6_38.4: init %i32 = converted %int_0.loc6_37, %int.convert_checked.loc6_38 [template = constants.%int_0.2]
|
|
// CHECK:STDOUT: %.loc6_38.5: ref %i32 = struct_access file.%b_ref.var, element1
|
|
// CHECK:STDOUT: %.loc6_38.6: init %i32 = initialize_from %.loc6_38.4 to %.loc6_38.5 [template = constants.%int_0.2]
|
|
// CHECK:STDOUT: %.loc6_38.7: init %struct_type.a.d.1 = struct_init (%.loc6_38.3, %.loc6_38.6) to file.%b_ref.var [template = constants.%struct.3]
|
|
// CHECK:STDOUT: %.loc6_39: init %struct_type.a.d.1 = converted %.loc6_38.1, %.loc6_38.7 [template = constants.%struct.3]
|
|
// CHECK:STDOUT: assign file.%b_ref.var, %.loc6_39
|
|
// CHECK:STDOUT: return
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @C(constants.%S) {
|
|
// CHECK:STDOUT: %S.loc8_9.2 => constants.%S
|
|
// CHECK:STDOUT: %S.patt.loc8_9.2 => constants.%S
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @C(constants.%struct.4) {
|
|
// CHECK:STDOUT: %S.loc8_9.2 => constants.%struct.4
|
|
// CHECK:STDOUT: %S.patt.loc8_9.2 => constants.%struct.4
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: --- implicit.impl.carbon
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic]
|
|
// CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic]
|
|
// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic]
|
|
// CHECK:STDOUT: %ImplicitAs.type.2: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic]
|
|
// CHECK:STDOUT: %Self.1: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic]
|
|
// CHECK:STDOUT: %Dest.patt: type = symbolic_binding_pattern Dest, 0 [symbolic]
|
|
// CHECK:STDOUT: %ImplicitAs.type.3: type = facet_type <@ImplicitAs, @ImplicitAs(%iN)> [symbolic]
|
|
// CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic]
|
|
// CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic]
|
|
// CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %Self.as_type.1: type = facet_access_type %Self.1 [symbolic]
|
|
// CHECK:STDOUT: %Convert.assoc_type.1: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic]
|
|
// CHECK:STDOUT: %assoc0.1: %Convert.assoc_type.1 = assoc_entity element0, imports.%import_ref.11 [symbolic]
|
|
// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.2, @impl.1(%N) [symbolic]
|
|
// CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %interface.1: <witness> = interface_witness (%Convert.2) [symbolic]
|
|
// CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic]
|
|
// CHECK:STDOUT: %ImplicitAs.type.4: type = facet_type <@ImplicitAs, @ImplicitAs(%uN)> [symbolic]
|
|
// CHECK:STDOUT: %Convert.type.3: type = fn_type @Convert.3, @impl.2(%N) [symbolic]
|
|
// CHECK:STDOUT: %Convert.3: %Convert.type.3 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %interface.2: <witness> = interface_witness (%Convert.3) [symbolic]
|
|
// CHECK:STDOUT: %ImplicitAs.type.5: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [template]
|
|
// CHECK:STDOUT: %Convert.type.4: type = fn_type @Convert.4, @impl.3(%N) [symbolic]
|
|
// CHECK:STDOUT: %Convert.4: %Convert.type.4 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %interface.3: <witness> = interface_witness (%Convert.4) [symbolic]
|
|
// CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template]
|
|
// CHECK:STDOUT: %Convert.5: %Convert.type.5 = struct_value () [template]
|
|
// CHECK:STDOUT: %Convert.assoc_type.2: type = assoc_entity_type %ImplicitAs.type.5, %Convert.type.5 [template]
|
|
// CHECK:STDOUT: %assoc0.2: %Convert.assoc_type.2 = assoc_entity element0, imports.%import_ref.18 [template]
|
|
// CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.5, @impl.4(%N) [symbolic]
|
|
// CHECK:STDOUT: %Convert.6: %Convert.type.6 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %interface.4: <witness> = interface_witness (%Convert.6) [symbolic]
|
|
// CHECK:STDOUT: %As.type.2: type = facet_type <@As, @As(%Dest)> [symbolic]
|
|
// CHECK:STDOUT: %Self.2: %As.type.2 = bind_symbolic_name Self, 1 [symbolic]
|
|
// CHECK:STDOUT: %As.type.3: type = facet_type <@As, @As(%iN)> [symbolic]
|
|
// CHECK:STDOUT: %Convert.type.7: type = fn_type @Convert.6, @As(%Dest) [symbolic]
|
|
// CHECK:STDOUT: %Convert.7: %Convert.type.7 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %Self.as_type.2: type = facet_access_type %Self.2 [symbolic]
|
|
// CHECK:STDOUT: %Convert.assoc_type.3: type = assoc_entity_type %As.type.2, %Convert.type.7 [symbolic]
|
|
// CHECK:STDOUT: %assoc0.3: %Convert.assoc_type.3 = assoc_entity element0, imports.%import_ref.28 [symbolic]
|
|
// CHECK:STDOUT: %Convert.type.8: type = fn_type @Convert.7, @impl.5(%N) [symbolic]
|
|
// CHECK:STDOUT: %Convert.8: %Convert.type.8 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %interface.5: <witness> = interface_witness (%Convert.8) [symbolic]
|
|
// CHECK:STDOUT: %As.type.4: type = facet_type <@As, @As(%uN)> [symbolic]
|
|
// CHECK:STDOUT: %Convert.type.9: type = fn_type @Convert.8, @impl.6(%N) [symbolic]
|
|
// CHECK:STDOUT: %Convert.9: %Convert.type.9 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %interface.6: <witness> = interface_witness (%Convert.9) [symbolic]
|
|
// CHECK:STDOUT: %As.type.5: type = facet_type <@As, @As(Core.IntLiteral)> [template]
|
|
// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.9, @impl.7(%N) [symbolic]
|
|
// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %interface.7: <witness> = interface_witness (%Convert.10) [symbolic]
|
|
// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.6, @As(Core.IntLiteral) [template]
|
|
// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template]
|
|
// CHECK:STDOUT: %Convert.assoc_type.4: type = assoc_entity_type %As.type.5, %Convert.type.11 [template]
|
|
// CHECK:STDOUT: %assoc0.4: %Convert.assoc_type.4 = assoc_entity element0, imports.%import_ref.35 [template]
|
|
// CHECK:STDOUT: %Convert.type.12: type = fn_type @Convert.10, @impl.8(%N) [symbolic]
|
|
// CHECK:STDOUT: %Convert.12: %Convert.type.12 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %interface.8: <witness> = interface_witness (%Convert.12) [symbolic]
|
|
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template]
|
|
// CHECK:STDOUT: %Int.type: type = fn_type @Int [template]
|
|
// CHECK:STDOUT: %Int: %Int.type = struct_value () [template]
|
|
// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template]
|
|
// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [template]
|
|
// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template]
|
|
// CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32) [template]
|
|
// CHECK:STDOUT: %struct_type.b.c: type = struct_type {.b: %i32, .c: %tuple.type.2} [template]
|
|
// CHECK:STDOUT: %struct_type.a.d.1: type = struct_type {.a: %struct_type.b.c, .d: %i32} [template]
|
|
// CHECK:STDOUT: %C.type: type = generic_class_type @C [template]
|
|
// CHECK:STDOUT: %C.generic: %C.type = struct_value () [template]
|
|
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template]
|
|
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [template]
|
|
// CHECK:STDOUT: %struct_type.a.b.1: type = struct_type {.a: %i32, .b: %i32} [template]
|
|
// CHECK:STDOUT: %S: %struct_type.a.b.1 = bind_symbolic_name S, 0 [symbolic]
|
|
// CHECK:STDOUT: %S.patt: %struct_type.a.b.1 = symbolic_binding_pattern S, 0 [symbolic]
|
|
// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template]
|
|
// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template]
|
|
// CHECK:STDOUT: %struct_type.a.b.2: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [template]
|
|
// CHECK:STDOUT: %ImplicitAs.type.6: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [template]
|
|
// CHECK:STDOUT: %Convert.type.13: type = fn_type @Convert.1, @ImplicitAs(%i32) [template]
|
|
// CHECK:STDOUT: %Convert.13: %Convert.type.13 = struct_value () [template]
|
|
// CHECK:STDOUT: %Convert.assoc_type.5: type = assoc_entity_type %ImplicitAs.type.6, %Convert.type.13 [template]
|
|
// CHECK:STDOUT: %assoc0.5: %Convert.assoc_type.5 = assoc_entity element0, imports.%import_ref.11 [template]
|
|
// CHECK:STDOUT: %assoc0.6: %Convert.assoc_type.1 = assoc_entity element0, imports.%import_ref.43 [symbolic]
|
|
// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template]
|
|
// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template]
|
|
// CHECK:STDOUT: %interface.9: <witness> = interface_witness (%Convert.14) [template]
|
|
// CHECK:STDOUT: %Convert.bound.1: <bound method> = bound_method %int_1.1, %Convert.14 [template]
|
|
// CHECK:STDOUT: %Convert.specific_fn.1: <specific function> = specific_function %Convert.bound.1, @Convert.2(%int_32) [template]
|
|
// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template]
|
|
// CHECK:STDOUT: %Convert.bound.2: <bound method> = bound_method %int_2.1, %Convert.14 [template]
|
|
// CHECK:STDOUT: %Convert.specific_fn.2: <specific function> = specific_function %Convert.bound.2, @Convert.2(%int_32) [template]
|
|
// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template]
|
|
// CHECK:STDOUT: %struct: %struct_type.a.b.1 = struct_value (%int_1.2, %int_2.2) [template]
|
|
// CHECK:STDOUT: %C.2: type = class_type @C, @C(%struct) [template]
|
|
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
|
|
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: imports {
|
|
// CHECK:STDOUT: %import_ref.1: ref %struct_type.a = import_ref Implicit//default, inst+22, loaded
|
|
// CHECK:STDOUT: %import_ref.2: ref %struct_type.a.d.1 = import_ref Implicit//default, inst+353, loaded
|
|
// CHECK:STDOUT: %import_ref.3: %C.type = import_ref Implicit//default, inst+412, loaded [template = constants.%C.generic]
|
|
// CHECK:STDOUT: %import_ref.4: %F.type = import_ref Implicit//default, inst+456, loaded [template = constants.%F]
|
|
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
|
|
// CHECK:STDOUT: .Int = %import_ref.39
|
|
// CHECK:STDOUT: .ImplicitAs = %import_ref.42
|
|
// CHECK:STDOUT: import Core//prelude
|
|
// CHECK:STDOUT: import Core//prelude/...
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %import_ref.5 = import_ref Implicit//default, inst+38, unloaded
|
|
// CHECK:STDOUT: %import_ref.6: @ImplicitAs.%Convert.assoc_type (%Convert.assoc_type.1) = import_ref Implicit//default, inst+39, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.6)]
|
|
// CHECK:STDOUT: %import_ref.7 = import_ref Implicit//default, inst+40, unloaded
|
|
// CHECK:STDOUT: %import_ref.8: type = import_ref Implicit//default, inst+79, loaded [template = Core.IntLiteral]
|
|
// CHECK:STDOUT: %import_ref.9: type = import_ref Implicit//default, inst+80, loaded [symbolic = @impl.1.%ImplicitAs.type (constants.%ImplicitAs.type.3)]
|
|
// CHECK:STDOUT: %import_ref.10: <witness> = import_ref Implicit//default, inst+81, loaded [symbolic = @impl.1.%interface (constants.%interface.1)]
|
|
// CHECK:STDOUT: %import_ref.11 = import_ref Implicit//default, inst+53, unloaded
|
|
// CHECK:STDOUT: %import_ref.12: type = import_ref Implicit//default, inst+105, loaded [template = Core.IntLiteral]
|
|
// CHECK:STDOUT: %import_ref.13: type = import_ref Implicit//default, inst+106, loaded [symbolic = @impl.2.%ImplicitAs.type (constants.%ImplicitAs.type.4)]
|
|
// CHECK:STDOUT: %import_ref.14 = import_ref Implicit//default, inst+107, unloaded
|
|
// CHECK:STDOUT: %import_ref.15: type = import_ref Implicit//default, inst+130, loaded [symbolic = @impl.3.%iN (constants.%iN)]
|
|
// CHECK:STDOUT: %import_ref.16: type = import_ref Implicit//default, inst+131, loaded [template = constants.%ImplicitAs.type.5]
|
|
// CHECK:STDOUT: %import_ref.17 = import_ref Implicit//default, inst+132, unloaded
|
|
// CHECK:STDOUT: %import_ref.19: type = import_ref Implicit//default, inst+158, loaded [symbolic = @impl.4.%uN (constants.%uN)]
|
|
// CHECK:STDOUT: %import_ref.20: type = import_ref Implicit//default, inst+159, loaded [template = constants.%ImplicitAs.type.5]
|
|
// CHECK:STDOUT: %import_ref.21 = import_ref Implicit//default, inst+160, unloaded
|
|
// CHECK:STDOUT: %import_ref.22 = import_ref Implicit//default, inst+186, unloaded
|
|
// CHECK:STDOUT: %import_ref.23 = import_ref Implicit//default, inst+187, unloaded
|
|
// CHECK:STDOUT: %import_ref.24 = import_ref Implicit//default, inst+188, unloaded
|
|
// CHECK:STDOUT: %import_ref.25: type = import_ref Implicit//default, inst+192, loaded [template = Core.IntLiteral]
|
|
// CHECK:STDOUT: %import_ref.26: type = import_ref Implicit//default, inst+193, loaded [symbolic = @impl.5.%As.type (constants.%As.type.3)]
|
|
// CHECK:STDOUT: %import_ref.27 = import_ref Implicit//default, inst+194, unloaded
|
|
// CHECK:STDOUT: %import_ref.28 = import_ref Implicit//default, inst+207, unloaded
|
|
// CHECK:STDOUT: %import_ref.29: type = import_ref Implicit//default, inst+241, loaded [template = Core.IntLiteral]
|
|
// CHECK:STDOUT: %import_ref.30: type = import_ref Implicit//default, inst+242, loaded [symbolic = @impl.6.%As.type (constants.%As.type.4)]
|
|
// CHECK:STDOUT: %import_ref.31 = import_ref Implicit//default, inst+243, unloaded
|
|
// CHECK:STDOUT: %import_ref.32: type = import_ref Implicit//default, inst+266, loaded [symbolic = @impl.7.%iN (constants.%iN)]
|
|
// CHECK:STDOUT: %import_ref.33: type = import_ref Implicit//default, inst+267, loaded [template = constants.%As.type.5]
|
|
// CHECK:STDOUT: %import_ref.34 = import_ref Implicit//default, inst+268, unloaded
|
|
// CHECK:STDOUT: %import_ref.36: type = import_ref Implicit//default, inst+294, loaded [symbolic = @impl.8.%uN (constants.%uN)]
|
|
// CHECK:STDOUT: %import_ref.37: type = import_ref Implicit//default, inst+295, loaded [template = constants.%As.type.5]
|
|
// CHECK:STDOUT: %import_ref.38 = import_ref Implicit//default, inst+296, unloaded
|
|
// CHECK:STDOUT: %import_ref.40: <witness> = import_ref Implicit//default, inst+419, loaded [template = constants.%complete_type]
|
|
// CHECK:STDOUT: %import_ref.41 = import_ref Implicit//default, inst+417, unloaded
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: file {
|
|
// CHECK:STDOUT: package: <namespace> = namespace [template] {
|
|
// CHECK:STDOUT: .a_ref = imports.%import_ref.1
|
|
// CHECK:STDOUT: .b_ref = imports.%import_ref.2
|
|
// CHECK:STDOUT: .C = imports.%import_ref.3
|
|
// CHECK:STDOUT: .F = imports.%import_ref.4
|
|
// CHECK:STDOUT: .Core = imports.%Core
|
|
// CHECK:STDOUT: .a = %a
|
|
// CHECK:STDOUT: .b = %b
|
|
// CHECK:STDOUT: .c = %c
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %Implicit.import = import Implicit
|
|
// CHECK:STDOUT: %default.import = import <invalid>
|
|
// CHECK:STDOUT: %Core.import = import Core
|
|
// CHECK:STDOUT: %int_32.loc4: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
|
// CHECK:STDOUT: %int.make_type_signed.loc4: init type = call constants.%Int(%int_32.loc4) [template = constants.%i32]
|
|
// CHECK:STDOUT: %.loc4_13.1: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32]
|
|
// CHECK:STDOUT: %.loc4_13.2: type = converted %int.make_type_signed.loc4, %.loc4_13.1 [template = constants.%i32]
|
|
// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [template = constants.%struct_type.a]
|
|
// CHECK:STDOUT: %a.var: ref %struct_type.a = var a
|
|
// CHECK:STDOUT: %a: ref %struct_type.a = bind_name a, %a.var
|
|
// CHECK:STDOUT: %int_32.loc5_18: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
|
// CHECK:STDOUT: %int.make_type_signed.loc5_18: init type = call constants.%Int(%int_32.loc5_18) [template = constants.%i32]
|
|
// CHECK:STDOUT: %.loc5_18.1: type = value_of_initializer %int.make_type_signed.loc5_18 [template = constants.%i32]
|
|
// CHECK:STDOUT: %.loc5_18.2: type = converted %int.make_type_signed.loc5_18, %.loc5_18.1 [template = constants.%i32]
|
|
// CHECK:STDOUT: %int_32.loc5_28: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
|
// CHECK:STDOUT: %int.make_type_signed.loc5_28: init type = call constants.%Int(%int_32.loc5_28) [template = constants.%i32]
|
|
// CHECK:STDOUT: %.loc5_32.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc5_28)
|
|
// CHECK:STDOUT: %.loc5_32.2: type = value_of_initializer %int.make_type_signed.loc5_28 [template = constants.%i32]
|
|
// CHECK:STDOUT: %.loc5_32.3: type = converted %int.make_type_signed.loc5_28, %.loc5_32.2 [template = constants.%i32]
|
|
// CHECK:STDOUT: %.loc5_32.4: type = converted %.loc5_32.1, constants.%tuple.type.2 [template = constants.%tuple.type.2]
|
|
// CHECK:STDOUT: %struct_type.b.c: type = struct_type {.b: %i32, .c: %tuple.type.2} [template = constants.%struct_type.b.c]
|
|
// CHECK:STDOUT: %int_32.loc5_40: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
|
// CHECK:STDOUT: %int.make_type_signed.loc5_40: init type = call constants.%Int(%int_32.loc5_40) [template = constants.%i32]
|
|
// CHECK:STDOUT: %.loc5_40.1: type = value_of_initializer %int.make_type_signed.loc5_40 [template = constants.%i32]
|
|
// CHECK:STDOUT: %.loc5_40.2: type = converted %int.make_type_signed.loc5_40, %.loc5_40.1 [template = constants.%i32]
|
|
// CHECK:STDOUT: %struct_type.a.d: type = struct_type {.a: %struct_type.b.c, .d: %i32} [template = constants.%struct_type.a.d.1]
|
|
// CHECK:STDOUT: %b.var: ref %struct_type.a.d.1 = var b
|
|
// CHECK:STDOUT: %b: ref %struct_type.a.d.1 = bind_name b, %b.var
|
|
// CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.3 [template = constants.%C.generic]
|
|
// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1]
|
|
// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1]
|
|
// CHECK:STDOUT: %.loc6_25.1: %struct_type.a.b.2 = struct_literal (%int_1, %int_2)
|
|
// CHECK:STDOUT: %impl.elem0.loc6_25.1: %Convert.type.13 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14]
|
|
// CHECK:STDOUT: %Convert.bound.loc6_25.1: <bound method> = bound_method %int_1, %impl.elem0.loc6_25.1 [template = constants.%Convert.bound.1]
|
|
// CHECK:STDOUT: %Convert.specific_fn.loc6_25.1: <specific function> = specific_function %Convert.bound.loc6_25.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1]
|
|
// CHECK:STDOUT: %int.convert_checked.loc6_25.1: init %i32 = call %Convert.specific_fn.loc6_25.1(%int_1) [template = constants.%int_1.2]
|
|
// CHECK:STDOUT: %.loc6_25.2: %i32 = value_of_initializer %int.convert_checked.loc6_25.1 [template = constants.%int_1.2]
|
|
// CHECK:STDOUT: %.loc6_25.3: %i32 = converted %int_1, %.loc6_25.2 [template = constants.%int_1.2]
|
|
// CHECK:STDOUT: %impl.elem0.loc6_25.2: %Convert.type.13 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14]
|
|
// CHECK:STDOUT: %Convert.bound.loc6_25.2: <bound method> = bound_method %int_2, %impl.elem0.loc6_25.2 [template = constants.%Convert.bound.2]
|
|
// CHECK:STDOUT: %Convert.specific_fn.loc6_25.2: <specific function> = specific_function %Convert.bound.loc6_25.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2]
|
|
// CHECK:STDOUT: %int.convert_checked.loc6_25.2: init %i32 = call %Convert.specific_fn.loc6_25.2(%int_2) [template = constants.%int_2.2]
|
|
// CHECK:STDOUT: %.loc6_25.4: %i32 = value_of_initializer %int.convert_checked.loc6_25.2 [template = constants.%int_2.2]
|
|
// CHECK:STDOUT: %.loc6_25.5: %i32 = converted %int_2, %.loc6_25.4 [template = constants.%int_2.2]
|
|
// CHECK:STDOUT: %struct: %struct_type.a.b.1 = struct_value (%.loc6_25.3, %.loc6_25.5) [template = constants.%struct]
|
|
// CHECK:STDOUT: %.loc6_26: %struct_type.a.b.1 = converted %.loc6_25.1, %struct [template = constants.%struct]
|
|
// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%struct) [template = constants.%C.2]
|
|
// CHECK:STDOUT: %c.var: ref %C.2 = var c
|
|
// CHECK:STDOUT: %c: ref %C.2 = bind_name c, %c.var
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic interface @ImplicitAs(constants.%Dest: type) {
|
|
// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
|
|
// CHECK:STDOUT: %Dest.patt: type = symbolic_binding_pattern Dest, 0 [symbolic = %Dest.patt (constants.%Dest.patt)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)]
|
|
// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.1)]
|
|
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)]
|
|
// CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)]
|
|
// CHECK:STDOUT: %Convert.assoc_type: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %Convert.assoc_type (constants.%Convert.assoc_type.1)]
|
|
// CHECK:STDOUT: %assoc0: @ImplicitAs.%Convert.assoc_type (%Convert.assoc_type.1) = assoc_entity element0, imports.%import_ref.11 [symbolic = %assoc0 (constants.%assoc0.1)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: interface {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: .Self = imports.%import_ref.5
|
|
// CHECK:STDOUT: .Convert = imports.%import_ref.6
|
|
// CHECK:STDOUT: witness = (imports.%import_ref.7)
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic interface @As(constants.%Dest: type) {
|
|
// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
|
|
// CHECK:STDOUT: %Dest.patt: type = symbolic_binding_pattern Dest, 0 [symbolic = %Dest.patt (constants.%Dest.patt)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%Dest)> [symbolic = %As.type (constants.%As.type.2)]
|
|
// CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)]
|
|
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.6, @As(%Dest) [symbolic = %Convert.type (constants.%Convert.type.7)]
|
|
// CHECK:STDOUT: %Convert: @As.%Convert.type (%Convert.type.7) = struct_value () [symbolic = %Convert (constants.%Convert.7)]
|
|
// CHECK:STDOUT: %Convert.assoc_type: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.7) [symbolic = %Convert.assoc_type (constants.%Convert.assoc_type.3)]
|
|
// CHECK:STDOUT: %assoc0: @As.%Convert.assoc_type (%Convert.assoc_type.3) = assoc_entity element0, imports.%import_ref.28 [symbolic = %assoc0 (constants.%assoc0.3)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: interface {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: .Self = imports.%import_ref.22
|
|
// CHECK:STDOUT: .Convert = imports.%import_ref.23
|
|
// CHECK:STDOUT: witness = (imports.%import_ref.24)
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic impl @impl.1(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
|
|
// CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
|
|
// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%iN)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.3)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.2, @impl.1(%N) [symbolic = %Convert.type (constants.%Convert.type.2)]
|
|
// CHECK:STDOUT: %Convert: @impl.1.%Convert.type (%Convert.type.2) = struct_value () [symbolic = %Convert (constants.%Convert.2)]
|
|
// CHECK:STDOUT: %interface: <witness> = interface_witness (%Convert) [symbolic = %interface (constants.%interface.1)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: impl: imports.%import_ref.8 as imports.%import_ref.9 {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: witness = imports.%import_ref.10
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic impl @impl.2(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
|
|
// CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
|
|
// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%uN)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.4)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.3, @impl.2(%N) [symbolic = %Convert.type (constants.%Convert.type.3)]
|
|
// CHECK:STDOUT: %Convert: @impl.2.%Convert.type (%Convert.type.3) = struct_value () [symbolic = %Convert (constants.%Convert.3)]
|
|
// CHECK:STDOUT: %interface: <witness> = interface_witness (%Convert) [symbolic = %interface (constants.%interface.2)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: impl: imports.%import_ref.12 as imports.%import_ref.13 {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: witness = imports.%import_ref.14
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic impl @impl.3(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
|
|
// CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.4, @impl.3(%N) [symbolic = %Convert.type (constants.%Convert.type.4)]
|
|
// CHECK:STDOUT: %Convert: @impl.3.%Convert.type (%Convert.type.4) = struct_value () [symbolic = %Convert (constants.%Convert.4)]
|
|
// CHECK:STDOUT: %interface: <witness> = interface_witness (%Convert) [symbolic = %interface (constants.%interface.3)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: impl: imports.%import_ref.15 as imports.%import_ref.16 {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: witness = imports.%import_ref.17
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic impl @impl.4(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
|
|
// CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.5, @impl.4(%N) [symbolic = %Convert.type (constants.%Convert.type.6)]
|
|
// CHECK:STDOUT: %Convert: @impl.4.%Convert.type (%Convert.type.6) = struct_value () [symbolic = %Convert (constants.%Convert.6)]
|
|
// CHECK:STDOUT: %interface: <witness> = interface_witness (%Convert) [symbolic = %interface (constants.%interface.4)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: impl: imports.%import_ref.19 as imports.%import_ref.20 {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: witness = imports.%import_ref.21
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic impl @impl.5(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
|
|
// CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
|
|
// CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%iN)> [symbolic = %As.type (constants.%As.type.3)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.7, @impl.5(%N) [symbolic = %Convert.type (constants.%Convert.type.8)]
|
|
// CHECK:STDOUT: %Convert: @impl.5.%Convert.type (%Convert.type.8) = struct_value () [symbolic = %Convert (constants.%Convert.8)]
|
|
// CHECK:STDOUT: %interface: <witness> = interface_witness (%Convert) [symbolic = %interface (constants.%interface.5)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: impl: imports.%import_ref.25 as imports.%import_ref.26 {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: witness = imports.%import_ref.27
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic impl @impl.6(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
|
|
// CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
|
|
// CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%uN)> [symbolic = %As.type (constants.%As.type.4)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.8, @impl.6(%N) [symbolic = %Convert.type (constants.%Convert.type.9)]
|
|
// CHECK:STDOUT: %Convert: @impl.6.%Convert.type (%Convert.type.9) = struct_value () [symbolic = %Convert (constants.%Convert.9)]
|
|
// CHECK:STDOUT: %interface: <witness> = interface_witness (%Convert) [symbolic = %interface (constants.%interface.6)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: impl: imports.%import_ref.29 as imports.%import_ref.30 {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: witness = imports.%import_ref.31
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic impl @impl.7(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
|
|
// CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.9, @impl.7(%N) [symbolic = %Convert.type (constants.%Convert.type.10)]
|
|
// CHECK:STDOUT: %Convert: @impl.7.%Convert.type (%Convert.type.10) = struct_value () [symbolic = %Convert (constants.%Convert.10)]
|
|
// CHECK:STDOUT: %interface: <witness> = interface_witness (%Convert) [symbolic = %interface (constants.%interface.7)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: impl: imports.%import_ref.32 as imports.%import_ref.33 {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: witness = imports.%import_ref.34
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic impl @impl.8(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
|
|
// CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.10, @impl.8(%N) [symbolic = %Convert.type (constants.%Convert.type.12)]
|
|
// CHECK:STDOUT: %Convert: @impl.8.%Convert.type (%Convert.type.12) = struct_value () [symbolic = %Convert (constants.%Convert.12)]
|
|
// CHECK:STDOUT: %interface: <witness> = interface_witness (%Convert) [symbolic = %interface (constants.%interface.8)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: impl: imports.%import_ref.36 as imports.%import_ref.37 {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: witness = imports.%import_ref.38
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic class @C(constants.%S: %struct_type.a.b.1) {
|
|
// CHECK:STDOUT: %S: %struct_type.a.b.1 = bind_symbolic_name S, 0 [symbolic = %S (constants.%S)]
|
|
// CHECK:STDOUT: %S.patt: %struct_type.a.b.1 = symbolic_binding_pattern S, 0 [symbolic = %S.patt (constants.%S.patt)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: class {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: .Self = imports.%import_ref.41
|
|
// CHECK:STDOUT: complete_type_witness = imports.%import_ref.40
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @Convert.1(constants.%Dest: type, constants.%Self.1: %ImplicitAs.type.2) {
|
|
// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
|
|
// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)]
|
|
// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.1)]
|
|
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type.1)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%Self.as_type (%Self.as_type.1)]() -> @Convert.1.%Dest (%Dest);
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @Convert.2(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn[%self.param_patt: Core.IntLiteral]() -> @Convert.2.%iN (%iN) = "int.convert_checked";
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @Convert.3(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn[%self.param_patt: Core.IntLiteral]() -> @Convert.3.%uN (%uN) = "int.convert_checked";
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @Convert.4(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn[%self.param_patt: @Convert.4.%iN (%iN)]() -> Core.IntLiteral = "int.convert_checked";
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @Convert.5(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn[%self.param_patt: @Convert.5.%uN (%uN)]() -> Core.IntLiteral = "int.convert_checked";
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @Convert.6(constants.%Dest: type, constants.%Self.2: %As.type.2) {
|
|
// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
|
|
// CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%Dest)> [symbolic = %As.type (constants.%As.type.2)]
|
|
// CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)]
|
|
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type.2)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn[%self.param_patt: @Convert.6.%Self.as_type (%Self.as_type.2)]() -> @Convert.6.%Dest (%Dest);
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @Convert.7(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn[%self.param_patt: Core.IntLiteral]() -> @Convert.7.%iN (%iN) = "int.convert_checked";
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @Convert.8(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn[%self.param_patt: Core.IntLiteral]() -> @Convert.8.%uN (%uN) = "int.convert_checked";
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @Convert.9(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn[%self.param_patt: @Convert.9.%iN (%iN)]() -> Core.IntLiteral = "int.convert_checked";
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @Convert.10(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn[%self.param_patt: @Convert.10.%uN (%uN)]() -> Core.IntLiteral = "int.convert_checked";
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @F() -> %C.2;
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @__global_init() {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %a_ref.ref: ref %struct_type.a = name_ref a_ref, imports.%import_ref.1
|
|
// CHECK:STDOUT: %.loc4_20.1: ref %i32 = struct_access %a_ref.ref, element0
|
|
// CHECK:STDOUT: %.loc4_20.2: %i32 = bind_value %.loc4_20.1
|
|
// CHECK:STDOUT: %.loc4_20.3: init %struct_type.a = struct_init (%.loc4_20.2) to file.%a.var
|
|
// CHECK:STDOUT: %.loc4_25: init %struct_type.a = converted %a_ref.ref, %.loc4_20.3
|
|
// CHECK:STDOUT: assign file.%a.var, %.loc4_25
|
|
// CHECK:STDOUT: %b_ref.ref: ref %struct_type.a.d.1 = name_ref b_ref, imports.%import_ref.2
|
|
// CHECK:STDOUT: %.loc5_47.1: ref %struct_type.b.c = struct_access %b_ref.ref, element0
|
|
// CHECK:STDOUT: %.loc5_47.2: ref %i32 = struct_access %.loc5_47.1, element0
|
|
// CHECK:STDOUT: %.loc5_47.3: %i32 = bind_value %.loc5_47.2
|
|
// CHECK:STDOUT: %.loc5_47.4: ref %struct_type.b.c = struct_access file.%b.var, element0
|
|
// CHECK:STDOUT: %.loc5_47.5: ref %i32 = struct_access %.loc5_47.4, element0
|
|
// CHECK:STDOUT: %.loc5_47.6: init %i32 = initialize_from %.loc5_47.3 to %.loc5_47.5
|
|
// CHECK:STDOUT: %.loc5_47.7: ref %tuple.type.2 = struct_access %.loc5_47.1, element1
|
|
// CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access %.loc5_47.7, element0
|
|
// CHECK:STDOUT: %.loc5_47.8: %i32 = bind_value %tuple.elem0
|
|
// CHECK:STDOUT: %.loc5_47.9: ref %tuple.type.2 = struct_access %.loc5_47.4, element1
|
|
// CHECK:STDOUT: %.loc5_47.10: init %tuple.type.2 = tuple_init (%.loc5_47.8) to %.loc5_47.9
|
|
// CHECK:STDOUT: %.loc5_47.11: init %tuple.type.2 = converted %.loc5_47.7, %.loc5_47.10
|
|
// CHECK:STDOUT: %.loc5_47.12: init %tuple.type.2 = initialize_from %.loc5_47.11 to %.loc5_47.9
|
|
// CHECK:STDOUT: %.loc5_47.13: init %struct_type.b.c = struct_init (%.loc5_47.6, %.loc5_47.12) to %.loc5_47.4
|
|
// CHECK:STDOUT: %.loc5_47.14: init %struct_type.b.c = converted %.loc5_47.1, %.loc5_47.13
|
|
// CHECK:STDOUT: %.loc5_47.15: ref %i32 = struct_access %b_ref.ref, element1
|
|
// CHECK:STDOUT: %.loc5_47.16: %i32 = bind_value %.loc5_47.15
|
|
// CHECK:STDOUT: %.loc5_47.17: ref %i32 = struct_access file.%b.var, element1
|
|
// CHECK:STDOUT: %.loc5_47.18: init %i32 = initialize_from %.loc5_47.16 to %.loc5_47.17
|
|
// CHECK:STDOUT: %.loc5_47.19: init %struct_type.a.d.1 = struct_init (%.loc5_47.14, %.loc5_47.18) to file.%b.var
|
|
// CHECK:STDOUT: %.loc5_52: init %struct_type.a.d.1 = converted %b_ref.ref, %.loc5_47.19
|
|
// CHECK:STDOUT: assign file.%b.var, %.loc5_52
|
|
// CHECK:STDOUT: %F.ref: %F.type = name_ref F, imports.%import_ref.4 [template = constants.%F]
|
|
// CHECK:STDOUT: %.loc6: ref %C.2 = splice_block file.%c.var {}
|
|
// CHECK:STDOUT: %F.call: init %C.2 = call %F.ref() to %.loc6
|
|
// CHECK:STDOUT: assign file.%c.var, %F.call
|
|
// CHECK:STDOUT: return
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) {
|
|
// CHECK:STDOUT: %Dest => constants.%Dest
|
|
// CHECK:STDOUT: %Dest.patt => constants.%Dest
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @ImplicitAs(constants.%iN) {
|
|
// CHECK:STDOUT: %Dest => constants.%iN
|
|
// CHECK:STDOUT: %Dest.patt => constants.%iN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @ImplicitAs(%Dest) {
|
|
// CHECK:STDOUT: %Dest => constants.%Dest
|
|
// CHECK:STDOUT: %Dest.patt => constants.%Dest
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @ImplicitAs(@impl.1.%iN) {
|
|
// CHECK:STDOUT: %Dest => constants.%iN
|
|
// CHECK:STDOUT: %Dest.patt => constants.%iN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.1(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %iN => constants.%iN
|
|
// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.1(%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %iN => constants.%iN
|
|
// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @ImplicitAs(@Convert.1.%Dest) {
|
|
// CHECK:STDOUT: %Dest => constants.%Dest
|
|
// CHECK:STDOUT: %Dest.patt => constants.%Dest
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Convert.1(constants.%Dest, constants.%Self.1) {
|
|
// CHECK:STDOUT: %Dest => constants.%Dest
|
|
// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2
|
|
// CHECK:STDOUT: %Self => constants.%Self.1
|
|
// CHECK:STDOUT: %Self.as_type => constants.%Self.as_type.1
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Convert.2(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %iN => constants.%iN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @ImplicitAs(constants.%uN) {
|
|
// CHECK:STDOUT: %Dest => constants.%uN
|
|
// CHECK:STDOUT: %Dest.patt => constants.%uN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @ImplicitAs(@impl.2.%uN) {
|
|
// CHECK:STDOUT: %Dest => constants.%uN
|
|
// CHECK:STDOUT: %Dest.patt => constants.%uN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.2(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %uN => constants.%uN
|
|
// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.4
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.2(%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %uN => constants.%uN
|
|
// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.4
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Convert.3(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %uN => constants.%uN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @ImplicitAs(Core.IntLiteral) {
|
|
// CHECK:STDOUT: %Dest => Core.IntLiteral
|
|
// CHECK:STDOUT: %Dest.patt => Core.IntLiteral
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.5
|
|
// CHECK:STDOUT: %Self => constants.%Self.1
|
|
// CHECK:STDOUT: %Convert.type => constants.%Convert.type.5
|
|
// CHECK:STDOUT: %Convert => constants.%Convert.5
|
|
// CHECK:STDOUT: %Convert.assoc_type => constants.%Convert.assoc_type.2
|
|
// CHECK:STDOUT: %assoc0 => constants.%assoc0.2
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.3(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %iN => constants.%iN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.3(%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %iN => constants.%iN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Convert.4(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %iN => constants.%iN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.4(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %uN => constants.%uN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.4(%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %uN => constants.%uN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Convert.5(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %uN => constants.%uN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @As(constants.%Dest) {
|
|
// CHECK:STDOUT: %Dest => constants.%Dest
|
|
// CHECK:STDOUT: %Dest.patt => constants.%Dest
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @As(constants.%iN) {
|
|
// CHECK:STDOUT: %Dest => constants.%iN
|
|
// CHECK:STDOUT: %Dest.patt => constants.%iN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @As(%Dest) {
|
|
// CHECK:STDOUT: %Dest => constants.%Dest
|
|
// CHECK:STDOUT: %Dest.patt => constants.%Dest
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @As(@impl.5.%iN) {
|
|
// CHECK:STDOUT: %Dest => constants.%iN
|
|
// CHECK:STDOUT: %Dest.patt => constants.%iN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.5(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %iN => constants.%iN
|
|
// CHECK:STDOUT: %As.type => constants.%As.type.3
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.5(%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %iN => constants.%iN
|
|
// CHECK:STDOUT: %As.type => constants.%As.type.3
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @As(@Convert.6.%Dest) {
|
|
// CHECK:STDOUT: %Dest => constants.%Dest
|
|
// CHECK:STDOUT: %Dest.patt => constants.%Dest
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Convert.6(constants.%Dest, constants.%Self.2) {
|
|
// CHECK:STDOUT: %Dest => constants.%Dest
|
|
// CHECK:STDOUT: %As.type => constants.%As.type.2
|
|
// CHECK:STDOUT: %Self => constants.%Self.2
|
|
// CHECK:STDOUT: %Self.as_type => constants.%Self.as_type.2
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Convert.7(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %iN => constants.%iN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @As(constants.%uN) {
|
|
// CHECK:STDOUT: %Dest => constants.%uN
|
|
// CHECK:STDOUT: %Dest.patt => constants.%uN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @As(@impl.6.%uN) {
|
|
// CHECK:STDOUT: %Dest => constants.%uN
|
|
// CHECK:STDOUT: %Dest.patt => constants.%uN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.6(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %uN => constants.%uN
|
|
// CHECK:STDOUT: %As.type => constants.%As.type.4
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.6(%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %uN => constants.%uN
|
|
// CHECK:STDOUT: %As.type => constants.%As.type.4
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Convert.8(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %uN => constants.%uN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @As(Core.IntLiteral) {
|
|
// CHECK:STDOUT: %Dest => Core.IntLiteral
|
|
// CHECK:STDOUT: %Dest.patt => Core.IntLiteral
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %As.type => constants.%As.type.5
|
|
// CHECK:STDOUT: %Self => constants.%Self.2
|
|
// CHECK:STDOUT: %Convert.type => constants.%Convert.type.11
|
|
// CHECK:STDOUT: %Convert => constants.%Convert.11
|
|
// CHECK:STDOUT: %Convert.assoc_type => constants.%Convert.assoc_type.4
|
|
// CHECK:STDOUT: %assoc0 => constants.%assoc0.4
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.7(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %iN => constants.%iN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.7(%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %iN => constants.%iN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Convert.9(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %iN => constants.%iN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.8(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %uN => constants.%uN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.8(%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %uN => constants.%uN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Convert.10(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %uN => constants.%uN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @C(constants.%S) {
|
|
// CHECK:STDOUT: %S => constants.%S
|
|
// CHECK:STDOUT: %S.patt => constants.%S
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @ImplicitAs(constants.%i32) {
|
|
// CHECK:STDOUT: %Dest => constants.%i32
|
|
// CHECK:STDOUT: %Dest.patt => constants.%i32
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.6
|
|
// CHECK:STDOUT: %Self => constants.%Self.1
|
|
// CHECK:STDOUT: %Convert.type => constants.%Convert.type.13
|
|
// CHECK:STDOUT: %Convert => constants.%Convert.13
|
|
// CHECK:STDOUT: %Convert.assoc_type => constants.%Convert.assoc_type.5
|
|
// CHECK:STDOUT: %assoc0 => constants.%assoc0.5
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.1(constants.%int_32) {
|
|
// CHECK:STDOUT: %N => constants.%int_32
|
|
// CHECK:STDOUT: %N.patt => constants.%int_32
|
|
// CHECK:STDOUT: %iN => constants.%i32
|
|
// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.6
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %Convert.type => constants.%Convert.type.14
|
|
// CHECK:STDOUT: %Convert => constants.%Convert.14
|
|
// CHECK:STDOUT: %interface => constants.%interface.9
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Convert.2(constants.%int_32) {
|
|
// CHECK:STDOUT: %N => constants.%int_32
|
|
// CHECK:STDOUT: %iN => constants.%i32
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @C(constants.%struct) {
|
|
// CHECK:STDOUT: %S => constants.%struct
|
|
// CHECK:STDOUT: %S.patt => constants.%struct
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: --- fail_bad_type.impl.carbon
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic]
|
|
// CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic]
|
|
// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic]
|
|
// CHECK:STDOUT: %ImplicitAs.type.2: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic]
|
|
// CHECK:STDOUT: %Self.1: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic]
|
|
// CHECK:STDOUT: %Dest.patt: type = symbolic_binding_pattern Dest, 0 [symbolic]
|
|
// CHECK:STDOUT: %ImplicitAs.type.3: type = facet_type <@ImplicitAs, @ImplicitAs(%iN)> [symbolic]
|
|
// CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic]
|
|
// CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic]
|
|
// CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %Self.as_type.1: type = facet_access_type %Self.1 [symbolic]
|
|
// CHECK:STDOUT: %Convert.assoc_type.1: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic]
|
|
// CHECK:STDOUT: %assoc0.1: %Convert.assoc_type.1 = assoc_entity element0, imports.%import_ref.11 [symbolic]
|
|
// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.2, @impl.1(%N) [symbolic]
|
|
// CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %interface.1: <witness> = interface_witness (%Convert.2) [symbolic]
|
|
// CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic]
|
|
// CHECK:STDOUT: %ImplicitAs.type.4: type = facet_type <@ImplicitAs, @ImplicitAs(%uN)> [symbolic]
|
|
// CHECK:STDOUT: %Convert.type.3: type = fn_type @Convert.3, @impl.2(%N) [symbolic]
|
|
// CHECK:STDOUT: %Convert.3: %Convert.type.3 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %interface.2: <witness> = interface_witness (%Convert.3) [symbolic]
|
|
// CHECK:STDOUT: %ImplicitAs.type.5: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [template]
|
|
// CHECK:STDOUT: %Convert.type.4: type = fn_type @Convert.4, @impl.3(%N) [symbolic]
|
|
// CHECK:STDOUT: %Convert.4: %Convert.type.4 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %interface.3: <witness> = interface_witness (%Convert.4) [symbolic]
|
|
// CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template]
|
|
// CHECK:STDOUT: %Convert.5: %Convert.type.5 = struct_value () [template]
|
|
// CHECK:STDOUT: %Convert.assoc_type.2: type = assoc_entity_type %ImplicitAs.type.5, %Convert.type.5 [template]
|
|
// CHECK:STDOUT: %assoc0.2: %Convert.assoc_type.2 = assoc_entity element0, imports.%import_ref.18 [template]
|
|
// CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.5, @impl.4(%N) [symbolic]
|
|
// CHECK:STDOUT: %Convert.6: %Convert.type.6 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %interface.4: <witness> = interface_witness (%Convert.6) [symbolic]
|
|
// CHECK:STDOUT: %As.type.2: type = facet_type <@As, @As(%Dest)> [symbolic]
|
|
// CHECK:STDOUT: %Self.2: %As.type.2 = bind_symbolic_name Self, 1 [symbolic]
|
|
// CHECK:STDOUT: %As.type.3: type = facet_type <@As, @As(%iN)> [symbolic]
|
|
// CHECK:STDOUT: %Convert.type.7: type = fn_type @Convert.6, @As(%Dest) [symbolic]
|
|
// CHECK:STDOUT: %Convert.7: %Convert.type.7 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %Self.as_type.2: type = facet_access_type %Self.2 [symbolic]
|
|
// CHECK:STDOUT: %Convert.assoc_type.3: type = assoc_entity_type %As.type.2, %Convert.type.7 [symbolic]
|
|
// CHECK:STDOUT: %assoc0.3: %Convert.assoc_type.3 = assoc_entity element0, imports.%import_ref.28 [symbolic]
|
|
// CHECK:STDOUT: %Convert.type.8: type = fn_type @Convert.7, @impl.5(%N) [symbolic]
|
|
// CHECK:STDOUT: %Convert.8: %Convert.type.8 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %interface.5: <witness> = interface_witness (%Convert.8) [symbolic]
|
|
// CHECK:STDOUT: %As.type.4: type = facet_type <@As, @As(%uN)> [symbolic]
|
|
// CHECK:STDOUT: %Convert.type.9: type = fn_type @Convert.8, @impl.6(%N) [symbolic]
|
|
// CHECK:STDOUT: %Convert.9: %Convert.type.9 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %interface.6: <witness> = interface_witness (%Convert.9) [symbolic]
|
|
// CHECK:STDOUT: %As.type.5: type = facet_type <@As, @As(Core.IntLiteral)> [template]
|
|
// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.9, @impl.7(%N) [symbolic]
|
|
// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %interface.7: <witness> = interface_witness (%Convert.10) [symbolic]
|
|
// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.6, @As(Core.IntLiteral) [template]
|
|
// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template]
|
|
// CHECK:STDOUT: %Convert.assoc_type.4: type = assoc_entity_type %As.type.5, %Convert.type.11 [template]
|
|
// CHECK:STDOUT: %assoc0.4: %Convert.assoc_type.4 = assoc_entity element0, imports.%import_ref.35 [template]
|
|
// CHECK:STDOUT: %Convert.type.12: type = fn_type @Convert.10, @impl.8(%N) [symbolic]
|
|
// CHECK:STDOUT: %Convert.12: %Convert.type.12 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %interface.8: <witness> = interface_witness (%Convert.12) [symbolic]
|
|
// CHECK:STDOUT: %C.type: type = generic_class_type @C [template]
|
|
// CHECK:STDOUT: %C.generic: %C.type = struct_value () [template]
|
|
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template]
|
|
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [template]
|
|
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template]
|
|
// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template]
|
|
// CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %i32, .b: %i32} [template]
|
|
// CHECK:STDOUT: %S: %struct_type.a.b = bind_symbolic_name S, 0 [symbolic]
|
|
// CHECK:STDOUT: %S.patt: %struct_type.a.b = symbolic_binding_pattern S, 0 [symbolic]
|
|
// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template]
|
|
// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template]
|
|
// CHECK:STDOUT: %struct_type.c.d: type = struct_type {.c: Core.IntLiteral, .d: Core.IntLiteral} [template]
|
|
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
|
|
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
|
|
// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template]
|
|
// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template]
|
|
// CHECK:STDOUT: %struct: %struct_type.a.b = struct_value (%int_1.2, %int_2.2) [template]
|
|
// CHECK:STDOUT: %C.2: type = class_type @C, @C(%struct) [template]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: imports {
|
|
// CHECK:STDOUT: %import_ref.1 = import_ref Implicit//default, inst+22, unloaded
|
|
// CHECK:STDOUT: %import_ref.2 = import_ref Implicit//default, inst+353, unloaded
|
|
// CHECK:STDOUT: %import_ref.3: %C.type = import_ref Implicit//default, inst+412, loaded [template = constants.%C.generic]
|
|
// CHECK:STDOUT: %import_ref.4: %F.type = import_ref Implicit//default, inst+456, loaded [template = constants.%F]
|
|
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
|
|
// CHECK:STDOUT: import Core//prelude
|
|
// CHECK:STDOUT: import Core//prelude/...
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %import_ref.5 = import_ref Implicit//default, inst+38, unloaded
|
|
// CHECK:STDOUT: %import_ref.6 = import_ref Implicit//default, inst+39, unloaded
|
|
// CHECK:STDOUT: %import_ref.7 = import_ref Implicit//default, inst+40, unloaded
|
|
// CHECK:STDOUT: %import_ref.8: type = import_ref Implicit//default, inst+79, loaded [template = Core.IntLiteral]
|
|
// CHECK:STDOUT: %import_ref.9: type = import_ref Implicit//default, inst+80, loaded [symbolic = @impl.1.%ImplicitAs.type (constants.%ImplicitAs.type.3)]
|
|
// CHECK:STDOUT: %import_ref.10 = import_ref Implicit//default, inst+81, unloaded
|
|
// CHECK:STDOUT: %import_ref.11 = import_ref Implicit//default, inst+53, unloaded
|
|
// CHECK:STDOUT: %import_ref.12: type = import_ref Implicit//default, inst+105, loaded [template = Core.IntLiteral]
|
|
// CHECK:STDOUT: %import_ref.13: type = import_ref Implicit//default, inst+106, loaded [symbolic = @impl.2.%ImplicitAs.type (constants.%ImplicitAs.type.4)]
|
|
// CHECK:STDOUT: %import_ref.14 = import_ref Implicit//default, inst+107, unloaded
|
|
// CHECK:STDOUT: %import_ref.15: type = import_ref Implicit//default, inst+130, loaded [symbolic = @impl.3.%iN (constants.%iN)]
|
|
// CHECK:STDOUT: %import_ref.16: type = import_ref Implicit//default, inst+131, loaded [template = constants.%ImplicitAs.type.5]
|
|
// CHECK:STDOUT: %import_ref.17 = import_ref Implicit//default, inst+132, unloaded
|
|
// CHECK:STDOUT: %import_ref.19: type = import_ref Implicit//default, inst+158, loaded [symbolic = @impl.4.%uN (constants.%uN)]
|
|
// CHECK:STDOUT: %import_ref.20: type = import_ref Implicit//default, inst+159, loaded [template = constants.%ImplicitAs.type.5]
|
|
// CHECK:STDOUT: %import_ref.21 = import_ref Implicit//default, inst+160, unloaded
|
|
// CHECK:STDOUT: %import_ref.22 = import_ref Implicit//default, inst+186, unloaded
|
|
// CHECK:STDOUT: %import_ref.23 = import_ref Implicit//default, inst+187, unloaded
|
|
// CHECK:STDOUT: %import_ref.24 = import_ref Implicit//default, inst+188, unloaded
|
|
// CHECK:STDOUT: %import_ref.25: type = import_ref Implicit//default, inst+192, loaded [template = Core.IntLiteral]
|
|
// CHECK:STDOUT: %import_ref.26: type = import_ref Implicit//default, inst+193, loaded [symbolic = @impl.5.%As.type (constants.%As.type.3)]
|
|
// CHECK:STDOUT: %import_ref.27 = import_ref Implicit//default, inst+194, unloaded
|
|
// CHECK:STDOUT: %import_ref.28 = import_ref Implicit//default, inst+207, unloaded
|
|
// CHECK:STDOUT: %import_ref.29: type = import_ref Implicit//default, inst+241, loaded [template = Core.IntLiteral]
|
|
// CHECK:STDOUT: %import_ref.30: type = import_ref Implicit//default, inst+242, loaded [symbolic = @impl.6.%As.type (constants.%As.type.4)]
|
|
// CHECK:STDOUT: %import_ref.31 = import_ref Implicit//default, inst+243, unloaded
|
|
// CHECK:STDOUT: %import_ref.32: type = import_ref Implicit//default, inst+266, loaded [symbolic = @impl.7.%iN (constants.%iN)]
|
|
// CHECK:STDOUT: %import_ref.33: type = import_ref Implicit//default, inst+267, loaded [template = constants.%As.type.5]
|
|
// CHECK:STDOUT: %import_ref.34 = import_ref Implicit//default, inst+268, unloaded
|
|
// CHECK:STDOUT: %import_ref.36: type = import_ref Implicit//default, inst+294, loaded [symbolic = @impl.8.%uN (constants.%uN)]
|
|
// CHECK:STDOUT: %import_ref.37: type = import_ref Implicit//default, inst+295, loaded [template = constants.%As.type.5]
|
|
// CHECK:STDOUT: %import_ref.38 = import_ref Implicit//default, inst+296, unloaded
|
|
// CHECK:STDOUT: %import_ref.39: <witness> = import_ref Implicit//default, inst+419, loaded [template = constants.%complete_type]
|
|
// CHECK:STDOUT: %import_ref.40 = import_ref Implicit//default, inst+417, unloaded
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: file {
|
|
// CHECK:STDOUT: package: <namespace> = namespace [template] {
|
|
// CHECK:STDOUT: .a_ref = imports.%import_ref.1
|
|
// CHECK:STDOUT: .b_ref = imports.%import_ref.2
|
|
// CHECK:STDOUT: .C = imports.%import_ref.3
|
|
// CHECK:STDOUT: .F = imports.%import_ref.4
|
|
// CHECK:STDOUT: .Core = imports.%Core
|
|
// CHECK:STDOUT: .c_bad = %c_bad
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %Implicit.import = import Implicit
|
|
// CHECK:STDOUT: %default.import = import <invalid>
|
|
// CHECK:STDOUT: %Core.import = import Core
|
|
// CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.3 [template = constants.%C.generic]
|
|
// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1]
|
|
// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1]
|
|
// CHECK:STDOUT: %.loc11: %struct_type.c.d = struct_literal (%int_1, %int_2)
|
|
// CHECK:STDOUT: %c_bad.var: ref <error> = var c_bad
|
|
// CHECK:STDOUT: %c_bad: ref <error> = bind_name c_bad, %c_bad.var
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic interface @ImplicitAs(constants.%Dest: type) {
|
|
// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
|
|
// CHECK:STDOUT: %Dest.patt: type = symbolic_binding_pattern Dest, 0 [symbolic = %Dest.patt (constants.%Dest.patt)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)]
|
|
// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.1)]
|
|
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)]
|
|
// CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)]
|
|
// CHECK:STDOUT: %Convert.assoc_type: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %Convert.assoc_type (constants.%Convert.assoc_type.1)]
|
|
// CHECK:STDOUT: %assoc0: @ImplicitAs.%Convert.assoc_type (%Convert.assoc_type.1) = assoc_entity element0, imports.%import_ref.11 [symbolic = %assoc0 (constants.%assoc0.1)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: interface {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: .Self = imports.%import_ref.5
|
|
// CHECK:STDOUT: .Convert = imports.%import_ref.6
|
|
// CHECK:STDOUT: witness = (imports.%import_ref.7)
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic interface @As(constants.%Dest: type) {
|
|
// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
|
|
// CHECK:STDOUT: %Dest.patt: type = symbolic_binding_pattern Dest, 0 [symbolic = %Dest.patt (constants.%Dest.patt)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%Dest)> [symbolic = %As.type (constants.%As.type.2)]
|
|
// CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)]
|
|
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.6, @As(%Dest) [symbolic = %Convert.type (constants.%Convert.type.7)]
|
|
// CHECK:STDOUT: %Convert: @As.%Convert.type (%Convert.type.7) = struct_value () [symbolic = %Convert (constants.%Convert.7)]
|
|
// CHECK:STDOUT: %Convert.assoc_type: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.7) [symbolic = %Convert.assoc_type (constants.%Convert.assoc_type.3)]
|
|
// CHECK:STDOUT: %assoc0: @As.%Convert.assoc_type (%Convert.assoc_type.3) = assoc_entity element0, imports.%import_ref.28 [symbolic = %assoc0 (constants.%assoc0.3)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: interface {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: .Self = imports.%import_ref.22
|
|
// CHECK:STDOUT: .Convert = imports.%import_ref.23
|
|
// CHECK:STDOUT: witness = (imports.%import_ref.24)
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic impl @impl.1(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
|
|
// CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
|
|
// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%iN)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.3)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.2, @impl.1(%N) [symbolic = %Convert.type (constants.%Convert.type.2)]
|
|
// CHECK:STDOUT: %Convert: @impl.1.%Convert.type (%Convert.type.2) = struct_value () [symbolic = %Convert (constants.%Convert.2)]
|
|
// CHECK:STDOUT: %interface: <witness> = interface_witness (%Convert) [symbolic = %interface (constants.%interface.1)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: impl: imports.%import_ref.8 as imports.%import_ref.9 {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: witness = imports.%import_ref.10
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic impl @impl.2(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
|
|
// CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
|
|
// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%uN)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.4)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.3, @impl.2(%N) [symbolic = %Convert.type (constants.%Convert.type.3)]
|
|
// CHECK:STDOUT: %Convert: @impl.2.%Convert.type (%Convert.type.3) = struct_value () [symbolic = %Convert (constants.%Convert.3)]
|
|
// CHECK:STDOUT: %interface: <witness> = interface_witness (%Convert) [symbolic = %interface (constants.%interface.2)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: impl: imports.%import_ref.12 as imports.%import_ref.13 {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: witness = imports.%import_ref.14
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic impl @impl.3(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
|
|
// CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.4, @impl.3(%N) [symbolic = %Convert.type (constants.%Convert.type.4)]
|
|
// CHECK:STDOUT: %Convert: @impl.3.%Convert.type (%Convert.type.4) = struct_value () [symbolic = %Convert (constants.%Convert.4)]
|
|
// CHECK:STDOUT: %interface: <witness> = interface_witness (%Convert) [symbolic = %interface (constants.%interface.3)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: impl: imports.%import_ref.15 as imports.%import_ref.16 {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: witness = imports.%import_ref.17
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic impl @impl.4(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
|
|
// CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.5, @impl.4(%N) [symbolic = %Convert.type (constants.%Convert.type.6)]
|
|
// CHECK:STDOUT: %Convert: @impl.4.%Convert.type (%Convert.type.6) = struct_value () [symbolic = %Convert (constants.%Convert.6)]
|
|
// CHECK:STDOUT: %interface: <witness> = interface_witness (%Convert) [symbolic = %interface (constants.%interface.4)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: impl: imports.%import_ref.19 as imports.%import_ref.20 {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: witness = imports.%import_ref.21
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic impl @impl.5(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
|
|
// CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
|
|
// CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%iN)> [symbolic = %As.type (constants.%As.type.3)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.7, @impl.5(%N) [symbolic = %Convert.type (constants.%Convert.type.8)]
|
|
// CHECK:STDOUT: %Convert: @impl.5.%Convert.type (%Convert.type.8) = struct_value () [symbolic = %Convert (constants.%Convert.8)]
|
|
// CHECK:STDOUT: %interface: <witness> = interface_witness (%Convert) [symbolic = %interface (constants.%interface.5)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: impl: imports.%import_ref.25 as imports.%import_ref.26 {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: witness = imports.%import_ref.27
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic impl @impl.6(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
|
|
// CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
|
|
// CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%uN)> [symbolic = %As.type (constants.%As.type.4)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.8, @impl.6(%N) [symbolic = %Convert.type (constants.%Convert.type.9)]
|
|
// CHECK:STDOUT: %Convert: @impl.6.%Convert.type (%Convert.type.9) = struct_value () [symbolic = %Convert (constants.%Convert.9)]
|
|
// CHECK:STDOUT: %interface: <witness> = interface_witness (%Convert) [symbolic = %interface (constants.%interface.6)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: impl: imports.%import_ref.29 as imports.%import_ref.30 {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: witness = imports.%import_ref.31
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic impl @impl.7(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
|
|
// CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.9, @impl.7(%N) [symbolic = %Convert.type (constants.%Convert.type.10)]
|
|
// CHECK:STDOUT: %Convert: @impl.7.%Convert.type (%Convert.type.10) = struct_value () [symbolic = %Convert (constants.%Convert.10)]
|
|
// CHECK:STDOUT: %interface: <witness> = interface_witness (%Convert) [symbolic = %interface (constants.%interface.7)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: impl: imports.%import_ref.32 as imports.%import_ref.33 {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: witness = imports.%import_ref.34
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic impl @impl.8(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
|
|
// CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.10, @impl.8(%N) [symbolic = %Convert.type (constants.%Convert.type.12)]
|
|
// CHECK:STDOUT: %Convert: @impl.8.%Convert.type (%Convert.type.12) = struct_value () [symbolic = %Convert (constants.%Convert.12)]
|
|
// CHECK:STDOUT: %interface: <witness> = interface_witness (%Convert) [symbolic = %interface (constants.%interface.8)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: impl: imports.%import_ref.36 as imports.%import_ref.37 {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: witness = imports.%import_ref.38
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic class @C(constants.%S: %struct_type.a.b) {
|
|
// CHECK:STDOUT: %S: %struct_type.a.b = bind_symbolic_name S, 0 [symbolic = %S (constants.%S)]
|
|
// CHECK:STDOUT: %S.patt: %struct_type.a.b = symbolic_binding_pattern S, 0 [symbolic = %S.patt (constants.%S.patt)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: class {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: .Self = imports.%import_ref.40
|
|
// CHECK:STDOUT: complete_type_witness = imports.%import_ref.39
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @Convert.1(constants.%Dest: type, constants.%Self.1: %ImplicitAs.type.2) {
|
|
// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
|
|
// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)]
|
|
// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.1)]
|
|
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type.1)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%Self.as_type (%Self.as_type.1)]() -> @Convert.1.%Dest (%Dest);
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @Convert.2(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn[%self.param_patt: Core.IntLiteral]() -> @Convert.2.%iN (%iN) = "int.convert_checked";
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @Convert.3(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn[%self.param_patt: Core.IntLiteral]() -> @Convert.3.%uN (%uN) = "int.convert_checked";
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @Convert.4(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn[%self.param_patt: @Convert.4.%iN (%iN)]() -> Core.IntLiteral = "int.convert_checked";
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @Convert.5(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn[%self.param_patt: @Convert.5.%uN (%uN)]() -> Core.IntLiteral = "int.convert_checked";
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @Convert.6(constants.%Dest: type, constants.%Self.2: %As.type.2) {
|
|
// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
|
|
// CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%Dest)> [symbolic = %As.type (constants.%As.type.2)]
|
|
// CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)]
|
|
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type.2)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn[%self.param_patt: @Convert.6.%Self.as_type (%Self.as_type.2)]() -> @Convert.6.%Dest (%Dest);
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @Convert.7(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn[%self.param_patt: Core.IntLiteral]() -> @Convert.7.%iN (%iN) = "int.convert_checked";
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @Convert.8(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn[%self.param_patt: Core.IntLiteral]() -> @Convert.8.%uN (%uN) = "int.convert_checked";
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @Convert.9(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn[%self.param_patt: @Convert.9.%iN (%iN)]() -> Core.IntLiteral = "int.convert_checked";
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @Convert.10(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn[%self.param_patt: @Convert.10.%uN (%uN)]() -> Core.IntLiteral = "int.convert_checked";
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @F() -> %C.2;
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @__global_init() {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %F.ref: %F.type = name_ref F, imports.%import_ref.4 [template = constants.%F]
|
|
// CHECK:STDOUT: %.loc11: ref %C.2 = temporary_storage
|
|
// CHECK:STDOUT: %F.call: init %C.2 = call %F.ref() to %.loc11
|
|
// CHECK:STDOUT: assign file.%c_bad.var, <error>
|
|
// CHECK:STDOUT: return
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) {
|
|
// CHECK:STDOUT: %Dest => constants.%Dest
|
|
// CHECK:STDOUT: %Dest.patt => constants.%Dest
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @ImplicitAs(constants.%iN) {
|
|
// CHECK:STDOUT: %Dest => constants.%iN
|
|
// CHECK:STDOUT: %Dest.patt => constants.%iN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @ImplicitAs(%Dest) {
|
|
// CHECK:STDOUT: %Dest => constants.%Dest
|
|
// CHECK:STDOUT: %Dest.patt => constants.%Dest
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @ImplicitAs(@impl.1.%iN) {
|
|
// CHECK:STDOUT: %Dest => constants.%iN
|
|
// CHECK:STDOUT: %Dest.patt => constants.%iN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.1(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %iN => constants.%iN
|
|
// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.1(%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %iN => constants.%iN
|
|
// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @ImplicitAs(@Convert.1.%Dest) {
|
|
// CHECK:STDOUT: %Dest => constants.%Dest
|
|
// CHECK:STDOUT: %Dest.patt => constants.%Dest
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Convert.1(constants.%Dest, constants.%Self.1) {
|
|
// CHECK:STDOUT: %Dest => constants.%Dest
|
|
// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2
|
|
// CHECK:STDOUT: %Self => constants.%Self.1
|
|
// CHECK:STDOUT: %Self.as_type => constants.%Self.as_type.1
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Convert.2(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %iN => constants.%iN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @ImplicitAs(constants.%uN) {
|
|
// CHECK:STDOUT: %Dest => constants.%uN
|
|
// CHECK:STDOUT: %Dest.patt => constants.%uN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @ImplicitAs(@impl.2.%uN) {
|
|
// CHECK:STDOUT: %Dest => constants.%uN
|
|
// CHECK:STDOUT: %Dest.patt => constants.%uN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.2(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %uN => constants.%uN
|
|
// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.4
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.2(%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %uN => constants.%uN
|
|
// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.4
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Convert.3(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %uN => constants.%uN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @ImplicitAs(Core.IntLiteral) {
|
|
// CHECK:STDOUT: %Dest => Core.IntLiteral
|
|
// CHECK:STDOUT: %Dest.patt => Core.IntLiteral
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.5
|
|
// CHECK:STDOUT: %Self => constants.%Self.1
|
|
// CHECK:STDOUT: %Convert.type => constants.%Convert.type.5
|
|
// CHECK:STDOUT: %Convert => constants.%Convert.5
|
|
// CHECK:STDOUT: %Convert.assoc_type => constants.%Convert.assoc_type.2
|
|
// CHECK:STDOUT: %assoc0 => constants.%assoc0.2
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.3(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %iN => constants.%iN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.3(%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %iN => constants.%iN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Convert.4(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %iN => constants.%iN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.4(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %uN => constants.%uN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.4(%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %uN => constants.%uN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Convert.5(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %uN => constants.%uN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @As(constants.%Dest) {
|
|
// CHECK:STDOUT: %Dest => constants.%Dest
|
|
// CHECK:STDOUT: %Dest.patt => constants.%Dest
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @As(constants.%iN) {
|
|
// CHECK:STDOUT: %Dest => constants.%iN
|
|
// CHECK:STDOUT: %Dest.patt => constants.%iN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @As(%Dest) {
|
|
// CHECK:STDOUT: %Dest => constants.%Dest
|
|
// CHECK:STDOUT: %Dest.patt => constants.%Dest
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @As(@impl.5.%iN) {
|
|
// CHECK:STDOUT: %Dest => constants.%iN
|
|
// CHECK:STDOUT: %Dest.patt => constants.%iN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.5(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %iN => constants.%iN
|
|
// CHECK:STDOUT: %As.type => constants.%As.type.3
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.5(%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %iN => constants.%iN
|
|
// CHECK:STDOUT: %As.type => constants.%As.type.3
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @As(@Convert.6.%Dest) {
|
|
// CHECK:STDOUT: %Dest => constants.%Dest
|
|
// CHECK:STDOUT: %Dest.patt => constants.%Dest
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Convert.6(constants.%Dest, constants.%Self.2) {
|
|
// CHECK:STDOUT: %Dest => constants.%Dest
|
|
// CHECK:STDOUT: %As.type => constants.%As.type.2
|
|
// CHECK:STDOUT: %Self => constants.%Self.2
|
|
// CHECK:STDOUT: %Self.as_type => constants.%Self.as_type.2
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Convert.7(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %iN => constants.%iN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @As(constants.%uN) {
|
|
// CHECK:STDOUT: %Dest => constants.%uN
|
|
// CHECK:STDOUT: %Dest.patt => constants.%uN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @As(@impl.6.%uN) {
|
|
// CHECK:STDOUT: %Dest => constants.%uN
|
|
// CHECK:STDOUT: %Dest.patt => constants.%uN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.6(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %uN => constants.%uN
|
|
// CHECK:STDOUT: %As.type => constants.%As.type.4
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.6(%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %uN => constants.%uN
|
|
// CHECK:STDOUT: %As.type => constants.%As.type.4
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Convert.8(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %uN => constants.%uN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @As(Core.IntLiteral) {
|
|
// CHECK:STDOUT: %Dest => Core.IntLiteral
|
|
// CHECK:STDOUT: %Dest.patt => Core.IntLiteral
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %As.type => constants.%As.type.5
|
|
// CHECK:STDOUT: %Self => constants.%Self.2
|
|
// CHECK:STDOUT: %Convert.type => constants.%Convert.type.11
|
|
// CHECK:STDOUT: %Convert => constants.%Convert.11
|
|
// CHECK:STDOUT: %Convert.assoc_type => constants.%Convert.assoc_type.4
|
|
// CHECK:STDOUT: %assoc0 => constants.%assoc0.4
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.7(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %iN => constants.%iN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.7(%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %iN => constants.%iN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Convert.9(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %iN => constants.%iN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.8(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %uN => constants.%uN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.8(%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %uN => constants.%uN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Convert.10(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %uN => constants.%uN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @C(constants.%S) {
|
|
// CHECK:STDOUT: %S => constants.%S
|
|
// CHECK:STDOUT: %S.patt => constants.%S
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @C(constants.%struct) {
|
|
// CHECK:STDOUT: %S => constants.%struct
|
|
// CHECK:STDOUT: %S.patt => constants.%struct
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: --- fail_bad_value.impl.carbon
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic]
|
|
// CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic]
|
|
// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic]
|
|
// CHECK:STDOUT: %ImplicitAs.type.2: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic]
|
|
// CHECK:STDOUT: %Self.1: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic]
|
|
// CHECK:STDOUT: %Dest.patt: type = symbolic_binding_pattern Dest, 0 [symbolic]
|
|
// CHECK:STDOUT: %ImplicitAs.type.3: type = facet_type <@ImplicitAs, @ImplicitAs(%iN)> [symbolic]
|
|
// CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic]
|
|
// CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic]
|
|
// CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %Self.as_type.1: type = facet_access_type %Self.1 [symbolic]
|
|
// CHECK:STDOUT: %Convert.assoc_type.1: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic]
|
|
// CHECK:STDOUT: %assoc0.1: %Convert.assoc_type.1 = assoc_entity element0, imports.%import_ref.11 [symbolic]
|
|
// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.2, @impl.1(%N) [symbolic]
|
|
// CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %interface.1: <witness> = interface_witness (%Convert.2) [symbolic]
|
|
// CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic]
|
|
// CHECK:STDOUT: %ImplicitAs.type.4: type = facet_type <@ImplicitAs, @ImplicitAs(%uN)> [symbolic]
|
|
// CHECK:STDOUT: %Convert.type.3: type = fn_type @Convert.3, @impl.2(%N) [symbolic]
|
|
// CHECK:STDOUT: %Convert.3: %Convert.type.3 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %interface.2: <witness> = interface_witness (%Convert.3) [symbolic]
|
|
// CHECK:STDOUT: %ImplicitAs.type.5: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [template]
|
|
// CHECK:STDOUT: %Convert.type.4: type = fn_type @Convert.4, @impl.3(%N) [symbolic]
|
|
// CHECK:STDOUT: %Convert.4: %Convert.type.4 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %interface.3: <witness> = interface_witness (%Convert.4) [symbolic]
|
|
// CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template]
|
|
// CHECK:STDOUT: %Convert.5: %Convert.type.5 = struct_value () [template]
|
|
// CHECK:STDOUT: %Convert.assoc_type.2: type = assoc_entity_type %ImplicitAs.type.5, %Convert.type.5 [template]
|
|
// CHECK:STDOUT: %assoc0.2: %Convert.assoc_type.2 = assoc_entity element0, imports.%import_ref.18 [template]
|
|
// CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.5, @impl.4(%N) [symbolic]
|
|
// CHECK:STDOUT: %Convert.6: %Convert.type.6 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %interface.4: <witness> = interface_witness (%Convert.6) [symbolic]
|
|
// CHECK:STDOUT: %As.type.2: type = facet_type <@As, @As(%Dest)> [symbolic]
|
|
// CHECK:STDOUT: %Self.2: %As.type.2 = bind_symbolic_name Self, 1 [symbolic]
|
|
// CHECK:STDOUT: %As.type.3: type = facet_type <@As, @As(%iN)> [symbolic]
|
|
// CHECK:STDOUT: %Convert.type.7: type = fn_type @Convert.6, @As(%Dest) [symbolic]
|
|
// CHECK:STDOUT: %Convert.7: %Convert.type.7 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %Self.as_type.2: type = facet_access_type %Self.2 [symbolic]
|
|
// CHECK:STDOUT: %Convert.assoc_type.3: type = assoc_entity_type %As.type.2, %Convert.type.7 [symbolic]
|
|
// CHECK:STDOUT: %assoc0.3: %Convert.assoc_type.3 = assoc_entity element0, imports.%import_ref.28 [symbolic]
|
|
// CHECK:STDOUT: %Convert.type.8: type = fn_type @Convert.7, @impl.5(%N) [symbolic]
|
|
// CHECK:STDOUT: %Convert.8: %Convert.type.8 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %interface.5: <witness> = interface_witness (%Convert.8) [symbolic]
|
|
// CHECK:STDOUT: %As.type.4: type = facet_type <@As, @As(%uN)> [symbolic]
|
|
// CHECK:STDOUT: %Convert.type.9: type = fn_type @Convert.8, @impl.6(%N) [symbolic]
|
|
// CHECK:STDOUT: %Convert.9: %Convert.type.9 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %interface.6: <witness> = interface_witness (%Convert.9) [symbolic]
|
|
// CHECK:STDOUT: %As.type.5: type = facet_type <@As, @As(Core.IntLiteral)> [template]
|
|
// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.9, @impl.7(%N) [symbolic]
|
|
// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %interface.7: <witness> = interface_witness (%Convert.10) [symbolic]
|
|
// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.6, @As(Core.IntLiteral) [template]
|
|
// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template]
|
|
// CHECK:STDOUT: %Convert.assoc_type.4: type = assoc_entity_type %As.type.5, %Convert.type.11 [template]
|
|
// CHECK:STDOUT: %assoc0.4: %Convert.assoc_type.4 = assoc_entity element0, imports.%import_ref.35 [template]
|
|
// CHECK:STDOUT: %Convert.type.12: type = fn_type @Convert.10, @impl.8(%N) [symbolic]
|
|
// CHECK:STDOUT: %Convert.12: %Convert.type.12 = struct_value () [symbolic]
|
|
// CHECK:STDOUT: %interface.8: <witness> = interface_witness (%Convert.12) [symbolic]
|
|
// CHECK:STDOUT: %C.type: type = generic_class_type @C [template]
|
|
// CHECK:STDOUT: %C.generic: %C.type = struct_value () [template]
|
|
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template]
|
|
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [template]
|
|
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template]
|
|
// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template]
|
|
// CHECK:STDOUT: %struct_type.a.b.1: type = struct_type {.a: %i32, .b: %i32} [template]
|
|
// CHECK:STDOUT: %S: %struct_type.a.b.1 = bind_symbolic_name S, 0 [symbolic]
|
|
// CHECK:STDOUT: %S.patt: %struct_type.a.b.1 = symbolic_binding_pattern S, 0 [symbolic]
|
|
// CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template]
|
|
// CHECK:STDOUT: %int_4.1: Core.IntLiteral = int_value 4 [template]
|
|
// CHECK:STDOUT: %struct_type.a.b.2: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [template]
|
|
// CHECK:STDOUT: %ImplicitAs.type.6: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [template]
|
|
// CHECK:STDOUT: %Convert.type.13: type = fn_type @Convert.1, @ImplicitAs(%i32) [template]
|
|
// CHECK:STDOUT: %Convert.13: %Convert.type.13 = struct_value () [template]
|
|
// CHECK:STDOUT: %Convert.assoc_type.5: type = assoc_entity_type %ImplicitAs.type.6, %Convert.type.13 [template]
|
|
// CHECK:STDOUT: %assoc0.5: %Convert.assoc_type.5 = assoc_entity element0, imports.%import_ref.11 [template]
|
|
// CHECK:STDOUT: %assoc0.6: %Convert.assoc_type.1 = assoc_entity element0, imports.%import_ref.42 [symbolic]
|
|
// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template]
|
|
// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template]
|
|
// CHECK:STDOUT: %interface.9: <witness> = interface_witness (%Convert.14) [template]
|
|
// CHECK:STDOUT: %Convert.bound.1: <bound method> = bound_method %int_3.1, %Convert.14 [template]
|
|
// CHECK:STDOUT: %Convert.specific_fn.1: <specific function> = specific_function %Convert.bound.1, @Convert.2(%int_32) [template]
|
|
// CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template]
|
|
// CHECK:STDOUT: %Convert.bound.2: <bound method> = bound_method %int_4.1, %Convert.14 [template]
|
|
// CHECK:STDOUT: %Convert.specific_fn.2: <specific function> = specific_function %Convert.bound.2, @Convert.2(%int_32) [template]
|
|
// CHECK:STDOUT: %int_4.2: %i32 = int_value 4 [template]
|
|
// CHECK:STDOUT: %struct.1: %struct_type.a.b.1 = struct_value (%int_3.2, %int_4.2) [template]
|
|
// CHECK:STDOUT: %C.2: type = class_type @C, @C(%struct.1) [template]
|
|
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
|
|
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
|
|
// CHECK:STDOUT: %int_2: %i32 = int_value 2 [template]
|
|
// CHECK:STDOUT: %int_1: %i32 = int_value 1 [template]
|
|
// CHECK:STDOUT: %struct.2: %struct_type.a.b.1 = struct_value (%int_1, %int_2) [template]
|
|
// CHECK:STDOUT: %C.3: type = class_type @C, @C(%struct.2) [template]
|
|
// CHECK:STDOUT: %ImplicitAs.type.7: type = facet_type <@ImplicitAs, @ImplicitAs(%C.2)> [template]
|
|
// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.1, @ImplicitAs(%C.2) [template]
|
|
// CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template]
|
|
// CHECK:STDOUT: %Convert.assoc_type.6: type = assoc_entity_type %ImplicitAs.type.7, %Convert.type.15 [template]
|
|
// CHECK:STDOUT: %assoc0.7: %Convert.assoc_type.6 = assoc_entity element0, imports.%import_ref.11 [template]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: imports {
|
|
// CHECK:STDOUT: %import_ref.1 = import_ref Implicit//default, inst+22, unloaded
|
|
// CHECK:STDOUT: %import_ref.2 = import_ref Implicit//default, inst+353, unloaded
|
|
// CHECK:STDOUT: %import_ref.3: %C.type = import_ref Implicit//default, inst+412, loaded [template = constants.%C.generic]
|
|
// CHECK:STDOUT: %import_ref.4: %F.type = import_ref Implicit//default, inst+456, loaded [template = constants.%F]
|
|
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
|
|
// CHECK:STDOUT: .ImplicitAs = %import_ref.41
|
|
// CHECK:STDOUT: import Core//prelude
|
|
// CHECK:STDOUT: import Core//prelude/...
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %import_ref.5 = import_ref Implicit//default, inst+38, unloaded
|
|
// CHECK:STDOUT: %import_ref.6: @ImplicitAs.%Convert.assoc_type (%Convert.assoc_type.1) = import_ref Implicit//default, inst+39, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.6)]
|
|
// CHECK:STDOUT: %import_ref.7 = import_ref Implicit//default, inst+40, unloaded
|
|
// CHECK:STDOUT: %import_ref.8: type = import_ref Implicit//default, inst+79, loaded [template = Core.IntLiteral]
|
|
// CHECK:STDOUT: %import_ref.9: type = import_ref Implicit//default, inst+80, loaded [symbolic = @impl.1.%ImplicitAs.type (constants.%ImplicitAs.type.3)]
|
|
// CHECK:STDOUT: %import_ref.10: <witness> = import_ref Implicit//default, inst+81, loaded [symbolic = @impl.1.%interface (constants.%interface.1)]
|
|
// CHECK:STDOUT: %import_ref.11 = import_ref Implicit//default, inst+53, unloaded
|
|
// CHECK:STDOUT: %import_ref.12: type = import_ref Implicit//default, inst+105, loaded [template = Core.IntLiteral]
|
|
// CHECK:STDOUT: %import_ref.13: type = import_ref Implicit//default, inst+106, loaded [symbolic = @impl.2.%ImplicitAs.type (constants.%ImplicitAs.type.4)]
|
|
// CHECK:STDOUT: %import_ref.14 = import_ref Implicit//default, inst+107, unloaded
|
|
// CHECK:STDOUT: %import_ref.15: type = import_ref Implicit//default, inst+130, loaded [symbolic = @impl.3.%iN (constants.%iN)]
|
|
// CHECK:STDOUT: %import_ref.16: type = import_ref Implicit//default, inst+131, loaded [template = constants.%ImplicitAs.type.5]
|
|
// CHECK:STDOUT: %import_ref.17 = import_ref Implicit//default, inst+132, unloaded
|
|
// CHECK:STDOUT: %import_ref.19: type = import_ref Implicit//default, inst+158, loaded [symbolic = @impl.4.%uN (constants.%uN)]
|
|
// CHECK:STDOUT: %import_ref.20: type = import_ref Implicit//default, inst+159, loaded [template = constants.%ImplicitAs.type.5]
|
|
// CHECK:STDOUT: %import_ref.21 = import_ref Implicit//default, inst+160, unloaded
|
|
// CHECK:STDOUT: %import_ref.22 = import_ref Implicit//default, inst+186, unloaded
|
|
// CHECK:STDOUT: %import_ref.23 = import_ref Implicit//default, inst+187, unloaded
|
|
// CHECK:STDOUT: %import_ref.24 = import_ref Implicit//default, inst+188, unloaded
|
|
// CHECK:STDOUT: %import_ref.25: type = import_ref Implicit//default, inst+192, loaded [template = Core.IntLiteral]
|
|
// CHECK:STDOUT: %import_ref.26: type = import_ref Implicit//default, inst+193, loaded [symbolic = @impl.5.%As.type (constants.%As.type.3)]
|
|
// CHECK:STDOUT: %import_ref.27 = import_ref Implicit//default, inst+194, unloaded
|
|
// CHECK:STDOUT: %import_ref.28 = import_ref Implicit//default, inst+207, unloaded
|
|
// CHECK:STDOUT: %import_ref.29: type = import_ref Implicit//default, inst+241, loaded [template = Core.IntLiteral]
|
|
// CHECK:STDOUT: %import_ref.30: type = import_ref Implicit//default, inst+242, loaded [symbolic = @impl.6.%As.type (constants.%As.type.4)]
|
|
// CHECK:STDOUT: %import_ref.31 = import_ref Implicit//default, inst+243, unloaded
|
|
// CHECK:STDOUT: %import_ref.32: type = import_ref Implicit//default, inst+266, loaded [symbolic = @impl.7.%iN (constants.%iN)]
|
|
// CHECK:STDOUT: %import_ref.33: type = import_ref Implicit//default, inst+267, loaded [template = constants.%As.type.5]
|
|
// CHECK:STDOUT: %import_ref.34 = import_ref Implicit//default, inst+268, unloaded
|
|
// CHECK:STDOUT: %import_ref.36: type = import_ref Implicit//default, inst+294, loaded [symbolic = @impl.8.%uN (constants.%uN)]
|
|
// CHECK:STDOUT: %import_ref.37: type = import_ref Implicit//default, inst+295, loaded [template = constants.%As.type.5]
|
|
// CHECK:STDOUT: %import_ref.38 = import_ref Implicit//default, inst+296, unloaded
|
|
// CHECK:STDOUT: %import_ref.39: <witness> = import_ref Implicit//default, inst+419, loaded [template = constants.%complete_type]
|
|
// CHECK:STDOUT: %import_ref.40 = import_ref Implicit//default, inst+417, unloaded
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: file {
|
|
// CHECK:STDOUT: package: <namespace> = namespace [template] {
|
|
// CHECK:STDOUT: .a_ref = imports.%import_ref.1
|
|
// CHECK:STDOUT: .b_ref = imports.%import_ref.2
|
|
// CHECK:STDOUT: .C = imports.%import_ref.3
|
|
// CHECK:STDOUT: .F = imports.%import_ref.4
|
|
// CHECK:STDOUT: .Core = imports.%Core
|
|
// CHECK:STDOUT: .c_bad = %c_bad
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %Implicit.import = import Implicit
|
|
// CHECK:STDOUT: %default.import = import <invalid>
|
|
// CHECK:STDOUT: %Core.import = import Core
|
|
// CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.3 [template = constants.%C.generic]
|
|
// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1]
|
|
// CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [template = constants.%int_4.1]
|
|
// CHECK:STDOUT: %.loc9_29.1: %struct_type.a.b.2 = struct_literal (%int_3, %int_4)
|
|
// CHECK:STDOUT: %impl.elem0.loc9_29.1: %Convert.type.13 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14]
|
|
// CHECK:STDOUT: %Convert.bound.loc9_29.1: <bound method> = bound_method %int_3, %impl.elem0.loc9_29.1 [template = constants.%Convert.bound.1]
|
|
// CHECK:STDOUT: %Convert.specific_fn.loc9_29.1: <specific function> = specific_function %Convert.bound.loc9_29.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1]
|
|
// CHECK:STDOUT: %int.convert_checked.loc9_29.1: init %i32 = call %Convert.specific_fn.loc9_29.1(%int_3) [template = constants.%int_3.2]
|
|
// CHECK:STDOUT: %.loc9_29.2: %i32 = value_of_initializer %int.convert_checked.loc9_29.1 [template = constants.%int_3.2]
|
|
// CHECK:STDOUT: %.loc9_29.3: %i32 = converted %int_3, %.loc9_29.2 [template = constants.%int_3.2]
|
|
// CHECK:STDOUT: %impl.elem0.loc9_29.2: %Convert.type.13 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14]
|
|
// CHECK:STDOUT: %Convert.bound.loc9_29.2: <bound method> = bound_method %int_4, %impl.elem0.loc9_29.2 [template = constants.%Convert.bound.2]
|
|
// CHECK:STDOUT: %Convert.specific_fn.loc9_29.2: <specific function> = specific_function %Convert.bound.loc9_29.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2]
|
|
// CHECK:STDOUT: %int.convert_checked.loc9_29.2: init %i32 = call %Convert.specific_fn.loc9_29.2(%int_4) [template = constants.%int_4.2]
|
|
// CHECK:STDOUT: %.loc9_29.4: %i32 = value_of_initializer %int.convert_checked.loc9_29.2 [template = constants.%int_4.2]
|
|
// CHECK:STDOUT: %.loc9_29.5: %i32 = converted %int_4, %.loc9_29.4 [template = constants.%int_4.2]
|
|
// CHECK:STDOUT: %struct: %struct_type.a.b.1 = struct_value (%.loc9_29.3, %.loc9_29.5) [template = constants.%struct.1]
|
|
// CHECK:STDOUT: %.loc9_30: %struct_type.a.b.1 = converted %.loc9_29.1, %struct [template = constants.%struct.1]
|
|
// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%struct.1) [template = constants.%C.2]
|
|
// CHECK:STDOUT: %c_bad.var: ref %C.2 = var c_bad
|
|
// CHECK:STDOUT: %c_bad: ref %C.2 = bind_name c_bad, %c_bad.var
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic interface @ImplicitAs(constants.%Dest: type) {
|
|
// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
|
|
// CHECK:STDOUT: %Dest.patt: type = symbolic_binding_pattern Dest, 0 [symbolic = %Dest.patt (constants.%Dest.patt)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)]
|
|
// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.1)]
|
|
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)]
|
|
// CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)]
|
|
// CHECK:STDOUT: %Convert.assoc_type: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %Convert.assoc_type (constants.%Convert.assoc_type.1)]
|
|
// CHECK:STDOUT: %assoc0: @ImplicitAs.%Convert.assoc_type (%Convert.assoc_type.1) = assoc_entity element0, imports.%import_ref.11 [symbolic = %assoc0 (constants.%assoc0.1)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: interface {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: .Self = imports.%import_ref.5
|
|
// CHECK:STDOUT: .Convert = imports.%import_ref.6
|
|
// CHECK:STDOUT: witness = (imports.%import_ref.7)
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic interface @As(constants.%Dest: type) {
|
|
// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
|
|
// CHECK:STDOUT: %Dest.patt: type = symbolic_binding_pattern Dest, 0 [symbolic = %Dest.patt (constants.%Dest.patt)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%Dest)> [symbolic = %As.type (constants.%As.type.2)]
|
|
// CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)]
|
|
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.6, @As(%Dest) [symbolic = %Convert.type (constants.%Convert.type.7)]
|
|
// CHECK:STDOUT: %Convert: @As.%Convert.type (%Convert.type.7) = struct_value () [symbolic = %Convert (constants.%Convert.7)]
|
|
// CHECK:STDOUT: %Convert.assoc_type: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.7) [symbolic = %Convert.assoc_type (constants.%Convert.assoc_type.3)]
|
|
// CHECK:STDOUT: %assoc0: @As.%Convert.assoc_type (%Convert.assoc_type.3) = assoc_entity element0, imports.%import_ref.28 [symbolic = %assoc0 (constants.%assoc0.3)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: interface {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: .Self = imports.%import_ref.22
|
|
// CHECK:STDOUT: .Convert = imports.%import_ref.23
|
|
// CHECK:STDOUT: witness = (imports.%import_ref.24)
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic impl @impl.1(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
|
|
// CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
|
|
// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%iN)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.3)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.2, @impl.1(%N) [symbolic = %Convert.type (constants.%Convert.type.2)]
|
|
// CHECK:STDOUT: %Convert: @impl.1.%Convert.type (%Convert.type.2) = struct_value () [symbolic = %Convert (constants.%Convert.2)]
|
|
// CHECK:STDOUT: %interface: <witness> = interface_witness (%Convert) [symbolic = %interface (constants.%interface.1)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: impl: imports.%import_ref.8 as imports.%import_ref.9 {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: witness = imports.%import_ref.10
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic impl @impl.2(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
|
|
// CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
|
|
// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%uN)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.4)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.3, @impl.2(%N) [symbolic = %Convert.type (constants.%Convert.type.3)]
|
|
// CHECK:STDOUT: %Convert: @impl.2.%Convert.type (%Convert.type.3) = struct_value () [symbolic = %Convert (constants.%Convert.3)]
|
|
// CHECK:STDOUT: %interface: <witness> = interface_witness (%Convert) [symbolic = %interface (constants.%interface.2)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: impl: imports.%import_ref.12 as imports.%import_ref.13 {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: witness = imports.%import_ref.14
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic impl @impl.3(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
|
|
// CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.4, @impl.3(%N) [symbolic = %Convert.type (constants.%Convert.type.4)]
|
|
// CHECK:STDOUT: %Convert: @impl.3.%Convert.type (%Convert.type.4) = struct_value () [symbolic = %Convert (constants.%Convert.4)]
|
|
// CHECK:STDOUT: %interface: <witness> = interface_witness (%Convert) [symbolic = %interface (constants.%interface.3)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: impl: imports.%import_ref.15 as imports.%import_ref.16 {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: witness = imports.%import_ref.17
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic impl @impl.4(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
|
|
// CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.5, @impl.4(%N) [symbolic = %Convert.type (constants.%Convert.type.6)]
|
|
// CHECK:STDOUT: %Convert: @impl.4.%Convert.type (%Convert.type.6) = struct_value () [symbolic = %Convert (constants.%Convert.6)]
|
|
// CHECK:STDOUT: %interface: <witness> = interface_witness (%Convert) [symbolic = %interface (constants.%interface.4)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: impl: imports.%import_ref.19 as imports.%import_ref.20 {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: witness = imports.%import_ref.21
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic impl @impl.5(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
|
|
// CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
|
|
// CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%iN)> [symbolic = %As.type (constants.%As.type.3)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.7, @impl.5(%N) [symbolic = %Convert.type (constants.%Convert.type.8)]
|
|
// CHECK:STDOUT: %Convert: @impl.5.%Convert.type (%Convert.type.8) = struct_value () [symbolic = %Convert (constants.%Convert.8)]
|
|
// CHECK:STDOUT: %interface: <witness> = interface_witness (%Convert) [symbolic = %interface (constants.%interface.5)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: impl: imports.%import_ref.25 as imports.%import_ref.26 {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: witness = imports.%import_ref.27
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic impl @impl.6(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
|
|
// CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
|
|
// CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%uN)> [symbolic = %As.type (constants.%As.type.4)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.8, @impl.6(%N) [symbolic = %Convert.type (constants.%Convert.type.9)]
|
|
// CHECK:STDOUT: %Convert: @impl.6.%Convert.type (%Convert.type.9) = struct_value () [symbolic = %Convert (constants.%Convert.9)]
|
|
// CHECK:STDOUT: %interface: <witness> = interface_witness (%Convert) [symbolic = %interface (constants.%interface.6)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: impl: imports.%import_ref.29 as imports.%import_ref.30 {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: witness = imports.%import_ref.31
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic impl @impl.7(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
|
|
// CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.9, @impl.7(%N) [symbolic = %Convert.type (constants.%Convert.type.10)]
|
|
// CHECK:STDOUT: %Convert: @impl.7.%Convert.type (%Convert.type.10) = struct_value () [symbolic = %Convert (constants.%Convert.10)]
|
|
// CHECK:STDOUT: %interface: <witness> = interface_witness (%Convert) [symbolic = %interface (constants.%interface.7)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: impl: imports.%import_ref.32 as imports.%import_ref.33 {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: witness = imports.%import_ref.34
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic impl @impl.8(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
|
|
// CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.10, @impl.8(%N) [symbolic = %Convert.type (constants.%Convert.type.12)]
|
|
// CHECK:STDOUT: %Convert: @impl.8.%Convert.type (%Convert.type.12) = struct_value () [symbolic = %Convert (constants.%Convert.12)]
|
|
// CHECK:STDOUT: %interface: <witness> = interface_witness (%Convert) [symbolic = %interface (constants.%interface.8)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: impl: imports.%import_ref.36 as imports.%import_ref.37 {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: witness = imports.%import_ref.38
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic class @C(constants.%S: %struct_type.a.b.1) {
|
|
// CHECK:STDOUT: %S: %struct_type.a.b.1 = bind_symbolic_name S, 0 [symbolic = %S (constants.%S)]
|
|
// CHECK:STDOUT: %S.patt: %struct_type.a.b.1 = symbolic_binding_pattern S, 0 [symbolic = %S.patt (constants.%S.patt)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: class {
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: .Self = imports.%import_ref.40
|
|
// CHECK:STDOUT: complete_type_witness = imports.%import_ref.39
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @Convert.1(constants.%Dest: type, constants.%Self.1: %ImplicitAs.type.2) {
|
|
// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
|
|
// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)]
|
|
// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.1)]
|
|
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type.1)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%Self.as_type (%Self.as_type.1)]() -> @Convert.1.%Dest (%Dest);
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @Convert.2(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn[%self.param_patt: Core.IntLiteral]() -> @Convert.2.%iN (%iN) = "int.convert_checked";
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @Convert.3(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn[%self.param_patt: Core.IntLiteral]() -> @Convert.3.%uN (%uN) = "int.convert_checked";
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @Convert.4(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn[%self.param_patt: @Convert.4.%iN (%iN)]() -> Core.IntLiteral = "int.convert_checked";
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @Convert.5(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn[%self.param_patt: @Convert.5.%uN (%uN)]() -> Core.IntLiteral = "int.convert_checked";
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @Convert.6(constants.%Dest: type, constants.%Self.2: %As.type.2) {
|
|
// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
|
|
// CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%Dest)> [symbolic = %As.type (constants.%As.type.2)]
|
|
// CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)]
|
|
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type.2)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn[%self.param_patt: @Convert.6.%Self.as_type (%Self.as_type.2)]() -> @Convert.6.%Dest (%Dest);
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @Convert.7(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn[%self.param_patt: Core.IntLiteral]() -> @Convert.7.%iN (%iN) = "int.convert_checked";
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @Convert.8(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn[%self.param_patt: Core.IntLiteral]() -> @Convert.8.%uN (%uN) = "int.convert_checked";
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @Convert.9(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn[%self.param_patt: @Convert.9.%iN (%iN)]() -> Core.IntLiteral = "int.convert_checked";
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @Convert.10(constants.%N: Core.IntLiteral) {
|
|
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
|
|
// CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn[%self.param_patt: @Convert.10.%uN (%uN)]() -> Core.IntLiteral = "int.convert_checked";
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @F() -> %C.3;
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @__global_init() {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %F.ref: %F.type = name_ref F, imports.%import_ref.4 [template = constants.%F]
|
|
// CHECK:STDOUT: %.loc9_36: ref %C.3 = temporary_storage
|
|
// CHECK:STDOUT: %F.call: init %C.3 = call %F.ref() to %.loc9_36
|
|
// CHECK:STDOUT: %.loc9_37: %C.2 = converted %F.call, <error> [template = <error>]
|
|
// CHECK:STDOUT: assign file.%c_bad.var, <error>
|
|
// CHECK:STDOUT: return
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) {
|
|
// CHECK:STDOUT: %Dest => constants.%Dest
|
|
// CHECK:STDOUT: %Dest.patt => constants.%Dest
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @ImplicitAs(constants.%iN) {
|
|
// CHECK:STDOUT: %Dest => constants.%iN
|
|
// CHECK:STDOUT: %Dest.patt => constants.%iN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @ImplicitAs(%Dest) {
|
|
// CHECK:STDOUT: %Dest => constants.%Dest
|
|
// CHECK:STDOUT: %Dest.patt => constants.%Dest
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @ImplicitAs(@impl.1.%iN) {
|
|
// CHECK:STDOUT: %Dest => constants.%iN
|
|
// CHECK:STDOUT: %Dest.patt => constants.%iN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.1(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %iN => constants.%iN
|
|
// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.1(%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %iN => constants.%iN
|
|
// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @ImplicitAs(@Convert.1.%Dest) {
|
|
// CHECK:STDOUT: %Dest => constants.%Dest
|
|
// CHECK:STDOUT: %Dest.patt => constants.%Dest
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Convert.1(constants.%Dest, constants.%Self.1) {
|
|
// CHECK:STDOUT: %Dest => constants.%Dest
|
|
// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2
|
|
// CHECK:STDOUT: %Self => constants.%Self.1
|
|
// CHECK:STDOUT: %Self.as_type => constants.%Self.as_type.1
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Convert.2(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %iN => constants.%iN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @ImplicitAs(constants.%uN) {
|
|
// CHECK:STDOUT: %Dest => constants.%uN
|
|
// CHECK:STDOUT: %Dest.patt => constants.%uN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @ImplicitAs(@impl.2.%uN) {
|
|
// CHECK:STDOUT: %Dest => constants.%uN
|
|
// CHECK:STDOUT: %Dest.patt => constants.%uN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.2(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %uN => constants.%uN
|
|
// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.4
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.2(%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %uN => constants.%uN
|
|
// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.4
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Convert.3(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %uN => constants.%uN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @ImplicitAs(Core.IntLiteral) {
|
|
// CHECK:STDOUT: %Dest => Core.IntLiteral
|
|
// CHECK:STDOUT: %Dest.patt => Core.IntLiteral
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.5
|
|
// CHECK:STDOUT: %Self => constants.%Self.1
|
|
// CHECK:STDOUT: %Convert.type => constants.%Convert.type.5
|
|
// CHECK:STDOUT: %Convert => constants.%Convert.5
|
|
// CHECK:STDOUT: %Convert.assoc_type => constants.%Convert.assoc_type.2
|
|
// CHECK:STDOUT: %assoc0 => constants.%assoc0.2
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.3(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %iN => constants.%iN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.3(%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %iN => constants.%iN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Convert.4(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %iN => constants.%iN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.4(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %uN => constants.%uN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.4(%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %uN => constants.%uN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Convert.5(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %uN => constants.%uN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @As(constants.%Dest) {
|
|
// CHECK:STDOUT: %Dest => constants.%Dest
|
|
// CHECK:STDOUT: %Dest.patt => constants.%Dest
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @As(constants.%iN) {
|
|
// CHECK:STDOUT: %Dest => constants.%iN
|
|
// CHECK:STDOUT: %Dest.patt => constants.%iN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @As(%Dest) {
|
|
// CHECK:STDOUT: %Dest => constants.%Dest
|
|
// CHECK:STDOUT: %Dest.patt => constants.%Dest
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @As(@impl.5.%iN) {
|
|
// CHECK:STDOUT: %Dest => constants.%iN
|
|
// CHECK:STDOUT: %Dest.patt => constants.%iN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.5(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %iN => constants.%iN
|
|
// CHECK:STDOUT: %As.type => constants.%As.type.3
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.5(%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %iN => constants.%iN
|
|
// CHECK:STDOUT: %As.type => constants.%As.type.3
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @As(@Convert.6.%Dest) {
|
|
// CHECK:STDOUT: %Dest => constants.%Dest
|
|
// CHECK:STDOUT: %Dest.patt => constants.%Dest
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Convert.6(constants.%Dest, constants.%Self.2) {
|
|
// CHECK:STDOUT: %Dest => constants.%Dest
|
|
// CHECK:STDOUT: %As.type => constants.%As.type.2
|
|
// CHECK:STDOUT: %Self => constants.%Self.2
|
|
// CHECK:STDOUT: %Self.as_type => constants.%Self.as_type.2
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Convert.7(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %iN => constants.%iN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @As(constants.%uN) {
|
|
// CHECK:STDOUT: %Dest => constants.%uN
|
|
// CHECK:STDOUT: %Dest.patt => constants.%uN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @As(@impl.6.%uN) {
|
|
// CHECK:STDOUT: %Dest => constants.%uN
|
|
// CHECK:STDOUT: %Dest.patt => constants.%uN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.6(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %uN => constants.%uN
|
|
// CHECK:STDOUT: %As.type => constants.%As.type.4
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.6(%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %uN => constants.%uN
|
|
// CHECK:STDOUT: %As.type => constants.%As.type.4
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Convert.8(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %uN => constants.%uN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @As(Core.IntLiteral) {
|
|
// CHECK:STDOUT: %Dest => Core.IntLiteral
|
|
// CHECK:STDOUT: %Dest.patt => Core.IntLiteral
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %As.type => constants.%As.type.5
|
|
// CHECK:STDOUT: %Self => constants.%Self.2
|
|
// CHECK:STDOUT: %Convert.type => constants.%Convert.type.11
|
|
// CHECK:STDOUT: %Convert => constants.%Convert.11
|
|
// CHECK:STDOUT: %Convert.assoc_type => constants.%Convert.assoc_type.4
|
|
// CHECK:STDOUT: %assoc0 => constants.%assoc0.4
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.7(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %iN => constants.%iN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.7(%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %iN => constants.%iN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Convert.9(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %iN => constants.%iN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.8(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %uN => constants.%uN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.8(%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %N.patt => constants.%N
|
|
// CHECK:STDOUT: %uN => constants.%uN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Convert.10(constants.%N) {
|
|
// CHECK:STDOUT: %N => constants.%N
|
|
// CHECK:STDOUT: %uN => constants.%uN
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @C(constants.%S) {
|
|
// CHECK:STDOUT: %S => constants.%S
|
|
// CHECK:STDOUT: %S.patt => constants.%S
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @ImplicitAs(constants.%i32) {
|
|
// CHECK:STDOUT: %Dest => constants.%i32
|
|
// CHECK:STDOUT: %Dest.patt => constants.%i32
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.6
|
|
// CHECK:STDOUT: %Self => constants.%Self.1
|
|
// CHECK:STDOUT: %Convert.type => constants.%Convert.type.13
|
|
// CHECK:STDOUT: %Convert => constants.%Convert.13
|
|
// CHECK:STDOUT: %Convert.assoc_type => constants.%Convert.assoc_type.5
|
|
// CHECK:STDOUT: %assoc0 => constants.%assoc0.5
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @impl.1(constants.%int_32) {
|
|
// CHECK:STDOUT: %N => constants.%int_32
|
|
// CHECK:STDOUT: %N.patt => constants.%int_32
|
|
// CHECK:STDOUT: %iN => constants.%i32
|
|
// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.6
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %Convert.type => constants.%Convert.type.14
|
|
// CHECK:STDOUT: %Convert => constants.%Convert.14
|
|
// CHECK:STDOUT: %interface => constants.%interface.9
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Convert.2(constants.%int_32) {
|
|
// CHECK:STDOUT: %N => constants.%int_32
|
|
// CHECK:STDOUT: %iN => constants.%i32
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @C(constants.%struct.1) {
|
|
// CHECK:STDOUT: %S => constants.%struct.1
|
|
// CHECK:STDOUT: %S.patt => constants.%struct.1
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @C(constants.%struct.2) {
|
|
// CHECK:STDOUT: %S => constants.%struct.2
|
|
// CHECK:STDOUT: %S.patt => constants.%struct.2
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @ImplicitAs(constants.%C.2) {
|
|
// CHECK:STDOUT: %Dest => constants.%C.2
|
|
// CHECK:STDOUT: %Dest.patt => constants.%C.2
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.7
|
|
// CHECK:STDOUT: %Self => constants.%Self.1
|
|
// CHECK:STDOUT: %Convert.type => constants.%Convert.type.15
|
|
// CHECK:STDOUT: %Convert => constants.%Convert.15
|
|
// CHECK:STDOUT: %Convert.assoc_type => constants.%Convert.assoc_type.6
|
|
// CHECK:STDOUT: %assoc0 => constants.%assoc0.7
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|