mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Model Core.Int as a class type (#4644)
Instead of treating `Core.Int` as the toolchain's builtin `IntType`, model it as a class that adapts the builtin type. This aligns us better with the intended language model, gives an associated library for `impl`s involving `Core.Int` to live within, and opens the door adding member functions to `Core.Int` if we decide that is desirable. Remarkably it also seems to make the formatted SemIR a little smaller, because a call to a generic class generates less IR than a call to a function.
This commit is contained in:
+12
-26
@@ -18,9 +18,7 @@ fn G() {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template]
|
||||
// CHECK:STDOUT: %Int.type: type = fn_type @Int [template]
|
||||
// CHECK:STDOUT: %Int: %Int.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template]
|
||||
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template]
|
||||
// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type, type) [template]
|
||||
// CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32, %i32, %i32) [template]
|
||||
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
|
||||
@@ -36,7 +34,7 @@ fn G() {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
|
||||
// CHECK:STDOUT: .Int = %import_ref
|
||||
// CHECK:STDOUT: .Int = %import_ref.1
|
||||
// CHECK:STDOUT: import Core//prelude
|
||||
// CHECK:STDOUT: import Core//prelude/...
|
||||
// CHECK:STDOUT: }
|
||||
@@ -54,19 +52,13 @@ fn G() {
|
||||
// CHECK:STDOUT: %return.param_patt: %tuple.type.2 = out_param_pattern %return.patt, runtime_param0
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %int_32.loc11_12: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc11_12: init type = call constants.%Int(%int_32.loc11_12) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %i32.loc11_12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_32.loc11_17: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc11_17: init type = call constants.%Int(%int_32.loc11_17) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %i32.loc11_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_32.loc11_22: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc11_22: init type = call constants.%Int(%int_32.loc11_22) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc11_25.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc11_12, %int.make_type_signed.loc11_17, %int.make_type_signed.loc11_22)
|
||||
// CHECK:STDOUT: %.loc11_25.2: type = value_of_initializer %int.make_type_signed.loc11_12 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc11_25.3: type = converted %int.make_type_signed.loc11_12, %.loc11_25.2 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc11_25.4: type = value_of_initializer %int.make_type_signed.loc11_17 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc11_25.5: type = converted %int.make_type_signed.loc11_17, %.loc11_25.4 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc11_25.6: type = value_of_initializer %int.make_type_signed.loc11_22 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc11_25.7: type = converted %int.make_type_signed.loc11_22, %.loc11_25.6 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc11_25.8: type = converted %.loc11_25.1, constants.%tuple.type.2 [template = constants.%tuple.type.2]
|
||||
// CHECK:STDOUT: %i32.loc11_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc11_25.1: %tuple.type.1 = tuple_literal (%i32.loc11_12, %i32.loc11_17, %i32.loc11_22)
|
||||
// CHECK:STDOUT: %.loc11_25.2: type = converted %.loc11_25.1, constants.%tuple.type.2 [template = constants.%tuple.type.2]
|
||||
// CHECK:STDOUT: %return.param: ref %tuple.type.2 = out_param runtime_param0
|
||||
// CHECK:STDOUT: %return: ref %tuple.type.2 = return_slot %return.param
|
||||
// CHECK:STDOUT: }
|
||||
@@ -78,20 +70,14 @@ fn G() {
|
||||
// CHECK:STDOUT: fn @G() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %int_32.loc14_12: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc14_12: init type = call constants.%Int(%int_32.loc14_12) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %i32.loc14_12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_32.loc14_17: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc14_17: init type = call constants.%Int(%int_32.loc14_17) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %i32.loc14_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_32.loc14_22: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc14_22: init type = call constants.%Int(%int_32.loc14_22) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc14_25.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc14_12, %int.make_type_signed.loc14_17, %int.make_type_signed.loc14_22)
|
||||
// CHECK:STDOUT: %i32.loc14_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc14_25.1: %tuple.type.1 = tuple_literal (%i32.loc14_12, %i32.loc14_17, %i32.loc14_22)
|
||||
// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2]
|
||||
// CHECK:STDOUT: %.loc14_25.2: type = value_of_initializer %int.make_type_signed.loc14_12 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc14_25.3: type = converted %int.make_type_signed.loc14_12, %.loc14_25.2 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc14_25.4: type = value_of_initializer %int.make_type_signed.loc14_17 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc14_25.5: type = converted %int.make_type_signed.loc14_17, %.loc14_25.4 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc14_25.6: type = value_of_initializer %int.make_type_signed.loc14_22 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc14_25.7: type = converted %int.make_type_signed.loc14_22, %.loc14_25.6 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc14_25.8: type = converted %.loc14_25.1, constants.%tuple.type.2 [template = constants.%tuple.type.2]
|
||||
// CHECK:STDOUT: %.loc14_25.2: type = converted %.loc14_25.1, constants.%tuple.type.2 [template = constants.%tuple.type.2]
|
||||
// CHECK:STDOUT: %array_type: type = array_type %int_2, %tuple.type.2 [template = constants.%array_type]
|
||||
// CHECK:STDOUT: %v.var: ref %array_type = var v
|
||||
// CHECK:STDOUT: %v: ref %array_type = bind_name v, %v.var
|
||||
|
||||
+20
-30
@@ -20,9 +20,7 @@ fn G() {
|
||||
// CHECK:STDOUT: %G.type: type = fn_type @G [template]
|
||||
// CHECK:STDOUT: %G: %G.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template]
|
||||
// CHECK:STDOUT: %Int.type: type = fn_type @Int [template]
|
||||
// CHECK:STDOUT: %Int: %Int.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template]
|
||||
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template]
|
||||
// CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template]
|
||||
// CHECK:STDOUT: %array_type: type = array_type %int_3.1, %i32 [template]
|
||||
// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template]
|
||||
@@ -30,16 +28,16 @@ fn G() {
|
||||
// CHECK:STDOUT: %tuple.type.1: type = tuple_type (Core.IntLiteral, Core.IntLiteral, Core.IntLiteral) [template]
|
||||
// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template]
|
||||
// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template]
|
||||
// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template]
|
||||
// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template]
|
||||
// CHECK:STDOUT: %interface.9: <witness> = interface_witness (%Convert.14) [template]
|
||||
// CHECK:STDOUT: %Convert.bound.1: <bound method> = bound_method %int_1.1, %Convert.14 [template]
|
||||
// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template]
|
||||
// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template]
|
||||
// CHECK:STDOUT: %interface.5: <witness> = interface_witness (%Convert.10) [template]
|
||||
// CHECK:STDOUT: %Convert.bound.1: <bound method> = bound_method %int_1.1, %Convert.10 [template]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.1: <specific function> = specific_function %Convert.bound.1, @Convert.2(%int_32) [template]
|
||||
// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template]
|
||||
// CHECK:STDOUT: %Convert.bound.2: <bound method> = bound_method %int_2.1, %Convert.14 [template]
|
||||
// CHECK:STDOUT: %Convert.bound.2: <bound method> = bound_method %int_2.1, %Convert.10 [template]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.2: <specific function> = specific_function %Convert.bound.2, @Convert.2(%int_32) [template]
|
||||
// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template]
|
||||
// CHECK:STDOUT: %Convert.bound.3: <bound method> = bound_method %int_3.1, %Convert.14 [template]
|
||||
// CHECK:STDOUT: %Convert.bound.3: <bound method> = bound_method %int_3.1, %Convert.10 [template]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.3: <specific function> = specific_function %Convert.bound.3, @Convert.2(%int_32) [template]
|
||||
// CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template]
|
||||
// CHECK:STDOUT: %array: %array_type = tuple_value (%int_1.2, %int_2.2, %int_3.2) [template]
|
||||
@@ -51,7 +49,7 @@ fn G() {
|
||||
// CHECK:STDOUT: imports {
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
|
||||
// CHECK:STDOUT: .Int = %import_ref.1
|
||||
// CHECK:STDOUT: .ImplicitAs = %import_ref.2
|
||||
// CHECK:STDOUT: .ImplicitAs = %import_ref.5
|
||||
// CHECK:STDOUT: import Core//prelude
|
||||
// CHECK:STDOUT: import Core//prelude/...
|
||||
// CHECK:STDOUT: }
|
||||
@@ -69,10 +67,8 @@ fn G() {
|
||||
// CHECK:STDOUT: fn @G() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %int_32.loc13: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc13: init type = call constants.%Int(%int_32.loc13) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %i32.loc13: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_3.loc13_16: Core.IntLiteral = int_value 3 [template = constants.%int_3.1]
|
||||
// CHECK:STDOUT: %.loc13_11.1: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc13_11.2: type = converted %int.make_type_signed.loc13, %.loc13_11.1 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %array_type: type = array_type %int_3.loc13_16, %i32 [template = constants.%array_type]
|
||||
// CHECK:STDOUT: %a.var: ref %array_type = var a
|
||||
// CHECK:STDOUT: %a: ref %array_type = bind_name a, %a.var
|
||||
@@ -80,7 +76,7 @@ fn G() {
|
||||
// CHECK:STDOUT: %int_2.loc13_25: Core.IntLiteral = int_value 2 [template = constants.%int_2.1]
|
||||
// CHECK:STDOUT: %int_3.loc13_28: Core.IntLiteral = int_value 3 [template = constants.%int_3.1]
|
||||
// CHECK:STDOUT: %.loc13_29.1: %tuple.type.1 = tuple_literal (%int_1.loc13_22, %int_2.loc13_25, %int_3.loc13_28)
|
||||
// CHECK:STDOUT: %impl.elem0.loc13_29.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14]
|
||||
// CHECK:STDOUT: %impl.elem0.loc13_29.1: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10]
|
||||
// CHECK:STDOUT: %Convert.bound.loc13_29.1: <bound method> = bound_method %int_1.loc13_22, %impl.elem0.loc13_29.1 [template = constants.%Convert.bound.1]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc13_29.1: <specific function> = specific_function %Convert.bound.loc13_29.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc13_29.1: init %i32 = call %Convert.specific_fn.loc13_29.1(%int_1.loc13_22) [template = constants.%int_1.2]
|
||||
@@ -88,7 +84,7 @@ fn G() {
|
||||
// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0]
|
||||
// CHECK:STDOUT: %.loc13_29.3: ref %i32 = array_index %a.var, %int_0
|
||||
// CHECK:STDOUT: %.loc13_29.4: init %i32 = initialize_from %.loc13_29.2 to %.loc13_29.3 [template = constants.%int_1.2]
|
||||
// CHECK:STDOUT: %impl.elem0.loc13_29.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14]
|
||||
// CHECK:STDOUT: %impl.elem0.loc13_29.2: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10]
|
||||
// CHECK:STDOUT: %Convert.bound.loc13_29.2: <bound method> = bound_method %int_2.loc13_25, %impl.elem0.loc13_29.2 [template = constants.%Convert.bound.2]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc13_29.2: <specific function> = specific_function %Convert.bound.loc13_29.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc13_29.2: init %i32 = call %Convert.specific_fn.loc13_29.2(%int_2.loc13_25) [template = constants.%int_2.2]
|
||||
@@ -96,7 +92,7 @@ fn G() {
|
||||
// CHECK:STDOUT: %int_1.loc13_29: Core.IntLiteral = int_value 1 [template = constants.%int_1.1]
|
||||
// CHECK:STDOUT: %.loc13_29.6: ref %i32 = array_index %a.var, %int_1.loc13_29
|
||||
// CHECK:STDOUT: %.loc13_29.7: init %i32 = initialize_from %.loc13_29.5 to %.loc13_29.6 [template = constants.%int_2.2]
|
||||
// CHECK:STDOUT: %impl.elem0.loc13_29.3: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14]
|
||||
// CHECK:STDOUT: %impl.elem0.loc13_29.3: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10]
|
||||
// CHECK:STDOUT: %Convert.bound.loc13_29.3: <bound method> = bound_method %int_3.loc13_28, %impl.elem0.loc13_29.3 [template = constants.%Convert.bound.3]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc13_29.3: <specific function> = specific_function %Convert.bound.loc13_29.3, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc13_29.3: init %i32 = call %Convert.specific_fn.loc13_29.3(%int_3.loc13_28) [template = constants.%int_3.2]
|
||||
@@ -108,40 +104,34 @@ fn G() {
|
||||
// CHECK:STDOUT: %.loc13_30: init %array_type = converted %.loc13_29.1, %.loc13_29.11 [template = constants.%array]
|
||||
// CHECK:STDOUT: assign %a.var, %.loc13_30
|
||||
// CHECK:STDOUT: %int_32.loc14_11: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc14_11: init type = call constants.%Int(%int_32.loc14_11) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %i32.loc14_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_32.loc14_16: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc14_16: init type = call constants.%Int(%int_32.loc14_16) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %i32.loc14_16: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_32.loc14_21: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc14_21: init type = call constants.%Int(%int_32.loc14_21) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc14_24.1: %tuple.type.2 = tuple_literal (%int.make_type_signed.loc14_11, %int.make_type_signed.loc14_16, %int.make_type_signed.loc14_21)
|
||||
// CHECK:STDOUT: %.loc14_24.2: type = value_of_initializer %int.make_type_signed.loc14_11 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc14_24.3: type = converted %int.make_type_signed.loc14_11, %.loc14_24.2 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc14_24.4: type = value_of_initializer %int.make_type_signed.loc14_16 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc14_24.5: type = converted %int.make_type_signed.loc14_16, %.loc14_24.4 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc14_24.6: type = value_of_initializer %int.make_type_signed.loc14_21 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc14_24.7: type = converted %int.make_type_signed.loc14_21, %.loc14_24.6 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc14_24.8: type = converted %.loc14_24.1, constants.%tuple.type.3 [template = constants.%tuple.type.3]
|
||||
// CHECK:STDOUT: %i32.loc14_21: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc14_24.1: %tuple.type.2 = tuple_literal (%i32.loc14_11, %i32.loc14_16, %i32.loc14_21)
|
||||
// CHECK:STDOUT: %.loc14_24.2: type = converted %.loc14_24.1, constants.%tuple.type.3 [template = constants.%tuple.type.3]
|
||||
// CHECK:STDOUT: %b.var: ref %tuple.type.3 = var b
|
||||
// CHECK:STDOUT: %b: ref %tuple.type.3 = bind_name b, %b.var
|
||||
// CHECK:STDOUT: %int_1.loc14: Core.IntLiteral = int_value 1 [template = constants.%int_1.1]
|
||||
// CHECK:STDOUT: %int_2.loc14: Core.IntLiteral = int_value 2 [template = constants.%int_2.1]
|
||||
// CHECK:STDOUT: %int_3.loc14: Core.IntLiteral = int_value 3 [template = constants.%int_3.1]
|
||||
// CHECK:STDOUT: %.loc14_36.1: %tuple.type.1 = tuple_literal (%int_1.loc14, %int_2.loc14, %int_3.loc14)
|
||||
// CHECK:STDOUT: %impl.elem0.loc14_36.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14]
|
||||
// CHECK:STDOUT: %impl.elem0.loc14_36.1: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10]
|
||||
// CHECK:STDOUT: %Convert.bound.loc14_36.1: <bound method> = bound_method %int_1.loc14, %impl.elem0.loc14_36.1 [template = constants.%Convert.bound.1]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc14_36.1: <specific function> = specific_function %Convert.bound.loc14_36.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc14_36.1: init %i32 = call %Convert.specific_fn.loc14_36.1(%int_1.loc14) [template = constants.%int_1.2]
|
||||
// CHECK:STDOUT: %.loc14_36.2: init %i32 = converted %int_1.loc14, %int.convert_checked.loc14_36.1 [template = constants.%int_1.2]
|
||||
// CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access %b.var, element0
|
||||
// CHECK:STDOUT: %.loc14_36.3: init %i32 = initialize_from %.loc14_36.2 to %tuple.elem0 [template = constants.%int_1.2]
|
||||
// CHECK:STDOUT: %impl.elem0.loc14_36.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14]
|
||||
// CHECK:STDOUT: %impl.elem0.loc14_36.2: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10]
|
||||
// CHECK:STDOUT: %Convert.bound.loc14_36.2: <bound method> = bound_method %int_2.loc14, %impl.elem0.loc14_36.2 [template = constants.%Convert.bound.2]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc14_36.2: <specific function> = specific_function %Convert.bound.loc14_36.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc14_36.2: init %i32 = call %Convert.specific_fn.loc14_36.2(%int_2.loc14) [template = constants.%int_2.2]
|
||||
// CHECK:STDOUT: %.loc14_36.4: init %i32 = converted %int_2.loc14, %int.convert_checked.loc14_36.2 [template = constants.%int_2.2]
|
||||
// CHECK:STDOUT: %tuple.elem1: ref %i32 = tuple_access %b.var, element1
|
||||
// CHECK:STDOUT: %.loc14_36.5: init %i32 = initialize_from %.loc14_36.4 to %tuple.elem1 [template = constants.%int_2.2]
|
||||
// CHECK:STDOUT: %impl.elem0.loc14_36.3: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14]
|
||||
// CHECK:STDOUT: %impl.elem0.loc14_36.3: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10]
|
||||
// CHECK:STDOUT: %Convert.bound.loc14_36.3: <bound method> = bound_method %int_3.loc14, %impl.elem0.loc14_36.3 [template = constants.%Convert.bound.3]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc14_36.3: <specific function> = specific_function %Convert.bound.loc14_36.3, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc14_36.3: init %i32 = call %Convert.specific_fn.loc14_36.3(%int_3.loc14) [template = constants.%int_3.2]
|
||||
|
||||
+11
-17
@@ -18,9 +18,7 @@ fn Run() {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template]
|
||||
// CHECK:STDOUT: %Int.type: type = fn_type @Int [template]
|
||||
// CHECK:STDOUT: %Int: %Int.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template]
|
||||
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template]
|
||||
// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template]
|
||||
// CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32) [template]
|
||||
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
|
||||
@@ -28,10 +26,10 @@ fn Run() {
|
||||
// CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template]
|
||||
// CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral) [template]
|
||||
// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template]
|
||||
// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template]
|
||||
// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template]
|
||||
// CHECK:STDOUT: %interface.9: <witness> = interface_witness (%Convert.14) [template]
|
||||
// CHECK:STDOUT: %Convert.bound: <bound method> = bound_method %int_0.1, %Convert.14 [template]
|
||||
// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template]
|
||||
// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template]
|
||||
// CHECK:STDOUT: %interface.5: <witness> = interface_witness (%Convert.10) [template]
|
||||
// CHECK:STDOUT: %Convert.bound: <bound method> = bound_method %int_0.1, %Convert.10 [template]
|
||||
// CHECK:STDOUT: %Convert.specific_fn: <specific function> = specific_function %Convert.bound, @Convert.2(%int_32) [template]
|
||||
// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template]
|
||||
// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%int_0.2) [template]
|
||||
@@ -44,7 +42,7 @@ fn Run() {
|
||||
// CHECK:STDOUT: imports {
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
|
||||
// CHECK:STDOUT: .Int = %import_ref.1
|
||||
// CHECK:STDOUT: .ImplicitAs = %import_ref.2
|
||||
// CHECK:STDOUT: .ImplicitAs = %import_ref.5
|
||||
// CHECK:STDOUT: import Core//prelude
|
||||
// CHECK:STDOUT: import Core//prelude/...
|
||||
// CHECK:STDOUT: }
|
||||
@@ -62,11 +60,9 @@ fn Run() {
|
||||
// CHECK:STDOUT: %return.param_patt: %tuple.type.2 = out_param_pattern %return.patt, runtime_param0
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc11_16.1: %tuple.type.1 = tuple_literal (%int.make_type_signed)
|
||||
// CHECK:STDOUT: %.loc11_16.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc11_16.3: type = converted %int.make_type_signed, %.loc11_16.2 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc11_16.4: type = converted %.loc11_16.1, constants.%tuple.type.2 [template = constants.%tuple.type.2]
|
||||
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc11_16.1: %tuple.type.1 = tuple_literal (%i32)
|
||||
// CHECK:STDOUT: %.loc11_16.2: type = converted %.loc11_16.1, constants.%tuple.type.2 [template = constants.%tuple.type.2]
|
||||
// CHECK:STDOUT: %return.param: ref %tuple.type.2 = out_param runtime_param0
|
||||
// CHECK:STDOUT: %return: ref %tuple.type.2 = return_slot %return.param
|
||||
// CHECK:STDOUT: }
|
||||
@@ -77,7 +73,7 @@ fn Run() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1]
|
||||
// CHECK:STDOUT: %.loc11_30.1: %tuple.type.3 = tuple_literal (%int_0)
|
||||
// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14]
|
||||
// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10]
|
||||
// CHECK:STDOUT: %Convert.bound: <bound method> = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound]
|
||||
// CHECK:STDOUT: %Convert.specific_fn: <specific function> = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn]
|
||||
// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2]
|
||||
@@ -91,10 +87,8 @@ fn Run() {
|
||||
// CHECK:STDOUT: fn @Run() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1]
|
||||
// CHECK:STDOUT: %.loc14_11.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc14_11.2: type = converted %int.make_type_signed, %.loc14_11.1 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %array_type: type = array_type %int_1, %i32 [template = constants.%array_type]
|
||||
// CHECK:STDOUT: %t.var: ref %array_type = var t
|
||||
// CHECK:STDOUT: %t: ref %array_type = bind_name t, %t.var
|
||||
|
||||
+17
-27
@@ -15,9 +15,7 @@ var b: [i32; 3] = a;
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template]
|
||||
// CHECK:STDOUT: %Int.type: type = fn_type @Int [template]
|
||||
// CHECK:STDOUT: %Int: %Int.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template]
|
||||
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template]
|
||||
// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type, type) [template]
|
||||
// CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32, %i32, %i32) [template]
|
||||
// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template]
|
||||
@@ -25,16 +23,16 @@ var b: [i32; 3] = a;
|
||||
// CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template]
|
||||
// CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral, Core.IntLiteral, Core.IntLiteral) [template]
|
||||
// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template]
|
||||
// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template]
|
||||
// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template]
|
||||
// CHECK:STDOUT: %interface.9: <witness> = interface_witness (%Convert.14) [template]
|
||||
// CHECK:STDOUT: %Convert.bound.1: <bound method> = bound_method %int_1.1, %Convert.14 [template]
|
||||
// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template]
|
||||
// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template]
|
||||
// CHECK:STDOUT: %interface.5: <witness> = interface_witness (%Convert.10) [template]
|
||||
// CHECK:STDOUT: %Convert.bound.1: <bound method> = bound_method %int_1.1, %Convert.10 [template]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.1: <specific function> = specific_function %Convert.bound.1, @Convert.2(%int_32) [template]
|
||||
// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template]
|
||||
// CHECK:STDOUT: %Convert.bound.2: <bound method> = bound_method %int_2.1, %Convert.14 [template]
|
||||
// CHECK:STDOUT: %Convert.bound.2: <bound method> = bound_method %int_2.1, %Convert.10 [template]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.2: <specific function> = specific_function %Convert.bound.2, @Convert.2(%int_32) [template]
|
||||
// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template]
|
||||
// CHECK:STDOUT: %Convert.bound.3: <bound method> = bound_method %int_3.1, %Convert.14 [template]
|
||||
// CHECK:STDOUT: %Convert.bound.3: <bound method> = bound_method %int_3.1, %Convert.10 [template]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.3: <specific function> = specific_function %Convert.bound.3, @Convert.2(%int_32) [template]
|
||||
// CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template]
|
||||
// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%int_1.2, %int_2.2, %int_3.2) [template]
|
||||
@@ -45,7 +43,7 @@ var b: [i32; 3] = a;
|
||||
// CHECK:STDOUT: imports {
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
|
||||
// CHECK:STDOUT: .Int = %import_ref.1
|
||||
// CHECK:STDOUT: .ImplicitAs = %import_ref.2
|
||||
// CHECK:STDOUT: .ImplicitAs = %import_ref.5
|
||||
// CHECK:STDOUT: import Core//prelude
|
||||
// CHECK:STDOUT: import Core//prelude/...
|
||||
// CHECK:STDOUT: }
|
||||
@@ -59,26 +57,18 @@ var b: [i32; 3] = a;
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %int_32.loc11_9: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc11_9: init type = call constants.%Int(%int_32.loc11_9) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %i32.loc11_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_32.loc11_14: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc11_14: init type = call constants.%Int(%int_32.loc11_14) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %i32.loc11_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_32.loc11_19: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc11_19: init type = call constants.%Int(%int_32.loc11_19) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc11_22.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc11_9, %int.make_type_signed.loc11_14, %int.make_type_signed.loc11_19)
|
||||
// CHECK:STDOUT: %.loc11_22.2: type = value_of_initializer %int.make_type_signed.loc11_9 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc11_22.3: type = converted %int.make_type_signed.loc11_9, %.loc11_22.2 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc11_22.4: type = value_of_initializer %int.make_type_signed.loc11_14 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc11_22.5: type = converted %int.make_type_signed.loc11_14, %.loc11_22.4 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc11_22.6: type = value_of_initializer %int.make_type_signed.loc11_19 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc11_22.7: type = converted %int.make_type_signed.loc11_19, %.loc11_22.6 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc11_22.8: type = converted %.loc11_22.1, constants.%tuple.type.2 [template = constants.%tuple.type.2]
|
||||
// CHECK:STDOUT: %i32.loc11_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc11_22.1: %tuple.type.1 = tuple_literal (%i32.loc11_9, %i32.loc11_14, %i32.loc11_19)
|
||||
// CHECK:STDOUT: %.loc11_22.2: type = converted %.loc11_22.1, constants.%tuple.type.2 [template = constants.%tuple.type.2]
|
||||
// CHECK:STDOUT: %a.var: ref %tuple.type.2 = var a
|
||||
// CHECK:STDOUT: %a: ref %tuple.type.2 = bind_name a, %a.var
|
||||
// CHECK:STDOUT: %int_32.loc12: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%int_32.loc12) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %i32.loc12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1]
|
||||
// CHECK:STDOUT: %.loc12_9.1: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc12_9.2: type = converted %int.make_type_signed.loc12, %.loc12_9.1 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %array_type: type = array_type %int_3, %i32 [template = constants.%array_type]
|
||||
// CHECK:STDOUT: %b.var: ref %array_type = var b
|
||||
// CHECK:STDOUT: %b: ref %array_type = bind_name b, %b.var
|
||||
@@ -90,21 +80,21 @@ var b: [i32; 3] = a;
|
||||
// CHECK:STDOUT: %int_2.loc11: Core.IntLiteral = int_value 2 [template = constants.%int_2.1]
|
||||
// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1]
|
||||
// CHECK:STDOUT: %.loc11_34.1: %tuple.type.3 = tuple_literal (%int_1.loc11, %int_2.loc11, %int_3)
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_34.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14]
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_34.1: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10]
|
||||
// CHECK:STDOUT: %Convert.bound.loc11_34.1: <bound method> = bound_method %int_1.loc11, %impl.elem0.loc11_34.1 [template = constants.%Convert.bound.1]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc11_34.1: <specific function> = specific_function %Convert.bound.loc11_34.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc11_34.1: init %i32 = call %Convert.specific_fn.loc11_34.1(%int_1.loc11) [template = constants.%int_1.2]
|
||||
// CHECK:STDOUT: %.loc11_34.2: init %i32 = converted %int_1.loc11, %int.convert_checked.loc11_34.1 [template = constants.%int_1.2]
|
||||
// CHECK:STDOUT: %tuple.elem0.loc11: ref %i32 = tuple_access file.%a.var, element0
|
||||
// CHECK:STDOUT: %.loc11_34.3: init %i32 = initialize_from %.loc11_34.2 to %tuple.elem0.loc11 [template = constants.%int_1.2]
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_34.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14]
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_34.2: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10]
|
||||
// CHECK:STDOUT: %Convert.bound.loc11_34.2: <bound method> = bound_method %int_2.loc11, %impl.elem0.loc11_34.2 [template = constants.%Convert.bound.2]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc11_34.2: <specific function> = specific_function %Convert.bound.loc11_34.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc11_34.2: init %i32 = call %Convert.specific_fn.loc11_34.2(%int_2.loc11) [template = constants.%int_2.2]
|
||||
// CHECK:STDOUT: %.loc11_34.4: init %i32 = converted %int_2.loc11, %int.convert_checked.loc11_34.2 [template = constants.%int_2.2]
|
||||
// CHECK:STDOUT: %tuple.elem1.loc11: ref %i32 = tuple_access file.%a.var, element1
|
||||
// CHECK:STDOUT: %.loc11_34.5: init %i32 = initialize_from %.loc11_34.4 to %tuple.elem1.loc11 [template = constants.%int_2.2]
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_34.3: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14]
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_34.3: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10]
|
||||
// CHECK:STDOUT: %Convert.bound.loc11_34.3: <bound method> = bound_method %int_3, %impl.elem0.loc11_34.3 [template = constants.%Convert.bound.3]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc11_34.3: <specific function> = specific_function %Convert.bound.loc11_34.3, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc11_34.3: init %i32 = call %Convert.specific_fn.loc11_34.3(%int_3) [template = constants.%int_3.2]
|
||||
|
||||
+9
-13
@@ -16,19 +16,17 @@ var c: [(); 5] = ((), (), (), (), (),);
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template]
|
||||
// CHECK:STDOUT: %Int.type: type = fn_type @Int [template]
|
||||
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %Int: %Int.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template]
|
||||
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template]
|
||||
// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template]
|
||||
// CHECK:STDOUT: %array_type.1: type = array_type %int_1.1, %i32 [template]
|
||||
// CHECK:STDOUT: %tuple.type.1: type = tuple_type (Core.IntLiteral) [template]
|
||||
// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template]
|
||||
// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template]
|
||||
// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template]
|
||||
// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template]
|
||||
// CHECK:STDOUT: %interface.9: <witness> = interface_witness (%Convert.14) [template]
|
||||
// CHECK:STDOUT: %Convert.bound: <bound method> = bound_method %int_1.1, %Convert.14 [template]
|
||||
// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template]
|
||||
// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template]
|
||||
// CHECK:STDOUT: %interface.5: <witness> = interface_witness (%Convert.10) [template]
|
||||
// CHECK:STDOUT: %Convert.bound: <bound method> = bound_method %int_1.1, %Convert.10 [template]
|
||||
// CHECK:STDOUT: %Convert.specific_fn: <specific function> = specific_function %Convert.bound, @Convert.2(%int_32) [template]
|
||||
// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template]
|
||||
// CHECK:STDOUT: %array.1: %array_type.1 = tuple_value (%int_1.2) [template]
|
||||
@@ -53,8 +51,8 @@ var c: [(); 5] = ((), (), (), (), (),);
|
||||
// CHECK:STDOUT: imports {
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
|
||||
// CHECK:STDOUT: .Int = %import_ref.1
|
||||
// CHECK:STDOUT: .ImplicitAs = %import_ref.2
|
||||
// CHECK:STDOUT: .Float = %import_ref.38
|
||||
// CHECK:STDOUT: .ImplicitAs = %import_ref.5
|
||||
// CHECK:STDOUT: .Float = %import_ref.193
|
||||
// CHECK:STDOUT: import Core//prelude
|
||||
// CHECK:STDOUT: import Core//prelude/...
|
||||
// CHECK:STDOUT: }
|
||||
@@ -69,10 +67,8 @@ var c: [(); 5] = ((), (), (), (), (),);
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1]
|
||||
// CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc11_9.2: type = converted %int.make_type_signed, %.loc11_9.1 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %array_type.loc11: type = array_type %int_1, %i32 [template = constants.%array_type.1]
|
||||
// CHECK:STDOUT: %a.var: ref %array_type.1 = var a
|
||||
// CHECK:STDOUT: %a: ref %array_type.1 = bind_name a, %a.var
|
||||
@@ -96,7 +92,7 @@ var c: [(); 5] = ((), (), (), (), (),);
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %int_1.loc11: Core.IntLiteral = int_value 1 [template = constants.%int_1.1]
|
||||
// CHECK:STDOUT: %.loc11_22.1: %tuple.type.1 = tuple_literal (%int_1.loc11)
|
||||
// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14]
|
||||
// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10]
|
||||
// CHECK:STDOUT: %Convert.bound: <bound method> = bound_method %int_1.loc11, %impl.elem0 [template = constants.%Convert.bound]
|
||||
// CHECK:STDOUT: %Convert.specific_fn: <specific function> = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn]
|
||||
// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_1.loc11) [template = constants.%int_1.2]
|
||||
|
||||
+41
-61
@@ -19,56 +19,52 @@ let c: [i32; ConvertToU32(3)]* = &a;
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template]
|
||||
// CHECK:STDOUT: %Int.type: type = fn_type @Int [template]
|
||||
// CHECK:STDOUT: %Int: %Int.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template]
|
||||
// CHECK:STDOUT: %Add.type: type = fn_type @Add [template]
|
||||
// CHECK:STDOUT: %Add: %Add.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %UInt.type: type = fn_type @UInt [template]
|
||||
// CHECK:STDOUT: %UInt: %UInt.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %u32: type = int_type unsigned, %int_32 [template]
|
||||
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template]
|
||||
// CHECK:STDOUT: %Add.type.1: type = fn_type @Add.1 [template]
|
||||
// CHECK:STDOUT: %Add: %Add.type.1 = struct_value () [template]
|
||||
// CHECK:STDOUT: %u32: type = class_type @UInt, @UInt(%int_32) [template]
|
||||
// CHECK:STDOUT: %ConvertToU32.type: type = fn_type @ConvertToU32 [template]
|
||||
// CHECK:STDOUT: %ConvertToU32: %ConvertToU32.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template]
|
||||
// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template]
|
||||
// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template]
|
||||
// CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template]
|
||||
// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template]
|
||||
// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template]
|
||||
// CHECK:STDOUT: %interface.9: <witness> = interface_witness (%Convert.14) [template]
|
||||
// CHECK:STDOUT: %Convert.bound.1: <bound method> = bound_method %int_1.1, %Convert.14 [template]
|
||||
// CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template]
|
||||
// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template]
|
||||
// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template]
|
||||
// CHECK:STDOUT: %interface.5: <witness> = interface_witness (%Convert.10) [template]
|
||||
// CHECK:STDOUT: %Convert.bound.1: <bound method> = bound_method %int_1.1, %Convert.10 [template]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.1: <specific function> = specific_function %Convert.bound.1, @Convert.2(%int_32) [template]
|
||||
// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template]
|
||||
// CHECK:STDOUT: %Convert.bound.2: <bound method> = bound_method %int_2.1, %Convert.14 [template]
|
||||
// CHECK:STDOUT: %Convert.bound.2: <bound method> = bound_method %int_2.1, %Convert.10 [template]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.2: <specific function> = specific_function %Convert.bound.2, @Convert.2(%int_32) [template]
|
||||
// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template]
|
||||
// CHECK:STDOUT: %int_3.1: %i32 = int_value 3 [template]
|
||||
// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%int_32) [template]
|
||||
// CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template]
|
||||
// CHECK:STDOUT: %interface.10: <witness> = interface_witness (%Convert.15) [template]
|
||||
// CHECK:STDOUT: %Convert.bound.3: <bound method> = bound_method %int_3.1, %Convert.15 [template]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.3: <specific function> = specific_function %Convert.bound.3, @Convert.4(%int_32) [template]
|
||||
// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.3, @impl.2(%int_32) [template]
|
||||
// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template]
|
||||
// CHECK:STDOUT: %interface.6: <witness> = interface_witness (%Convert.11) [template]
|
||||
// CHECK:STDOUT: %Convert.bound.3: <bound method> = bound_method %int_3.1, %Convert.11 [template]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.3: <specific function> = specific_function %Convert.bound.3, @Convert.3(%int_32) [template]
|
||||
// CHECK:STDOUT: %int_3.2: Core.IntLiteral = int_value 3 [template]
|
||||
// CHECK:STDOUT: %array_type: type = array_type %int_3.2, %i32 [template]
|
||||
// CHECK:STDOUT: %ptr: type = ptr_type %array_type [template]
|
||||
// CHECK:STDOUT: %tuple.type: type = tuple_type (Core.IntLiteral, Core.IntLiteral, Core.IntLiteral) [template]
|
||||
// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template]
|
||||
// CHECK:STDOUT: %Convert.bound.4: <bound method> = bound_method %int_3.2, %Convert.14 [template]
|
||||
// CHECK:STDOUT: %Convert.bound.4: <bound method> = bound_method %int_3.2, %Convert.10 [template]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.4: <specific function> = specific_function %Convert.bound.4, @Convert.2(%int_32) [template]
|
||||
// CHECK:STDOUT: %array: %array_type = tuple_value (%int_1.2, %int_2.2, %int_3.1) [template]
|
||||
// CHECK:STDOUT: %int_3.3: %u32 = int_value 3 [template]
|
||||
// CHECK:STDOUT: %Convert.type.16: type = fn_type @Convert.5, @impl.4(%int_32) [template]
|
||||
// CHECK:STDOUT: %Convert.type.16: type = fn_type @Convert.8, @impl.32(%int_32) [template]
|
||||
// CHECK:STDOUT: %Convert.16: %Convert.type.16 = struct_value () [template]
|
||||
// CHECK:STDOUT: %interface.11: <witness> = interface_witness (%Convert.16) [template]
|
||||
// CHECK:STDOUT: %Convert.bound.5: <bound method> = bound_method %int_3.3, %Convert.16 [template]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.5: <specific function> = specific_function %Convert.bound.5, @Convert.5(%int_32) [template]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.5: <specific function> = specific_function %Convert.bound.5, @Convert.8(%int_32) [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
|
||||
// CHECK:STDOUT: .Int = %import_ref.1
|
||||
// CHECK:STDOUT: .UInt = %import_ref.2
|
||||
// CHECK:STDOUT: .ImplicitAs = %import_ref.3
|
||||
// CHECK:STDOUT: .UInt = %import_ref.5
|
||||
// CHECK:STDOUT: .ImplicitAs = %import_ref.9
|
||||
// CHECK:STDOUT: import Core//prelude
|
||||
// CHECK:STDOUT: import Core//prelude/...
|
||||
// CHECK:STDOUT: }
|
||||
@@ -84,7 +80,7 @@ let c: [i32; ConvertToU32(3)]* = &a;
|
||||
// CHECK:STDOUT: .c = @__global_init.%c
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %Add.decl: %Add.type = fn_decl @Add [template = constants.%Add] {
|
||||
// CHECK:STDOUT: %Add.decl: %Add.type.1 = fn_decl @Add.1 [template = constants.%Add] {
|
||||
// CHECK:STDOUT: %a.patt: %i32 = binding_pattern a
|
||||
// CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0
|
||||
// CHECK:STDOUT: %b.patt: %i32 = binding_pattern b
|
||||
@@ -93,17 +89,11 @@ let c: [i32; ConvertToU32(3)]* = &a;
|
||||
// CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %int_32.loc11_11: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc11_11: init type = call constants.%Int(%int_32.loc11_11) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_signed.loc11_11 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_signed.loc11_11, %.loc11_11.1 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %i32.loc11_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_32.loc11_19: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc11_19: init type = call constants.%Int(%int_32.loc11_19) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc11_19.1: type = value_of_initializer %int.make_type_signed.loc11_19 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc11_19.2: type = converted %int.make_type_signed.loc11_19, %.loc11_19.1 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %i32.loc11_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_32.loc11_27: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc11_27: init type = call constants.%Int(%int_32.loc11_27) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc11_27.1: type = value_of_initializer %int.make_type_signed.loc11_27 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc11_27.2: type = converted %int.make_type_signed.loc11_27, %.loc11_27.1 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %i32.loc11_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0
|
||||
// CHECK:STDOUT: %a: %i32 = bind_name a, %a.param
|
||||
// CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1
|
||||
@@ -118,41 +108,35 @@ let c: [i32; ConvertToU32(3)]* = &a;
|
||||
// CHECK:STDOUT: %return.param_patt: %u32 = out_param_pattern %return.patt, runtime_param1
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %int_32.loc12_20: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32.loc12_20) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc12_20.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc12_20.2: type = converted %int.make_type_signed, %.loc12_20.1 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_32.loc12_28: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_unsigned: init type = call constants.%UInt(%int_32.loc12_28) [template = constants.%u32]
|
||||
// CHECK:STDOUT: %.loc12_28.1: type = value_of_initializer %int.make_type_unsigned [template = constants.%u32]
|
||||
// CHECK:STDOUT: %.loc12_28.2: type = converted %int.make_type_unsigned, %.loc12_28.1 [template = constants.%u32]
|
||||
// CHECK:STDOUT: %u32: type = class_type @UInt, @UInt(constants.%int_32) [template = constants.%u32]
|
||||
// CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0
|
||||
// CHECK:STDOUT: %a: %i32 = bind_name a, %a.param
|
||||
// CHECK:STDOUT: %return.param: ref %u32 = out_param runtime_param1
|
||||
// CHECK:STDOUT: %return: ref %u32 = return_slot %return.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %int_32.loc14: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc14: init type = call constants.%Int(%int_32.loc14) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %Add.ref: %Add.type = name_ref Add, %Add.decl [template = constants.%Add]
|
||||
// CHECK:STDOUT: %i32.loc14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %Add.ref: %Add.type.1 = name_ref Add, %Add.decl [template = constants.%Add]
|
||||
// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1]
|
||||
// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1]
|
||||
// CHECK:STDOUT: %impl.elem0.loc14_18: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14]
|
||||
// CHECK:STDOUT: %impl.elem0.loc14_18: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10]
|
||||
// CHECK:STDOUT: %Convert.bound.loc14_18: <bound method> = bound_method %int_1, %impl.elem0.loc14_18 [template = constants.%Convert.bound.1]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc14_18: <specific function> = specific_function %Convert.bound.loc14_18, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc14_18: init %i32 = call %Convert.specific_fn.loc14_18(%int_1) [template = constants.%int_1.2]
|
||||
// CHECK:STDOUT: %.loc14_18.1: %i32 = value_of_initializer %int.convert_checked.loc14_18 [template = constants.%int_1.2]
|
||||
// CHECK:STDOUT: %.loc14_18.2: %i32 = converted %int_1, %.loc14_18.1 [template = constants.%int_1.2]
|
||||
// CHECK:STDOUT: %impl.elem0.loc14_21: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14]
|
||||
// CHECK:STDOUT: %impl.elem0.loc14_21: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10]
|
||||
// CHECK:STDOUT: %Convert.bound.loc14_21: <bound method> = bound_method %int_2, %impl.elem0.loc14_21 [template = constants.%Convert.bound.2]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc14_21: <specific function> = specific_function %Convert.bound.loc14_21, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc14_21: init %i32 = call %Convert.specific_fn.loc14_21(%int_2) [template = constants.%int_2.2]
|
||||
// CHECK:STDOUT: %.loc14_21.1: %i32 = value_of_initializer %int.convert_checked.loc14_21 [template = constants.%int_2.2]
|
||||
// CHECK:STDOUT: %.loc14_21.2: %i32 = converted %int_2, %.loc14_21.1 [template = constants.%int_2.2]
|
||||
// CHECK:STDOUT: %int.sadd: init %i32 = call %Add.ref(%.loc14_18.2, %.loc14_21.2) [template = constants.%int_3.1]
|
||||
// CHECK:STDOUT: %.loc14_9.1: type = value_of_initializer %int.make_type_signed.loc14 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc14_9.2: type = converted %int.make_type_signed.loc14, %.loc14_9.1 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %impl.elem0.loc14_22: %Convert.type.6 = interface_witness_access constants.%interface.10, element0 [template = constants.%Convert.15]
|
||||
// CHECK:STDOUT: %impl.elem0.loc14_22: %Convert.type.5 = interface_witness_access constants.%interface.6, element0 [template = constants.%Convert.11]
|
||||
// CHECK:STDOUT: %Convert.bound.loc14_22: <bound method> = bound_method %int.sadd, %impl.elem0.loc14_22 [template = constants.%Convert.bound.3]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc14_22: <specific function> = specific_function %Convert.bound.loc14_22, @Convert.4(constants.%int_32) [template = constants.%Convert.specific_fn.3]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc14_22: <specific function> = specific_function %Convert.bound.loc14_22, @Convert.3(constants.%int_32) [template = constants.%Convert.specific_fn.3]
|
||||
// CHECK:STDOUT: %.loc14_22.1: %i32 = value_of_initializer %int.sadd [template = constants.%int_3.1]
|
||||
// CHECK:STDOUT: %.loc14_22.2: %i32 = converted %int.sadd, %.loc14_22.1 [template = constants.%int_3.1]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc14_22: init Core.IntLiteral = call %Convert.specific_fn.loc14_22(%.loc14_22.2) [template = constants.%int_3.2]
|
||||
@@ -162,28 +146,24 @@ let c: [i32; ConvertToU32(3)]* = &a;
|
||||
// CHECK:STDOUT: %a.var: ref %array_type = var a
|
||||
// CHECK:STDOUT: %a: ref %array_type = bind_name a, %a.var
|
||||
// CHECK:STDOUT: %int_32.loc15: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc15: init type = call constants.%Int(%int_32.loc15) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %i32.loc15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_3.loc15: Core.IntLiteral = int_value 3 [template = constants.%int_3.2]
|
||||
// CHECK:STDOUT: %.loc15_9.1: type = value_of_initializer %int.make_type_signed.loc15 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc15_9.2: type = converted %int.make_type_signed.loc15, %.loc15_9.1 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %array_type.loc15: type = array_type %int_3.loc15, %i32 [template = constants.%array_type]
|
||||
// CHECK:STDOUT: %ptr.loc15: type = ptr_type %array_type [template = constants.%ptr]
|
||||
// CHECK:STDOUT: %int_32.loc16: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc16: init type = call constants.%Int(%int_32.loc16) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %i32.loc16: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %ConvertToU32.ref: %ConvertToU32.type = name_ref ConvertToU32, %ConvertToU32.decl [template = constants.%ConvertToU32]
|
||||
// CHECK:STDOUT: %int_3.loc16: Core.IntLiteral = int_value 3 [template = constants.%int_3.2]
|
||||
// CHECK:STDOUT: %impl.elem0.loc16_27: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14]
|
||||
// CHECK:STDOUT: %impl.elem0.loc16_27: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10]
|
||||
// CHECK:STDOUT: %Convert.bound.loc16_27: <bound method> = bound_method %int_3.loc16, %impl.elem0.loc16_27 [template = constants.%Convert.bound.4]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc16_27: <specific function> = specific_function %Convert.bound.loc16_27, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.4]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc16_27: init %i32 = call %Convert.specific_fn.loc16_27(%int_3.loc16) [template = constants.%int_3.1]
|
||||
// CHECK:STDOUT: %.loc16_27.1: %i32 = value_of_initializer %int.convert_checked.loc16_27 [template = constants.%int_3.1]
|
||||
// CHECK:STDOUT: %.loc16_27.2: %i32 = converted %int_3.loc16, %.loc16_27.1 [template = constants.%int_3.1]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc16_28.1: init %u32 = call %ConvertToU32.ref(%.loc16_27.2) [template = constants.%int_3.3]
|
||||
// CHECK:STDOUT: %.loc16_9.1: type = value_of_initializer %int.make_type_signed.loc16 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc16_9.2: type = converted %int.make_type_signed.loc16, %.loc16_9.1 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %impl.elem0.loc16_28: %Convert.type.6 = interface_witness_access constants.%interface.11, element0 [template = constants.%Convert.16]
|
||||
// CHECK:STDOUT: %impl.elem0.loc16_28: %Convert.type.5 = interface_witness_access constants.%interface.11, element0 [template = constants.%Convert.16]
|
||||
// CHECK:STDOUT: %Convert.bound.loc16_28: <bound method> = bound_method %int.convert_checked.loc16_28.1, %impl.elem0.loc16_28 [template = constants.%Convert.bound.5]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc16_28: <specific function> = specific_function %Convert.bound.loc16_28, @Convert.5(constants.%int_32) [template = constants.%Convert.specific_fn.5]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc16_28: <specific function> = specific_function %Convert.bound.loc16_28, @Convert.8(constants.%int_32) [template = constants.%Convert.specific_fn.5]
|
||||
// CHECK:STDOUT: %.loc16_28.1: %u32 = value_of_initializer %int.convert_checked.loc16_28.1 [template = constants.%int_3.3]
|
||||
// CHECK:STDOUT: %.loc16_28.2: %u32 = converted %int.convert_checked.loc16_28.1, %.loc16_28.1 [template = constants.%int_3.3]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc16_28.2: init Core.IntLiteral = call %Convert.specific_fn.loc16_28(%.loc16_28.2) [template = constants.%int_3.2]
|
||||
@@ -193,7 +173,7 @@ let c: [i32; ConvertToU32(3)]* = &a;
|
||||
// CHECK:STDOUT: %ptr.loc16: type = ptr_type %array_type [template = constants.%ptr]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @Add(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.sadd";
|
||||
// CHECK:STDOUT: fn @Add.1(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.sadd";
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @ConvertToU32(%a.param_patt: %i32) -> %u32 = "int.convert_checked";
|
||||
// CHECK:STDOUT:
|
||||
@@ -203,7 +183,7 @@ let c: [i32; ConvertToU32(3)]* = &a;
|
||||
// CHECK:STDOUT: %int_2.loc14_31: Core.IntLiteral = int_value 2 [template = constants.%int_2.1]
|
||||
// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.2]
|
||||
// CHECK:STDOUT: %.loc14_35.1: %tuple.type = tuple_literal (%int_1.loc14_28, %int_2.loc14_31, %int_3)
|
||||
// CHECK:STDOUT: %impl.elem0.loc14_35.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14]
|
||||
// CHECK:STDOUT: %impl.elem0.loc14_35.1: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10]
|
||||
// CHECK:STDOUT: %Convert.bound.loc14_35.1: <bound method> = bound_method %int_1.loc14_28, %impl.elem0.loc14_35.1 [template = constants.%Convert.bound.1]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc14_35.1: <specific function> = specific_function %Convert.bound.loc14_35.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc14_35.1: init %i32 = call %Convert.specific_fn.loc14_35.1(%int_1.loc14_28) [template = constants.%int_1.2]
|
||||
@@ -211,7 +191,7 @@ let c: [i32; ConvertToU32(3)]* = &a;
|
||||
// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0]
|
||||
// CHECK:STDOUT: %.loc14_35.3: ref %i32 = array_index file.%a.var, %int_0
|
||||
// CHECK:STDOUT: %.loc14_35.4: init %i32 = initialize_from %.loc14_35.2 to %.loc14_35.3 [template = constants.%int_1.2]
|
||||
// CHECK:STDOUT: %impl.elem0.loc14_35.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14]
|
||||
// CHECK:STDOUT: %impl.elem0.loc14_35.2: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10]
|
||||
// CHECK:STDOUT: %Convert.bound.loc14_35.2: <bound method> = bound_method %int_2.loc14_31, %impl.elem0.loc14_35.2 [template = constants.%Convert.bound.2]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc14_35.2: <specific function> = specific_function %Convert.bound.loc14_35.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc14_35.2: init %i32 = call %Convert.specific_fn.loc14_35.2(%int_2.loc14_31) [template = constants.%int_2.2]
|
||||
@@ -219,7 +199,7 @@ let c: [i32; ConvertToU32(3)]* = &a;
|
||||
// CHECK:STDOUT: %int_1.loc14_35: Core.IntLiteral = int_value 1 [template = constants.%int_1.1]
|
||||
// CHECK:STDOUT: %.loc14_35.6: ref %i32 = array_index file.%a.var, %int_1.loc14_35
|
||||
// CHECK:STDOUT: %.loc14_35.7: init %i32 = initialize_from %.loc14_35.5 to %.loc14_35.6 [template = constants.%int_2.2]
|
||||
// CHECK:STDOUT: %impl.elem0.loc14_35.3: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14]
|
||||
// CHECK:STDOUT: %impl.elem0.loc14_35.3: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10]
|
||||
// CHECK:STDOUT: %Convert.bound.loc14_35.3: <bound method> = bound_method %int_3, %impl.elem0.loc14_35.3 [template = constants.%Convert.bound.4]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc14_35.3: <specific function> = specific_function %Convert.bound.loc14_35.3, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.4]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc14_35.3: init %i32 = call %Convert.specific_fn.loc14_35.3(%int_3) [template = constants.%int_3.1]
|
||||
|
||||
+23
-31
@@ -19,33 +19,31 @@ var a: [i32; Negate(1)];
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template]
|
||||
// CHECK:STDOUT: %Int.type: type = fn_type @Int [template]
|
||||
// CHECK:STDOUT: %Int: %Int.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template]
|
||||
// CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template]
|
||||
// CHECK:STDOUT: %Negate: %Negate.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template]
|
||||
// CHECK:STDOUT: %Negate.type.1: type = fn_type @Negate.1 [template]
|
||||
// CHECK:STDOUT: %Negate: %Negate.type.1 = struct_value () [template]
|
||||
// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template]
|
||||
// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template]
|
||||
// CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template]
|
||||
// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template]
|
||||
// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template]
|
||||
// CHECK:STDOUT: %interface.9: <witness> = interface_witness (%Convert.14) [template]
|
||||
// CHECK:STDOUT: %Convert.bound.1: <bound method> = bound_method %int_1.1, %Convert.14 [template]
|
||||
// CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template]
|
||||
// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template]
|
||||
// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template]
|
||||
// CHECK:STDOUT: %interface.5: <witness> = interface_witness (%Convert.10) [template]
|
||||
// CHECK:STDOUT: %Convert.bound.1: <bound method> = bound_method %int_1.1, %Convert.10 [template]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.1: <specific function> = specific_function %Convert.bound.1, @Convert.2(%int_32) [template]
|
||||
// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template]
|
||||
// CHECK:STDOUT: %int_-1.1: %i32 = int_value -1 [template]
|
||||
// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%int_32) [template]
|
||||
// CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template]
|
||||
// CHECK:STDOUT: %interface.10: <witness> = interface_witness (%Convert.15) [template]
|
||||
// CHECK:STDOUT: %Convert.bound.2: <bound method> = bound_method %int_-1.1, %Convert.15 [template]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.2: <specific function> = specific_function %Convert.bound.2, @Convert.4(%int_32) [template]
|
||||
// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.3, @impl.2(%int_32) [template]
|
||||
// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template]
|
||||
// CHECK:STDOUT: %interface.6: <witness> = interface_witness (%Convert.11) [template]
|
||||
// CHECK:STDOUT: %Convert.bound.2: <bound method> = bound_method %int_-1.1, %Convert.11 [template]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.2: <specific function> = specific_function %Convert.bound.2, @Convert.3(%int_32) [template]
|
||||
// CHECK:STDOUT: %int_-1.2: Core.IntLiteral = int_value -1 [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
|
||||
// CHECK:STDOUT: .Int = %import_ref.1
|
||||
// CHECK:STDOUT: .ImplicitAs = %import_ref.2
|
||||
// CHECK:STDOUT: .ImplicitAs = %import_ref.5
|
||||
// CHECK:STDOUT: import Core//prelude
|
||||
// CHECK:STDOUT: import Core//prelude/...
|
||||
// CHECK:STDOUT: }
|
||||
@@ -58,41 +56,35 @@ var a: [i32; Negate(1)];
|
||||
// CHECK:STDOUT: .a = %a
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %Negate.decl: %Negate.type = fn_decl @Negate [template = constants.%Negate] {
|
||||
// CHECK:STDOUT: %Negate.decl: %Negate.type.1 = fn_decl @Negate.1 [template = constants.%Negate] {
|
||||
// CHECK:STDOUT: %n.patt: %i32 = binding_pattern n
|
||||
// CHECK:STDOUT: %n.param_patt: %i32 = value_param_pattern %n.patt, runtime_param0
|
||||
// CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern
|
||||
// CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %int_32.loc11_14: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc11_14: init type = call constants.%Int(%int_32.loc11_14) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc11_14.1: type = value_of_initializer %int.make_type_signed.loc11_14 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc11_14.2: type = converted %int.make_type_signed.loc11_14, %.loc11_14.1 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %i32.loc11_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_32.loc11_22: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc11_22: init type = call constants.%Int(%int_32.loc11_22) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc11_22.1: type = value_of_initializer %int.make_type_signed.loc11_22 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc11_22.2: type = converted %int.make_type_signed.loc11_22, %.loc11_22.1 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %i32.loc11_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %n.param: %i32 = value_param runtime_param0
|
||||
// CHECK:STDOUT: %n: %i32 = bind_name n, %n.param
|
||||
// CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1
|
||||
// CHECK:STDOUT: %return: ref %i32 = return_slot %return.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %Negate.ref: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate]
|
||||
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %Negate.ref: %Negate.type.1 = name_ref Negate, %Negate.decl [template = constants.%Negate]
|
||||
// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1]
|
||||
// CHECK:STDOUT: %impl.elem0.loc16_21: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14]
|
||||
// CHECK:STDOUT: %impl.elem0.loc16_21: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10]
|
||||
// CHECK:STDOUT: %Convert.bound.loc16_21: <bound method> = bound_method %int_1, %impl.elem0.loc16_21 [template = constants.%Convert.bound.1]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc16_21: <specific function> = specific_function %Convert.bound.loc16_21, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc16_21: init %i32 = call %Convert.specific_fn.loc16_21(%int_1) [template = constants.%int_1.2]
|
||||
// CHECK:STDOUT: %.loc16_21.1: %i32 = value_of_initializer %int.convert_checked.loc16_21 [template = constants.%int_1.2]
|
||||
// CHECK:STDOUT: %.loc16_21.2: %i32 = converted %int_1, %.loc16_21.1 [template = constants.%int_1.2]
|
||||
// CHECK:STDOUT: %int.snegate: init %i32 = call %Negate.ref(%.loc16_21.2) [template = constants.%int_-1.1]
|
||||
// CHECK:STDOUT: %.loc16_9.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc16_9.2: type = converted %int.make_type_signed, %.loc16_9.1 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %impl.elem0.loc16_22: %Convert.type.6 = interface_witness_access constants.%interface.10, element0 [template = constants.%Convert.15]
|
||||
// CHECK:STDOUT: %impl.elem0.loc16_22: %Convert.type.5 = interface_witness_access constants.%interface.6, element0 [template = constants.%Convert.11]
|
||||
// CHECK:STDOUT: %Convert.bound.loc16_22: <bound method> = bound_method %int.snegate, %impl.elem0.loc16_22 [template = constants.%Convert.bound.2]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc16_22: <specific function> = specific_function %Convert.bound.loc16_22, @Convert.4(constants.%int_32) [template = constants.%Convert.specific_fn.2]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc16_22: <specific function> = specific_function %Convert.bound.loc16_22, @Convert.3(constants.%int_32) [template = constants.%Convert.specific_fn.2]
|
||||
// CHECK:STDOUT: %.loc16_22.1: %i32 = value_of_initializer %int.snegate [template = constants.%int_-1.1]
|
||||
// CHECK:STDOUT: %.loc16_22.2: %i32 = converted %int.snegate, %.loc16_22.1 [template = constants.%int_-1.1]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc16_22: init Core.IntLiteral = call %Convert.specific_fn.loc16_22(%.loc16_22.2) [template = constants.%int_-1.2]
|
||||
@@ -103,5 +95,5 @@ var a: [i32; Negate(1)];
|
||||
// CHECK:STDOUT: %a: ref <error> = bind_name a, %a.var
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @Negate(%n.param_patt: %i32) -> %i32 = "int.snegate";
|
||||
// CHECK:STDOUT: fn @Negate.1(%n.param_patt: %i32) -> %i32 = "int.snegate";
|
||||
// CHECK:STDOUT:
|
||||
|
||||
@@ -26,9 +26,7 @@ var b: [1; 39999999999999999993];
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template]
|
||||
// CHECK:STDOUT: %Int.type: type = fn_type @Int [template]
|
||||
// CHECK:STDOUT: %Int: %Int.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template]
|
||||
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template]
|
||||
// CHECK:STDOUT: %int_39999999999999999993: Core.IntLiteral = int_value 39999999999999999993 [template]
|
||||
// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -36,7 +34,7 @@ var b: [1; 39999999999999999993];
|
||||
// CHECK:STDOUT: imports {
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
|
||||
// CHECK:STDOUT: .Int = %import_ref.1
|
||||
// CHECK:STDOUT: .ImplicitAs = %import_ref.2
|
||||
// CHECK:STDOUT: .ImplicitAs = %import_ref.5
|
||||
// CHECK:STDOUT: import Core//prelude
|
||||
// CHECK:STDOUT: import Core//prelude/...
|
||||
// CHECK:STDOUT: }
|
||||
@@ -50,10 +48,8 @@ var b: [1; 39999999999999999993];
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_39999999999999999993.loc15: Core.IntLiteral = int_value 39999999999999999993 [template = constants.%int_39999999999999999993]
|
||||
// CHECK:STDOUT: %.loc15_9.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc15_9.2: type = converted %int.make_type_signed, %.loc15_9.1 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %array_type.loc15: type = array_type %int_39999999999999999993.loc15, %i32 [template = <error>]
|
||||
// CHECK:STDOUT: %a.var: ref <error> = var a
|
||||
// CHECK:STDOUT: %a: ref <error> = bind_name a, %a.var
|
||||
|
||||
+3
-7
@@ -17,9 +17,7 @@ var a: [i32; 1] = (1, 2, 3);
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template]
|
||||
// CHECK:STDOUT: %Int.type: type = fn_type @Int [template]
|
||||
// CHECK:STDOUT: %Int: %Int.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template]
|
||||
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template]
|
||||
// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template]
|
||||
// CHECK:STDOUT: %array_type: type = array_type %int_1, %i32 [template]
|
||||
// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template]
|
||||
@@ -29,7 +27,7 @@ var a: [i32; 1] = (1, 2, 3);
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
|
||||
// CHECK:STDOUT: .Int = %import_ref
|
||||
// CHECK:STDOUT: .Int = %import_ref.1
|
||||
// CHECK:STDOUT: import Core//prelude
|
||||
// CHECK:STDOUT: import Core//prelude/...
|
||||
// CHECK:STDOUT: }
|
||||
@@ -42,10 +40,8 @@ var a: [i32; 1] = (1, 2, 3);
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1]
|
||||
// CHECK:STDOUT: %.loc14_9.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc14_9.2: type = converted %int.make_type_signed, %.loc14_9.1 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %array_type: type = array_type %int_1, %i32 [template = constants.%array_type]
|
||||
// CHECK:STDOUT: %a.var: ref %array_type = var a
|
||||
// CHECK:STDOUT: %a: ref %array_type = bind_name a, %a.var
|
||||
|
||||
@@ -18,9 +18,7 @@ var b: i32 = a[{.index = 3}.index];
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template]
|
||||
// CHECK:STDOUT: %Int.type: type = fn_type @Int [template]
|
||||
// CHECK:STDOUT: %Int: %Int.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template]
|
||||
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template]
|
||||
// CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template]
|
||||
// CHECK:STDOUT: %array_type: type = array_type %int_3.1, %i32 [template]
|
||||
// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template]
|
||||
@@ -28,16 +26,16 @@ var b: i32 = a[{.index = 3}.index];
|
||||
// CHECK:STDOUT: %tuple.type: type = tuple_type (Core.IntLiteral, Core.IntLiteral, Core.IntLiteral) [template]
|
||||
// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template]
|
||||
// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template]
|
||||
// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template]
|
||||
// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template]
|
||||
// CHECK:STDOUT: %interface.9: <witness> = interface_witness (%Convert.14) [template]
|
||||
// CHECK:STDOUT: %Convert.bound.1: <bound method> = bound_method %int_1.1, %Convert.14 [template]
|
||||
// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template]
|
||||
// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template]
|
||||
// CHECK:STDOUT: %interface.5: <witness> = interface_witness (%Convert.10) [template]
|
||||
// CHECK:STDOUT: %Convert.bound.1: <bound method> = bound_method %int_1.1, %Convert.10 [template]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.1: <specific function> = specific_function %Convert.bound.1, @Convert.2(%int_32) [template]
|
||||
// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template]
|
||||
// CHECK:STDOUT: %Convert.bound.2: <bound method> = bound_method %int_2.1, %Convert.14 [template]
|
||||
// CHECK:STDOUT: %Convert.bound.2: <bound method> = bound_method %int_2.1, %Convert.10 [template]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.2: <specific function> = specific_function %Convert.bound.2, @Convert.2(%int_32) [template]
|
||||
// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template]
|
||||
// CHECK:STDOUT: %Convert.bound.3: <bound method> = bound_method %int_3.1, %Convert.14 [template]
|
||||
// CHECK:STDOUT: %Convert.bound.3: <bound method> = bound_method %int_3.1, %Convert.10 [template]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.3: <specific function> = specific_function %Convert.bound.3, @Convert.2(%int_32) [template]
|
||||
// CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template]
|
||||
// CHECK:STDOUT: %array: %array_type = tuple_value (%int_1.2, %int_2.2, %int_3.2) [template]
|
||||
@@ -48,7 +46,7 @@ var b: i32 = a[{.index = 3}.index];
|
||||
// CHECK:STDOUT: imports {
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
|
||||
// CHECK:STDOUT: .Int = %import_ref.1
|
||||
// CHECK:STDOUT: .ImplicitAs = %import_ref.2
|
||||
// CHECK:STDOUT: .ImplicitAs = %import_ref.5
|
||||
// CHECK:STDOUT: import Core//prelude
|
||||
// CHECK:STDOUT: import Core//prelude/...
|
||||
// CHECK:STDOUT: }
|
||||
@@ -62,17 +60,13 @@ var b: i32 = a[{.index = 3}.index];
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %int_32.loc11: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%int_32.loc11) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1]
|
||||
// CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc11_9.2: type = converted %int.make_type_signed.loc11, %.loc11_9.1 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %array_type: type = array_type %int_3, %i32 [template = constants.%array_type]
|
||||
// CHECK:STDOUT: %a.var: ref %array_type = var a
|
||||
// CHECK:STDOUT: %a: ref %array_type = bind_name a, %a.var
|
||||
// CHECK:STDOUT: %int_32.loc15: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc15: init type = call constants.%Int(%int_32.loc15) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc15_8.1: type = value_of_initializer %int.make_type_signed.loc15 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc15_8.2: type = converted %int.make_type_signed.loc15, %.loc15_8.1 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %i32.loc15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %b.var: ref %i32 = var b
|
||||
// CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var
|
||||
// CHECK:STDOUT: }
|
||||
@@ -83,7 +77,7 @@ var b: i32 = a[{.index = 3}.index];
|
||||
// CHECK:STDOUT: %int_2.loc11_23: Core.IntLiteral = int_value 2 [template = constants.%int_2.1]
|
||||
// CHECK:STDOUT: %int_3.loc11: Core.IntLiteral = int_value 3 [template = constants.%int_3.1]
|
||||
// CHECK:STDOUT: %.loc11_27.1: %tuple.type = tuple_literal (%int_1.loc11_20, %int_2.loc11_23, %int_3.loc11)
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_27.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14]
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_27.1: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10]
|
||||
// CHECK:STDOUT: %Convert.bound.loc11_27.1: <bound method> = bound_method %int_1.loc11_20, %impl.elem0.loc11_27.1 [template = constants.%Convert.bound.1]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc11_27.1: <specific function> = specific_function %Convert.bound.loc11_27.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc11_27.1: init %i32 = call %Convert.specific_fn.loc11_27.1(%int_1.loc11_20) [template = constants.%int_1.2]
|
||||
@@ -91,7 +85,7 @@ var b: i32 = a[{.index = 3}.index];
|
||||
// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0]
|
||||
// CHECK:STDOUT: %.loc11_27.3: ref %i32 = array_index file.%a.var, %int_0
|
||||
// CHECK:STDOUT: %.loc11_27.4: init %i32 = initialize_from %.loc11_27.2 to %.loc11_27.3 [template = constants.%int_1.2]
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_27.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14]
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_27.2: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10]
|
||||
// CHECK:STDOUT: %Convert.bound.loc11_27.2: <bound method> = bound_method %int_2.loc11_23, %impl.elem0.loc11_27.2 [template = constants.%Convert.bound.2]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc11_27.2: <specific function> = specific_function %Convert.bound.loc11_27.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc11_27.2: init %i32 = call %Convert.specific_fn.loc11_27.2(%int_2.loc11_23) [template = constants.%int_2.2]
|
||||
@@ -99,7 +93,7 @@ var b: i32 = a[{.index = 3}.index];
|
||||
// CHECK:STDOUT: %int_1.loc11_27: Core.IntLiteral = int_value 1 [template = constants.%int_1.1]
|
||||
// CHECK:STDOUT: %.loc11_27.6: ref %i32 = array_index file.%a.var, %int_1.loc11_27
|
||||
// CHECK:STDOUT: %.loc11_27.7: init %i32 = initialize_from %.loc11_27.5 to %.loc11_27.6 [template = constants.%int_2.2]
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_27.3: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14]
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_27.3: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10]
|
||||
// CHECK:STDOUT: %Convert.bound.loc11_27.3: <bound method> = bound_method %int_3.loc11, %impl.elem0.loc11_27.3 [template = constants.%Convert.bound.3]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc11_27.3: <specific function> = specific_function %Convert.bound.loc11_27.3, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc11_27.3: init %i32 = call %Convert.specific_fn.loc11_27.3(%int_3.loc11) [template = constants.%int_3.2]
|
||||
@@ -117,18 +111,16 @@ var b: i32 = a[{.index = 3}.index];
|
||||
// CHECK:STDOUT: %.loc15_27.2: %struct_type.index = converted %.loc15_27.1, %struct [template = constants.%struct]
|
||||
// CHECK:STDOUT: %.loc15_28.1: Core.IntLiteral = struct_access %.loc15_27.2, element0 [template = constants.%int_3.1]
|
||||
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc15_34.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc15_34.2: type = converted %int.make_type_signed, %.loc15_34.1 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %impl.elem0.loc15: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14]
|
||||
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %impl.elem0.loc15: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10]
|
||||
// CHECK:STDOUT: %Convert.bound.loc15: <bound method> = bound_method %.loc15_28.1, %impl.elem0.loc15 [template = constants.%Convert.bound.3]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc15: <specific function> = specific_function %Convert.bound.loc15, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc15: init %i32 = call %Convert.specific_fn.loc15(%.loc15_28.1) [template = constants.%int_3.2]
|
||||
// CHECK:STDOUT: %.loc15_28.2: %i32 = value_of_initializer %int.convert_checked.loc15 [template = constants.%int_3.2]
|
||||
// CHECK:STDOUT: %.loc15_28.3: %i32 = converted %.loc15_28.1, %.loc15_28.2 [template = constants.%int_3.2]
|
||||
// CHECK:STDOUT: %.loc15_34.3: ref %i32 = array_index %a.ref, %.loc15_28.3 [template = <error>]
|
||||
// CHECK:STDOUT: %.loc15_34.4: %i32 = bind_value %.loc15_34.3
|
||||
// CHECK:STDOUT: assign file.%b.var, %.loc15_34.4
|
||||
// CHECK:STDOUT: %.loc15_34.1: ref %i32 = array_index %a.ref, %.loc15_28.3 [template = <error>]
|
||||
// CHECK:STDOUT: %.loc15_34.2: %i32 = bind_value %.loc15_34.1
|
||||
// CHECK:STDOUT: assign file.%b.var, %.loc15_34.2
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
+18
-34
@@ -43,9 +43,7 @@ var d: [i32; 3] = t2;
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template]
|
||||
// CHECK:STDOUT: %Int.type: type = fn_type @Int [template]
|
||||
// CHECK:STDOUT: %Int: %Int.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template]
|
||||
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template]
|
||||
// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template]
|
||||
// CHECK:STDOUT: %array_type: type = array_type %int_3, %i32 [template]
|
||||
// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template]
|
||||
@@ -54,10 +52,10 @@ var d: [i32; 3] = t2;
|
||||
// CHECK:STDOUT: %tuple.type.1: type = tuple_type (Core.IntLiteral, String, String) [template]
|
||||
// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template]
|
||||
// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template]
|
||||
// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template]
|
||||
// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template]
|
||||
// CHECK:STDOUT: %interface.9: <witness> = interface_witness (%Convert.14) [template]
|
||||
// CHECK:STDOUT: %Convert.bound: <bound method> = bound_method %int_1.1, %Convert.14 [template]
|
||||
// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template]
|
||||
// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template]
|
||||
// CHECK:STDOUT: %interface.5: <witness> = interface_witness (%Convert.10) [template]
|
||||
// CHECK:STDOUT: %Convert.bound: <bound method> = bound_method %int_1.1, %Convert.10 [template]
|
||||
// CHECK:STDOUT: %Convert.specific_fn: <specific function> = specific_function %Convert.bound, @Convert.2(%int_32) [template]
|
||||
// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template]
|
||||
// CHECK:STDOUT: %tuple.type.2: type = tuple_type (type, type, type) [template]
|
||||
@@ -71,7 +69,7 @@ var d: [i32; 3] = t2;
|
||||
// CHECK:STDOUT: imports {
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
|
||||
// CHECK:STDOUT: .Int = %import_ref.1
|
||||
// CHECK:STDOUT: .ImplicitAs = %import_ref.2
|
||||
// CHECK:STDOUT: .ImplicitAs = %import_ref.5
|
||||
// CHECK:STDOUT: import Core//prelude
|
||||
// CHECK:STDOUT: import Core//prelude/...
|
||||
// CHECK:STDOUT: }
|
||||
@@ -89,54 +87,40 @@ var d: [i32; 3] = t2;
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %int_32.loc18: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc18: init type = call constants.%Int(%int_32.loc18) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %i32.loc18: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_3.loc18: Core.IntLiteral = int_value 3 [template = constants.%int_3]
|
||||
// CHECK:STDOUT: %.loc18_9.1: type = value_of_initializer %int.make_type_signed.loc18 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc18_9.2: type = converted %int.make_type_signed.loc18, %.loc18_9.1 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %array_type.loc18: type = array_type %int_3.loc18, %i32 [template = constants.%array_type]
|
||||
// CHECK:STDOUT: %a.var: ref %array_type = var a
|
||||
// CHECK:STDOUT: %a: ref %array_type = bind_name a, %a.var
|
||||
// CHECK:STDOUT: %int_32.loc20: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc20: init type = call constants.%Int(%int_32.loc20) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc20_29.1: %tuple.type.2 = tuple_literal (%int.make_type_signed.loc20, String, String)
|
||||
// CHECK:STDOUT: %.loc20_29.2: type = value_of_initializer %int.make_type_signed.loc20 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc20_29.3: type = converted %int.make_type_signed.loc20, %.loc20_29.2 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc20_29.4: type = converted %.loc20_29.1, constants.%tuple.type.3 [template = constants.%tuple.type.3]
|
||||
// CHECK:STDOUT: %i32.loc20: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc20_29.1: %tuple.type.2 = tuple_literal (%i32.loc20, String, String)
|
||||
// CHECK:STDOUT: %.loc20_29.2: type = converted %.loc20_29.1, constants.%tuple.type.3 [template = constants.%tuple.type.3]
|
||||
// CHECK:STDOUT: %t1.var: ref %tuple.type.3 = var t1
|
||||
// CHECK:STDOUT: %t1: ref %tuple.type.3 = bind_name t1, %t1.var
|
||||
// CHECK:STDOUT: %int_32.loc28: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc28: init type = call constants.%Int(%int_32.loc28) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %i32.loc28: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_3.loc28: Core.IntLiteral = int_value 3 [template = constants.%int_3]
|
||||
// CHECK:STDOUT: %.loc28_9.1: type = value_of_initializer %int.make_type_signed.loc28 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc28_9.2: type = converted %int.make_type_signed.loc28, %.loc28_9.1 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %array_type.loc28: type = array_type %int_3.loc28, %i32 [template = constants.%array_type]
|
||||
// CHECK:STDOUT: %b.var: ref %array_type = var b
|
||||
// CHECK:STDOUT: %b: ref %array_type = bind_name b, %b.var
|
||||
// CHECK:STDOUT: %int_32.loc34: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc34: init type = call constants.%Int(%int_32.loc34) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %i32.loc34: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_3.loc34: Core.IntLiteral = int_value 3 [template = constants.%int_3]
|
||||
// CHECK:STDOUT: %.loc34_9.1: type = value_of_initializer %int.make_type_signed.loc34 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc34_9.2: type = converted %int.make_type_signed.loc34, %.loc34_9.1 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %array_type.loc34: type = array_type %int_3.loc34, %i32 [template = constants.%array_type]
|
||||
// CHECK:STDOUT: %c.var: ref %array_type = var c
|
||||
// CHECK:STDOUT: %c: ref %array_type = bind_name c, %c.var
|
||||
// CHECK:STDOUT: %int_32.loc36_10: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc36_10: init type = call constants.%Int(%int_32.loc36_10) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %i32.loc36_10: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_32.loc36_15: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc36_15: init type = call constants.%Int(%int_32.loc36_15) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc36_18.1: %tuple.type.6 = tuple_literal (%int.make_type_signed.loc36_10, %int.make_type_signed.loc36_15)
|
||||
// CHECK:STDOUT: %.loc36_18.2: type = value_of_initializer %int.make_type_signed.loc36_10 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc36_18.3: type = converted %int.make_type_signed.loc36_10, %.loc36_18.2 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc36_18.4: type = value_of_initializer %int.make_type_signed.loc36_15 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc36_18.5: type = converted %int.make_type_signed.loc36_15, %.loc36_18.4 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc36_18.6: type = converted %.loc36_18.1, constants.%tuple.type.7 [template = constants.%tuple.type.7]
|
||||
// CHECK:STDOUT: %i32.loc36_15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc36_18.1: %tuple.type.6 = tuple_literal (%i32.loc36_10, %i32.loc36_15)
|
||||
// CHECK:STDOUT: %.loc36_18.2: type = converted %.loc36_18.1, constants.%tuple.type.7 [template = constants.%tuple.type.7]
|
||||
// CHECK:STDOUT: %t2.var: ref %tuple.type.7 = var t2
|
||||
// CHECK:STDOUT: %t2: ref %tuple.type.7 = bind_name t2, %t2.var
|
||||
// CHECK:STDOUT: %int_32.loc40: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc40: init type = call constants.%Int(%int_32.loc40) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %i32.loc40: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_3.loc40: Core.IntLiteral = int_value 3 [template = constants.%int_3]
|
||||
// CHECK:STDOUT: %.loc40_9.1: type = value_of_initializer %int.make_type_signed.loc40 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc40_9.2: type = converted %int.make_type_signed.loc40, %.loc40_9.1 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %array_type.loc40: type = array_type %int_3.loc40, %i32 [template = constants.%array_type]
|
||||
// CHECK:STDOUT: %d.var: ref %array_type = var d
|
||||
// CHECK:STDOUT: %d: ref %array_type = bind_name d, %d.var
|
||||
@@ -148,7 +132,7 @@ var d: [i32; 3] = t2;
|
||||
// CHECK:STDOUT: %str.loc18_23: String = string_literal "Hello" [template = constants.%str.1]
|
||||
// CHECK:STDOUT: %str.loc18_32: String = string_literal "World" [template = constants.%str.2]
|
||||
// CHECK:STDOUT: %.loc18_39.1: %tuple.type.1 = tuple_literal (%int_1.loc18, %str.loc18_23, %str.loc18_32)
|
||||
// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14]
|
||||
// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10]
|
||||
// CHECK:STDOUT: %Convert.bound: <bound method> = bound_method %int_1.loc18, %impl.elem0 [template = constants.%Convert.bound]
|
||||
// CHECK:STDOUT: %Convert.specific_fn: <specific function> = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn]
|
||||
// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_1.loc18) [template = constants.%int_1.2]
|
||||
|
||||
+21
-33
@@ -20,9 +20,7 @@ fn G() -> i32 {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template]
|
||||
// CHECK:STDOUT: %Int.type: type = fn_type @Int [template]
|
||||
// CHECK:STDOUT: %Int: %Int.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template]
|
||||
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template]
|
||||
// CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template]
|
||||
// CHECK:STDOUT: %array_type: type = array_type %int_3.1, %i32 [template]
|
||||
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
|
||||
@@ -34,16 +32,16 @@ fn G() -> i32 {
|
||||
// CHECK:STDOUT: %tuple.type: type = tuple_type (Core.IntLiteral, Core.IntLiteral, Core.IntLiteral) [template]
|
||||
// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template]
|
||||
// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template]
|
||||
// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template]
|
||||
// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template]
|
||||
// CHECK:STDOUT: %interface.9: <witness> = interface_witness (%Convert.14) [template]
|
||||
// CHECK:STDOUT: %Convert.bound.1: <bound method> = bound_method %int_1.1, %Convert.14 [template]
|
||||
// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template]
|
||||
// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template]
|
||||
// CHECK:STDOUT: %interface.5: <witness> = interface_witness (%Convert.10) [template]
|
||||
// CHECK:STDOUT: %Convert.bound.1: <bound method> = bound_method %int_1.1, %Convert.10 [template]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.1: <specific function> = specific_function %Convert.bound.1, @Convert.2(%int_32) [template]
|
||||
// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template]
|
||||
// CHECK:STDOUT: %Convert.bound.2: <bound method> = bound_method %int_2.1, %Convert.14 [template]
|
||||
// CHECK:STDOUT: %Convert.bound.2: <bound method> = bound_method %int_2.1, %Convert.10 [template]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.2: <specific function> = specific_function %Convert.bound.2, @Convert.2(%int_32) [template]
|
||||
// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template]
|
||||
// CHECK:STDOUT: %Convert.bound.3: <bound method> = bound_method %int_3.1, %Convert.14 [template]
|
||||
// CHECK:STDOUT: %Convert.bound.3: <bound method> = bound_method %int_3.1, %Convert.10 [template]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.3: <specific function> = specific_function %Convert.bound.3, @Convert.2(%int_32) [template]
|
||||
// CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template]
|
||||
// CHECK:STDOUT: %array: %array_type = tuple_value (%int_1.2, %int_2.2, %int_3.2) [template]
|
||||
@@ -52,7 +50,7 @@ fn G() -> i32 {
|
||||
// CHECK:STDOUT: imports {
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
|
||||
// CHECK:STDOUT: .Int = %import_ref.1
|
||||
// CHECK:STDOUT: .ImplicitAs = %import_ref.2
|
||||
// CHECK:STDOUT: .ImplicitAs = %import_ref.5
|
||||
// CHECK:STDOUT: import Core//prelude
|
||||
// CHECK:STDOUT: import Core//prelude/...
|
||||
// CHECK:STDOUT: }
|
||||
@@ -74,19 +72,13 @@ fn G() -> i32 {
|
||||
// CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %int_32.loc11_12: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc11_12: init type = call constants.%Int(%int_32.loc11_12) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %i32.loc11_12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1]
|
||||
// CHECK:STDOUT: %.loc11_12.1: type = value_of_initializer %int.make_type_signed.loc11_12 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc11_12.2: type = converted %int.make_type_signed.loc11_12, %.loc11_12.1 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %array_type: type = array_type %int_3, %i32 [template = constants.%array_type]
|
||||
// CHECK:STDOUT: %int_32.loc11_24: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc11_24: init type = call constants.%Int(%int_32.loc11_24) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc11_24.1: type = value_of_initializer %int.make_type_signed.loc11_24 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc11_24.2: type = converted %int.make_type_signed.loc11_24, %.loc11_24.1 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %i32.loc11_24: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_32.loc11_32: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc11_32: init type = call constants.%Int(%int_32.loc11_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc11_32.1: type = value_of_initializer %int.make_type_signed.loc11_32 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc11_32.2: type = converted %int.make_type_signed.loc11_32, %.loc11_32.1 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %i32.loc11_32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %arr.param: %array_type = value_param runtime_param0
|
||||
// CHECK:STDOUT: %arr: %array_type = bind_name arr, %arr.param
|
||||
// CHECK:STDOUT: %i.param: %i32 = value_param runtime_param1
|
||||
@@ -99,9 +91,7 @@ fn G() -> i32 {
|
||||
// CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc15_11.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc15_11.2: type = converted %int.make_type_signed, %.loc15_11.1 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0
|
||||
// CHECK:STDOUT: %return: ref %i32 = return_slot %return.param
|
||||
// CHECK:STDOUT: }
|
||||
@@ -112,13 +102,11 @@ fn G() -> i32 {
|
||||
// CHECK:STDOUT: %arr.ref: %array_type = name_ref arr, %arr
|
||||
// CHECK:STDOUT: %i.ref: %i32 = name_ref i, %i
|
||||
// CHECK:STDOUT: %int_32.loc12: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%int_32.loc12) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc12_15.1: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc12_15.2: type = converted %int.make_type_signed.loc12, %.loc12_15.1 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc12_15.3: ref %array_type = value_as_ref %arr.ref
|
||||
// CHECK:STDOUT: %.loc12_15.4: ref %i32 = array_index %.loc12_15.3, %i.ref
|
||||
// CHECK:STDOUT: %.loc12_15.5: %i32 = bind_value %.loc12_15.4
|
||||
// CHECK:STDOUT: return %.loc12_15.5
|
||||
// CHECK:STDOUT: %i32.loc12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc12_15.1: ref %array_type = value_as_ref %arr.ref
|
||||
// CHECK:STDOUT: %.loc12_15.2: ref %i32 = array_index %.loc12_15.1, %i.ref
|
||||
// CHECK:STDOUT: %.loc12_15.3: %i32 = bind_value %.loc12_15.2
|
||||
// CHECK:STDOUT: return %.loc12_15.3
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @G() -> %i32 {
|
||||
@@ -129,7 +117,7 @@ fn G() -> i32 {
|
||||
// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1]
|
||||
// CHECK:STDOUT: %.loc16_20.1: %tuple.type = tuple_literal (%int_1.loc16_13, %int_2.loc16_16, %int_3)
|
||||
// CHECK:STDOUT: %int_1.loc16_23: Core.IntLiteral = int_value 1 [template = constants.%int_1.1]
|
||||
// CHECK:STDOUT: %impl.elem0.loc16_20.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14]
|
||||
// CHECK:STDOUT: %impl.elem0.loc16_20.1: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10]
|
||||
// CHECK:STDOUT: %Convert.bound.loc16_20.1: <bound method> = bound_method %int_1.loc16_13, %impl.elem0.loc16_20.1 [template = constants.%Convert.bound.1]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc16_20.1: <specific function> = specific_function %Convert.bound.loc16_20.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc16_20.1: init %i32 = call %Convert.specific_fn.loc16_20.1(%int_1.loc16_13) [template = constants.%int_1.2]
|
||||
@@ -138,7 +126,7 @@ fn G() -> i32 {
|
||||
// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0]
|
||||
// CHECK:STDOUT: %.loc16_20.4: ref %i32 = array_index %.loc16_20.3, %int_0
|
||||
// CHECK:STDOUT: %.loc16_20.5: init %i32 = initialize_from %.loc16_20.2 to %.loc16_20.4 [template = constants.%int_1.2]
|
||||
// CHECK:STDOUT: %impl.elem0.loc16_20.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14]
|
||||
// CHECK:STDOUT: %impl.elem0.loc16_20.2: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10]
|
||||
// CHECK:STDOUT: %Convert.bound.loc16_20.2: <bound method> = bound_method %int_2.loc16_16, %impl.elem0.loc16_20.2 [template = constants.%Convert.bound.2]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc16_20.2: <specific function> = specific_function %Convert.bound.loc16_20.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc16_20.2: init %i32 = call %Convert.specific_fn.loc16_20.2(%int_2.loc16_16) [template = constants.%int_2.2]
|
||||
@@ -146,7 +134,7 @@ fn G() -> i32 {
|
||||
// CHECK:STDOUT: %int_1.loc16_20: Core.IntLiteral = int_value 1 [template = constants.%int_1.1]
|
||||
// CHECK:STDOUT: %.loc16_20.7: ref %i32 = array_index %.loc16_20.3, %int_1.loc16_20
|
||||
// CHECK:STDOUT: %.loc16_20.8: init %i32 = initialize_from %.loc16_20.6 to %.loc16_20.7 [template = constants.%int_2.2]
|
||||
// CHECK:STDOUT: %impl.elem0.loc16_20.3: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14]
|
||||
// CHECK:STDOUT: %impl.elem0.loc16_20.3: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10]
|
||||
// CHECK:STDOUT: %Convert.bound.loc16_20.3: <bound method> = bound_method %int_3, %impl.elem0.loc16_20.3 [template = constants.%Convert.bound.3]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc16_20.3: <specific function> = specific_function %Convert.bound.loc16_20.3, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc16_20.3: init %i32 = call %Convert.specific_fn.loc16_20.3(%int_3) [template = constants.%int_3.2]
|
||||
@@ -158,7 +146,7 @@ fn G() -> i32 {
|
||||
// CHECK:STDOUT: %.loc16_20.13: init %array_type = converted %.loc16_20.1, %.loc16_20.12 [template = constants.%array]
|
||||
// CHECK:STDOUT: %.loc16_20.14: ref %array_type = temporary %.loc16_20.3, %.loc16_20.13
|
||||
// CHECK:STDOUT: %.loc16_20.15: %array_type = bind_value %.loc16_20.14
|
||||
// CHECK:STDOUT: %impl.elem0.loc16_23: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14]
|
||||
// CHECK:STDOUT: %impl.elem0.loc16_23: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10]
|
||||
// CHECK:STDOUT: %Convert.bound.loc16_23: <bound method> = bound_method %int_1.loc16_23, %impl.elem0.loc16_23 [template = constants.%Convert.bound.1]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc16_23: <specific function> = specific_function %Convert.bound.loc16_23, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc16_23: init %i32 = call %Convert.specific_fn.loc16_23(%int_1.loc16_23) [template = constants.%int_1.2]
|
||||
|
||||
+10
-22
@@ -26,9 +26,7 @@ fn G(n: i32) -> i32 {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template]
|
||||
// CHECK:STDOUT: %Int.type: type = fn_type @Int [template]
|
||||
// CHECK:STDOUT: %Int: %Int.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template]
|
||||
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template]
|
||||
// CHECK:STDOUT: %int_42: Core.IntLiteral = int_value 42 [template]
|
||||
// CHECK:STDOUT: %array_type: type = array_type %int_42, %i32 [template]
|
||||
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
|
||||
@@ -37,7 +35,7 @@ fn G(n: i32) -> i32 {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
|
||||
// CHECK:STDOUT: .Int = %import_ref
|
||||
// CHECK:STDOUT: .Int = %import_ref.1
|
||||
// CHECK:STDOUT: import Core//prelude
|
||||
// CHECK:STDOUT: import Core//prelude/...
|
||||
// CHECK:STDOUT: }
|
||||
@@ -54,10 +52,8 @@ fn G(n: i32) -> i32 {
|
||||
// CHECK:STDOUT: %return.param_patt: %array_type = out_param_pattern %return.patt, runtime_param0
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_42: Core.IntLiteral = int_value 42 [template = constants.%int_42]
|
||||
// CHECK:STDOUT: %.loc4_12.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc4_12.2: type = converted %int.make_type_signed, %.loc4_12.1 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %array_type: type = array_type %int_42, %i32 [template = constants.%array_type]
|
||||
// CHECK:STDOUT: %return.param: ref %array_type = out_param runtime_param0
|
||||
// CHECK:STDOUT: %return: ref %array_type = return_slot %return.param
|
||||
@@ -70,9 +66,7 @@ fn G(n: i32) -> i32 {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template]
|
||||
// CHECK:STDOUT: %Int.type: type = fn_type @Int [template]
|
||||
// CHECK:STDOUT: %Int: %Int.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template]
|
||||
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template]
|
||||
// CHECK:STDOUT: %G.type: type = fn_type @G [template]
|
||||
// CHECK:STDOUT: %G: %G.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
|
||||
@@ -105,13 +99,9 @@ fn G(n: i32) -> i32 {
|
||||
// CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %int_32.loc4_9: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc4_9: init type = call constants.%Int(%int_32.loc4_9) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc4_9.1: type = value_of_initializer %int.make_type_signed.loc4_9 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc4_9.2: type = converted %int.make_type_signed.loc4_9, %.loc4_9.1 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %i32.loc4_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_32.loc4_17: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc4_17: init type = call constants.%Int(%int_32.loc4_17) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc4_17.1: type = value_of_initializer %int.make_type_signed.loc4_17 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc4_17.2: type = converted %int.make_type_signed.loc4_17, %.loc4_17.1 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %i32.loc4_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %n.param: %i32 = value_param runtime_param0
|
||||
// CHECK:STDOUT: %n: %i32 = bind_name n, %n.param
|
||||
// CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1
|
||||
@@ -127,12 +117,10 @@ fn G(n: i32) -> i32 {
|
||||
// CHECK:STDOUT: %n.ref: %i32 = name_ref n, %n
|
||||
// CHECK:STDOUT: %.loc5_12.2: ref %array_type = temporary %.loc5_12.1, %F.call
|
||||
// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%int_32.loc5) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc5_15.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc5_15.2: type = converted %int.make_type_signed.loc5, %.loc5_15.1 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc5_15.3: ref %i32 = array_index %.loc5_12.2, %n.ref
|
||||
// CHECK:STDOUT: %.loc5_15.4: %i32 = bind_value %.loc5_15.3
|
||||
// CHECK:STDOUT: return %.loc5_15.4
|
||||
// CHECK:STDOUT: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc5_15.1: ref %i32 = array_index %.loc5_12.2, %n.ref
|
||||
// CHECK:STDOUT: %.loc5_15.2: %i32 = bind_value %.loc5_15.1
|
||||
// CHECK:STDOUT: return %.loc5_15.2
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @F() -> %array_type [from "library.carbon"];
|
||||
|
||||
+18
-26
@@ -15,9 +15,7 @@ var b: i32 = a[{.index = 2}.index];
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template]
|
||||
// CHECK:STDOUT: %Int.type: type = fn_type @Int [template]
|
||||
// CHECK:STDOUT: %Int: %Int.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template]
|
||||
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template]
|
||||
// CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template]
|
||||
// CHECK:STDOUT: %array_type: type = array_type %int_3.1, %i32 [template]
|
||||
// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template]
|
||||
@@ -25,16 +23,16 @@ var b: i32 = a[{.index = 2}.index];
|
||||
// CHECK:STDOUT: %tuple.type: type = tuple_type (Core.IntLiteral, Core.IntLiteral, Core.IntLiteral) [template]
|
||||
// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template]
|
||||
// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template]
|
||||
// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template]
|
||||
// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template]
|
||||
// CHECK:STDOUT: %interface.9: <witness> = interface_witness (%Convert.14) [template]
|
||||
// CHECK:STDOUT: %Convert.bound.1: <bound method> = bound_method %int_1.1, %Convert.14 [template]
|
||||
// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template]
|
||||
// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template]
|
||||
// CHECK:STDOUT: %interface.5: <witness> = interface_witness (%Convert.10) [template]
|
||||
// CHECK:STDOUT: %Convert.bound.1: <bound method> = bound_method %int_1.1, %Convert.10 [template]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.1: <specific function> = specific_function %Convert.bound.1, @Convert.2(%int_32) [template]
|
||||
// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template]
|
||||
// CHECK:STDOUT: %Convert.bound.2: <bound method> = bound_method %int_2.1, %Convert.14 [template]
|
||||
// CHECK:STDOUT: %Convert.bound.2: <bound method> = bound_method %int_2.1, %Convert.10 [template]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.2: <specific function> = specific_function %Convert.bound.2, @Convert.2(%int_32) [template]
|
||||
// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template]
|
||||
// CHECK:STDOUT: %Convert.bound.3: <bound method> = bound_method %int_3.1, %Convert.14 [template]
|
||||
// CHECK:STDOUT: %Convert.bound.3: <bound method> = bound_method %int_3.1, %Convert.10 [template]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.3: <specific function> = specific_function %Convert.bound.3, @Convert.2(%int_32) [template]
|
||||
// CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template]
|
||||
// CHECK:STDOUT: %array: %array_type = tuple_value (%int_1.2, %int_2.2, %int_3.2) [template]
|
||||
@@ -45,7 +43,7 @@ var b: i32 = a[{.index = 2}.index];
|
||||
// CHECK:STDOUT: imports {
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
|
||||
// CHECK:STDOUT: .Int = %import_ref.1
|
||||
// CHECK:STDOUT: .ImplicitAs = %import_ref.2
|
||||
// CHECK:STDOUT: .ImplicitAs = %import_ref.5
|
||||
// CHECK:STDOUT: import Core//prelude
|
||||
// CHECK:STDOUT: import Core//prelude/...
|
||||
// CHECK:STDOUT: }
|
||||
@@ -59,17 +57,13 @@ var b: i32 = a[{.index = 2}.index];
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %int_32.loc11: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%int_32.loc11) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1]
|
||||
// CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc11_9.2: type = converted %int.make_type_signed.loc11, %.loc11_9.1 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %array_type: type = array_type %int_3, %i32 [template = constants.%array_type]
|
||||
// CHECK:STDOUT: %a.var: ref %array_type = var a
|
||||
// CHECK:STDOUT: %a: ref %array_type = bind_name a, %a.var
|
||||
// CHECK:STDOUT: %int_32.loc12: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%int_32.loc12) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc12_8.1: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc12_8.2: type = converted %int.make_type_signed.loc12, %.loc12_8.1 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %i32.loc12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %b.var: ref %i32 = var b
|
||||
// CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var
|
||||
// CHECK:STDOUT: }
|
||||
@@ -80,7 +74,7 @@ var b: i32 = a[{.index = 2}.index];
|
||||
// CHECK:STDOUT: %int_2.loc11_23: Core.IntLiteral = int_value 2 [template = constants.%int_2.1]
|
||||
// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1]
|
||||
// CHECK:STDOUT: %.loc11_27.1: %tuple.type = tuple_literal (%int_1.loc11_20, %int_2.loc11_23, %int_3)
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_27.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14]
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_27.1: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10]
|
||||
// CHECK:STDOUT: %Convert.bound.loc11_27.1: <bound method> = bound_method %int_1.loc11_20, %impl.elem0.loc11_27.1 [template = constants.%Convert.bound.1]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc11_27.1: <specific function> = specific_function %Convert.bound.loc11_27.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc11_27.1: init %i32 = call %Convert.specific_fn.loc11_27.1(%int_1.loc11_20) [template = constants.%int_1.2]
|
||||
@@ -88,7 +82,7 @@ var b: i32 = a[{.index = 2}.index];
|
||||
// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0]
|
||||
// CHECK:STDOUT: %.loc11_27.3: ref %i32 = array_index file.%a.var, %int_0
|
||||
// CHECK:STDOUT: %.loc11_27.4: init %i32 = initialize_from %.loc11_27.2 to %.loc11_27.3 [template = constants.%int_1.2]
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_27.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14]
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_27.2: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10]
|
||||
// CHECK:STDOUT: %Convert.bound.loc11_27.2: <bound method> = bound_method %int_2.loc11_23, %impl.elem0.loc11_27.2 [template = constants.%Convert.bound.2]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc11_27.2: <specific function> = specific_function %Convert.bound.loc11_27.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc11_27.2: init %i32 = call %Convert.specific_fn.loc11_27.2(%int_2.loc11_23) [template = constants.%int_2.2]
|
||||
@@ -96,7 +90,7 @@ var b: i32 = a[{.index = 2}.index];
|
||||
// CHECK:STDOUT: %int_1.loc11_27: Core.IntLiteral = int_value 1 [template = constants.%int_1.1]
|
||||
// CHECK:STDOUT: %.loc11_27.6: ref %i32 = array_index file.%a.var, %int_1.loc11_27
|
||||
// CHECK:STDOUT: %.loc11_27.7: init %i32 = initialize_from %.loc11_27.5 to %.loc11_27.6 [template = constants.%int_2.2]
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_27.3: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14]
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_27.3: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10]
|
||||
// CHECK:STDOUT: %Convert.bound.loc11_27.3: <bound method> = bound_method %int_3, %impl.elem0.loc11_27.3 [template = constants.%Convert.bound.3]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc11_27.3: <specific function> = specific_function %Convert.bound.loc11_27.3, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc11_27.3: init %i32 = call %Convert.specific_fn.loc11_27.3(%int_3) [template = constants.%int_3.2]
|
||||
@@ -114,18 +108,16 @@ var b: i32 = a[{.index = 2}.index];
|
||||
// CHECK:STDOUT: %.loc12_27.2: %struct_type.index = converted %.loc12_27.1, %struct [template = constants.%struct]
|
||||
// CHECK:STDOUT: %.loc12_28.1: Core.IntLiteral = struct_access %.loc12_27.2, element0 [template = constants.%int_2.1]
|
||||
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc12_34.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc12_34.2: type = converted %int.make_type_signed, %.loc12_34.1 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %impl.elem0.loc12: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14]
|
||||
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %impl.elem0.loc12: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10]
|
||||
// CHECK:STDOUT: %Convert.bound.loc12: <bound method> = bound_method %.loc12_28.1, %impl.elem0.loc12 [template = constants.%Convert.bound.2]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc12: <specific function> = specific_function %Convert.bound.loc12, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc12: init %i32 = call %Convert.specific_fn.loc12(%.loc12_28.1) [template = constants.%int_2.2]
|
||||
// CHECK:STDOUT: %.loc12_28.2: %i32 = value_of_initializer %int.convert_checked.loc12 [template = constants.%int_2.2]
|
||||
// CHECK:STDOUT: %.loc12_28.3: %i32 = converted %.loc12_28.1, %.loc12_28.2 [template = constants.%int_2.2]
|
||||
// CHECK:STDOUT: %.loc12_34.3: ref %i32 = array_index %a.ref, %.loc12_28.3
|
||||
// CHECK:STDOUT: %.loc12_34.4: %i32 = bind_value %.loc12_34.3
|
||||
// CHECK:STDOUT: assign file.%b.var, %.loc12_34.4
|
||||
// CHECK:STDOUT: %.loc12_34.1: ref %i32 = array_index %a.ref, %.loc12_28.3
|
||||
// CHECK:STDOUT: %.loc12_34.2: %i32 = bind_value %.loc12_34.1
|
||||
// CHECK:STDOUT: assign file.%b.var, %.loc12_34.2
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
+24
-28
@@ -14,9 +14,7 @@ var a: [i32; 9] = (1, 2, 3, 4, 5, 6, 7, 8, 9);
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template]
|
||||
// CHECK:STDOUT: %Int.type: type = fn_type @Int [template]
|
||||
// CHECK:STDOUT: %Int: %Int.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template]
|
||||
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template]
|
||||
// CHECK:STDOUT: %int_9.1: Core.IntLiteral = int_value 9 [template]
|
||||
// CHECK:STDOUT: %array_type: type = array_type %int_9.1, %i32 [template]
|
||||
// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template]
|
||||
@@ -30,34 +28,34 @@ var a: [i32; 9] = (1, 2, 3, 4, 5, 6, 7, 8, 9);
|
||||
// CHECK:STDOUT: %tuple.type: type = tuple_type (Core.IntLiteral, Core.IntLiteral, Core.IntLiteral, Core.IntLiteral, Core.IntLiteral, Core.IntLiteral, Core.IntLiteral, Core.IntLiteral, Core.IntLiteral) [template]
|
||||
// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template]
|
||||
// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template]
|
||||
// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template]
|
||||
// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template]
|
||||
// CHECK:STDOUT: %interface.9: <witness> = interface_witness (%Convert.14) [template]
|
||||
// CHECK:STDOUT: %Convert.bound.1: <bound method> = bound_method %int_1.1, %Convert.14 [template]
|
||||
// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template]
|
||||
// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template]
|
||||
// CHECK:STDOUT: %interface.5: <witness> = interface_witness (%Convert.10) [template]
|
||||
// CHECK:STDOUT: %Convert.bound.1: <bound method> = bound_method %int_1.1, %Convert.10 [template]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.1: <specific function> = specific_function %Convert.bound.1, @Convert.2(%int_32) [template]
|
||||
// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template]
|
||||
// CHECK:STDOUT: %Convert.bound.2: <bound method> = bound_method %int_2.1, %Convert.14 [template]
|
||||
// CHECK:STDOUT: %Convert.bound.2: <bound method> = bound_method %int_2.1, %Convert.10 [template]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.2: <specific function> = specific_function %Convert.bound.2, @Convert.2(%int_32) [template]
|
||||
// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template]
|
||||
// CHECK:STDOUT: %Convert.bound.3: <bound method> = bound_method %int_3.1, %Convert.14 [template]
|
||||
// CHECK:STDOUT: %Convert.bound.3: <bound method> = bound_method %int_3.1, %Convert.10 [template]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.3: <specific function> = specific_function %Convert.bound.3, @Convert.2(%int_32) [template]
|
||||
// CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template]
|
||||
// CHECK:STDOUT: %Convert.bound.4: <bound method> = bound_method %int_4.1, %Convert.14 [template]
|
||||
// CHECK:STDOUT: %Convert.bound.4: <bound method> = bound_method %int_4.1, %Convert.10 [template]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.4: <specific function> = specific_function %Convert.bound.4, @Convert.2(%int_32) [template]
|
||||
// CHECK:STDOUT: %int_4.2: %i32 = int_value 4 [template]
|
||||
// CHECK:STDOUT: %Convert.bound.5: <bound method> = bound_method %int_5.1, %Convert.14 [template]
|
||||
// CHECK:STDOUT: %Convert.bound.5: <bound method> = bound_method %int_5.1, %Convert.10 [template]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.5: <specific function> = specific_function %Convert.bound.5, @Convert.2(%int_32) [template]
|
||||
// CHECK:STDOUT: %int_5.2: %i32 = int_value 5 [template]
|
||||
// CHECK:STDOUT: %Convert.bound.6: <bound method> = bound_method %int_6.1, %Convert.14 [template]
|
||||
// CHECK:STDOUT: %Convert.bound.6: <bound method> = bound_method %int_6.1, %Convert.10 [template]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.6: <specific function> = specific_function %Convert.bound.6, @Convert.2(%int_32) [template]
|
||||
// CHECK:STDOUT: %int_6.2: %i32 = int_value 6 [template]
|
||||
// CHECK:STDOUT: %Convert.bound.7: <bound method> = bound_method %int_7.1, %Convert.14 [template]
|
||||
// CHECK:STDOUT: %Convert.bound.7: <bound method> = bound_method %int_7.1, %Convert.10 [template]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.7: <specific function> = specific_function %Convert.bound.7, @Convert.2(%int_32) [template]
|
||||
// CHECK:STDOUT: %int_7.2: %i32 = int_value 7 [template]
|
||||
// CHECK:STDOUT: %Convert.bound.8: <bound method> = bound_method %int_8.1, %Convert.14 [template]
|
||||
// CHECK:STDOUT: %Convert.bound.8: <bound method> = bound_method %int_8.1, %Convert.10 [template]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.8: <specific function> = specific_function %Convert.bound.8, @Convert.2(%int_32) [template]
|
||||
// CHECK:STDOUT: %int_8.2: %i32 = int_value 8 [template]
|
||||
// CHECK:STDOUT: %Convert.bound.9: <bound method> = bound_method %int_9.1, %Convert.14 [template]
|
||||
// CHECK:STDOUT: %Convert.bound.9: <bound method> = bound_method %int_9.1, %Convert.10 [template]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.9: <specific function> = specific_function %Convert.bound.9, @Convert.2(%int_32) [template]
|
||||
// CHECK:STDOUT: %int_9.2: %i32 = int_value 9 [template]
|
||||
// CHECK:STDOUT: %array: %array_type = tuple_value (%int_1.2, %int_2.2, %int_3.2, %int_4.2, %int_5.2, %int_6.2, %int_7.2, %int_8.2, %int_9.2) [template]
|
||||
@@ -66,7 +64,7 @@ var a: [i32; 9] = (1, 2, 3, 4, 5, 6, 7, 8, 9);
|
||||
// CHECK:STDOUT: imports {
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
|
||||
// CHECK:STDOUT: .Int = %import_ref.1
|
||||
// CHECK:STDOUT: .ImplicitAs = %import_ref.2
|
||||
// CHECK:STDOUT: .ImplicitAs = %import_ref.5
|
||||
// CHECK:STDOUT: import Core//prelude
|
||||
// CHECK:STDOUT: import Core//prelude/...
|
||||
// CHECK:STDOUT: }
|
||||
@@ -79,10 +77,8 @@ var a: [i32; 9] = (1, 2, 3, 4, 5, 6, 7, 8, 9);
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32]
|
||||
// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
|
||||
// CHECK:STDOUT: %int_9: Core.IntLiteral = int_value 9 [template = constants.%int_9.1]
|
||||
// CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc11_9.2: type = converted %int.make_type_signed, %.loc11_9.1 [template = constants.%i32]
|
||||
// CHECK:STDOUT: %array_type: type = array_type %int_9, %i32 [template = constants.%array_type]
|
||||
// CHECK:STDOUT: %a.var: ref %array_type = var a
|
||||
// CHECK:STDOUT: %a: ref %array_type = bind_name a, %a.var
|
||||
@@ -100,7 +96,7 @@ var a: [i32; 9] = (1, 2, 3, 4, 5, 6, 7, 8, 9);
|
||||
// CHECK:STDOUT: %int_8.loc11_41: Core.IntLiteral = int_value 8 [template = constants.%int_8.1]
|
||||
// CHECK:STDOUT: %int_9: Core.IntLiteral = int_value 9 [template = constants.%int_9.1]
|
||||
// CHECK:STDOUT: %.loc11_45.1: %tuple.type = tuple_literal (%int_1.loc11_20, %int_2.loc11_23, %int_3.loc11_26, %int_4.loc11_29, %int_5.loc11_32, %int_6.loc11_35, %int_7.loc11_38, %int_8.loc11_41, %int_9)
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_45.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14]
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_45.1: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10]
|
||||
// CHECK:STDOUT: %Convert.bound.loc11_45.1: <bound method> = bound_method %int_1.loc11_20, %impl.elem0.loc11_45.1 [template = constants.%Convert.bound.1]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc11_45.1: <specific function> = specific_function %Convert.bound.loc11_45.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc11_45.1: init %i32 = call %Convert.specific_fn.loc11_45.1(%int_1.loc11_20) [template = constants.%int_1.2]
|
||||
@@ -108,7 +104,7 @@ var a: [i32; 9] = (1, 2, 3, 4, 5, 6, 7, 8, 9);
|
||||
// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0]
|
||||
// CHECK:STDOUT: %.loc11_45.3: ref %i32 = array_index file.%a.var, %int_0
|
||||
// CHECK:STDOUT: %.loc11_45.4: init %i32 = initialize_from %.loc11_45.2 to %.loc11_45.3 [template = constants.%int_1.2]
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_45.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14]
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_45.2: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10]
|
||||
// CHECK:STDOUT: %Convert.bound.loc11_45.2: <bound method> = bound_method %int_2.loc11_23, %impl.elem0.loc11_45.2 [template = constants.%Convert.bound.2]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc11_45.2: <specific function> = specific_function %Convert.bound.loc11_45.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc11_45.2: init %i32 = call %Convert.specific_fn.loc11_45.2(%int_2.loc11_23) [template = constants.%int_2.2]
|
||||
@@ -116,7 +112,7 @@ var a: [i32; 9] = (1, 2, 3, 4, 5, 6, 7, 8, 9);
|
||||
// CHECK:STDOUT: %int_1.loc11_45: Core.IntLiteral = int_value 1 [template = constants.%int_1.1]
|
||||
// CHECK:STDOUT: %.loc11_45.6: ref %i32 = array_index file.%a.var, %int_1.loc11_45
|
||||
// CHECK:STDOUT: %.loc11_45.7: init %i32 = initialize_from %.loc11_45.5 to %.loc11_45.6 [template = constants.%int_2.2]
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_45.3: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14]
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_45.3: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10]
|
||||
// CHECK:STDOUT: %Convert.bound.loc11_45.3: <bound method> = bound_method %int_3.loc11_26, %impl.elem0.loc11_45.3 [template = constants.%Convert.bound.3]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc11_45.3: <specific function> = specific_function %Convert.bound.loc11_45.3, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc11_45.3: init %i32 = call %Convert.specific_fn.loc11_45.3(%int_3.loc11_26) [template = constants.%int_3.2]
|
||||
@@ -124,7 +120,7 @@ var a: [i32; 9] = (1, 2, 3, 4, 5, 6, 7, 8, 9);
|
||||
// CHECK:STDOUT: %int_2.loc11_45: Core.IntLiteral = int_value 2 [template = constants.%int_2.1]
|
||||
// CHECK:STDOUT: %.loc11_45.9: ref %i32 = array_index file.%a.var, %int_2.loc11_45
|
||||
// CHECK:STDOUT: %.loc11_45.10: init %i32 = initialize_from %.loc11_45.8 to %.loc11_45.9 [template = constants.%int_3.2]
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_45.4: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14]
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_45.4: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10]
|
||||
// CHECK:STDOUT: %Convert.bound.loc11_45.4: <bound method> = bound_method %int_4.loc11_29, %impl.elem0.loc11_45.4 [template = constants.%Convert.bound.4]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc11_45.4: <specific function> = specific_function %Convert.bound.loc11_45.4, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.4]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc11_45.4: init %i32 = call %Convert.specific_fn.loc11_45.4(%int_4.loc11_29) [template = constants.%int_4.2]
|
||||
@@ -132,7 +128,7 @@ var a: [i32; 9] = (1, 2, 3, 4, 5, 6, 7, 8, 9);
|
||||
// CHECK:STDOUT: %int_3.loc11_45: Core.IntLiteral = int_value 3 [template = constants.%int_3.1]
|
||||
// CHECK:STDOUT: %.loc11_45.12: ref %i32 = array_index file.%a.var, %int_3.loc11_45
|
||||
// CHECK:STDOUT: %.loc11_45.13: init %i32 = initialize_from %.loc11_45.11 to %.loc11_45.12 [template = constants.%int_4.2]
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_45.5: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14]
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_45.5: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10]
|
||||
// CHECK:STDOUT: %Convert.bound.loc11_45.5: <bound method> = bound_method %int_5.loc11_32, %impl.elem0.loc11_45.5 [template = constants.%Convert.bound.5]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc11_45.5: <specific function> = specific_function %Convert.bound.loc11_45.5, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.5]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc11_45.5: init %i32 = call %Convert.specific_fn.loc11_45.5(%int_5.loc11_32) [template = constants.%int_5.2]
|
||||
@@ -140,7 +136,7 @@ var a: [i32; 9] = (1, 2, 3, 4, 5, 6, 7, 8, 9);
|
||||
// CHECK:STDOUT: %int_4.loc11_45: Core.IntLiteral = int_value 4 [template = constants.%int_4.1]
|
||||
// CHECK:STDOUT: %.loc11_45.15: ref %i32 = array_index file.%a.var, %int_4.loc11_45
|
||||
// CHECK:STDOUT: %.loc11_45.16: init %i32 = initialize_from %.loc11_45.14 to %.loc11_45.15 [template = constants.%int_5.2]
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_45.6: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14]
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_45.6: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10]
|
||||
// CHECK:STDOUT: %Convert.bound.loc11_45.6: <bound method> = bound_method %int_6.loc11_35, %impl.elem0.loc11_45.6 [template = constants.%Convert.bound.6]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc11_45.6: <specific function> = specific_function %Convert.bound.loc11_45.6, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.6]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc11_45.6: init %i32 = call %Convert.specific_fn.loc11_45.6(%int_6.loc11_35) [template = constants.%int_6.2]
|
||||
@@ -148,7 +144,7 @@ var a: [i32; 9] = (1, 2, 3, 4, 5, 6, 7, 8, 9);
|
||||
// CHECK:STDOUT: %int_5.loc11_45: Core.IntLiteral = int_value 5 [template = constants.%int_5.1]
|
||||
// CHECK:STDOUT: %.loc11_45.18: ref %i32 = array_index file.%a.var, %int_5.loc11_45
|
||||
// CHECK:STDOUT: %.loc11_45.19: init %i32 = initialize_from %.loc11_45.17 to %.loc11_45.18 [template = constants.%int_6.2]
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_45.7: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14]
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_45.7: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10]
|
||||
// CHECK:STDOUT: %Convert.bound.loc11_45.7: <bound method> = bound_method %int_7.loc11_38, %impl.elem0.loc11_45.7 [template = constants.%Convert.bound.7]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc11_45.7: <specific function> = specific_function %Convert.bound.loc11_45.7, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.7]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc11_45.7: init %i32 = call %Convert.specific_fn.loc11_45.7(%int_7.loc11_38) [template = constants.%int_7.2]
|
||||
@@ -156,7 +152,7 @@ var a: [i32; 9] = (1, 2, 3, 4, 5, 6, 7, 8, 9);
|
||||
// CHECK:STDOUT: %int_6.loc11_45: Core.IntLiteral = int_value 6 [template = constants.%int_6.1]
|
||||
// CHECK:STDOUT: %.loc11_45.21: ref %i32 = array_index file.%a.var, %int_6.loc11_45
|
||||
// CHECK:STDOUT: %.loc11_45.22: init %i32 = initialize_from %.loc11_45.20 to %.loc11_45.21 [template = constants.%int_7.2]
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_45.8: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14]
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_45.8: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10]
|
||||
// CHECK:STDOUT: %Convert.bound.loc11_45.8: <bound method> = bound_method %int_8.loc11_41, %impl.elem0.loc11_45.8 [template = constants.%Convert.bound.8]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc11_45.8: <specific function> = specific_function %Convert.bound.loc11_45.8, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.8]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc11_45.8: init %i32 = call %Convert.specific_fn.loc11_45.8(%int_8.loc11_41) [template = constants.%int_8.2]
|
||||
@@ -164,7 +160,7 @@ var a: [i32; 9] = (1, 2, 3, 4, 5, 6, 7, 8, 9);
|
||||
// CHECK:STDOUT: %int_7.loc11_45: Core.IntLiteral = int_value 7 [template = constants.%int_7.1]
|
||||
// CHECK:STDOUT: %.loc11_45.24: ref %i32 = array_index file.%a.var, %int_7.loc11_45
|
||||
// CHECK:STDOUT: %.loc11_45.25: init %i32 = initialize_from %.loc11_45.23 to %.loc11_45.24 [template = constants.%int_8.2]
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_45.9: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14]
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_45.9: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10]
|
||||
// CHECK:STDOUT: %Convert.bound.loc11_45.9: <bound method> = bound_method %int_9, %impl.elem0.loc11_45.9 [template = constants.%Convert.bound.9]
|
||||
// CHECK:STDOUT: %Convert.specific_fn.loc11_45.9: <specific function> = specific_function %Convert.bound.loc11_45.9, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.9]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc11_45.9: init %i32 = call %Convert.specific_fn.loc11_45.9(%int_9) [template = constants.%int_9.2]
|
||||
|
||||
Reference in New Issue
Block a user