|
|
@@ -19,8 +19,10 @@ import Cpp;
|
|
|
|
|
|
fn F() {
|
|
|
//@dump-sem-ir-begin
|
|
|
- let cpp_long : Cpp.long = 1 as i64;
|
|
|
+ let cpp_long: Cpp.long = 1;
|
|
|
let carbon_long: i64 = cpp_long;
|
|
|
+
|
|
|
+ var a: array(f32, 1 as Cpp.long) = (1.0,);
|
|
|
//@dump-sem-ir-end
|
|
|
}
|
|
|
|
|
|
@@ -32,8 +34,10 @@ import Cpp;
|
|
|
|
|
|
fn F() {
|
|
|
//@dump-sem-ir-begin
|
|
|
- let cpp_unsigned_long : Cpp.unsigned_long = 1 as u64;
|
|
|
+ let cpp_unsigned_long: Cpp.unsigned_long = 1;
|
|
|
let carbon_unsigned_long: u64 = cpp_unsigned_long;
|
|
|
+
|
|
|
+ var a: array(f32, 1 as Cpp.unsigned_long) = (1.0,);
|
|
|
//@dump-sem-ir-end
|
|
|
}
|
|
|
|
|
|
@@ -52,7 +56,7 @@ auto PassLongLong(long x) -> LongResult;
|
|
|
|
|
|
fn F() {
|
|
|
//@dump-sem-ir-begin
|
|
|
- let cpp_long_long: Cpp.long_long = 1 as i64;
|
|
|
+ let cpp_long_long: Cpp.long_long = 1;
|
|
|
let cpp_long_long_result: Cpp.LongLongResult = Cpp.PassLongLong(cpp_long_long);
|
|
|
|
|
|
let cpp_compat_long_long: Core.CppCompat.LongLong64 = cpp_long_long;
|
|
|
@@ -60,6 +64,8 @@ fn F() {
|
|
|
|
|
|
let carbon_i64: i64 = cpp_long_long;
|
|
|
let carbon_i64_result: Cpp.LongResult = Cpp.PassLongLong(carbon_i64);
|
|
|
+
|
|
|
+ var a: array(f32, 1 as Cpp.long_long) = (1.0,);
|
|
|
//@dump-sem-ir-end
|
|
|
}
|
|
|
|
|
|
@@ -78,7 +84,7 @@ auto PassULongLong(unsigned long x) -> ULongResult;
|
|
|
|
|
|
fn F() {
|
|
|
//@dump-sem-ir-begin
|
|
|
- let cpp_unsigned_long_long: Cpp.unsigned_long_long = 1 as u64;
|
|
|
+ let cpp_unsigned_long_long: Cpp.unsigned_long_long = 1;
|
|
|
let cpp_unsigned_long_long_result: Cpp.ULongLongResult = Cpp.PassULongLong(cpp_unsigned_long_long);
|
|
|
|
|
|
let cpp_compat_ulong_long: Core.CppCompat.ULongLong64 = cpp_unsigned_long_long;
|
|
|
@@ -86,19 +92,43 @@ fn F() {
|
|
|
|
|
|
let carbon_u64: u64 = cpp_unsigned_long_long;
|
|
|
let carbon_u64_result: Cpp.ULongResult = Cpp.PassULongLong(carbon_u64);
|
|
|
+
|
|
|
+ var a: array(f32, 1 as Cpp.unsigned_long_long) = (1.0,);
|
|
|
//@dump-sem-ir-end
|
|
|
}
|
|
|
|
|
|
// CHECK:STDOUT: --- long.carbon
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: constants {
|
|
|
+// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
|
|
// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [concrete]
|
|
|
+// CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic]
|
|
|
// CHECK:STDOUT: %i64: type = class_type @Int, @Int(%int_64) [concrete]
|
|
|
// CHECK:STDOUT: %pattern_type.95b: type = pattern_type %i64 [concrete]
|
|
|
// CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete]
|
|
|
+// CHECK:STDOUT: %ImplicitAs.type.e50: type = facet_type <@ImplicitAs, @ImplicitAs(%i64)> [concrete]
|
|
|
+// CHECK:STDOUT: %ImplicitAs.Convert.type.94e: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i64) [concrete]
|
|
|
+// CHECK:STDOUT: %To.586: Core.IntLiteral = symbolic_binding To, 0 [symbolic]
|
|
|
+// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.f51: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To.586) [symbolic]
|
|
|
+// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.2a1: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.f51 = struct_value () [symbolic]
|
|
|
+// CHECK:STDOUT: %ImplicitAs.type.7a9: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete]
|
|
|
+// CHECK:STDOUT: %ImplicitAs.Convert.type.71e: type = fn_type @ImplicitAs.Convert, @ImplicitAs(Core.IntLiteral) [concrete]
|
|
|
+// CHECK:STDOUT: %From: Core.IntLiteral = symbolic_binding From, 0 [symbolic]
|
|
|
+// CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.type.2c2: type = fn_type @Int.as.ImplicitAs.impl.Convert, @Int.as.ImplicitAs.impl(%From) [symbolic]
|
|
|
+// CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.cdf: %Int.as.ImplicitAs.impl.Convert.type.2c2 = struct_value () [symbolic]
|
|
|
+// CHECK:STDOUT: %ImplicitAs.impl_witness.924: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.132, @Core.IntLiteral.as.ImplicitAs.impl(%int_64) [concrete]
|
|
|
+// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.a53: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%int_64) [concrete]
|
|
|
+// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.b80: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.a53 = struct_value () [concrete]
|
|
|
+// CHECK:STDOUT: %ImplicitAs.facet.66e: %ImplicitAs.type.e50 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.924) [concrete]
|
|
|
+// CHECK:STDOUT: %.3b0: type = fn_type_with_self_type %ImplicitAs.Convert.type.94e, %ImplicitAs.facet.66e [concrete]
|
|
|
+// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.b80 [concrete]
|
|
|
+// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: <specific function> = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.b80, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_64) [concrete]
|
|
|
+// CHECK:STDOUT: %bound_method.c00: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
|
|
|
+// CHECK:STDOUT: %int_1.41a: %i64 = int_value 1 [concrete]
|
|
|
+// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
|
|
|
+// CHECK:STDOUT: %f32.97e: type = class_type @Float, @Float(%int_32) [concrete]
|
|
|
// CHECK:STDOUT: %As.type.bbb: type = facet_type <@As, @As(%i64)> [concrete]
|
|
|
// CHECK:STDOUT: %As.Convert.type.d57: type = fn_type @As.Convert, @As(%i64) [concrete]
|
|
|
-// CHECK:STDOUT: %To.586: Core.IntLiteral = symbolic_binding To, 0 [symbolic]
|
|
|
// CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.0fd: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%To.586) [symbolic]
|
|
|
// CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.2b1: %Core.IntLiteral.as.As.impl.Convert.type.0fd = struct_value () [symbolic]
|
|
|
// CHECK:STDOUT: %As.impl_witness.c40: <witness> = impl_witness imports.%As.impl_witness_table.251, @Core.IntLiteral.as.As.impl(%int_64) [concrete]
|
|
|
@@ -108,8 +138,39 @@ fn F() {
|
|
|
// CHECK:STDOUT: %.277: type = fn_type_with_self_type %As.Convert.type.d57, %As.facet [concrete]
|
|
|
// CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.108 [concrete]
|
|
|
// CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.specific_fn: <specific function> = specific_function %Core.IntLiteral.as.As.impl.Convert.108, @Core.IntLiteral.as.As.impl.Convert(%int_64) [concrete]
|
|
|
-// CHECK:STDOUT: %bound_method: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.specific_fn [concrete]
|
|
|
-// CHECK:STDOUT: %int_1.41a: %i64 = int_value 1 [concrete]
|
|
|
+// CHECK:STDOUT: %bound_method.c84: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.specific_fn [concrete]
|
|
|
+// CHECK:STDOUT: %ImplicitAs.impl_witness.ef2: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.783, @Int.as.ImplicitAs.impl(%int_64) [concrete]
|
|
|
+// CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.type.96f: type = fn_type @Int.as.ImplicitAs.impl.Convert, @Int.as.ImplicitAs.impl(%int_64) [concrete]
|
|
|
+// CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.698: %Int.as.ImplicitAs.impl.Convert.type.96f = struct_value () [concrete]
|
|
|
+// CHECK:STDOUT: %ImplicitAs.facet.495: %ImplicitAs.type.7a9 = facet_value %i64, (%ImplicitAs.impl_witness.ef2) [concrete]
|
|
|
+// CHECK:STDOUT: %.9d8: type = fn_type_with_self_type %ImplicitAs.Convert.type.71e, %ImplicitAs.facet.495 [concrete]
|
|
|
+// CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %int_1.41a, %Int.as.ImplicitAs.impl.Convert.698 [concrete]
|
|
|
+// CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.specific_fn: <specific function> = specific_function %Int.as.ImplicitAs.impl.Convert.698, @Int.as.ImplicitAs.impl.Convert(%int_64) [concrete]
|
|
|
+// CHECK:STDOUT: %bound_method.c56: <bound method> = bound_method %int_1.41a, %Int.as.ImplicitAs.impl.Convert.specific_fn [concrete]
|
|
|
+// CHECK:STDOUT: %array_type: type = array_type %int_1.5b8, %f32.97e [concrete]
|
|
|
+// CHECK:STDOUT: %pattern_type.b36: type = pattern_type %array_type [concrete]
|
|
|
+// CHECK:STDOUT: %float.674: Core.FloatLiteral = float_literal_value 10e-1 [concrete]
|
|
|
+// CHECK:STDOUT: %tuple.type: type = tuple_type (Core.FloatLiteral) [concrete]
|
|
|
+// CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%float.674) [concrete]
|
|
|
+// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete]
|
|
|
+// CHECK:STDOUT: %ImplicitAs.type.921: type = facet_type <@ImplicitAs, @ImplicitAs(%f32.97e)> [concrete]
|
|
|
+// CHECK:STDOUT: %ImplicitAs.Convert.type.b8c: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%f32.97e) [concrete]
|
|
|
+// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.528: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%N) [symbolic]
|
|
|
+// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.98e: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.528 = struct_value () [symbolic]
|
|
|
+// CHECK:STDOUT: %ImplicitAs.impl_witness.e0e: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.f5c, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete]
|
|
|
+// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.2ba: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete]
|
|
|
+// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.947: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.2ba = struct_value () [concrete]
|
|
|
+// CHECK:STDOUT: %ImplicitAs.facet.92e: %ImplicitAs.type.921 = facet_value Core.FloatLiteral, (%ImplicitAs.impl_witness.e0e) [concrete]
|
|
|
+// CHECK:STDOUT: %.393: type = fn_type_with_self_type %ImplicitAs.Convert.type.b8c, %ImplicitAs.facet.92e [concrete]
|
|
|
+// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %float.674, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.947 [concrete]
|
|
|
+// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn: <specific function> = specific_function %Core.FloatLiteral.as.ImplicitAs.impl.Convert.947, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete]
|
|
|
+// CHECK:STDOUT: %bound_method.d8a: <bound method> = bound_method %float.674, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
|
|
|
+// CHECK:STDOUT: %float.e3b: %f32.97e = float_value 1 [concrete]
|
|
|
+// CHECK:STDOUT: %array: %array_type = tuple_value (%float.e3b) [concrete]
|
|
|
+// CHECK:STDOUT: %type_where: type = facet_type <type where .Self impls <CanDestroy>> [concrete]
|
|
|
+// CHECK:STDOUT: %facet_value: %type_where = facet_value %array_type, () [concrete]
|
|
|
+// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.1a5: type = fn_type @DestroyT.binding.as_type.as.Destroy.impl.Op, @DestroyT.binding.as_type.as.Destroy.impl(%facet_value) [concrete]
|
|
|
+// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.39c: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.1a5 = struct_value () [concrete]
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: imports {
|
|
|
@@ -117,8 +178,14 @@ fn F() {
|
|
|
// CHECK:STDOUT: .long = @F.%i64.1
|
|
|
// CHECK:STDOUT: import Cpp//...
|
|
|
// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT: %Core.import_ref.e24: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.f51) = import_ref Core//prelude/types/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.2a1)]
|
|
|
+// CHECK:STDOUT: %ImplicitAs.impl_witness_table.132 = impl_witness_table (%Core.import_ref.e24), @Core.IntLiteral.as.ImplicitAs.impl [concrete]
|
|
|
+// CHECK:STDOUT: %Core.import_ref.a86: @Int.as.ImplicitAs.impl.%Int.as.ImplicitAs.impl.Convert.type (%Int.as.ImplicitAs.impl.Convert.type.2c2) = import_ref Core//prelude/types/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.ImplicitAs.impl.%Int.as.ImplicitAs.impl.Convert (constants.%Int.as.ImplicitAs.impl.Convert.cdf)]
|
|
|
+// CHECK:STDOUT: %ImplicitAs.impl_witness_table.783 = impl_witness_table (%Core.import_ref.a86), @Int.as.ImplicitAs.impl [concrete]
|
|
|
// CHECK:STDOUT: %Core.import_ref.05d: @Core.IntLiteral.as.As.impl.%Core.IntLiteral.as.As.impl.Convert.type (%Core.IntLiteral.as.As.impl.Convert.type.0fd) = import_ref Core//prelude/types/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.As.impl.%Core.IntLiteral.as.As.impl.Convert (constants.%Core.IntLiteral.as.As.impl.Convert.2b1)]
|
|
|
// CHECK:STDOUT: %As.impl_witness_table.251 = impl_witness_table (%Core.import_ref.05d), @Core.IntLiteral.as.As.impl [concrete]
|
|
|
+// CHECK:STDOUT: %Core.import_ref.f5b: @Core.FloatLiteral.as.ImplicitAs.impl.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.type (%Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.528) = import_ref Core//prelude/types/float, loc{{\d+_\d+}}, loaded [symbolic = @Core.FloatLiteral.as.ImplicitAs.impl.%Core.FloatLiteral.as.ImplicitAs.impl.Convert (constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.98e)]
|
|
|
+// CHECK:STDOUT: %ImplicitAs.impl_witness_table.f5c = impl_witness_table (%Core.import_ref.f5b), @Core.FloatLiteral.as.ImplicitAs.impl [concrete]
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: fn @F() {
|
|
|
@@ -126,22 +193,20 @@ fn F() {
|
|
|
// CHECK:STDOUT: name_binding_decl {
|
|
|
// CHECK:STDOUT: %cpp_long.patt: %pattern_type.95b = value_binding_pattern cpp_long [concrete]
|
|
|
// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
|
|
|
-// CHECK:STDOUT: %int_64.loc8: Core.IntLiteral = int_value 64 [concrete = constants.%int_64]
|
|
|
-// CHECK:STDOUT: %i64.loc8: type = class_type @Int, @Int(constants.%int_64) [concrete = constants.%i64]
|
|
|
-// CHECK:STDOUT: %impl.elem0: %.277 = impl_witness_access constants.%As.impl_witness.c40, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.108]
|
|
|
-// CHECK:STDOUT: %bound_method.loc8_31.1: <bound method> = bound_method %int_1, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound]
|
|
|
-// CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @Core.IntLiteral.as.As.impl.Convert(constants.%int_64) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn]
|
|
|
-// CHECK:STDOUT: %bound_method.loc8_31.2: <bound method> = bound_method %int_1, %specific_fn [concrete = constants.%bound_method]
|
|
|
-// CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.call: init %i64 = call %bound_method.loc8_31.2(%int_1) [concrete = constants.%int_1.41a]
|
|
|
-// CHECK:STDOUT: %.loc8_31.1: %i64 = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call [concrete = constants.%int_1.41a]
|
|
|
-// CHECK:STDOUT: %.loc8_31.2: %i64 = converted %int_1, %.loc8_31.1 [concrete = constants.%int_1.41a]
|
|
|
-// CHECK:STDOUT: %.loc8_21: type = splice_block %long.ref [concrete = constants.%i64] {
|
|
|
-// CHECK:STDOUT: %Cpp.ref: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
|
|
+// CHECK:STDOUT: %int_1.loc8: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
|
|
|
+// CHECK:STDOUT: %.loc8_20: type = splice_block %long.ref.loc8 [concrete = constants.%i64] {
|
|
|
+// CHECK:STDOUT: %Cpp.ref.loc8: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
|
|
// CHECK:STDOUT: <elided>
|
|
|
-// CHECK:STDOUT: %long.ref: type = name_ref long, %i64.1 [concrete = constants.%i64]
|
|
|
+// CHECK:STDOUT: %long.ref.loc8: type = name_ref long, %i64.1 [concrete = constants.%i64]
|
|
|
// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %cpp_long: %i64 = value_binding cpp_long, %.loc8_31.2
|
|
|
+// CHECK:STDOUT: %impl.elem0.loc8: %.3b0 = impl_witness_access constants.%ImplicitAs.impl_witness.924, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.b80]
|
|
|
+// CHECK:STDOUT: %bound_method.loc8_28.1: <bound method> = bound_method %int_1.loc8, %impl.elem0.loc8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
|
|
|
+// CHECK:STDOUT: %specific_fn.loc8: <specific function> = specific_function %impl.elem0.loc8, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_64) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
|
|
+// CHECK:STDOUT: %bound_method.loc8_28.2: <bound method> = bound_method %int_1.loc8, %specific_fn.loc8 [concrete = constants.%bound_method.c00]
|
|
|
+// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i64 = call %bound_method.loc8_28.2(%int_1.loc8) [concrete = constants.%int_1.41a]
|
|
|
+// CHECK:STDOUT: %.loc8_28.1: %i64 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.41a]
|
|
|
+// CHECK:STDOUT: %.loc8_28.2: %i64 = converted %int_1.loc8, %.loc8_28.1 [concrete = constants.%int_1.41a]
|
|
|
+// CHECK:STDOUT: %cpp_long: %i64 = value_binding cpp_long, %.loc8_28.2
|
|
|
// CHECK:STDOUT: name_binding_decl {
|
|
|
// CHECK:STDOUT: %carbon_long.patt: %pattern_type.95b = value_binding_pattern carbon_long [concrete]
|
|
|
// CHECK:STDOUT: }
|
|
|
@@ -151,19 +216,87 @@ fn F() {
|
|
|
// CHECK:STDOUT: %i64.loc9: type = class_type @Int, @Int(constants.%int_64) [concrete = constants.%i64]
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT: %carbon_long: %i64 = value_binding carbon_long, %cpp_long.ref
|
|
|
+// CHECK:STDOUT: name_binding_decl {
|
|
|
+// CHECK:STDOUT: %a.patt: %pattern_type.b36 = ref_binding_pattern a [concrete]
|
|
|
+// CHECK:STDOUT: %a.var_patt: %pattern_type.b36 = var_pattern %a.patt [concrete]
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT: %a.var: ref %array_type = var %a.var_patt
|
|
|
+// CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float.674]
|
|
|
+// CHECK:STDOUT: %.loc11_43.1: %tuple.type = tuple_literal (%float) [concrete = constants.%tuple]
|
|
|
+// CHECK:STDOUT: %impl.elem0.loc11_43: %.393 = impl_witness_access constants.%ImplicitAs.impl_witness.e0e, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.947]
|
|
|
+// CHECK:STDOUT: %bound_method.loc11_43.1: <bound method> = bound_method %float, %impl.elem0.loc11_43 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound]
|
|
|
+// CHECK:STDOUT: %specific_fn.loc11_43: <specific function> = specific_function %impl.elem0.loc11_43, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
|
|
+// CHECK:STDOUT: %bound_method.loc11_43.2: <bound method> = bound_method %float, %specific_fn.loc11_43 [concrete = constants.%bound_method.d8a]
|
|
|
+// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call: init %f32.97e = call %bound_method.loc11_43.2(%float) [concrete = constants.%float.e3b]
|
|
|
+// CHECK:STDOUT: %.loc11_43.2: init %f32.97e = converted %float, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%float.e3b]
|
|
|
+// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0]
|
|
|
+// CHECK:STDOUT: %.loc11_43.3: ref %f32.97e = array_index %a.var, %int_0
|
|
|
+// CHECK:STDOUT: %.loc11_43.4: init %f32.97e = initialize_from %.loc11_43.2 to %.loc11_43.3 [concrete = constants.%float.e3b]
|
|
|
+// CHECK:STDOUT: %.loc11_43.5: init %array_type = array_init (%.loc11_43.4) to %a.var [concrete = constants.%array]
|
|
|
+// CHECK:STDOUT: %.loc11_3: init %array_type = converted %.loc11_43.1, %.loc11_43.5 [concrete = constants.%array]
|
|
|
+// CHECK:STDOUT: assign %a.var, %.loc11_3
|
|
|
+// CHECK:STDOUT: %.loc11_34: type = splice_block %array_type [concrete = constants.%array_type] {
|
|
|
+// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
|
|
|
+// CHECK:STDOUT: %f32: type = class_type @Float, @Float(constants.%int_32) [concrete = constants.%f32.97e]
|
|
|
+// CHECK:STDOUT: %int_1.loc11: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
|
|
|
+// CHECK:STDOUT: %Cpp.ref.loc11: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
|
|
+// CHECK:STDOUT: %long.ref.loc11: type = name_ref long, %i64.1 [concrete = constants.%i64]
|
|
|
+// CHECK:STDOUT: %impl.elem0.loc11_23.1: %.277 = impl_witness_access constants.%As.impl_witness.c40, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.108]
|
|
|
+// CHECK:STDOUT: %bound_method.loc11_23.1: <bound method> = bound_method %int_1.loc11, %impl.elem0.loc11_23.1 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound]
|
|
|
+// CHECK:STDOUT: %specific_fn.loc11_23.1: <specific function> = specific_function %impl.elem0.loc11_23.1, @Core.IntLiteral.as.As.impl.Convert(constants.%int_64) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn]
|
|
|
+// CHECK:STDOUT: %bound_method.loc11_23.2: <bound method> = bound_method %int_1.loc11, %specific_fn.loc11_23.1 [concrete = constants.%bound_method.c84]
|
|
|
+// CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.call: init %i64 = call %bound_method.loc11_23.2(%int_1.loc11) [concrete = constants.%int_1.41a]
|
|
|
+// CHECK:STDOUT: %.loc11_23.1: %i64 = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call [concrete = constants.%int_1.41a]
|
|
|
+// CHECK:STDOUT: %.loc11_23.2: %i64 = converted %int_1.loc11, %.loc11_23.1 [concrete = constants.%int_1.41a]
|
|
|
+// CHECK:STDOUT: %impl.elem0.loc11_23.2: %.9d8 = impl_witness_access constants.%ImplicitAs.impl_witness.ef2, element0 [concrete = constants.%Int.as.ImplicitAs.impl.Convert.698]
|
|
|
+// CHECK:STDOUT: %bound_method.loc11_23.3: <bound method> = bound_method %.loc11_23.2, %impl.elem0.loc11_23.2 [concrete = constants.%Int.as.ImplicitAs.impl.Convert.bound]
|
|
|
+// CHECK:STDOUT: %specific_fn.loc11_23.2: <specific function> = specific_function %impl.elem0.loc11_23.2, @Int.as.ImplicitAs.impl.Convert(constants.%int_64) [concrete = constants.%Int.as.ImplicitAs.impl.Convert.specific_fn]
|
|
|
+// CHECK:STDOUT: %bound_method.loc11_23.4: <bound method> = bound_method %.loc11_23.2, %specific_fn.loc11_23.2 [concrete = constants.%bound_method.c56]
|
|
|
+// CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.call: init Core.IntLiteral = call %bound_method.loc11_23.4(%.loc11_23.2) [concrete = constants.%int_1.5b8]
|
|
|
+// CHECK:STDOUT: %.loc11_23.3: Core.IntLiteral = value_of_initializer %Int.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.5b8]
|
|
|
+// CHECK:STDOUT: %.loc11_23.4: Core.IntLiteral = converted %.loc11_23.2, %.loc11_23.3 [concrete = constants.%int_1.5b8]
|
|
|
+// CHECK:STDOUT: %array_type: type = array_type %.loc11_23.4, %f32 [concrete = constants.%array_type]
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT: %a: ref %array_type = ref_binding a, %a.var
|
|
|
+// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.bound: <bound method> = bound_method %a.var, constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.39c
|
|
|
+// CHECK:STDOUT: <elided>
|
|
|
+// CHECK:STDOUT: %bound_method.loc11_3: <bound method> = bound_method %a.var, %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn
|
|
|
+// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc11_3(%a.var)
|
|
|
// CHECK:STDOUT: <elided>
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: --- unsigned_long.carbon
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: constants {
|
|
|
+// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
|
|
// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [concrete]
|
|
|
+// CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic]
|
|
|
// CHECK:STDOUT: %u64: type = class_type @UInt, @UInt(%int_64) [concrete]
|
|
|
// CHECK:STDOUT: %pattern_type.157: type = pattern_type %u64 [concrete]
|
|
|
// CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete]
|
|
|
+// CHECK:STDOUT: %ImplicitAs.type.b8f: type = facet_type <@ImplicitAs, @ImplicitAs(%u64)> [concrete]
|
|
|
+// CHECK:STDOUT: %ImplicitAs.Convert.type.c65: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%u64) [concrete]
|
|
|
+// CHECK:STDOUT: %To.586: Core.IntLiteral = symbolic_binding To, 0 [symbolic]
|
|
|
+// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.98f: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To.586) [symbolic]
|
|
|
+// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.cde: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.98f = struct_value () [symbolic]
|
|
|
+// CHECK:STDOUT: %ImplicitAs.type.7a9: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete]
|
|
|
+// CHECK:STDOUT: %ImplicitAs.Convert.type.71e: type = fn_type @ImplicitAs.Convert, @ImplicitAs(Core.IntLiteral) [concrete]
|
|
|
+// CHECK:STDOUT: %From: Core.IntLiteral = symbolic_binding From, 0 [symbolic]
|
|
|
+// CHECK:STDOUT: %UInt.as.ImplicitAs.impl.Convert.type.df7: type = fn_type @UInt.as.ImplicitAs.impl.Convert, @UInt.as.ImplicitAs.impl(%From) [symbolic]
|
|
|
+// CHECK:STDOUT: %UInt.as.ImplicitAs.impl.Convert.b0f: %UInt.as.ImplicitAs.impl.Convert.type.df7 = struct_value () [symbolic]
|
|
|
+// CHECK:STDOUT: %ImplicitAs.impl_witness.bdc: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.257, @Core.IntLiteral.as.ImplicitAs.impl(%int_64) [concrete]
|
|
|
+// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.fba: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%int_64) [concrete]
|
|
|
+// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.e28: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.fba = struct_value () [concrete]
|
|
|
+// CHECK:STDOUT: %ImplicitAs.facet.014: %ImplicitAs.type.b8f = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.bdc) [concrete]
|
|
|
+// CHECK:STDOUT: %.ece: type = fn_type_with_self_type %ImplicitAs.Convert.type.c65, %ImplicitAs.facet.014 [concrete]
|
|
|
+// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.e28 [concrete]
|
|
|
+// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: <specific function> = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.e28, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_64) [concrete]
|
|
|
+// CHECK:STDOUT: %bound_method.d5e: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
|
|
|
+// CHECK:STDOUT: %int_1.f23: %u64 = int_value 1 [concrete]
|
|
|
+// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
|
|
|
+// CHECK:STDOUT: %f32.97e: type = class_type @Float, @Float(%int_32) [concrete]
|
|
|
// CHECK:STDOUT: %As.type.465: type = facet_type <@As, @As(%u64)> [concrete]
|
|
|
// CHECK:STDOUT: %As.Convert.type.7eb: type = fn_type @As.Convert, @As(%u64) [concrete]
|
|
|
-// CHECK:STDOUT: %To.586: Core.IntLiteral = symbolic_binding To, 0 [symbolic]
|
|
|
// CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.56b: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%To.586) [symbolic]
|
|
|
// CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.02d: %Core.IntLiteral.as.As.impl.Convert.type.56b = struct_value () [symbolic]
|
|
|
// CHECK:STDOUT: %As.impl_witness.ed2d: <witness> = impl_witness imports.%As.impl_witness_table.a7d, @Core.IntLiteral.as.As.impl(%int_64) [concrete]
|
|
|
@@ -173,8 +306,39 @@ fn F() {
|
|
|
// CHECK:STDOUT: %.5b8: type = fn_type_with_self_type %As.Convert.type.7eb, %As.facet [concrete]
|
|
|
// CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.a09 [concrete]
|
|
|
// CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.specific_fn: <specific function> = specific_function %Core.IntLiteral.as.As.impl.Convert.a09, @Core.IntLiteral.as.As.impl.Convert(%int_64) [concrete]
|
|
|
-// CHECK:STDOUT: %bound_method: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.specific_fn [concrete]
|
|
|
-// CHECK:STDOUT: %int_1.f23: %u64 = int_value 1 [concrete]
|
|
|
+// CHECK:STDOUT: %bound_method.bb9: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.specific_fn [concrete]
|
|
|
+// CHECK:STDOUT: %ImplicitAs.impl_witness.519: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.1a6, @UInt.as.ImplicitAs.impl(%int_64) [concrete]
|
|
|
+// CHECK:STDOUT: %UInt.as.ImplicitAs.impl.Convert.type.3ed: type = fn_type @UInt.as.ImplicitAs.impl.Convert, @UInt.as.ImplicitAs.impl(%int_64) [concrete]
|
|
|
+// CHECK:STDOUT: %UInt.as.ImplicitAs.impl.Convert.7e7: %UInt.as.ImplicitAs.impl.Convert.type.3ed = struct_value () [concrete]
|
|
|
+// CHECK:STDOUT: %ImplicitAs.facet.531: %ImplicitAs.type.7a9 = facet_value %u64, (%ImplicitAs.impl_witness.519) [concrete]
|
|
|
+// CHECK:STDOUT: %.407: type = fn_type_with_self_type %ImplicitAs.Convert.type.71e, %ImplicitAs.facet.531 [concrete]
|
|
|
+// CHECK:STDOUT: %UInt.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %int_1.f23, %UInt.as.ImplicitAs.impl.Convert.7e7 [concrete]
|
|
|
+// CHECK:STDOUT: %UInt.as.ImplicitAs.impl.Convert.specific_fn: <specific function> = specific_function %UInt.as.ImplicitAs.impl.Convert.7e7, @UInt.as.ImplicitAs.impl.Convert(%int_64) [concrete]
|
|
|
+// CHECK:STDOUT: %bound_method.ba3: <bound method> = bound_method %int_1.f23, %UInt.as.ImplicitAs.impl.Convert.specific_fn [concrete]
|
|
|
+// CHECK:STDOUT: %array_type: type = array_type %int_1.5b8, %f32.97e [concrete]
|
|
|
+// CHECK:STDOUT: %pattern_type.b36: type = pattern_type %array_type [concrete]
|
|
|
+// CHECK:STDOUT: %float.674: Core.FloatLiteral = float_literal_value 10e-1 [concrete]
|
|
|
+// CHECK:STDOUT: %tuple.type: type = tuple_type (Core.FloatLiteral) [concrete]
|
|
|
+// CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%float.674) [concrete]
|
|
|
+// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete]
|
|
|
+// CHECK:STDOUT: %ImplicitAs.type.921: type = facet_type <@ImplicitAs, @ImplicitAs(%f32.97e)> [concrete]
|
|
|
+// CHECK:STDOUT: %ImplicitAs.Convert.type.b8c: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%f32.97e) [concrete]
|
|
|
+// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.528: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%N) [symbolic]
|
|
|
+// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.98e: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.528 = struct_value () [symbolic]
|
|
|
+// CHECK:STDOUT: %ImplicitAs.impl_witness.e0e: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.f5c, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete]
|
|
|
+// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.2ba: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete]
|
|
|
+// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.947: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.2ba = struct_value () [concrete]
|
|
|
+// CHECK:STDOUT: %ImplicitAs.facet.92e: %ImplicitAs.type.921 = facet_value Core.FloatLiteral, (%ImplicitAs.impl_witness.e0e) [concrete]
|
|
|
+// CHECK:STDOUT: %.393: type = fn_type_with_self_type %ImplicitAs.Convert.type.b8c, %ImplicitAs.facet.92e [concrete]
|
|
|
+// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %float.674, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.947 [concrete]
|
|
|
+// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn: <specific function> = specific_function %Core.FloatLiteral.as.ImplicitAs.impl.Convert.947, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete]
|
|
|
+// CHECK:STDOUT: %bound_method.d8a: <bound method> = bound_method %float.674, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
|
|
|
+// CHECK:STDOUT: %float.e3b: %f32.97e = float_value 1 [concrete]
|
|
|
+// CHECK:STDOUT: %array: %array_type = tuple_value (%float.e3b) [concrete]
|
|
|
+// CHECK:STDOUT: %type_where: type = facet_type <type where .Self impls <CanDestroy>> [concrete]
|
|
|
+// CHECK:STDOUT: %facet_value: %type_where = facet_value %array_type, () [concrete]
|
|
|
+// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.1a5: type = fn_type @DestroyT.binding.as_type.as.Destroy.impl.Op, @DestroyT.binding.as_type.as.Destroy.impl(%facet_value) [concrete]
|
|
|
+// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.39c: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.1a5 = struct_value () [concrete]
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: imports {
|
|
|
@@ -182,8 +346,14 @@ fn F() {
|
|
|
// CHECK:STDOUT: .unsigned_long = @F.%u64.1
|
|
|
// CHECK:STDOUT: import Cpp//...
|
|
|
// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT: %Core.import_ref.c72: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.98f) = import_ref Core//prelude/types/uint, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.cde)]
|
|
|
+// CHECK:STDOUT: %ImplicitAs.impl_witness_table.257 = impl_witness_table (%Core.import_ref.c72), @Core.IntLiteral.as.ImplicitAs.impl [concrete]
|
|
|
+// CHECK:STDOUT: %Core.import_ref.7e2: @UInt.as.ImplicitAs.impl.%UInt.as.ImplicitAs.impl.Convert.type (%UInt.as.ImplicitAs.impl.Convert.type.df7) = import_ref Core//prelude/types/uint, loc{{\d+_\d+}}, loaded [symbolic = @UInt.as.ImplicitAs.impl.%UInt.as.ImplicitAs.impl.Convert (constants.%UInt.as.ImplicitAs.impl.Convert.b0f)]
|
|
|
+// CHECK:STDOUT: %ImplicitAs.impl_witness_table.1a6 = impl_witness_table (%Core.import_ref.7e2), @UInt.as.ImplicitAs.impl [concrete]
|
|
|
// CHECK:STDOUT: %Core.import_ref.7bb: @Core.IntLiteral.as.As.impl.%Core.IntLiteral.as.As.impl.Convert.type (%Core.IntLiteral.as.As.impl.Convert.type.56b) = import_ref Core//prelude/types/uint, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.As.impl.%Core.IntLiteral.as.As.impl.Convert (constants.%Core.IntLiteral.as.As.impl.Convert.02d)]
|
|
|
// CHECK:STDOUT: %As.impl_witness_table.a7d = impl_witness_table (%Core.import_ref.7bb), @Core.IntLiteral.as.As.impl [concrete]
|
|
|
+// CHECK:STDOUT: %Core.import_ref.f5b: @Core.FloatLiteral.as.ImplicitAs.impl.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.type (%Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.528) = import_ref Core//prelude/types/float, loc{{\d+_\d+}}, loaded [symbolic = @Core.FloatLiteral.as.ImplicitAs.impl.%Core.FloatLiteral.as.ImplicitAs.impl.Convert (constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.98e)]
|
|
|
+// CHECK:STDOUT: %ImplicitAs.impl_witness_table.f5c = impl_witness_table (%Core.import_ref.f5b), @Core.FloatLiteral.as.ImplicitAs.impl [concrete]
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: fn @F() {
|
|
|
@@ -191,22 +361,20 @@ fn F() {
|
|
|
// CHECK:STDOUT: name_binding_decl {
|
|
|
// CHECK:STDOUT: %cpp_unsigned_long.patt: %pattern_type.157 = value_binding_pattern cpp_unsigned_long [concrete]
|
|
|
// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
|
|
|
-// CHECK:STDOUT: %int_64.loc8: Core.IntLiteral = int_value 64 [concrete = constants.%int_64]
|
|
|
-// CHECK:STDOUT: %u64.loc8: type = class_type @UInt, @UInt(constants.%int_64) [concrete = constants.%u64]
|
|
|
-// CHECK:STDOUT: %impl.elem0: %.5b8 = impl_witness_access constants.%As.impl_witness.ed2d, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.a09]
|
|
|
-// CHECK:STDOUT: %bound_method.loc8_49.1: <bound method> = bound_method %int_1, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound]
|
|
|
-// CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @Core.IntLiteral.as.As.impl.Convert(constants.%int_64) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn]
|
|
|
-// CHECK:STDOUT: %bound_method.loc8_49.2: <bound method> = bound_method %int_1, %specific_fn [concrete = constants.%bound_method]
|
|
|
-// CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.call: init %u64 = call %bound_method.loc8_49.2(%int_1) [concrete = constants.%int_1.f23]
|
|
|
-// CHECK:STDOUT: %.loc8_49.1: %u64 = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call [concrete = constants.%int_1.f23]
|
|
|
-// CHECK:STDOUT: %.loc8_49.2: %u64 = converted %int_1, %.loc8_49.1 [concrete = constants.%int_1.f23]
|
|
|
-// CHECK:STDOUT: %.loc8_30: type = splice_block %unsigned_long.ref [concrete = constants.%u64] {
|
|
|
-// CHECK:STDOUT: %Cpp.ref: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
|
|
+// CHECK:STDOUT: %int_1.loc8: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
|
|
|
+// CHECK:STDOUT: %.loc8_29: type = splice_block %unsigned_long.ref.loc8 [concrete = constants.%u64] {
|
|
|
+// CHECK:STDOUT: %Cpp.ref.loc8: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
|
|
// CHECK:STDOUT: <elided>
|
|
|
-// CHECK:STDOUT: %unsigned_long.ref: type = name_ref unsigned_long, %u64.1 [concrete = constants.%u64]
|
|
|
+// CHECK:STDOUT: %unsigned_long.ref.loc8: type = name_ref unsigned_long, %u64.1 [concrete = constants.%u64]
|
|
|
// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %cpp_unsigned_long: %u64 = value_binding cpp_unsigned_long, %.loc8_49.2
|
|
|
+// CHECK:STDOUT: %impl.elem0.loc8: %.ece = impl_witness_access constants.%ImplicitAs.impl_witness.bdc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.e28]
|
|
|
+// CHECK:STDOUT: %bound_method.loc8_46.1: <bound method> = bound_method %int_1.loc8, %impl.elem0.loc8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
|
|
|
+// CHECK:STDOUT: %specific_fn.loc8: <specific function> = specific_function %impl.elem0.loc8, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_64) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
|
|
+// CHECK:STDOUT: %bound_method.loc8_46.2: <bound method> = bound_method %int_1.loc8, %specific_fn.loc8 [concrete = constants.%bound_method.d5e]
|
|
|
+// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %u64 = call %bound_method.loc8_46.2(%int_1.loc8) [concrete = constants.%int_1.f23]
|
|
|
+// CHECK:STDOUT: %.loc8_46.1: %u64 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.f23]
|
|
|
+// CHECK:STDOUT: %.loc8_46.2: %u64 = converted %int_1.loc8, %.loc8_46.1 [concrete = constants.%int_1.f23]
|
|
|
+// CHECK:STDOUT: %cpp_unsigned_long: %u64 = value_binding cpp_unsigned_long, %.loc8_46.2
|
|
|
// CHECK:STDOUT: name_binding_decl {
|
|
|
// CHECK:STDOUT: %carbon_unsigned_long.patt: %pattern_type.157 = value_binding_pattern carbon_unsigned_long [concrete]
|
|
|
// CHECK:STDOUT: }
|
|
|
@@ -216,6 +384,52 @@ fn F() {
|
|
|
// CHECK:STDOUT: %u64.loc9: type = class_type @UInt, @UInt(constants.%int_64) [concrete = constants.%u64]
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT: %carbon_unsigned_long: %u64 = value_binding carbon_unsigned_long, %cpp_unsigned_long.ref
|
|
|
+// CHECK:STDOUT: name_binding_decl {
|
|
|
+// CHECK:STDOUT: %a.patt: %pattern_type.b36 = ref_binding_pattern a [concrete]
|
|
|
+// CHECK:STDOUT: %a.var_patt: %pattern_type.b36 = var_pattern %a.patt [concrete]
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT: %a.var: ref %array_type = var %a.var_patt
|
|
|
+// CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float.674]
|
|
|
+// CHECK:STDOUT: %.loc11_52.1: %tuple.type = tuple_literal (%float) [concrete = constants.%tuple]
|
|
|
+// CHECK:STDOUT: %impl.elem0.loc11_52: %.393 = impl_witness_access constants.%ImplicitAs.impl_witness.e0e, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.947]
|
|
|
+// CHECK:STDOUT: %bound_method.loc11_52.1: <bound method> = bound_method %float, %impl.elem0.loc11_52 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound]
|
|
|
+// CHECK:STDOUT: %specific_fn.loc11_52: <specific function> = specific_function %impl.elem0.loc11_52, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
|
|
+// CHECK:STDOUT: %bound_method.loc11_52.2: <bound method> = bound_method %float, %specific_fn.loc11_52 [concrete = constants.%bound_method.d8a]
|
|
|
+// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call: init %f32.97e = call %bound_method.loc11_52.2(%float) [concrete = constants.%float.e3b]
|
|
|
+// CHECK:STDOUT: %.loc11_52.2: init %f32.97e = converted %float, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%float.e3b]
|
|
|
+// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0]
|
|
|
+// CHECK:STDOUT: %.loc11_52.3: ref %f32.97e = array_index %a.var, %int_0
|
|
|
+// CHECK:STDOUT: %.loc11_52.4: init %f32.97e = initialize_from %.loc11_52.2 to %.loc11_52.3 [concrete = constants.%float.e3b]
|
|
|
+// CHECK:STDOUT: %.loc11_52.5: init %array_type = array_init (%.loc11_52.4) to %a.var [concrete = constants.%array]
|
|
|
+// CHECK:STDOUT: %.loc11_3: init %array_type = converted %.loc11_52.1, %.loc11_52.5 [concrete = constants.%array]
|
|
|
+// CHECK:STDOUT: assign %a.var, %.loc11_3
|
|
|
+// CHECK:STDOUT: %.loc11_43: type = splice_block %array_type [concrete = constants.%array_type] {
|
|
|
+// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
|
|
|
+// CHECK:STDOUT: %f32: type = class_type @Float, @Float(constants.%int_32) [concrete = constants.%f32.97e]
|
|
|
+// CHECK:STDOUT: %int_1.loc11: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
|
|
|
+// CHECK:STDOUT: %Cpp.ref.loc11: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
|
|
+// CHECK:STDOUT: %unsigned_long.ref.loc11: type = name_ref unsigned_long, %u64.1 [concrete = constants.%u64]
|
|
|
+// CHECK:STDOUT: %impl.elem0.loc11_23.1: %.5b8 = impl_witness_access constants.%As.impl_witness.ed2d, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.a09]
|
|
|
+// CHECK:STDOUT: %bound_method.loc11_23.1: <bound method> = bound_method %int_1.loc11, %impl.elem0.loc11_23.1 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound]
|
|
|
+// CHECK:STDOUT: %specific_fn.loc11_23.1: <specific function> = specific_function %impl.elem0.loc11_23.1, @Core.IntLiteral.as.As.impl.Convert(constants.%int_64) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn]
|
|
|
+// CHECK:STDOUT: %bound_method.loc11_23.2: <bound method> = bound_method %int_1.loc11, %specific_fn.loc11_23.1 [concrete = constants.%bound_method.bb9]
|
|
|
+// CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.call: init %u64 = call %bound_method.loc11_23.2(%int_1.loc11) [concrete = constants.%int_1.f23]
|
|
|
+// CHECK:STDOUT: %.loc11_23.1: %u64 = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call [concrete = constants.%int_1.f23]
|
|
|
+// CHECK:STDOUT: %.loc11_23.2: %u64 = converted %int_1.loc11, %.loc11_23.1 [concrete = constants.%int_1.f23]
|
|
|
+// CHECK:STDOUT: %impl.elem0.loc11_23.2: %.407 = impl_witness_access constants.%ImplicitAs.impl_witness.519, element0 [concrete = constants.%UInt.as.ImplicitAs.impl.Convert.7e7]
|
|
|
+// CHECK:STDOUT: %bound_method.loc11_23.3: <bound method> = bound_method %.loc11_23.2, %impl.elem0.loc11_23.2 [concrete = constants.%UInt.as.ImplicitAs.impl.Convert.bound]
|
|
|
+// CHECK:STDOUT: %specific_fn.loc11_23.2: <specific function> = specific_function %impl.elem0.loc11_23.2, @UInt.as.ImplicitAs.impl.Convert(constants.%int_64) [concrete = constants.%UInt.as.ImplicitAs.impl.Convert.specific_fn]
|
|
|
+// CHECK:STDOUT: %bound_method.loc11_23.4: <bound method> = bound_method %.loc11_23.2, %specific_fn.loc11_23.2 [concrete = constants.%bound_method.ba3]
|
|
|
+// CHECK:STDOUT: %UInt.as.ImplicitAs.impl.Convert.call: init Core.IntLiteral = call %bound_method.loc11_23.4(%.loc11_23.2) [concrete = constants.%int_1.5b8]
|
|
|
+// CHECK:STDOUT: %.loc11_23.3: Core.IntLiteral = value_of_initializer %UInt.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.5b8]
|
|
|
+// CHECK:STDOUT: %.loc11_23.4: Core.IntLiteral = converted %.loc11_23.2, %.loc11_23.3 [concrete = constants.%int_1.5b8]
|
|
|
+// CHECK:STDOUT: %array_type: type = array_type %.loc11_23.4, %f32 [concrete = constants.%array_type]
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT: %a: ref %array_type = ref_binding a, %a.var
|
|
|
+// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.bound: <bound method> = bound_method %a.var, constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.39c
|
|
|
+// CHECK:STDOUT: <elided>
|
|
|
+// CHECK:STDOUT: %bound_method.loc11_3: <bound method> = bound_method %a.var, %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn
|
|
|
+// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc11_3(%a.var)
|
|
|
// CHECK:STDOUT: <elided>
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
@@ -227,38 +441,25 @@ fn F() {
|
|
|
// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [concrete]
|
|
|
// CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete]
|
|
|
// CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete]
|
|
|
+// CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic]
|
|
|
// CHECK:STDOUT: %i64: type = class_type @Int, @Int(%int_64) [concrete]
|
|
|
// CHECK:STDOUT: %pattern_type.76e: type = pattern_type %Cpp.long_long [concrete]
|
|
|
// CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete]
|
|
|
-// CHECK:STDOUT: %As.type.90f: type = generic_interface_type @As [concrete]
|
|
|
-// CHECK:STDOUT: %As.generic: %As.type.90f = struct_value () [concrete]
|
|
|
-// CHECK:STDOUT: %As.type.bbb: type = facet_type <@As, @As(%i64)> [concrete]
|
|
|
-// CHECK:STDOUT: %As.Convert.type.d57: type = fn_type @As.Convert, @As(%i64) [concrete]
|
|
|
-// CHECK:STDOUT: %To.586: Core.IntLiteral = symbolic_binding To, 0 [symbolic]
|
|
|
-// CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.0fd: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%To.586) [symbolic]
|
|
|
-// CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.2b1: %Core.IntLiteral.as.As.impl.Convert.type.0fd = struct_value () [symbolic]
|
|
|
-// CHECK:STDOUT: %As.impl_witness.c40: <witness> = impl_witness imports.%As.impl_witness_table.251, @Core.IntLiteral.as.As.impl(%int_64) [concrete]
|
|
|
-// CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.4f0: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%int_64) [concrete]
|
|
|
-// CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.108: %Core.IntLiteral.as.As.impl.Convert.type.4f0 = struct_value () [concrete]
|
|
|
-// CHECK:STDOUT: %As.facet: %As.type.bbb = facet_value Core.IntLiteral, (%As.impl_witness.c40) [concrete]
|
|
|
-// CHECK:STDOUT: %.277: type = fn_type_with_self_type %As.Convert.type.d57, %As.facet [concrete]
|
|
|
-// CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.108 [concrete]
|
|
|
-// CHECK:STDOUT: %pattern_type.95b: type = pattern_type %i64 [concrete]
|
|
|
-// CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.specific_fn: <specific function> = specific_function %Core.IntLiteral.as.As.impl.Convert.108, @Core.IntLiteral.as.As.impl.Convert(%int_64) [concrete]
|
|
|
-// CHECK:STDOUT: %bound_method: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.specific_fn [concrete]
|
|
|
-// CHECK:STDOUT: %int_1.41a: %i64 = int_value 1 [concrete]
|
|
|
// CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete]
|
|
|
// CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete]
|
|
|
// CHECK:STDOUT: %ImplicitAs.type.f6b: type = facet_type <@ImplicitAs, @ImplicitAs(%Cpp.long_long)> [concrete]
|
|
|
// CHECK:STDOUT: %ImplicitAs.Convert.type.6e4: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%Cpp.long_long) [concrete]
|
|
|
+// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
|
|
|
+// CHECK:STDOUT: %ImplicitAs.type.7a9: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete]
|
|
|
+// CHECK:STDOUT: %ImplicitAs.Convert.type.71e: type = fn_type @ImplicitAs.Convert, @ImplicitAs(Core.IntLiteral) [concrete]
|
|
|
// CHECK:STDOUT: %ImplicitAs.type.e50: type = facet_type <@ImplicitAs, @ImplicitAs(%i64)> [concrete]
|
|
|
// CHECK:STDOUT: %ImplicitAs.Convert.type.94e: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i64) [concrete]
|
|
|
-// CHECK:STDOUT: %ImplicitAs.impl_witness.19c: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.fe6 [concrete]
|
|
|
-// CHECK:STDOUT: %ImplicitAs.facet.a6c: %ImplicitAs.type.f6b = facet_value %i64, (%ImplicitAs.impl_witness.19c) [concrete]
|
|
|
-// CHECK:STDOUT: %.6d5: type = fn_type_with_self_type %ImplicitAs.Convert.type.6e4, %ImplicitAs.facet.a6c [concrete]
|
|
|
-// CHECK:STDOUT: %i64.as.ImplicitAs.impl.Convert.type: type = fn_type @i64.as.ImplicitAs.impl.Convert [concrete]
|
|
|
-// CHECK:STDOUT: %i64.as.ImplicitAs.impl.Convert: %i64.as.ImplicitAs.impl.Convert.type = struct_value () [concrete]
|
|
|
-// CHECK:STDOUT: %i64.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %int_1.41a, %i64.as.ImplicitAs.impl.Convert [concrete]
|
|
|
+// CHECK:STDOUT: %ImplicitAs.impl_witness.7d9: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.064 [concrete]
|
|
|
+// CHECK:STDOUT: %ImplicitAs.facet.138: %ImplicitAs.type.f6b = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.7d9) [concrete]
|
|
|
+// CHECK:STDOUT: %.1ef: type = fn_type_with_self_type %ImplicitAs.Convert.type.6e4, %ImplicitAs.facet.138 [concrete]
|
|
|
+// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.18d: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert.1 [concrete]
|
|
|
+// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.b3d: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.18d = struct_value () [concrete]
|
|
|
+// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.b3d [concrete]
|
|
|
// CHECK:STDOUT: %int_1.092: %Cpp.long_long = int_value 1 [concrete]
|
|
|
// CHECK:STDOUT: %LongLongResult: type = class_type @LongLongResult [concrete]
|
|
|
// CHECK:STDOUT: %pattern_type.257: type = pattern_type %LongLongResult [concrete]
|
|
|
@@ -267,18 +468,61 @@ fn F() {
|
|
|
// CHECK:STDOUT: %ptr.a95: type = ptr_type %LongLongResult [concrete]
|
|
|
// CHECK:STDOUT: %PassLongLong__carbon_thunk.type.aa8bde.1: type = fn_type @PassLongLong__carbon_thunk.1 [concrete]
|
|
|
// CHECK:STDOUT: %PassLongLong__carbon_thunk.9998b6.1: %PassLongLong__carbon_thunk.type.aa8bde.1 = struct_value () [concrete]
|
|
|
+// CHECK:STDOUT: %pattern_type.95b: type = pattern_type %i64 [concrete]
|
|
|
// CHECK:STDOUT: %ImplicitAs.impl_witness.a39: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.fb3 [concrete]
|
|
|
// CHECK:STDOUT: %ImplicitAs.facet.437: %ImplicitAs.type.e50 = facet_value %Cpp.long_long, (%ImplicitAs.impl_witness.a39) [concrete]
|
|
|
// CHECK:STDOUT: %.467: type = fn_type_with_self_type %ImplicitAs.Convert.type.94e, %ImplicitAs.facet.437 [concrete]
|
|
|
-// CHECK:STDOUT: %Cpp.long_long.as.ImplicitAs.impl.Convert.type: type = fn_type @Cpp.long_long.as.ImplicitAs.impl.Convert [concrete]
|
|
|
-// CHECK:STDOUT: %Cpp.long_long.as.ImplicitAs.impl.Convert: %Cpp.long_long.as.ImplicitAs.impl.Convert.type = struct_value () [concrete]
|
|
|
+// CHECK:STDOUT: %Cpp.long_long.as.ImplicitAs.impl.Convert.type.406: type = fn_type @Cpp.long_long.as.ImplicitAs.impl.Convert.1 [concrete]
|
|
|
+// CHECK:STDOUT: %Cpp.long_long.as.ImplicitAs.impl.Convert.1ba: %Cpp.long_long.as.ImplicitAs.impl.Convert.type.406 = struct_value () [concrete]
|
|
|
// CHECK:STDOUT: %LongResult: type = class_type @LongResult [concrete]
|
|
|
// CHECK:STDOUT: %pattern_type.cd9: type = pattern_type %LongResult [concrete]
|
|
|
// CHECK:STDOUT: %ptr.305: type = ptr_type %LongResult [concrete]
|
|
|
// CHECK:STDOUT: %PassLongLong__carbon_thunk.type.aa8bde.2: type = fn_type @PassLongLong__carbon_thunk.2 [concrete]
|
|
|
// CHECK:STDOUT: %PassLongLong__carbon_thunk.9998b6.2: %PassLongLong__carbon_thunk.type.aa8bde.2 = struct_value () [concrete]
|
|
|
+// CHECK:STDOUT: %Float.type: type = generic_class_type @Float [concrete]
|
|
|
+// CHECK:STDOUT: %Float.generic: %Float.type = struct_value () [concrete]
|
|
|
+// CHECK:STDOUT: %f32.97e: type = class_type @Float, @Float(%int_32) [concrete]
|
|
|
+// CHECK:STDOUT: %As.type.90f: type = generic_interface_type @As [concrete]
|
|
|
+// CHECK:STDOUT: %As.generic: %As.type.90f = struct_value () [concrete]
|
|
|
+// CHECK:STDOUT: %As.type.3eb: type = facet_type <@As, @As(%Cpp.long_long)> [concrete]
|
|
|
+// CHECK:STDOUT: %As.Convert.type.92c: type = fn_type @As.Convert, @As(%Cpp.long_long) [concrete]
|
|
|
+// CHECK:STDOUT: %As.impl_witness: <witness> = impl_witness imports.%As.impl_witness_table [concrete]
|
|
|
+// CHECK:STDOUT: %As.facet: %As.type.3eb = facet_value Core.IntLiteral, (%As.impl_witness) [concrete]
|
|
|
+// CHECK:STDOUT: %.956: type = fn_type_with_self_type %As.Convert.type.92c, %As.facet [concrete]
|
|
|
+// CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type: type = fn_type @Core.IntLiteral.as.As.impl.Convert [concrete]
|
|
|
+// CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert: %Core.IntLiteral.as.As.impl.Convert.type = struct_value () [concrete]
|
|
|
+// CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert [concrete]
|
|
|
+// CHECK:STDOUT: %ImplicitAs.impl_witness.fbe: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.122 [concrete]
|
|
|
+// CHECK:STDOUT: %ImplicitAs.facet.929: %ImplicitAs.type.7a9 = facet_value %Cpp.long_long, (%ImplicitAs.impl_witness.fbe) [concrete]
|
|
|
+// CHECK:STDOUT: %.db4: type = fn_type_with_self_type %ImplicitAs.Convert.type.71e, %ImplicitAs.facet.929 [concrete]
|
|
|
+// CHECK:STDOUT: %Cpp.long_long.as.ImplicitAs.impl.Convert.type.6c0: type = fn_type @Cpp.long_long.as.ImplicitAs.impl.Convert.2 [concrete]
|
|
|
+// CHECK:STDOUT: %Cpp.long_long.as.ImplicitAs.impl.Convert.e18: %Cpp.long_long.as.ImplicitAs.impl.Convert.type.6c0 = struct_value () [concrete]
|
|
|
+// CHECK:STDOUT: %Cpp.long_long.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %int_1.092, %Cpp.long_long.as.ImplicitAs.impl.Convert.e18 [concrete]
|
|
|
+// CHECK:STDOUT: %array_type: type = array_type %int_1.5b8, %f32.97e [concrete]
|
|
|
+// CHECK:STDOUT: %pattern_type.b36: type = pattern_type %array_type [concrete]
|
|
|
+// CHECK:STDOUT: %float.674: Core.FloatLiteral = float_literal_value 10e-1 [concrete]
|
|
|
+// CHECK:STDOUT: %tuple.type: type = tuple_type (Core.FloatLiteral) [concrete]
|
|
|
+// CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%float.674) [concrete]
|
|
|
+// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete]
|
|
|
+// CHECK:STDOUT: %ImplicitAs.type.921: type = facet_type <@ImplicitAs, @ImplicitAs(%f32.97e)> [concrete]
|
|
|
+// CHECK:STDOUT: %ImplicitAs.Convert.type.b8c: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%f32.97e) [concrete]
|
|
|
+// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.528: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%N) [symbolic]
|
|
|
+// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.98e: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.528 = struct_value () [symbolic]
|
|
|
+// CHECK:STDOUT: %ImplicitAs.impl_witness.e0e: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.f5c, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete]
|
|
|
+// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.2ba: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete]
|
|
|
+// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.947: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.2ba = struct_value () [concrete]
|
|
|
+// CHECK:STDOUT: %ImplicitAs.facet.92e: %ImplicitAs.type.921 = facet_value Core.FloatLiteral, (%ImplicitAs.impl_witness.e0e) [concrete]
|
|
|
+// CHECK:STDOUT: %.393: type = fn_type_with_self_type %ImplicitAs.Convert.type.b8c, %ImplicitAs.facet.92e [concrete]
|
|
|
+// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %float.674, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.947 [concrete]
|
|
|
+// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn: <specific function> = specific_function %Core.FloatLiteral.as.ImplicitAs.impl.Convert.947, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete]
|
|
|
+// CHECK:STDOUT: %bound_method: <bound method> = bound_method %float.674, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
|
|
|
+// CHECK:STDOUT: %float.e3b: %f32.97e = float_value 1 [concrete]
|
|
|
+// CHECK:STDOUT: %array: %array_type = tuple_value (%float.e3b) [concrete]
|
|
|
// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
|
|
|
// CHECK:STDOUT: %type_where: type = facet_type <type where .Self impls <CanDestroy>> [concrete]
|
|
|
+// CHECK:STDOUT: %facet_value.cee: %type_where = facet_value %array_type, () [concrete]
|
|
|
+// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.1a5: type = fn_type @DestroyT.binding.as_type.as.Destroy.impl.Op, @DestroyT.binding.as_type.as.Destroy.impl(%facet_value.cee) [concrete]
|
|
|
+// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.39c: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.1a5 = struct_value () [concrete]
|
|
|
// CHECK:STDOUT: %facet_value.1e3: %type_where = facet_value %LongResult, () [concrete]
|
|
|
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.6c9: type = fn_type @DestroyT.binding.as_type.as.Destroy.impl.Op, @DestroyT.binding.as_type.as.Destroy.impl(%facet_value.1e3) [concrete]
|
|
|
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.418: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.6c9 = struct_value () [concrete]
|
|
|
@@ -290,9 +534,10 @@ fn F() {
|
|
|
// CHECK:STDOUT: imports {
|
|
|
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
|
|
|
// CHECK:STDOUT: .CppCompat = %CppCompat.c59
|
|
|
+// CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
|
|
|
// CHECK:STDOUT: .Int = %Core.Int
|
|
|
+// CHECK:STDOUT: .Float = %Core.Float
|
|
|
// CHECK:STDOUT: .As = %Core.As
|
|
|
-// CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
|
|
|
// CHECK:STDOUT: .Destroy = %Core.Destroy
|
|
|
// CHECK:STDOUT: import Core//prelude
|
|
|
// CHECK:STDOUT: import Core//prelude/...
|
|
|
@@ -311,13 +556,9 @@ fn F() {
|
|
|
// CHECK:STDOUT: import Core//prelude/...
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT: %Core.LongLong64: type = import_ref Core//prelude/types/cpp/int, LongLong64, loaded [concrete = constants.%Cpp.long_long]
|
|
|
-// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic]
|
|
|
-// CHECK:STDOUT: %Core.As: %As.type.90f = import_ref Core//prelude/operators/as, As, loaded [concrete = constants.%As.generic]
|
|
|
-// CHECK:STDOUT: %Core.import_ref.05d: @Core.IntLiteral.as.As.impl.%Core.IntLiteral.as.As.impl.Convert.type (%Core.IntLiteral.as.As.impl.Convert.type.0fd) = import_ref Core//prelude/types/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.As.impl.%Core.IntLiteral.as.As.impl.Convert (constants.%Core.IntLiteral.as.As.impl.Convert.2b1)]
|
|
|
-// CHECK:STDOUT: %As.impl_witness_table.251 = impl_witness_table (%Core.import_ref.05d), @Core.IntLiteral.as.As.impl [concrete]
|
|
|
// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic]
|
|
|
-// CHECK:STDOUT: %Core.import_ref.16e: %i64.as.ImplicitAs.impl.Convert.type = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%i64.as.ImplicitAs.impl.Convert]
|
|
|
-// CHECK:STDOUT: %ImplicitAs.impl_witness_table.fe6 = impl_witness_table (%Core.import_ref.16e), @i64.as.ImplicitAs.impl [concrete]
|
|
|
+// CHECK:STDOUT: %Core.import_ref.ec9: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.18d = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.b3d]
|
|
|
+// CHECK:STDOUT: %ImplicitAs.impl_witness_table.064 = impl_witness_table (%Core.import_ref.ec9), @Core.IntLiteral.as.ImplicitAs.impl.485 [concrete]
|
|
|
// CHECK:STDOUT: %LongLongResult.decl: type = class_decl @LongLongResult [concrete = constants.%LongLongResult] {} {}
|
|
|
// CHECK:STDOUT: %PassLongLong.cpp_overload_set.value: %PassLongLong.cpp_overload_set.type = cpp_overload_set_value @PassLongLong.cpp_overload_set [concrete = constants.%PassLongLong.cpp_overload_set.value]
|
|
|
// CHECK:STDOUT: %PassLongLong__carbon_thunk.decl.139b1c.1: %PassLongLong__carbon_thunk.type.aa8bde.1 = fn_decl @PassLongLong__carbon_thunk.1 [concrete = constants.%PassLongLong__carbon_thunk.9998b6.1] {
|
|
|
@@ -325,14 +566,23 @@ fn F() {
|
|
|
// CHECK:STDOUT: } {
|
|
|
// CHECK:STDOUT: <elided>
|
|
|
// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %Core.import_ref.de9: %Cpp.long_long.as.ImplicitAs.impl.Convert.type = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%Cpp.long_long.as.ImplicitAs.impl.Convert]
|
|
|
-// CHECK:STDOUT: %ImplicitAs.impl_witness_table.fb3 = impl_witness_table (%Core.import_ref.de9), @Cpp.long_long.as.ImplicitAs.impl [concrete]
|
|
|
+// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic]
|
|
|
+// CHECK:STDOUT: %Core.import_ref.de9: %Cpp.long_long.as.ImplicitAs.impl.Convert.type.406 = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%Cpp.long_long.as.ImplicitAs.impl.Convert.1ba]
|
|
|
+// CHECK:STDOUT: %ImplicitAs.impl_witness_table.fb3 = impl_witness_table (%Core.import_ref.de9), @Cpp.long_long.as.ImplicitAs.impl.fa9 [concrete]
|
|
|
// CHECK:STDOUT: %LongResult.decl: type = class_decl @LongResult [concrete = constants.%LongResult] {} {}
|
|
|
// CHECK:STDOUT: %PassLongLong__carbon_thunk.decl.139b1c.2: %PassLongLong__carbon_thunk.type.aa8bde.2 = fn_decl @PassLongLong__carbon_thunk.2 [concrete = constants.%PassLongLong__carbon_thunk.9998b6.2] {
|
|
|
// CHECK:STDOUT: <elided>
|
|
|
// CHECK:STDOUT: } {
|
|
|
// CHECK:STDOUT: <elided>
|
|
|
// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT: %Core.Float: %Float.type = import_ref Core//prelude/types/float, Float, loaded [concrete = constants.%Float.generic]
|
|
|
+// CHECK:STDOUT: %Core.As: %As.type.90f = import_ref Core//prelude/operators/as, As, loaded [concrete = constants.%As.generic]
|
|
|
+// CHECK:STDOUT: %Core.import_ref.f4c: %Core.IntLiteral.as.As.impl.Convert.type = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%Core.IntLiteral.as.As.impl.Convert]
|
|
|
+// CHECK:STDOUT: %As.impl_witness_table = impl_witness_table (%Core.import_ref.f4c), @Core.IntLiteral.as.As.impl.6ca [concrete]
|
|
|
+// CHECK:STDOUT: %Core.import_ref.1c4: %Cpp.long_long.as.ImplicitAs.impl.Convert.type.6c0 = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%Cpp.long_long.as.ImplicitAs.impl.Convert.e18]
|
|
|
+// CHECK:STDOUT: %ImplicitAs.impl_witness_table.122 = impl_witness_table (%Core.import_ref.1c4), @Cpp.long_long.as.ImplicitAs.impl.dcb [concrete]
|
|
|
+// CHECK:STDOUT: %Core.import_ref.f5b: @Core.FloatLiteral.as.ImplicitAs.impl.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.type (%Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.528) = import_ref Core//prelude/types/float, loc{{\d+_\d+}}, loaded [symbolic = @Core.FloatLiteral.as.ImplicitAs.impl.%Core.FloatLiteral.as.ImplicitAs.impl.Convert (constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.98e)]
|
|
|
+// CHECK:STDOUT: %ImplicitAs.impl_witness_table.f5c = impl_witness_table (%Core.import_ref.f5b), @Core.FloatLiteral.as.ImplicitAs.impl [concrete]
|
|
|
// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/destroy, Destroy, loaded [concrete = constants.%Destroy.type]
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
@@ -341,26 +591,17 @@ fn F() {
|
|
|
// CHECK:STDOUT: name_binding_decl {
|
|
|
// CHECK:STDOUT: %cpp_long_long.patt: %pattern_type.76e = value_binding_pattern cpp_long_long [concrete]
|
|
|
// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
|
|
|
-// CHECK:STDOUT: %int_64.loc15: Core.IntLiteral = int_value 64 [concrete = constants.%int_64]
|
|
|
-// CHECK:STDOUT: %i64.loc15: type = class_type @Int, @Int(constants.%int_64) [concrete = constants.%i64]
|
|
|
-// CHECK:STDOUT: %impl.elem0.loc15_40.1: %.277 = impl_witness_access constants.%As.impl_witness.c40, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.108]
|
|
|
-// CHECK:STDOUT: %bound_method.loc15_40.1: <bound method> = bound_method %int_1, %impl.elem0.loc15_40.1 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound]
|
|
|
-// CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0.loc15_40.1, @Core.IntLiteral.as.As.impl.Convert(constants.%int_64) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn]
|
|
|
-// CHECK:STDOUT: %bound_method.loc15_40.2: <bound method> = bound_method %int_1, %specific_fn [concrete = constants.%bound_method]
|
|
|
-// CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.call: init %i64 = call %bound_method.loc15_40.2(%int_1) [concrete = constants.%int_1.41a]
|
|
|
-// CHECK:STDOUT: %.loc15_40.1: %i64 = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call [concrete = constants.%int_1.41a]
|
|
|
-// CHECK:STDOUT: %.loc15_40.2: %i64 = converted %int_1, %.loc15_40.1 [concrete = constants.%int_1.41a]
|
|
|
-// CHECK:STDOUT: %.loc15_25: type = splice_block %long_long.ref [concrete = constants.%Cpp.long_long] {
|
|
|
+// CHECK:STDOUT: %int_1.loc15: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
|
|
|
+// CHECK:STDOUT: %.loc15_25: type = splice_block %long_long.ref.loc15 [concrete = constants.%Cpp.long_long] {
|
|
|
// CHECK:STDOUT: %Cpp.ref.loc15: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
|
|
-// CHECK:STDOUT: %long_long.ref: type = name_ref long_long, constants.%Cpp.long_long [concrete = constants.%Cpp.long_long]
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %impl.elem0.loc15_40.2: %.6d5 = impl_witness_access constants.%ImplicitAs.impl_witness.19c, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert]
|
|
|
-// CHECK:STDOUT: %bound_method.loc15_40.3: <bound method> = bound_method %.loc15_40.2, %impl.elem0.loc15_40.2 [concrete = constants.%i64.as.ImplicitAs.impl.Convert.bound]
|
|
|
-// CHECK:STDOUT: %i64.as.ImplicitAs.impl.Convert.call: init %Cpp.long_long = call %bound_method.loc15_40.3(%.loc15_40.2) [concrete = constants.%int_1.092]
|
|
|
-// CHECK:STDOUT: %.loc15_40.3: %Cpp.long_long = value_of_initializer %i64.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.092]
|
|
|
-// CHECK:STDOUT: %.loc15_40.4: %Cpp.long_long = converted %.loc15_40.2, %.loc15_40.3 [concrete = constants.%int_1.092]
|
|
|
-// CHECK:STDOUT: %cpp_long_long: %Cpp.long_long = value_binding cpp_long_long, %.loc15_40.4
|
|
|
+// CHECK:STDOUT: %long_long.ref.loc15: type = name_ref long_long, constants.%Cpp.long_long [concrete = constants.%Cpp.long_long]
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT: %impl.elem0.loc15: %.1ef = impl_witness_access constants.%ImplicitAs.impl_witness.7d9, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.b3d]
|
|
|
+// CHECK:STDOUT: %bound_method.loc15: <bound method> = bound_method %int_1.loc15, %impl.elem0.loc15 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
|
|
|
+// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %Cpp.long_long = call %bound_method.loc15(%int_1.loc15) [concrete = constants.%int_1.092]
|
|
|
+// CHECK:STDOUT: %.loc15_38.1: %Cpp.long_long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.092]
|
|
|
+// CHECK:STDOUT: %.loc15_38.2: %Cpp.long_long = converted %int_1.loc15, %.loc15_38.1 [concrete = constants.%int_1.092]
|
|
|
+// CHECK:STDOUT: %cpp_long_long: %Cpp.long_long = value_binding cpp_long_long, %.loc15_38.2
|
|
|
// CHECK:STDOUT: name_binding_decl {
|
|
|
// CHECK:STDOUT: %cpp_long_long_result.patt: %pattern_type.257 = value_binding_pattern cpp_long_long_result [concrete]
|
|
|
// CHECK:STDOUT: }
|
|
|
@@ -409,14 +650,14 @@ fn F() {
|
|
|
// CHECK:STDOUT: %carbon_i64.patt: %pattern_type.95b = value_binding_pattern carbon_i64 [concrete]
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT: %cpp_long_long.ref.loc21: %Cpp.long_long = name_ref cpp_long_long, %cpp_long_long
|
|
|
-// CHECK:STDOUT: %.loc21_19: type = splice_block %i64.loc21 [concrete = constants.%i64] {
|
|
|
-// CHECK:STDOUT: %int_64.loc21: Core.IntLiteral = int_value 64 [concrete = constants.%int_64]
|
|
|
-// CHECK:STDOUT: %i64.loc21: type = class_type @Int, @Int(constants.%int_64) [concrete = constants.%i64]
|
|
|
+// CHECK:STDOUT: %.loc21_19: type = splice_block %i64 [concrete = constants.%i64] {
|
|
|
+// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [concrete = constants.%int_64]
|
|
|
+// CHECK:STDOUT: %i64: type = class_type @Int, @Int(constants.%int_64) [concrete = constants.%i64]
|
|
|
// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %impl.elem0.loc21: %.467 = impl_witness_access constants.%ImplicitAs.impl_witness.a39, element0 [concrete = constants.%Cpp.long_long.as.ImplicitAs.impl.Convert]
|
|
|
+// CHECK:STDOUT: %impl.elem0.loc21: %.467 = impl_witness_access constants.%ImplicitAs.impl_witness.a39, element0 [concrete = constants.%Cpp.long_long.as.ImplicitAs.impl.Convert.1ba]
|
|
|
// CHECK:STDOUT: %bound_method.loc21: <bound method> = bound_method %cpp_long_long.ref.loc21, %impl.elem0.loc21
|
|
|
-// CHECK:STDOUT: %Cpp.long_long.as.ImplicitAs.impl.Convert.call: init %i64 = call %bound_method.loc21(%cpp_long_long.ref.loc21)
|
|
|
-// CHECK:STDOUT: %.loc21_25.1: %i64 = value_of_initializer %Cpp.long_long.as.ImplicitAs.impl.Convert.call
|
|
|
+// CHECK:STDOUT: %Cpp.long_long.as.ImplicitAs.impl.Convert.call.loc21: init %i64 = call %bound_method.loc21(%cpp_long_long.ref.loc21)
|
|
|
+// CHECK:STDOUT: %.loc21_25.1: %i64 = value_of_initializer %Cpp.long_long.as.ImplicitAs.impl.Convert.call.loc21
|
|
|
// CHECK:STDOUT: %.loc21_25.2: %i64 = converted %cpp_long_long.ref.loc21, %.loc21_25.1
|
|
|
// CHECK:STDOUT: %carbon_i64: %i64 = value_binding carbon_i64, %.loc21_25.2
|
|
|
// CHECK:STDOUT: name_binding_decl {
|
|
|
@@ -436,17 +677,59 @@ fn F() {
|
|
|
// CHECK:STDOUT: %.loc22_70.3: ref %LongResult = temporary %.loc22_70.1, %.loc22_70.2
|
|
|
// CHECK:STDOUT: %.loc22_70.4: %LongResult = acquire_value %.loc22_70.3
|
|
|
// CHECK:STDOUT: %carbon_i64_result: %LongResult = value_binding carbon_i64_result, %.loc22_70.4
|
|
|
+// CHECK:STDOUT: name_binding_decl {
|
|
|
+// CHECK:STDOUT: %a.patt: %pattern_type.b36 = ref_binding_pattern a [concrete]
|
|
|
+// CHECK:STDOUT: %a.var_patt: %pattern_type.b36 = var_pattern %a.patt [concrete]
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT: %a.var: ref %array_type = var %a.var_patt
|
|
|
+// CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float.674]
|
|
|
+// CHECK:STDOUT: %.loc24_48.1: %tuple.type = tuple_literal (%float) [concrete = constants.%tuple]
|
|
|
+// CHECK:STDOUT: %impl.elem0.loc24_48: %.393 = impl_witness_access constants.%ImplicitAs.impl_witness.e0e, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.947]
|
|
|
+// CHECK:STDOUT: %bound_method.loc24_48.1: <bound method> = bound_method %float, %impl.elem0.loc24_48 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound]
|
|
|
+// CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0.loc24_48, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
|
|
+// CHECK:STDOUT: %bound_method.loc24_48.2: <bound method> = bound_method %float, %specific_fn [concrete = constants.%bound_method]
|
|
|
+// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call: init %f32.97e = call %bound_method.loc24_48.2(%float) [concrete = constants.%float.e3b]
|
|
|
+// CHECK:STDOUT: %.loc24_48.2: init %f32.97e = converted %float, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%float.e3b]
|
|
|
+// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0]
|
|
|
+// CHECK:STDOUT: %.loc24_48.3: ref %f32.97e = array_index %a.var, %int_0
|
|
|
+// CHECK:STDOUT: %.loc24_48.4: init %f32.97e = initialize_from %.loc24_48.2 to %.loc24_48.3 [concrete = constants.%float.e3b]
|
|
|
+// CHECK:STDOUT: %.loc24_48.5: init %array_type = array_init (%.loc24_48.4) to %a.var [concrete = constants.%array]
|
|
|
+// CHECK:STDOUT: %.loc24_3: init %array_type = converted %.loc24_48.1, %.loc24_48.5 [concrete = constants.%array]
|
|
|
+// CHECK:STDOUT: assign %a.var, %.loc24_3
|
|
|
+// CHECK:STDOUT: %.loc24_39: type = splice_block %array_type [concrete = constants.%array_type] {
|
|
|
+// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
|
|
|
+// CHECK:STDOUT: %f32: type = class_type @Float, @Float(constants.%int_32) [concrete = constants.%f32.97e]
|
|
|
+// CHECK:STDOUT: %int_1.loc24: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
|
|
|
+// CHECK:STDOUT: %Cpp.ref.loc24: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
|
|
+// CHECK:STDOUT: %long_long.ref.loc24: type = name_ref long_long, constants.%Cpp.long_long [concrete = constants.%Cpp.long_long]
|
|
|
+// CHECK:STDOUT: %impl.elem0.loc24_23.1: %.956 = impl_witness_access constants.%As.impl_witness, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert]
|
|
|
+// CHECK:STDOUT: %bound_method.loc24_23.1: <bound method> = bound_method %int_1.loc24, %impl.elem0.loc24_23.1 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound]
|
|
|
+// CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.call: init %Cpp.long_long = call %bound_method.loc24_23.1(%int_1.loc24) [concrete = constants.%int_1.092]
|
|
|
+// CHECK:STDOUT: %.loc24_23.1: %Cpp.long_long = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call [concrete = constants.%int_1.092]
|
|
|
+// CHECK:STDOUT: %.loc24_23.2: %Cpp.long_long = converted %int_1.loc24, %.loc24_23.1 [concrete = constants.%int_1.092]
|
|
|
+// CHECK:STDOUT: %impl.elem0.loc24_23.2: %.db4 = impl_witness_access constants.%ImplicitAs.impl_witness.fbe, element0 [concrete = constants.%Cpp.long_long.as.ImplicitAs.impl.Convert.e18]
|
|
|
+// CHECK:STDOUT: %bound_method.loc24_23.2: <bound method> = bound_method %.loc24_23.2, %impl.elem0.loc24_23.2 [concrete = constants.%Cpp.long_long.as.ImplicitAs.impl.Convert.bound]
|
|
|
+// CHECK:STDOUT: %Cpp.long_long.as.ImplicitAs.impl.Convert.call.loc24: init Core.IntLiteral = call %bound_method.loc24_23.2(%.loc24_23.2) [concrete = constants.%int_1.5b8]
|
|
|
+// CHECK:STDOUT: %.loc24_23.3: Core.IntLiteral = value_of_initializer %Cpp.long_long.as.ImplicitAs.impl.Convert.call.loc24 [concrete = constants.%int_1.5b8]
|
|
|
+// CHECK:STDOUT: %.loc24_23.4: Core.IntLiteral = converted %.loc24_23.2, %.loc24_23.3 [concrete = constants.%int_1.5b8]
|
|
|
+// CHECK:STDOUT: %array_type: type = array_type %.loc24_23.4, %f32 [concrete = constants.%array_type]
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT: %a: ref %array_type = ref_binding a, %a.var
|
|
|
+// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.bound.loc24: <bound method> = bound_method %a.var, constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.39c
|
|
|
+// CHECK:STDOUT: <elided>
|
|
|
+// CHECK:STDOUT: %bound_method.loc24_3: <bound method> = bound_method %a.var, %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.1
|
|
|
+// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.call.loc24: init %empty_tuple.type = call %bound_method.loc24_3(%a.var)
|
|
|
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.bound.loc22: <bound method> = bound_method %.loc22_70.3, constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.418
|
|
|
// CHECK:STDOUT: <elided>
|
|
|
-// CHECK:STDOUT: %bound_method.loc22: <bound method> = bound_method %.loc22_70.3, %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.1
|
|
|
+// CHECK:STDOUT: %bound_method.loc22: <bound method> = bound_method %.loc22_70.3, %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.2
|
|
|
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.call.loc22: init %empty_tuple.type = call %bound_method.loc22(%.loc22_70.3)
|
|
|
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.bound.loc19: <bound method> = bound_method %.loc19_94.3, constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.426
|
|
|
// CHECK:STDOUT: <elided>
|
|
|
-// CHECK:STDOUT: %bound_method.loc19: <bound method> = bound_method %.loc19_94.3, %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.2
|
|
|
+// CHECK:STDOUT: %bound_method.loc19: <bound method> = bound_method %.loc19_94.3, %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.3
|
|
|
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.call.loc19: init %empty_tuple.type = call %bound_method.loc19(%.loc19_94.3)
|
|
|
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.bound.loc16: <bound method> = bound_method %.loc16_80.3, constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.426
|
|
|
// CHECK:STDOUT: <elided>
|
|
|
-// CHECK:STDOUT: %bound_method.loc16: <bound method> = bound_method %.loc16_80.3, %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.3
|
|
|
+// CHECK:STDOUT: %bound_method.loc16: <bound method> = bound_method %.loc16_80.3, %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.4
|
|
|
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.call.loc16: init %empty_tuple.type = call %bound_method.loc16(%.loc16_80.3)
|
|
|
// CHECK:STDOUT: <elided>
|
|
|
// CHECK:STDOUT: }
|
|
|
@@ -459,38 +742,25 @@ fn F() {
|
|
|
// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [concrete]
|
|
|
// CHECK:STDOUT: %UInt.type: type = generic_class_type @UInt [concrete]
|
|
|
// CHECK:STDOUT: %UInt.generic: %UInt.type = struct_value () [concrete]
|
|
|
+// CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic]
|
|
|
// CHECK:STDOUT: %u64: type = class_type @UInt, @UInt(%int_64) [concrete]
|
|
|
// CHECK:STDOUT: %pattern_type.ebd: type = pattern_type %Cpp.unsigned_long_long [concrete]
|
|
|
// CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete]
|
|
|
-// CHECK:STDOUT: %As.type.90f: type = generic_interface_type @As [concrete]
|
|
|
-// CHECK:STDOUT: %As.generic: %As.type.90f = struct_value () [concrete]
|
|
|
-// CHECK:STDOUT: %As.type.465: type = facet_type <@As, @As(%u64)> [concrete]
|
|
|
-// CHECK:STDOUT: %As.Convert.type.7eb: type = fn_type @As.Convert, @As(%u64) [concrete]
|
|
|
-// CHECK:STDOUT: %To.586: Core.IntLiteral = symbolic_binding To, 0 [symbolic]
|
|
|
-// CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.56b: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%To.586) [symbolic]
|
|
|
-// CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.02d: %Core.IntLiteral.as.As.impl.Convert.type.56b = struct_value () [symbolic]
|
|
|
-// CHECK:STDOUT: %As.impl_witness.ed2d: <witness> = impl_witness imports.%As.impl_witness_table.a7d, @Core.IntLiteral.as.As.impl(%int_64) [concrete]
|
|
|
-// CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.422: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%int_64) [concrete]
|
|
|
-// CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.a09: %Core.IntLiteral.as.As.impl.Convert.type.422 = struct_value () [concrete]
|
|
|
-// CHECK:STDOUT: %As.facet: %As.type.465 = facet_value Core.IntLiteral, (%As.impl_witness.ed2d) [concrete]
|
|
|
-// CHECK:STDOUT: %.5b8: type = fn_type_with_self_type %As.Convert.type.7eb, %As.facet [concrete]
|
|
|
-// CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.a09 [concrete]
|
|
|
-// CHECK:STDOUT: %pattern_type.157: type = pattern_type %u64 [concrete]
|
|
|
-// CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.specific_fn: <specific function> = specific_function %Core.IntLiteral.as.As.impl.Convert.a09, @Core.IntLiteral.as.As.impl.Convert(%int_64) [concrete]
|
|
|
-// CHECK:STDOUT: %bound_method: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.specific_fn [concrete]
|
|
|
-// CHECK:STDOUT: %int_1.f23: %u64 = int_value 1 [concrete]
|
|
|
// CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete]
|
|
|
// CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete]
|
|
|
// CHECK:STDOUT: %ImplicitAs.type.4f6: type = facet_type <@ImplicitAs, @ImplicitAs(%Cpp.unsigned_long_long)> [concrete]
|
|
|
// CHECK:STDOUT: %ImplicitAs.Convert.type.c4b: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%Cpp.unsigned_long_long) [concrete]
|
|
|
+// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
|
|
|
+// CHECK:STDOUT: %ImplicitAs.type.7a9: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete]
|
|
|
+// CHECK:STDOUT: %ImplicitAs.Convert.type.71e: type = fn_type @ImplicitAs.Convert, @ImplicitAs(Core.IntLiteral) [concrete]
|
|
|
// CHECK:STDOUT: %ImplicitAs.type.b8f: type = facet_type <@ImplicitAs, @ImplicitAs(%u64)> [concrete]
|
|
|
// CHECK:STDOUT: %ImplicitAs.Convert.type.c65: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%u64) [concrete]
|
|
|
-// CHECK:STDOUT: %ImplicitAs.impl_witness.80f: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.654 [concrete]
|
|
|
-// CHECK:STDOUT: %ImplicitAs.facet.1f6: %ImplicitAs.type.4f6 = facet_value %u64, (%ImplicitAs.impl_witness.80f) [concrete]
|
|
|
-// CHECK:STDOUT: %.c9b: type = fn_type_with_self_type %ImplicitAs.Convert.type.c4b, %ImplicitAs.facet.1f6 [concrete]
|
|
|
-// CHECK:STDOUT: %u64.as.ImplicitAs.impl.Convert.type: type = fn_type @u64.as.ImplicitAs.impl.Convert [concrete]
|
|
|
-// CHECK:STDOUT: %u64.as.ImplicitAs.impl.Convert: %u64.as.ImplicitAs.impl.Convert.type = struct_value () [concrete]
|
|
|
-// CHECK:STDOUT: %u64.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %int_1.f23, %u64.as.ImplicitAs.impl.Convert [concrete]
|
|
|
+// CHECK:STDOUT: %ImplicitAs.impl_witness.259: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.3da [concrete]
|
|
|
+// CHECK:STDOUT: %ImplicitAs.facet.5e2: %ImplicitAs.type.4f6 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.259) [concrete]
|
|
|
+// CHECK:STDOUT: %.06c: type = fn_type_with_self_type %ImplicitAs.Convert.type.c4b, %ImplicitAs.facet.5e2 [concrete]
|
|
|
+// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.859: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert.1 [concrete]
|
|
|
+// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.665: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.859 = struct_value () [concrete]
|
|
|
+// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.665 [concrete]
|
|
|
// CHECK:STDOUT: %int_1.79a: %Cpp.unsigned_long_long = int_value 1 [concrete]
|
|
|
// CHECK:STDOUT: %ULongLongResult: type = class_type @ULongLongResult [concrete]
|
|
|
// CHECK:STDOUT: %pattern_type.633: type = pattern_type %ULongLongResult [concrete]
|
|
|
@@ -499,18 +769,61 @@ fn F() {
|
|
|
// CHECK:STDOUT: %ptr.d19: type = ptr_type %ULongLongResult [concrete]
|
|
|
// CHECK:STDOUT: %PassULongLong__carbon_thunk.type.88c6c2.1: type = fn_type @PassULongLong__carbon_thunk.1 [concrete]
|
|
|
// CHECK:STDOUT: %PassULongLong__carbon_thunk.887181.1: %PassULongLong__carbon_thunk.type.88c6c2.1 = struct_value () [concrete]
|
|
|
+// CHECK:STDOUT: %pattern_type.157: type = pattern_type %u64 [concrete]
|
|
|
// CHECK:STDOUT: %ImplicitAs.impl_witness.67a: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.7cb [concrete]
|
|
|
// CHECK:STDOUT: %ImplicitAs.facet.e14: %ImplicitAs.type.b8f = facet_value %Cpp.unsigned_long_long, (%ImplicitAs.impl_witness.67a) [concrete]
|
|
|
// CHECK:STDOUT: %.82e: type = fn_type_with_self_type %ImplicitAs.Convert.type.c65, %ImplicitAs.facet.e14 [concrete]
|
|
|
-// CHECK:STDOUT: %Cpp.unsigned_long_long.as.ImplicitAs.impl.Convert.type: type = fn_type @Cpp.unsigned_long_long.as.ImplicitAs.impl.Convert [concrete]
|
|
|
-// CHECK:STDOUT: %Cpp.unsigned_long_long.as.ImplicitAs.impl.Convert: %Cpp.unsigned_long_long.as.ImplicitAs.impl.Convert.type = struct_value () [concrete]
|
|
|
+// CHECK:STDOUT: %Cpp.unsigned_long_long.as.ImplicitAs.impl.Convert.type.270: type = fn_type @Cpp.unsigned_long_long.as.ImplicitAs.impl.Convert.1 [concrete]
|
|
|
+// CHECK:STDOUT: %Cpp.unsigned_long_long.as.ImplicitAs.impl.Convert.308: %Cpp.unsigned_long_long.as.ImplicitAs.impl.Convert.type.270 = struct_value () [concrete]
|
|
|
// CHECK:STDOUT: %ULongResult: type = class_type @ULongResult [concrete]
|
|
|
// CHECK:STDOUT: %pattern_type.6f2: type = pattern_type %ULongResult [concrete]
|
|
|
// CHECK:STDOUT: %ptr.f5e: type = ptr_type %ULongResult [concrete]
|
|
|
// CHECK:STDOUT: %PassULongLong__carbon_thunk.type.88c6c2.2: type = fn_type @PassULongLong__carbon_thunk.2 [concrete]
|
|
|
// CHECK:STDOUT: %PassULongLong__carbon_thunk.887181.2: %PassULongLong__carbon_thunk.type.88c6c2.2 = struct_value () [concrete]
|
|
|
+// CHECK:STDOUT: %Float.type: type = generic_class_type @Float [concrete]
|
|
|
+// CHECK:STDOUT: %Float.generic: %Float.type = struct_value () [concrete]
|
|
|
+// CHECK:STDOUT: %f32.97e: type = class_type @Float, @Float(%int_32) [concrete]
|
|
|
+// CHECK:STDOUT: %As.type.90f: type = generic_interface_type @As [concrete]
|
|
|
+// CHECK:STDOUT: %As.generic: %As.type.90f = struct_value () [concrete]
|
|
|
+// CHECK:STDOUT: %As.type.948: type = facet_type <@As, @As(%Cpp.unsigned_long_long)> [concrete]
|
|
|
+// CHECK:STDOUT: %As.Convert.type.2e6: type = fn_type @As.Convert, @As(%Cpp.unsigned_long_long) [concrete]
|
|
|
+// CHECK:STDOUT: %As.impl_witness: <witness> = impl_witness imports.%As.impl_witness_table [concrete]
|
|
|
+// CHECK:STDOUT: %As.facet: %As.type.948 = facet_value Core.IntLiteral, (%As.impl_witness) [concrete]
|
|
|
+// CHECK:STDOUT: %.b95: type = fn_type_with_self_type %As.Convert.type.2e6, %As.facet [concrete]
|
|
|
+// CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type: type = fn_type @Core.IntLiteral.as.As.impl.Convert [concrete]
|
|
|
+// CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert: %Core.IntLiteral.as.As.impl.Convert.type = struct_value () [concrete]
|
|
|
+// CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert [concrete]
|
|
|
+// CHECK:STDOUT: %ImplicitAs.impl_witness.80a: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.c25 [concrete]
|
|
|
+// CHECK:STDOUT: %ImplicitAs.facet.bd1: %ImplicitAs.type.7a9 = facet_value %Cpp.unsigned_long_long, (%ImplicitAs.impl_witness.80a) [concrete]
|
|
|
+// CHECK:STDOUT: %.881: type = fn_type_with_self_type %ImplicitAs.Convert.type.71e, %ImplicitAs.facet.bd1 [concrete]
|
|
|
+// CHECK:STDOUT: %Cpp.unsigned_long_long.as.ImplicitAs.impl.Convert.type.eb0: type = fn_type @Cpp.unsigned_long_long.as.ImplicitAs.impl.Convert.2 [concrete]
|
|
|
+// CHECK:STDOUT: %Cpp.unsigned_long_long.as.ImplicitAs.impl.Convert.564: %Cpp.unsigned_long_long.as.ImplicitAs.impl.Convert.type.eb0 = struct_value () [concrete]
|
|
|
+// CHECK:STDOUT: %Cpp.unsigned_long_long.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %int_1.79a, %Cpp.unsigned_long_long.as.ImplicitAs.impl.Convert.564 [concrete]
|
|
|
+// CHECK:STDOUT: %array_type: type = array_type %int_1.5b8, %f32.97e [concrete]
|
|
|
+// CHECK:STDOUT: %pattern_type.b36: type = pattern_type %array_type [concrete]
|
|
|
+// CHECK:STDOUT: %float.674: Core.FloatLiteral = float_literal_value 10e-1 [concrete]
|
|
|
+// CHECK:STDOUT: %tuple.type: type = tuple_type (Core.FloatLiteral) [concrete]
|
|
|
+// CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%float.674) [concrete]
|
|
|
+// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete]
|
|
|
+// CHECK:STDOUT: %ImplicitAs.type.921: type = facet_type <@ImplicitAs, @ImplicitAs(%f32.97e)> [concrete]
|
|
|
+// CHECK:STDOUT: %ImplicitAs.Convert.type.b8c: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%f32.97e) [concrete]
|
|
|
+// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.528: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%N) [symbolic]
|
|
|
+// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.98e: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.528 = struct_value () [symbolic]
|
|
|
+// CHECK:STDOUT: %ImplicitAs.impl_witness.e0e: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.f5c, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete]
|
|
|
+// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.2ba: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete]
|
|
|
+// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.947: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.2ba = struct_value () [concrete]
|
|
|
+// CHECK:STDOUT: %ImplicitAs.facet.92e: %ImplicitAs.type.921 = facet_value Core.FloatLiteral, (%ImplicitAs.impl_witness.e0e) [concrete]
|
|
|
+// CHECK:STDOUT: %.393: type = fn_type_with_self_type %ImplicitAs.Convert.type.b8c, %ImplicitAs.facet.92e [concrete]
|
|
|
+// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %float.674, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.947 [concrete]
|
|
|
+// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn: <specific function> = specific_function %Core.FloatLiteral.as.ImplicitAs.impl.Convert.947, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete]
|
|
|
+// CHECK:STDOUT: %bound_method: <bound method> = bound_method %float.674, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
|
|
|
+// CHECK:STDOUT: %float.e3b: %f32.97e = float_value 1 [concrete]
|
|
|
+// CHECK:STDOUT: %array: %array_type = tuple_value (%float.e3b) [concrete]
|
|
|
// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
|
|
|
// CHECK:STDOUT: %type_where: type = facet_type <type where .Self impls <CanDestroy>> [concrete]
|
|
|
+// CHECK:STDOUT: %facet_value.cee: %type_where = facet_value %array_type, () [concrete]
|
|
|
+// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.1a5: type = fn_type @DestroyT.binding.as_type.as.Destroy.impl.Op, @DestroyT.binding.as_type.as.Destroy.impl(%facet_value.cee) [concrete]
|
|
|
+// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.39c: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.1a5 = struct_value () [concrete]
|
|
|
// CHECK:STDOUT: %facet_value.4ba: %type_where = facet_value %ULongResult, () [concrete]
|
|
|
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.429: type = fn_type @DestroyT.binding.as_type.as.Destroy.impl.Op, @DestroyT.binding.as_type.as.Destroy.impl(%facet_value.4ba) [concrete]
|
|
|
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.735: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.429 = struct_value () [concrete]
|
|
|
@@ -522,9 +835,10 @@ fn F() {
|
|
|
// CHECK:STDOUT: imports {
|
|
|
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
|
|
|
// CHECK:STDOUT: .CppCompat = %CppCompat.c59
|
|
|
+// CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
|
|
|
// CHECK:STDOUT: .UInt = %Core.UInt
|
|
|
+// CHECK:STDOUT: .Float = %Core.Float
|
|
|
// CHECK:STDOUT: .As = %Core.As
|
|
|
-// CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
|
|
|
// CHECK:STDOUT: .Destroy = %Core.Destroy
|
|
|
// CHECK:STDOUT: import Core//prelude
|
|
|
// CHECK:STDOUT: import Core//prelude/...
|
|
|
@@ -543,13 +857,9 @@ fn F() {
|
|
|
// CHECK:STDOUT: import Core//prelude/...
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT: %Core.ULongLong64: type = import_ref Core//prelude/types/cpp/int, ULongLong64, loaded [concrete = constants.%Cpp.unsigned_long_long]
|
|
|
-// CHECK:STDOUT: %Core.UInt: %UInt.type = import_ref Core//prelude/types/uint, UInt, loaded [concrete = constants.%UInt.generic]
|
|
|
-// CHECK:STDOUT: %Core.As: %As.type.90f = import_ref Core//prelude/operators/as, As, loaded [concrete = constants.%As.generic]
|
|
|
-// CHECK:STDOUT: %Core.import_ref.7bb: @Core.IntLiteral.as.As.impl.%Core.IntLiteral.as.As.impl.Convert.type (%Core.IntLiteral.as.As.impl.Convert.type.56b) = import_ref Core//prelude/types/uint, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.As.impl.%Core.IntLiteral.as.As.impl.Convert (constants.%Core.IntLiteral.as.As.impl.Convert.02d)]
|
|
|
-// CHECK:STDOUT: %As.impl_witness_table.a7d = impl_witness_table (%Core.import_ref.7bb), @Core.IntLiteral.as.As.impl [concrete]
|
|
|
// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic]
|
|
|
-// CHECK:STDOUT: %Core.import_ref.3bb: %u64.as.ImplicitAs.impl.Convert.type = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%u64.as.ImplicitAs.impl.Convert]
|
|
|
-// CHECK:STDOUT: %ImplicitAs.impl_witness_table.654 = impl_witness_table (%Core.import_ref.3bb), @u64.as.ImplicitAs.impl [concrete]
|
|
|
+// CHECK:STDOUT: %Core.import_ref.c0f: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.859 = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.665]
|
|
|
+// CHECK:STDOUT: %ImplicitAs.impl_witness_table.3da = impl_witness_table (%Core.import_ref.c0f), @Core.IntLiteral.as.ImplicitAs.impl.25f [concrete]
|
|
|
// CHECK:STDOUT: %ULongLongResult.decl: type = class_decl @ULongLongResult [concrete = constants.%ULongLongResult] {} {}
|
|
|
// CHECK:STDOUT: %PassULongLong.cpp_overload_set.value: %PassULongLong.cpp_overload_set.type = cpp_overload_set_value @PassULongLong.cpp_overload_set [concrete = constants.%PassULongLong.cpp_overload_set.value]
|
|
|
// CHECK:STDOUT: %PassULongLong__carbon_thunk.decl.f0c073.1: %PassULongLong__carbon_thunk.type.88c6c2.1 = fn_decl @PassULongLong__carbon_thunk.1 [concrete = constants.%PassULongLong__carbon_thunk.887181.1] {
|
|
|
@@ -557,14 +867,23 @@ fn F() {
|
|
|
// CHECK:STDOUT: } {
|
|
|
// CHECK:STDOUT: <elided>
|
|
|
// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %Core.import_ref.643: %Cpp.unsigned_long_long.as.ImplicitAs.impl.Convert.type = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%Cpp.unsigned_long_long.as.ImplicitAs.impl.Convert]
|
|
|
-// CHECK:STDOUT: %ImplicitAs.impl_witness_table.7cb = impl_witness_table (%Core.import_ref.643), @Cpp.unsigned_long_long.as.ImplicitAs.impl [concrete]
|
|
|
+// CHECK:STDOUT: %Core.UInt: %UInt.type = import_ref Core//prelude/types/uint, UInt, loaded [concrete = constants.%UInt.generic]
|
|
|
+// CHECK:STDOUT: %Core.import_ref.643: %Cpp.unsigned_long_long.as.ImplicitAs.impl.Convert.type.270 = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%Cpp.unsigned_long_long.as.ImplicitAs.impl.Convert.308]
|
|
|
+// CHECK:STDOUT: %ImplicitAs.impl_witness_table.7cb = impl_witness_table (%Core.import_ref.643), @Cpp.unsigned_long_long.as.ImplicitAs.impl.4ae [concrete]
|
|
|
// CHECK:STDOUT: %ULongResult.decl: type = class_decl @ULongResult [concrete = constants.%ULongResult] {} {}
|
|
|
// CHECK:STDOUT: %PassULongLong__carbon_thunk.decl.f0c073.2: %PassULongLong__carbon_thunk.type.88c6c2.2 = fn_decl @PassULongLong__carbon_thunk.2 [concrete = constants.%PassULongLong__carbon_thunk.887181.2] {
|
|
|
// CHECK:STDOUT: <elided>
|
|
|
// CHECK:STDOUT: } {
|
|
|
// CHECK:STDOUT: <elided>
|
|
|
// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT: %Core.Float: %Float.type = import_ref Core//prelude/types/float, Float, loaded [concrete = constants.%Float.generic]
|
|
|
+// CHECK:STDOUT: %Core.As: %As.type.90f = import_ref Core//prelude/operators/as, As, loaded [concrete = constants.%As.generic]
|
|
|
+// CHECK:STDOUT: %Core.import_ref.7f6: %Core.IntLiteral.as.As.impl.Convert.type = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%Core.IntLiteral.as.As.impl.Convert]
|
|
|
+// CHECK:STDOUT: %As.impl_witness_table = impl_witness_table (%Core.import_ref.7f6), @Core.IntLiteral.as.As.impl.cc1 [concrete]
|
|
|
+// CHECK:STDOUT: %Core.import_ref.b163: %Cpp.unsigned_long_long.as.ImplicitAs.impl.Convert.type.eb0 = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%Cpp.unsigned_long_long.as.ImplicitAs.impl.Convert.564]
|
|
|
+// CHECK:STDOUT: %ImplicitAs.impl_witness_table.c25 = impl_witness_table (%Core.import_ref.b163), @Cpp.unsigned_long_long.as.ImplicitAs.impl.c2d [concrete]
|
|
|
+// CHECK:STDOUT: %Core.import_ref.f5b: @Core.FloatLiteral.as.ImplicitAs.impl.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.type (%Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.528) = import_ref Core//prelude/types/float, loc{{\d+_\d+}}, loaded [symbolic = @Core.FloatLiteral.as.ImplicitAs.impl.%Core.FloatLiteral.as.ImplicitAs.impl.Convert (constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.98e)]
|
|
|
+// CHECK:STDOUT: %ImplicitAs.impl_witness_table.f5c = impl_witness_table (%Core.import_ref.f5b), @Core.FloatLiteral.as.ImplicitAs.impl [concrete]
|
|
|
// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/destroy, Destroy, loaded [concrete = constants.%Destroy.type]
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
@@ -573,26 +892,17 @@ fn F() {
|
|
|
// CHECK:STDOUT: name_binding_decl {
|
|
|
// CHECK:STDOUT: %cpp_unsigned_long_long.patt: %pattern_type.ebd = value_binding_pattern cpp_unsigned_long_long [concrete]
|
|
|
// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
|
|
|
-// CHECK:STDOUT: %int_64.loc15: Core.IntLiteral = int_value 64 [concrete = constants.%int_64]
|
|
|
-// CHECK:STDOUT: %u64.loc15: type = class_type @UInt, @UInt(constants.%int_64) [concrete = constants.%u64]
|
|
|
-// CHECK:STDOUT: %impl.elem0.loc15_58.1: %.5b8 = impl_witness_access constants.%As.impl_witness.ed2d, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.a09]
|
|
|
-// CHECK:STDOUT: %bound_method.loc15_58.1: <bound method> = bound_method %int_1, %impl.elem0.loc15_58.1 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound]
|
|
|
-// CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0.loc15_58.1, @Core.IntLiteral.as.As.impl.Convert(constants.%int_64) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn]
|
|
|
-// CHECK:STDOUT: %bound_method.loc15_58.2: <bound method> = bound_method %int_1, %specific_fn [concrete = constants.%bound_method]
|
|
|
-// CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.call: init %u64 = call %bound_method.loc15_58.2(%int_1) [concrete = constants.%int_1.f23]
|
|
|
-// CHECK:STDOUT: %.loc15_58.1: %u64 = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call [concrete = constants.%int_1.f23]
|
|
|
-// CHECK:STDOUT: %.loc15_58.2: %u64 = converted %int_1, %.loc15_58.1 [concrete = constants.%int_1.f23]
|
|
|
-// CHECK:STDOUT: %.loc15_34: type = splice_block %unsigned_long_long.ref [concrete = constants.%Cpp.unsigned_long_long] {
|
|
|
+// CHECK:STDOUT: %int_1.loc15: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
|
|
|
+// CHECK:STDOUT: %.loc15_34: type = splice_block %unsigned_long_long.ref.loc15 [concrete = constants.%Cpp.unsigned_long_long] {
|
|
|
// CHECK:STDOUT: %Cpp.ref.loc15: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
|
|
-// CHECK:STDOUT: %unsigned_long_long.ref: type = name_ref unsigned_long_long, constants.%Cpp.unsigned_long_long [concrete = constants.%Cpp.unsigned_long_long]
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %impl.elem0.loc15_58.2: %.c9b = impl_witness_access constants.%ImplicitAs.impl_witness.80f, element0 [concrete = constants.%u64.as.ImplicitAs.impl.Convert]
|
|
|
-// CHECK:STDOUT: %bound_method.loc15_58.3: <bound method> = bound_method %.loc15_58.2, %impl.elem0.loc15_58.2 [concrete = constants.%u64.as.ImplicitAs.impl.Convert.bound]
|
|
|
-// CHECK:STDOUT: %u64.as.ImplicitAs.impl.Convert.call: init %Cpp.unsigned_long_long = call %bound_method.loc15_58.3(%.loc15_58.2) [concrete = constants.%int_1.79a]
|
|
|
-// CHECK:STDOUT: %.loc15_58.3: %Cpp.unsigned_long_long = value_of_initializer %u64.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.79a]
|
|
|
-// CHECK:STDOUT: %.loc15_58.4: %Cpp.unsigned_long_long = converted %.loc15_58.2, %.loc15_58.3 [concrete = constants.%int_1.79a]
|
|
|
-// CHECK:STDOUT: %cpp_unsigned_long_long: %Cpp.unsigned_long_long = value_binding cpp_unsigned_long_long, %.loc15_58.4
|
|
|
+// CHECK:STDOUT: %unsigned_long_long.ref.loc15: type = name_ref unsigned_long_long, constants.%Cpp.unsigned_long_long [concrete = constants.%Cpp.unsigned_long_long]
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT: %impl.elem0.loc15: %.06c = impl_witness_access constants.%ImplicitAs.impl_witness.259, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.665]
|
|
|
+// CHECK:STDOUT: %bound_method.loc15: <bound method> = bound_method %int_1.loc15, %impl.elem0.loc15 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
|
|
|
+// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %Cpp.unsigned_long_long = call %bound_method.loc15(%int_1.loc15) [concrete = constants.%int_1.79a]
|
|
|
+// CHECK:STDOUT: %.loc15_56.1: %Cpp.unsigned_long_long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.79a]
|
|
|
+// CHECK:STDOUT: %.loc15_56.2: %Cpp.unsigned_long_long = converted %int_1.loc15, %.loc15_56.1 [concrete = constants.%int_1.79a]
|
|
|
+// CHECK:STDOUT: %cpp_unsigned_long_long: %Cpp.unsigned_long_long = value_binding cpp_unsigned_long_long, %.loc15_56.2
|
|
|
// CHECK:STDOUT: name_binding_decl {
|
|
|
// CHECK:STDOUT: %cpp_unsigned_long_long_result.patt: %pattern_type.633 = value_binding_pattern cpp_unsigned_long_long_result [concrete]
|
|
|
// CHECK:STDOUT: }
|
|
|
@@ -641,14 +951,14 @@ fn F() {
|
|
|
// CHECK:STDOUT: %carbon_u64.patt: %pattern_type.157 = value_binding_pattern carbon_u64 [concrete]
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT: %cpp_unsigned_long_long.ref.loc21: %Cpp.unsigned_long_long = name_ref cpp_unsigned_long_long, %cpp_unsigned_long_long
|
|
|
-// CHECK:STDOUT: %.loc21_19: type = splice_block %u64.loc21 [concrete = constants.%u64] {
|
|
|
-// CHECK:STDOUT: %int_64.loc21: Core.IntLiteral = int_value 64 [concrete = constants.%int_64]
|
|
|
-// CHECK:STDOUT: %u64.loc21: type = class_type @UInt, @UInt(constants.%int_64) [concrete = constants.%u64]
|
|
|
+// CHECK:STDOUT: %.loc21_19: type = splice_block %u64 [concrete = constants.%u64] {
|
|
|
+// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [concrete = constants.%int_64]
|
|
|
+// CHECK:STDOUT: %u64: type = class_type @UInt, @UInt(constants.%int_64) [concrete = constants.%u64]
|
|
|
// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %impl.elem0.loc21: %.82e = impl_witness_access constants.%ImplicitAs.impl_witness.67a, element0 [concrete = constants.%Cpp.unsigned_long_long.as.ImplicitAs.impl.Convert]
|
|
|
+// CHECK:STDOUT: %impl.elem0.loc21: %.82e = impl_witness_access constants.%ImplicitAs.impl_witness.67a, element0 [concrete = constants.%Cpp.unsigned_long_long.as.ImplicitAs.impl.Convert.308]
|
|
|
// CHECK:STDOUT: %bound_method.loc21: <bound method> = bound_method %cpp_unsigned_long_long.ref.loc21, %impl.elem0.loc21
|
|
|
-// CHECK:STDOUT: %Cpp.unsigned_long_long.as.ImplicitAs.impl.Convert.call: init %u64 = call %bound_method.loc21(%cpp_unsigned_long_long.ref.loc21)
|
|
|
-// CHECK:STDOUT: %.loc21_25.1: %u64 = value_of_initializer %Cpp.unsigned_long_long.as.ImplicitAs.impl.Convert.call
|
|
|
+// CHECK:STDOUT: %Cpp.unsigned_long_long.as.ImplicitAs.impl.Convert.call.loc21: init %u64 = call %bound_method.loc21(%cpp_unsigned_long_long.ref.loc21)
|
|
|
+// CHECK:STDOUT: %.loc21_25.1: %u64 = value_of_initializer %Cpp.unsigned_long_long.as.ImplicitAs.impl.Convert.call.loc21
|
|
|
// CHECK:STDOUT: %.loc21_25.2: %u64 = converted %cpp_unsigned_long_long.ref.loc21, %.loc21_25.1
|
|
|
// CHECK:STDOUT: %carbon_u64: %u64 = value_binding carbon_u64, %.loc21_25.2
|
|
|
// CHECK:STDOUT: name_binding_decl {
|
|
|
@@ -668,17 +978,59 @@ fn F() {
|
|
|
// CHECK:STDOUT: %.loc22_72.3: ref %ULongResult = temporary %.loc22_72.1, %.loc22_72.2
|
|
|
// CHECK:STDOUT: %.loc22_72.4: %ULongResult = acquire_value %.loc22_72.3
|
|
|
// CHECK:STDOUT: %carbon_u64_result: %ULongResult = value_binding carbon_u64_result, %.loc22_72.4
|
|
|
+// CHECK:STDOUT: name_binding_decl {
|
|
|
+// CHECK:STDOUT: %a.patt: %pattern_type.b36 = ref_binding_pattern a [concrete]
|
|
|
+// CHECK:STDOUT: %a.var_patt: %pattern_type.b36 = var_pattern %a.patt [concrete]
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT: %a.var: ref %array_type = var %a.var_patt
|
|
|
+// CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float.674]
|
|
|
+// CHECK:STDOUT: %.loc24_57.1: %tuple.type = tuple_literal (%float) [concrete = constants.%tuple]
|
|
|
+// CHECK:STDOUT: %impl.elem0.loc24_57: %.393 = impl_witness_access constants.%ImplicitAs.impl_witness.e0e, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.947]
|
|
|
+// CHECK:STDOUT: %bound_method.loc24_57.1: <bound method> = bound_method %float, %impl.elem0.loc24_57 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound]
|
|
|
+// CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0.loc24_57, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
|
|
+// CHECK:STDOUT: %bound_method.loc24_57.2: <bound method> = bound_method %float, %specific_fn [concrete = constants.%bound_method]
|
|
|
+// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call: init %f32.97e = call %bound_method.loc24_57.2(%float) [concrete = constants.%float.e3b]
|
|
|
+// CHECK:STDOUT: %.loc24_57.2: init %f32.97e = converted %float, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%float.e3b]
|
|
|
+// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0]
|
|
|
+// CHECK:STDOUT: %.loc24_57.3: ref %f32.97e = array_index %a.var, %int_0
|
|
|
+// CHECK:STDOUT: %.loc24_57.4: init %f32.97e = initialize_from %.loc24_57.2 to %.loc24_57.3 [concrete = constants.%float.e3b]
|
|
|
+// CHECK:STDOUT: %.loc24_57.5: init %array_type = array_init (%.loc24_57.4) to %a.var [concrete = constants.%array]
|
|
|
+// CHECK:STDOUT: %.loc24_3: init %array_type = converted %.loc24_57.1, %.loc24_57.5 [concrete = constants.%array]
|
|
|
+// CHECK:STDOUT: assign %a.var, %.loc24_3
|
|
|
+// CHECK:STDOUT: %.loc24_48: type = splice_block %array_type [concrete = constants.%array_type] {
|
|
|
+// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
|
|
|
+// CHECK:STDOUT: %f32: type = class_type @Float, @Float(constants.%int_32) [concrete = constants.%f32.97e]
|
|
|
+// CHECK:STDOUT: %int_1.loc24: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
|
|
|
+// CHECK:STDOUT: %Cpp.ref.loc24: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
|
|
+// CHECK:STDOUT: %unsigned_long_long.ref.loc24: type = name_ref unsigned_long_long, constants.%Cpp.unsigned_long_long [concrete = constants.%Cpp.unsigned_long_long]
|
|
|
+// CHECK:STDOUT: %impl.elem0.loc24_23.1: %.b95 = impl_witness_access constants.%As.impl_witness, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert]
|
|
|
+// CHECK:STDOUT: %bound_method.loc24_23.1: <bound method> = bound_method %int_1.loc24, %impl.elem0.loc24_23.1 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound]
|
|
|
+// CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.call: init %Cpp.unsigned_long_long = call %bound_method.loc24_23.1(%int_1.loc24) [concrete = constants.%int_1.79a]
|
|
|
+// CHECK:STDOUT: %.loc24_23.1: %Cpp.unsigned_long_long = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call [concrete = constants.%int_1.79a]
|
|
|
+// CHECK:STDOUT: %.loc24_23.2: %Cpp.unsigned_long_long = converted %int_1.loc24, %.loc24_23.1 [concrete = constants.%int_1.79a]
|
|
|
+// CHECK:STDOUT: %impl.elem0.loc24_23.2: %.881 = impl_witness_access constants.%ImplicitAs.impl_witness.80a, element0 [concrete = constants.%Cpp.unsigned_long_long.as.ImplicitAs.impl.Convert.564]
|
|
|
+// CHECK:STDOUT: %bound_method.loc24_23.2: <bound method> = bound_method %.loc24_23.2, %impl.elem0.loc24_23.2 [concrete = constants.%Cpp.unsigned_long_long.as.ImplicitAs.impl.Convert.bound]
|
|
|
+// CHECK:STDOUT: %Cpp.unsigned_long_long.as.ImplicitAs.impl.Convert.call.loc24: init Core.IntLiteral = call %bound_method.loc24_23.2(%.loc24_23.2) [concrete = constants.%int_1.5b8]
|
|
|
+// CHECK:STDOUT: %.loc24_23.3: Core.IntLiteral = value_of_initializer %Cpp.unsigned_long_long.as.ImplicitAs.impl.Convert.call.loc24 [concrete = constants.%int_1.5b8]
|
|
|
+// CHECK:STDOUT: %.loc24_23.4: Core.IntLiteral = converted %.loc24_23.2, %.loc24_23.3 [concrete = constants.%int_1.5b8]
|
|
|
+// CHECK:STDOUT: %array_type: type = array_type %.loc24_23.4, %f32 [concrete = constants.%array_type]
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT: %a: ref %array_type = ref_binding a, %a.var
|
|
|
+// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.bound.loc24: <bound method> = bound_method %a.var, constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.39c
|
|
|
+// CHECK:STDOUT: <elided>
|
|
|
+// CHECK:STDOUT: %bound_method.loc24_3: <bound method> = bound_method %a.var, %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.1
|
|
|
+// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.call.loc24: init %empty_tuple.type = call %bound_method.loc24_3(%a.var)
|
|
|
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.bound.loc22: <bound method> = bound_method %.loc22_72.3, constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.735
|
|
|
// CHECK:STDOUT: <elided>
|
|
|
-// CHECK:STDOUT: %bound_method.loc22: <bound method> = bound_method %.loc22_72.3, %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.1
|
|
|
+// CHECK:STDOUT: %bound_method.loc22: <bound method> = bound_method %.loc22_72.3, %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.2
|
|
|
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.call.loc22: init %empty_tuple.type = call %bound_method.loc22(%.loc22_72.3)
|
|
|
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.bound.loc19: <bound method> = bound_method %.loc19_98.3, constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.3fd
|
|
|
// CHECK:STDOUT: <elided>
|
|
|
-// CHECK:STDOUT: %bound_method.loc19: <bound method> = bound_method %.loc19_98.3, %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.2
|
|
|
+// CHECK:STDOUT: %bound_method.loc19: <bound method> = bound_method %.loc19_98.3, %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.3
|
|
|
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.call.loc19: init %empty_tuple.type = call %bound_method.loc19(%.loc19_98.3)
|
|
|
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.bound.loc16: <bound method> = bound_method %.loc16_100.3, constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.3fd
|
|
|
// CHECK:STDOUT: <elided>
|
|
|
-// CHECK:STDOUT: %bound_method.loc16: <bound method> = bound_method %.loc16_100.3, %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.3
|
|
|
+// CHECK:STDOUT: %bound_method.loc16: <bound method> = bound_method %.loc16_100.3, %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.4
|
|
|
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.call.loc16: init %empty_tuple.type = call %bound_method.loc16(%.loc16_100.3)
|
|
|
// CHECK:STDOUT: <elided>
|
|
|
// CHECK:STDOUT: }
|