mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 08:11:04 +01:00
Rename BigInt to IntLiteral. (#4476)
In preparation for changing the type of integer literals to `IntLiteral`.
This commit is contained in:
@@ -23,7 +23,7 @@ fn Run() {
|
||||
// CHECK:STDOUT: --- fail_return_type_mismatch.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %.1: Core.BigInt = int_value 64 [template]
|
||||
// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 64 [template]
|
||||
// CHECK:STDOUT: %Float.type: type = fn_type @Float [template]
|
||||
// CHECK:STDOUT: %.2: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %Float: %Float.type = struct_value () [template]
|
||||
@@ -82,7 +82,7 @@ fn Run() {
|
||||
// CHECK:STDOUT: %return.patt: f64 = return_slot_pattern
|
||||
// CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param0
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %.loc11_13.1: Core.BigInt = int_value 64 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %.loc11_13.1: Core.IntLiteral = int_value 64 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%.loc11_13.1) [template = f64]
|
||||
// CHECK:STDOUT: %.loc11_13.2: type = value_of_initializer %float.make_type [template = f64]
|
||||
// CHECK:STDOUT: %.loc11_13.3: type = converted %float.make_type, %.loc11_13.2 [template = f64]
|
||||
@@ -112,7 +112,7 @@ fn Run() {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @Float(%size.param_patt: Core.BigInt) -> type = "float.make_type";
|
||||
// CHECK:STDOUT: fn @Float(%size.param_patt: Core.IntLiteral) -> type = "float.make_type";
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @Foo() -> f64 {
|
||||
// CHECK:STDOUT: !entry:
|
||||
|
||||
+135
-47
@@ -12,13 +12,7 @@
|
||||
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
// TODO: This declaration should be accepted, and the `var v` below should be
|
||||
// rejected during monomorphization, once integer literals have the type
|
||||
// `Core.IntLiteral(N)` as described in the design.
|
||||
// CHECK:STDERR: fail_todo_call_monomorphization_error.carbon:[[@LINE+3]]:41: error: name `IntLiteral` not found [NameNotFound]
|
||||
// CHECK:STDERR: fn ErrorIfNIsZero[N:! Core.BigInt()](n: Core.IntLiteral(N)) {
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~
|
||||
fn ErrorIfNIsZero[N:! Core.BigInt()](n: Core.IntLiteral(N)) {
|
||||
fn ErrorIfNIsZero(N:! Core.IntLiteral()) {
|
||||
// Check that we resolve the definition of a used specific function by
|
||||
// ensuring we produce an error when doing so. Notionally this error is
|
||||
// produced as a result of instantiating the `Core.Int` template, although
|
||||
@@ -27,17 +21,28 @@ fn ErrorIfNIsZero[N:! Core.BigInt()](n: Core.IntLiteral(N)) {
|
||||
}
|
||||
|
||||
fn CallNegative() {
|
||||
// TODO: This should fail during monomorphization once integer literals have
|
||||
// the type `Core.IntLiteral`.
|
||||
// CHECK:STDERR: fail_todo_call_monomorphization_error.carbon:[[@LINE+9]]:3: error: cannot implicitly convert from `i32` to `Core.IntLiteral` [ImplicitAsConversionFailure]
|
||||
// CHECK:STDERR: ErrorIfNIsZero(0);
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_todo_call_monomorphization_error.carbon:[[@LINE+6]]:3: note: type `i32` does not implement interface `ImplicitAs` [MissingImplInMemberAccessNote]
|
||||
// CHECK:STDERR: ErrorIfNIsZero(0);
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_todo_call_monomorphization_error.carbon:[[@LINE-17]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere]
|
||||
// CHECK:STDERR: fn ErrorIfNIsZero(N:! Core.IntLiteral()) {
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
ErrorIfNIsZero(0);
|
||||
}
|
||||
|
||||
// CHECK:STDOUT: --- fail_todo_call_monomorphization_error.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %BigInt.type: type = fn_type @BigInt [template]
|
||||
// CHECK:STDOUT: %IntLiteral.type: type = fn_type @IntLiteral [template]
|
||||
// CHECK:STDOUT: %.1: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %BigInt: %BigInt.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %N: Core.BigInt = bind_symbolic_name N, 0 [symbolic]
|
||||
// CHECK:STDOUT: %N.patt: Core.BigInt = symbolic_binding_pattern N, 0 [symbolic]
|
||||
// CHECK:STDOUT: %IntLiteral: %IntLiteral.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic]
|
||||
// CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic]
|
||||
// CHECK:STDOUT: %ErrorIfNIsZero.type: type = fn_type @ErrorIfNIsZero [template]
|
||||
// CHECK:STDOUT: %ErrorIfNIsZero: %ErrorIfNIsZero.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %Int.type: type = fn_type @Int [template]
|
||||
@@ -46,17 +51,41 @@ fn CallNegative() {
|
||||
// CHECK:STDOUT: %CallNegative.type: type = fn_type @CallNegative [template]
|
||||
// CHECK:STDOUT: %CallNegative: %CallNegative.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.3: i32 = int_value 0 [template]
|
||||
// CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template]
|
||||
// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type.1 = struct_value () [template]
|
||||
// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic]
|
||||
// CHECK:STDOUT: %ImplicitAs.type.2: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic]
|
||||
// CHECK:STDOUT: %Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2) = bind_symbolic_name Self, 1 [symbolic]
|
||||
// CHECK:STDOUT: %Dest.patt: type = symbolic_binding_pattern Dest, 0 [symbolic]
|
||||
// CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic]
|
||||
// CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic]
|
||||
// CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic]
|
||||
// CHECK:STDOUT: %.4: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic]
|
||||
// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.7 [symbolic]
|
||||
// CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(Core.IntLiteral) [template]
|
||||
// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(Core.IntLiteral) [template]
|
||||
// CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template]
|
||||
// CHECK:STDOUT: %.6: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template]
|
||||
// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.7 [template]
|
||||
// CHECK:STDOUT: %.8: %.4 = assoc_entity element0, imports.%import_ref.8 [symbolic]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
|
||||
// CHECK:STDOUT: .BigInt = %import_ref.1
|
||||
// CHECK:STDOUT: .IntLiteral = %import_ref.1
|
||||
// CHECK:STDOUT: .Int = %import_ref.2
|
||||
// CHECK:STDOUT: .ImplicitAs = %import_ref.3
|
||||
// CHECK:STDOUT: import Core//prelude
|
||||
// CHECK:STDOUT: import Core//prelude/...
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %import_ref.1: %BigInt.type = import_ref Core//prelude/types, inst+7, loaded [template = constants.%BigInt]
|
||||
// CHECK:STDOUT: %import_ref.1: %IntLiteral.type = import_ref Core//prelude/types, inst+7, loaded [template = constants.%IntLiteral]
|
||||
// CHECK:STDOUT: %import_ref.2: %Int.type = import_ref Core//prelude/types, inst+30, loaded [template = constants.%Int]
|
||||
// CHECK:STDOUT: %import_ref.3: %ImplicitAs.type.1 = import_ref Core//prelude/operators/as, inst+49, loaded [template = constants.%ImplicitAs]
|
||||
// CHECK:STDOUT: %import_ref.4 = import_ref Core//prelude/operators/as, inst+55, unloaded
|
||||
// CHECK:STDOUT: %import_ref.5: @ImplicitAs.%.1 (%.4) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.8)]
|
||||
// CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/as, inst+70, unloaded
|
||||
// CHECK:STDOUT: %import_ref.7 = import_ref Core//prelude/operators/as, inst+70, unloaded
|
||||
// CHECK:STDOUT: %import_ref.8 = import_ref Core//prelude/operators/as, inst+70, unloaded
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
@@ -67,61 +96,120 @@ fn CallNegative() {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %ErrorIfNIsZero.decl: %ErrorIfNIsZero.type = fn_decl @ErrorIfNIsZero [template = constants.%ErrorIfNIsZero] {
|
||||
// CHECK:STDOUT: %N.patt.loc10_19.1: Core.BigInt = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc10_19.2 (constants.%N.patt)]
|
||||
// CHECK:STDOUT: %N.param_patt: Core.BigInt = value_param_pattern %N.patt.loc10_19.1, runtime_param<invalid> [symbolic = %N.patt.loc10_19.2 (constants.%N.patt)]
|
||||
// CHECK:STDOUT: %n.patt: <error> = binding_pattern n
|
||||
// CHECK:STDOUT: %n.param_patt: <error> = value_param_pattern %n.patt, runtime_param0
|
||||
// CHECK:STDOUT: %N.patt.loc4_19.1: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc4_19.2 (constants.%N.patt)]
|
||||
// CHECK:STDOUT: %N.param_patt: Core.IntLiteral = value_param_pattern %N.patt.loc4_19.1, runtime_param<invalid> [symbolic = %N.patt.loc4_19.2 (constants.%N.patt)]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %Core.ref.loc10_23: <namespace> = name_ref Core, imports.%Core [template = imports.%Core]
|
||||
// CHECK:STDOUT: %BigInt.ref: %BigInt.type = name_ref BigInt, imports.%import_ref.1 [template = constants.%BigInt]
|
||||
// CHECK:STDOUT: %big_int.make_type: init type = call %BigInt.ref() [template = Core.BigInt]
|
||||
// CHECK:STDOUT: %.loc10_35.1: type = value_of_initializer %big_int.make_type [template = Core.BigInt]
|
||||
// CHECK:STDOUT: %.loc10_35.2: type = converted %big_int.make_type, %.loc10_35.1 [template = Core.BigInt]
|
||||
// CHECK:STDOUT: %Core.ref.loc10_41: <namespace> = name_ref Core, imports.%Core [template = imports.%Core]
|
||||
// CHECK:STDOUT: %IntLiteral.ref: <error> = name_ref IntLiteral, <error> [template = <error>]
|
||||
// CHECK:STDOUT: %N.ref.loc10: Core.BigInt = name_ref N, %N.loc10_19.1 [symbolic = %N.loc10_19.2 (constants.%N)]
|
||||
// CHECK:STDOUT: %N.param: Core.BigInt = value_param runtime_param<invalid>
|
||||
// CHECK:STDOUT: %N.loc10_19.1: Core.BigInt = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc10_19.2 (constants.%N)]
|
||||
// CHECK:STDOUT: %n.param: <error> = value_param runtime_param0
|
||||
// CHECK:STDOUT: %n: <error> = bind_name n, %n.param
|
||||
// CHECK:STDOUT: %Core.ref.loc4: <namespace> = name_ref Core, imports.%Core [template = imports.%Core]
|
||||
// CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, imports.%import_ref.1 [template = constants.%IntLiteral]
|
||||
// CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral]
|
||||
// CHECK:STDOUT: %.loc4_39.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral]
|
||||
// CHECK:STDOUT: %.loc4_39.2: type = converted %int_literal.make_type, %.loc4_39.1 [template = Core.IntLiteral]
|
||||
// CHECK:STDOUT: %N.param: Core.IntLiteral = value_param runtime_param<invalid>
|
||||
// CHECK:STDOUT: %N.loc4_19.1: Core.IntLiteral = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc4_19.2 (constants.%N)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %CallNegative.decl: %CallNegative.type = fn_decl @CallNegative [template = constants.%CallNegative] {} {}
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @BigInt() -> type = "big_int.make_type";
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @ErrorIfNIsZero(%N.loc10_19.1: Core.BigInt) {
|
||||
// CHECK:STDOUT: %N.loc10_19.2: Core.BigInt = bind_symbolic_name N, 0 [symbolic = %N.loc10_19.2 (constants.%N)]
|
||||
// CHECK:STDOUT: %N.patt.loc10_19.2: Core.BigInt = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc10_19.2 (constants.%N.patt)]
|
||||
// CHECK:STDOUT: generic interface @ImplicitAs(constants.%Dest: type) {
|
||||
// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
|
||||
// CHECK:STDOUT: %Dest.patt: type = symbolic_binding_pattern Dest, 0 [symbolic = %Dest.patt (constants.%Dest.patt)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %.loc15_18: type = int_type signed, %N.loc10_19.2 [symbolic = %.loc15_18 (constants.%.2)]
|
||||
// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)]
|
||||
// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)]
|
||||
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)]
|
||||
// CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)]
|
||||
// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.4)]
|
||||
// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.4) = assoc_entity element0, imports.%import_ref.7 [symbolic = %.2 (constants.%.5)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn[%N.param_patt: Core.BigInt](%n.param_patt: <error>) {
|
||||
// CHECK:STDOUT: interface {
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = imports.%import_ref.4
|
||||
// CHECK:STDOUT: .Convert = imports.%import_ref.5
|
||||
// CHECK:STDOUT: witness = (imports.%import_ref.6)
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @IntLiteral() -> type = "int_literal.make_type";
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @ErrorIfNIsZero(%N.loc4_19.1: Core.IntLiteral) {
|
||||
// CHECK:STDOUT: %N.loc4_19.2: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N.loc4_19.2 (constants.%N)]
|
||||
// CHECK:STDOUT: %N.patt.loc4_19.2: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc4_19.2 (constants.%N.patt)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %.loc9_18: type = int_type signed, %N.loc4_19.2 [symbolic = %.loc9_18 (constants.%.2)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn(%N.param_patt: Core.IntLiteral) {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %Core.ref.loc15: <namespace> = name_ref Core, imports.%Core [template = imports.%Core]
|
||||
// CHECK:STDOUT: %Core.ref.loc9: <namespace> = name_ref Core, imports.%Core [template = imports.%Core]
|
||||
// CHECK:STDOUT: %Int.ref: %Int.type = name_ref Int, imports.%import_ref.2 [template = constants.%Int]
|
||||
// CHECK:STDOUT: %N.ref.loc15: Core.BigInt = name_ref N, %N.loc10_19.1 [symbolic = %N.loc10_19.2 (constants.%N)]
|
||||
// CHECK:STDOUT: %int.make_type_signed: init type = call %Int.ref(%N.ref.loc15) [symbolic = %.loc15_18 (constants.%.2)]
|
||||
// CHECK:STDOUT: %.loc15_20.1: type = value_of_initializer %int.make_type_signed [symbolic = %.loc15_18 (constants.%.2)]
|
||||
// CHECK:STDOUT: %.loc15_20.2: type = converted %int.make_type_signed, %.loc15_20.1 [symbolic = %.loc15_18 (constants.%.2)]
|
||||
// CHECK:STDOUT: %v.var: ref @ErrorIfNIsZero.%.loc15_18 (%.2) = var v
|
||||
// CHECK:STDOUT: %v: ref @ErrorIfNIsZero.%.loc15_18 (%.2) = bind_name v, %v.var
|
||||
// CHECK:STDOUT: %N.ref: Core.IntLiteral = name_ref N, %N.loc4_19.1 [symbolic = %N.loc4_19.2 (constants.%N)]
|
||||
// CHECK:STDOUT: %int.make_type_signed: init type = call %Int.ref(%N.ref) [symbolic = %.loc9_18 (constants.%.2)]
|
||||
// CHECK:STDOUT: %.loc9_20.1: type = value_of_initializer %int.make_type_signed [symbolic = %.loc9_18 (constants.%.2)]
|
||||
// CHECK:STDOUT: %.loc9_20.2: type = converted %int.make_type_signed, %.loc9_20.1 [symbolic = %.loc9_18 (constants.%.2)]
|
||||
// CHECK:STDOUT: %v.var: ref @ErrorIfNIsZero.%.loc9_18 (%.2) = var v
|
||||
// CHECK:STDOUT: %v: ref @ErrorIfNIsZero.%.loc9_18 (%.2) = bind_name v, %v.var
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @Int(%size.param_patt: Core.BigInt) -> type = "int.make_type_signed";
|
||||
// CHECK:STDOUT: fn @Int(%size.param_patt: Core.IntLiteral) -> type = "int.make_type_signed";
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @CallNegative() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %ErrorIfNIsZero.ref: %ErrorIfNIsZero.type = name_ref ErrorIfNIsZero, file.%ErrorIfNIsZero.decl [template = constants.%ErrorIfNIsZero]
|
||||
// CHECK:STDOUT: %.loc19: i32 = int_value 0 [template = constants.%.3]
|
||||
// CHECK:STDOUT: %.loc24_18: i32 = int_value 0 [template = constants.%.3]
|
||||
// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(Core.IntLiteral) [template = constants.%ImplicitAs.type.3]
|
||||
// CHECK:STDOUT: %.loc24_17.1: %.6 = specific_constant imports.%import_ref.5, @ImplicitAs(Core.IntLiteral) [template = constants.%.7]
|
||||
// CHECK:STDOUT: %Convert.ref: %.6 = name_ref Convert, %.loc24_17.1 [template = constants.%.7]
|
||||
// CHECK:STDOUT: %.loc24_17.2: Core.IntLiteral = converted %.loc24_18, <error> [template = <error>]
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @Convert(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2)) {
|
||||
// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
|
||||
// CHECK:STDOUT: %ImplicitAs.type: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)]
|
||||
// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn[%self.param_patt: @Convert.%Self (%Self.2)]() -> @Convert.%Dest (%Dest);
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @ErrorIfNIsZero(constants.%N) {
|
||||
// CHECK:STDOUT: %N.loc10_19.2 => constants.%N
|
||||
// CHECK:STDOUT: %N.patt.loc10_19.2 => constants.%N
|
||||
// CHECK:STDOUT: %N.loc4_19.2 => constants.%N
|
||||
// CHECK:STDOUT: %N.patt.loc4_19.2 => constants.%N
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) {
|
||||
// CHECK:STDOUT: %Dest => constants.%Dest
|
||||
// CHECK:STDOUT: %Dest.patt => constants.%Dest
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @ImplicitAs(@ImplicitAs.%Dest) {
|
||||
// CHECK:STDOUT: %Dest => constants.%Dest
|
||||
// CHECK:STDOUT: %Dest.patt => constants.%Dest
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @ImplicitAs(@Convert.%Dest) {
|
||||
// CHECK:STDOUT: %Dest => constants.%Dest
|
||||
// CHECK:STDOUT: %Dest.patt => constants.%Dest
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @Convert(constants.%Dest, constants.%Self.1) {
|
||||
// CHECK:STDOUT: %Dest => constants.%Dest
|
||||
// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2
|
||||
// CHECK:STDOUT: %Self => constants.%Self.1
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @ImplicitAs(Core.IntLiteral) {
|
||||
// CHECK:STDOUT: %Dest => Core.IntLiteral
|
||||
// CHECK:STDOUT: %Dest.patt => Core.IntLiteral
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3
|
||||
// CHECK:STDOUT: %Self => constants.%Self.2
|
||||
// CHECK:STDOUT: %Convert.type => constants.%Convert.type.2
|
||||
// CHECK:STDOUT: %Convert => constants.%Convert.2
|
||||
// CHECK:STDOUT: %.1 => constants.%.6
|
||||
// CHECK:STDOUT: %.2 => constants.%.7
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
Reference in New Issue
Block a user