mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-06 07:34:45 +01:00
Rename template constant -> concrete constant. (#4939)
This implements a direction decided in a [recent discussion](https://docs.google.com/document/d/1Iut5f2TQBrtBNIduF4vJYOKfw7MbS8xH_J01_Q4e6Rk/edit?resourcekey=0-mc_vh5UzrzXfU4kO-3tOjA&tab=t.0#heading=h.mas1g68xx9ct) to switch away from "template constant" when naming a constant that doesn't depend on any generic parameters, because that creates confusion with template-dependent constant values that depend on a template parameter.
This commit is contained in:
+63
-63
@@ -33,30 +33,30 @@ fn While() {
|
||||
// CHECK:STDOUT: --- break_continue.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template]
|
||||
// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %A.type: type = fn_type @A [template]
|
||||
// CHECK:STDOUT: %A: %A.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %B.type: type = fn_type @B [template]
|
||||
// CHECK:STDOUT: %B: %B.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %C.type: type = fn_type @C [template]
|
||||
// CHECK:STDOUT: %C: %C.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %D.type: type = fn_type @D [template]
|
||||
// CHECK:STDOUT: %D: %D.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %E.type: type = fn_type @E [template]
|
||||
// CHECK:STDOUT: %E: %E.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
|
||||
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %G.type: type = fn_type @G [template]
|
||||
// CHECK:STDOUT: %G: %G.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %H.type: type = fn_type @H [template]
|
||||
// CHECK:STDOUT: %H: %H.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %While.type: type = fn_type @While [template]
|
||||
// CHECK:STDOUT: %While: %While.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [concrete]
|
||||
// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %A.type: type = fn_type @A [concrete]
|
||||
// CHECK:STDOUT: %A: %A.type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %B.type: type = fn_type @B [concrete]
|
||||
// CHECK:STDOUT: %B: %B.type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %C.type: type = fn_type @C [concrete]
|
||||
// CHECK:STDOUT: %C: %C.type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %D.type: type = fn_type @D [concrete]
|
||||
// CHECK:STDOUT: %D: %D.type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %E.type: type = fn_type @E [concrete]
|
||||
// CHECK:STDOUT: %E: %E.type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
|
||||
// CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %G.type: type = fn_type @G [concrete]
|
||||
// CHECK:STDOUT: %G: %G.type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %H.type: type = fn_type @H [concrete]
|
||||
// CHECK:STDOUT: %H: %H.type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %While.type: type = fn_type @While [concrete]
|
||||
// CHECK:STDOUT: %While: %While.type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
|
||||
// CHECK:STDOUT: .Bool = %Core.Bool
|
||||
// CHECK:STDOUT: import Core//prelude
|
||||
// CHECK:STDOUT: import Core//prelude/...
|
||||
@@ -64,7 +64,7 @@ fn While() {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: package: <namespace> = namespace [template] {
|
||||
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
|
||||
// CHECK:STDOUT: .Core = imports.%Core
|
||||
// CHECK:STDOUT: .A = %A.decl
|
||||
// CHECK:STDOUT: .B = %B.decl
|
||||
@@ -77,87 +77,87 @@ fn While() {
|
||||
// CHECK:STDOUT: .While = %While.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {
|
||||
// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [concrete = constants.%A] {
|
||||
// CHECK:STDOUT: %return.patt: bool = return_slot_pattern
|
||||
// CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param0
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool]
|
||||
// CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %bool.make_type [template = bool]
|
||||
// CHECK:STDOUT: %.loc11_11.2: type = converted %bool.make_type, %.loc11_11.1 [template = bool]
|
||||
// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [concrete = bool]
|
||||
// CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %bool.make_type [concrete = bool]
|
||||
// CHECK:STDOUT: %.loc11_11.2: type = converted %bool.make_type, %.loc11_11.1 [concrete = bool]
|
||||
// CHECK:STDOUT: %return.param: ref bool = out_param runtime_param0
|
||||
// CHECK:STDOUT: %return: ref bool = return_slot %return.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %B.decl: %B.type = fn_decl @B [template = constants.%B] {
|
||||
// CHECK:STDOUT: %B.decl: %B.type = fn_decl @B [concrete = constants.%B] {
|
||||
// CHECK:STDOUT: %return.patt: bool = return_slot_pattern
|
||||
// CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param0
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool]
|
||||
// CHECK:STDOUT: %.loc12_11.1: type = value_of_initializer %bool.make_type [template = bool]
|
||||
// CHECK:STDOUT: %.loc12_11.2: type = converted %bool.make_type, %.loc12_11.1 [template = bool]
|
||||
// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [concrete = bool]
|
||||
// CHECK:STDOUT: %.loc12_11.1: type = value_of_initializer %bool.make_type [concrete = bool]
|
||||
// CHECK:STDOUT: %.loc12_11.2: type = converted %bool.make_type, %.loc12_11.1 [concrete = bool]
|
||||
// CHECK:STDOUT: %return.param: ref bool = out_param runtime_param0
|
||||
// CHECK:STDOUT: %return: ref bool = return_slot %return.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %C.decl: %C.type = fn_decl @C [template = constants.%C] {
|
||||
// CHECK:STDOUT: %C.decl: %C.type = fn_decl @C [concrete = constants.%C] {
|
||||
// CHECK:STDOUT: %return.patt: bool = return_slot_pattern
|
||||
// CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param0
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool]
|
||||
// CHECK:STDOUT: %.loc13_11.1: type = value_of_initializer %bool.make_type [template = bool]
|
||||
// CHECK:STDOUT: %.loc13_11.2: type = converted %bool.make_type, %.loc13_11.1 [template = bool]
|
||||
// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [concrete = bool]
|
||||
// CHECK:STDOUT: %.loc13_11.1: type = value_of_initializer %bool.make_type [concrete = bool]
|
||||
// CHECK:STDOUT: %.loc13_11.2: type = converted %bool.make_type, %.loc13_11.1 [concrete = bool]
|
||||
// CHECK:STDOUT: %return.param: ref bool = out_param runtime_param0
|
||||
// CHECK:STDOUT: %return: ref bool = return_slot %return.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %D.decl: %D.type = fn_decl @D [template = constants.%D] {
|
||||
// CHECK:STDOUT: %D.decl: %D.type = fn_decl @D [concrete = constants.%D] {
|
||||
// CHECK:STDOUT: %return.patt: bool = return_slot_pattern
|
||||
// CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param0
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool]
|
||||
// CHECK:STDOUT: %.loc14_11.1: type = value_of_initializer %bool.make_type [template = bool]
|
||||
// CHECK:STDOUT: %.loc14_11.2: type = converted %bool.make_type, %.loc14_11.1 [template = bool]
|
||||
// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [concrete = bool]
|
||||
// CHECK:STDOUT: %.loc14_11.1: type = value_of_initializer %bool.make_type [concrete = bool]
|
||||
// CHECK:STDOUT: %.loc14_11.2: type = converted %bool.make_type, %.loc14_11.1 [concrete = bool]
|
||||
// CHECK:STDOUT: %return.param: ref bool = out_param runtime_param0
|
||||
// CHECK:STDOUT: %return: ref bool = return_slot %return.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %E.decl: %E.type = fn_decl @E [template = constants.%E] {
|
||||
// CHECK:STDOUT: %E.decl: %E.type = fn_decl @E [concrete = constants.%E] {
|
||||
// CHECK:STDOUT: %return.patt: bool = return_slot_pattern
|
||||
// CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param0
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool]
|
||||
// CHECK:STDOUT: %.loc15_11.1: type = value_of_initializer %bool.make_type [template = bool]
|
||||
// CHECK:STDOUT: %.loc15_11.2: type = converted %bool.make_type, %.loc15_11.1 [template = bool]
|
||||
// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [concrete = bool]
|
||||
// CHECK:STDOUT: %.loc15_11.1: type = value_of_initializer %bool.make_type [concrete = bool]
|
||||
// CHECK:STDOUT: %.loc15_11.2: type = converted %bool.make_type, %.loc15_11.1 [concrete = bool]
|
||||
// CHECK:STDOUT: %return.param: ref bool = out_param runtime_param0
|
||||
// CHECK:STDOUT: %return: ref bool = return_slot %return.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {
|
||||
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {
|
||||
// CHECK:STDOUT: %return.patt: bool = return_slot_pattern
|
||||
// CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param0
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool]
|
||||
// CHECK:STDOUT: %.loc16_11.1: type = value_of_initializer %bool.make_type [template = bool]
|
||||
// CHECK:STDOUT: %.loc16_11.2: type = converted %bool.make_type, %.loc16_11.1 [template = bool]
|
||||
// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [concrete = bool]
|
||||
// CHECK:STDOUT: %.loc16_11.1: type = value_of_initializer %bool.make_type [concrete = bool]
|
||||
// CHECK:STDOUT: %.loc16_11.2: type = converted %bool.make_type, %.loc16_11.1 [concrete = bool]
|
||||
// CHECK:STDOUT: %return.param: ref bool = out_param runtime_param0
|
||||
// CHECK:STDOUT: %return: ref bool = return_slot %return.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] {
|
||||
// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {
|
||||
// CHECK:STDOUT: %return.patt: bool = return_slot_pattern
|
||||
// CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param0
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool]
|
||||
// CHECK:STDOUT: %.loc17_11.1: type = value_of_initializer %bool.make_type [template = bool]
|
||||
// CHECK:STDOUT: %.loc17_11.2: type = converted %bool.make_type, %.loc17_11.1 [template = bool]
|
||||
// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [concrete = bool]
|
||||
// CHECK:STDOUT: %.loc17_11.1: type = value_of_initializer %bool.make_type [concrete = bool]
|
||||
// CHECK:STDOUT: %.loc17_11.2: type = converted %bool.make_type, %.loc17_11.1 [concrete = bool]
|
||||
// CHECK:STDOUT: %return.param: ref bool = out_param runtime_param0
|
||||
// CHECK:STDOUT: %return: ref bool = return_slot %return.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %H.decl: %H.type = fn_decl @H [template = constants.%H] {
|
||||
// CHECK:STDOUT: %H.decl: %H.type = fn_decl @H [concrete = constants.%H] {
|
||||
// CHECK:STDOUT: %return.patt: bool = return_slot_pattern
|
||||
// CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param0
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool]
|
||||
// CHECK:STDOUT: %.loc18_11.1: type = value_of_initializer %bool.make_type [template = bool]
|
||||
// CHECK:STDOUT: %.loc18_11.2: type = converted %bool.make_type, %.loc18_11.1 [template = bool]
|
||||
// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [concrete = bool]
|
||||
// CHECK:STDOUT: %.loc18_11.1: type = value_of_initializer %bool.make_type [concrete = bool]
|
||||
// CHECK:STDOUT: %.loc18_11.2: type = converted %bool.make_type, %.loc18_11.1 [concrete = bool]
|
||||
// CHECK:STDOUT: %return.param: ref bool = out_param runtime_param0
|
||||
// CHECK:STDOUT: %return: ref bool = return_slot %return.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %While.decl: %While.type = fn_decl @While [template = constants.%While] {} {}
|
||||
// CHECK:STDOUT: %While.decl: %While.type = fn_decl @While [concrete = constants.%While] {} {}
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @A() -> bool;
|
||||
@@ -181,14 +181,14 @@ fn While() {
|
||||
// CHECK:STDOUT: br !while.cond.loc21
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !while.cond.loc21:
|
||||
// CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%A.decl [template = constants.%A]
|
||||
// CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%A.decl [concrete = constants.%A]
|
||||
// CHECK:STDOUT: %A.call: init bool = call %A.ref()
|
||||
// CHECK:STDOUT: %.loc21_13.1: bool = value_of_initializer %A.call
|
||||
// CHECK:STDOUT: %.loc21_13.2: bool = converted %A.call, %.loc21_13.1
|
||||
// CHECK:STDOUT: if %.loc21_13.2 br !while.body.loc21 else br !while.done.loc21
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !while.body.loc21:
|
||||
// CHECK:STDOUT: %B.ref: %B.type = name_ref B, file.%B.decl [template = constants.%B]
|
||||
// CHECK:STDOUT: %B.ref: %B.type = name_ref B, file.%B.decl [concrete = constants.%B]
|
||||
// CHECK:STDOUT: %B.call: init bool = call %B.ref()
|
||||
// CHECK:STDOUT: %.loc22_12.1: bool = value_of_initializer %B.call
|
||||
// CHECK:STDOUT: %.loc22_12.2: bool = converted %B.call, %.loc22_12.1
|
||||
@@ -198,7 +198,7 @@ fn While() {
|
||||
// CHECK:STDOUT: br !while.cond.loc21
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !if.else.loc22:
|
||||
// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C]
|
||||
// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C]
|
||||
// CHECK:STDOUT: %C.call: init bool = call %C.ref()
|
||||
// CHECK:STDOUT: %.loc23_12.1: bool = value_of_initializer %C.call
|
||||
// CHECK:STDOUT: %.loc23_12.2: bool = converted %C.call, %.loc23_12.1
|
||||
@@ -211,14 +211,14 @@ fn While() {
|
||||
// CHECK:STDOUT: br !while.cond.loc24
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !while.cond.loc24:
|
||||
// CHECK:STDOUT: %D.ref: %D.type = name_ref D, file.%D.decl [template = constants.%D]
|
||||
// CHECK:STDOUT: %D.ref: %D.type = name_ref D, file.%D.decl [concrete = constants.%D]
|
||||
// CHECK:STDOUT: %D.call: init bool = call %D.ref()
|
||||
// CHECK:STDOUT: %.loc24_15.1: bool = value_of_initializer %D.call
|
||||
// CHECK:STDOUT: %.loc24_15.2: bool = converted %D.call, %.loc24_15.1
|
||||
// CHECK:STDOUT: if %.loc24_15.2 br !while.body.loc24 else br !while.done.loc24
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !while.body.loc24:
|
||||
// CHECK:STDOUT: %E.ref: %E.type = name_ref E, file.%E.decl [template = constants.%E]
|
||||
// CHECK:STDOUT: %E.ref: %E.type = name_ref E, file.%E.decl [concrete = constants.%E]
|
||||
// CHECK:STDOUT: %E.call: init bool = call %E.ref()
|
||||
// CHECK:STDOUT: %.loc25_14.1: bool = value_of_initializer %E.call
|
||||
// CHECK:STDOUT: %.loc25_14.2: bool = converted %E.call, %.loc25_14.1
|
||||
@@ -228,7 +228,7 @@ fn While() {
|
||||
// CHECK:STDOUT: br !while.cond.loc24
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !if.else.loc25:
|
||||
// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F]
|
||||
// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F]
|
||||
// CHECK:STDOUT: %F.call: init bool = call %F.ref()
|
||||
// CHECK:STDOUT: %.loc26_14.1: bool = value_of_initializer %F.call
|
||||
// CHECK:STDOUT: %.loc26_14.2: bool = converted %F.call, %.loc26_14.1
|
||||
@@ -241,7 +241,7 @@ fn While() {
|
||||
// CHECK:STDOUT: br !while.cond.loc24
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !while.done.loc24:
|
||||
// CHECK:STDOUT: %G.ref: %G.type = name_ref G, file.%G.decl [template = constants.%G]
|
||||
// CHECK:STDOUT: %G.ref: %G.type = name_ref G, file.%G.decl [concrete = constants.%G]
|
||||
// CHECK:STDOUT: %G.call: init bool = call %G.ref()
|
||||
// CHECK:STDOUT: %.loc28_12.1: bool = value_of_initializer %G.call
|
||||
// CHECK:STDOUT: %.loc28_12.2: bool = converted %G.call, %.loc28_12.1
|
||||
@@ -251,7 +251,7 @@ fn While() {
|
||||
// CHECK:STDOUT: br !while.cond.loc21
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !if.else.loc28:
|
||||
// CHECK:STDOUT: %H.ref: %H.type = name_ref H, file.%H.decl [template = constants.%H]
|
||||
// CHECK:STDOUT: %H.ref: %H.type = name_ref H, file.%H.decl [concrete = constants.%H]
|
||||
// CHECK:STDOUT: %H.call: init bool = call %H.ref()
|
||||
// CHECK:STDOUT: %.loc29_12.1: bool = value_of_initializer %H.call
|
||||
// CHECK:STDOUT: %.loc29_12.2: bool = converted %H.call, %.loc29_12.1
|
||||
|
||||
@@ -22,13 +22,13 @@ fn While() {
|
||||
// CHECK:STDOUT: --- fail_bad_condition.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %While.type: type = fn_type @While [template]
|
||||
// CHECK:STDOUT: %While: %While.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %str: String = string_literal "Hello" [template]
|
||||
// CHECK:STDOUT: %While.type: type = fn_type @While [concrete]
|
||||
// CHECK:STDOUT: %While: %While.type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %str: String = string_literal "Hello" [concrete]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
|
||||
// CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
|
||||
// CHECK:STDOUT: import Core//prelude
|
||||
// CHECK:STDOUT: import Core//prelude/...
|
||||
@@ -36,12 +36,12 @@ fn While() {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: package: <namespace> = namespace [template] {
|
||||
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
|
||||
// CHECK:STDOUT: .Core = imports.%Core
|
||||
// CHECK:STDOUT: .While = %While.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %While.decl: %While.type = fn_decl @While [template = constants.%While] {} {}
|
||||
// CHECK:STDOUT: %While.decl: %While.type = fn_decl @While [concrete = constants.%While] {} {}
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @While() {
|
||||
@@ -49,8 +49,8 @@ fn While() {
|
||||
// CHECK:STDOUT: br !while.cond
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !while.cond:
|
||||
// CHECK:STDOUT: %str: String = string_literal "Hello" [template = constants.%str]
|
||||
// CHECK:STDOUT: %.loc19: bool = converted %str, <error> [template = <error>]
|
||||
// CHECK:STDOUT: %str: String = string_literal "Hello" [concrete = constants.%str]
|
||||
// CHECK:STDOUT: %.loc19: bool = converted %str, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: if <error> br !while.body else br !while.done
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !while.body:
|
||||
|
||||
@@ -38,24 +38,24 @@ fn While() {
|
||||
// CHECK:STDOUT: --- fail_break_continue.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %While.type: type = fn_type @While [template]
|
||||
// CHECK:STDOUT: %While: %While.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %While.type: type = fn_type @While [concrete]
|
||||
// CHECK:STDOUT: %While: %While.type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
|
||||
// CHECK:STDOUT: import Core//prelude
|
||||
// CHECK:STDOUT: import Core//prelude/...
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: package: <namespace> = namespace [template] {
|
||||
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
|
||||
// CHECK:STDOUT: .Core = imports.%Core
|
||||
// CHECK:STDOUT: .While = %While.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %While.decl: %While.type = fn_decl @While [template = constants.%While] {} {}
|
||||
// CHECK:STDOUT: %While.decl: %While.type = fn_decl @While [concrete = constants.%While] {} {}
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @While() {
|
||||
|
||||
+27
-27
@@ -26,23 +26,23 @@ fn While() {
|
||||
// CHECK:STDOUT: --- unreachable_end.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template]
|
||||
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %Cond.type: type = fn_type @Cond [template]
|
||||
// CHECK:STDOUT: %Cond: %Cond.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
|
||||
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %G.type: type = fn_type @G [template]
|
||||
// CHECK:STDOUT: %G: %G.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %H.type: type = fn_type @H [template]
|
||||
// CHECK:STDOUT: %H: %H.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %While.type: type = fn_type @While [template]
|
||||
// CHECK:STDOUT: %While: %While.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [concrete]
|
||||
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
||||
// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %Cond.type: type = fn_type @Cond [concrete]
|
||||
// CHECK:STDOUT: %Cond: %Cond.type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
|
||||
// CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %G.type: type = fn_type @G [concrete]
|
||||
// CHECK:STDOUT: %G: %G.type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %H.type: type = fn_type @H [concrete]
|
||||
// CHECK:STDOUT: %H: %H.type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %While.type: type = fn_type @While [concrete]
|
||||
// CHECK:STDOUT: %While: %While.type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
|
||||
// CHECK:STDOUT: .Bool = %Core.Bool
|
||||
// CHECK:STDOUT: import Core//prelude
|
||||
// CHECK:STDOUT: import Core//prelude/...
|
||||
@@ -50,7 +50,7 @@ fn While() {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: package: <namespace> = namespace [template] {
|
||||
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
|
||||
// CHECK:STDOUT: .Core = imports.%Core
|
||||
// CHECK:STDOUT: .Cond = %Cond.decl
|
||||
// CHECK:STDOUT: .F = %F.decl
|
||||
@@ -59,20 +59,20 @@ fn While() {
|
||||
// CHECK:STDOUT: .While = %While.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %Cond.decl: %Cond.type = fn_decl @Cond [template = constants.%Cond] {
|
||||
// CHECK:STDOUT: %Cond.decl: %Cond.type = fn_decl @Cond [concrete = constants.%Cond] {
|
||||
// CHECK:STDOUT: %return.patt: bool = return_slot_pattern
|
||||
// CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param0
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool]
|
||||
// CHECK:STDOUT: %.loc11_14.1: type = value_of_initializer %bool.make_type [template = bool]
|
||||
// CHECK:STDOUT: %.loc11_14.2: type = converted %bool.make_type, %.loc11_14.1 [template = bool]
|
||||
// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [concrete = bool]
|
||||
// CHECK:STDOUT: %.loc11_14.1: type = value_of_initializer %bool.make_type [concrete = bool]
|
||||
// CHECK:STDOUT: %.loc11_14.2: type = converted %bool.make_type, %.loc11_14.1 [concrete = bool]
|
||||
// CHECK:STDOUT: %return.param: ref bool = out_param runtime_param0
|
||||
// CHECK:STDOUT: %return: ref bool = return_slot %return.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {}
|
||||
// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] {} {}
|
||||
// CHECK:STDOUT: %H.decl: %H.type = fn_decl @H [template = constants.%H] {} {}
|
||||
// CHECK:STDOUT: %While.decl: %While.type = fn_decl @While [template = constants.%While] {} {}
|
||||
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {}
|
||||
// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {} {}
|
||||
// CHECK:STDOUT: %H.decl: %H.type = fn_decl @H [concrete = constants.%H] {} {}
|
||||
// CHECK:STDOUT: %While.decl: %While.type = fn_decl @While [concrete = constants.%While] {} {}
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @Cond() -> bool;
|
||||
@@ -85,24 +85,24 @@ fn While() {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @While() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F]
|
||||
// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F]
|
||||
// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.ref()
|
||||
// CHECK:STDOUT: br !while.cond
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !while.cond:
|
||||
// CHECK:STDOUT: %Cond.ref: %Cond.type = name_ref Cond, file.%Cond.decl [template = constants.%Cond]
|
||||
// CHECK:STDOUT: %Cond.ref: %Cond.type = name_ref Cond, file.%Cond.decl [concrete = constants.%Cond]
|
||||
// CHECK:STDOUT: %Cond.call: init bool = call %Cond.ref()
|
||||
// CHECK:STDOUT: %.loc19_16.1: bool = value_of_initializer %Cond.call
|
||||
// CHECK:STDOUT: %.loc19_16.2: bool = converted %Cond.call, %.loc19_16.1
|
||||
// CHECK:STDOUT: if %.loc19_16.2 br !while.body else br !while.done
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !while.body:
|
||||
// CHECK:STDOUT: %G.ref: %G.type = name_ref G, file.%G.decl [template = constants.%G]
|
||||
// CHECK:STDOUT: %G.ref: %G.type = name_ref G, file.%G.decl [concrete = constants.%G]
|
||||
// CHECK:STDOUT: %G.call: init %empty_tuple.type = call %G.ref()
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !while.done:
|
||||
// CHECK:STDOUT: %H.ref: %H.type = name_ref H, file.%H.decl [template = constants.%H]
|
||||
// CHECK:STDOUT: %H.ref: %H.type = name_ref H, file.%H.decl [concrete = constants.%H]
|
||||
// CHECK:STDOUT: %H.call: init %empty_tuple.type = call %H.ref()
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
|
||||
+27
-27
@@ -25,23 +25,23 @@ fn While() {
|
||||
// CHECK:STDOUT: --- while.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template]
|
||||
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %Cond.type: type = fn_type @Cond [template]
|
||||
// CHECK:STDOUT: %Cond: %Cond.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
|
||||
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %G.type: type = fn_type @G [template]
|
||||
// CHECK:STDOUT: %G: %G.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %H.type: type = fn_type @H [template]
|
||||
// CHECK:STDOUT: %H: %H.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %While.type: type = fn_type @While [template]
|
||||
// CHECK:STDOUT: %While: %While.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [concrete]
|
||||
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
||||
// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %Cond.type: type = fn_type @Cond [concrete]
|
||||
// CHECK:STDOUT: %Cond: %Cond.type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
|
||||
// CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %G.type: type = fn_type @G [concrete]
|
||||
// CHECK:STDOUT: %G: %G.type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %H.type: type = fn_type @H [concrete]
|
||||
// CHECK:STDOUT: %H: %H.type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %While.type: type = fn_type @While [concrete]
|
||||
// CHECK:STDOUT: %While: %While.type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
|
||||
// CHECK:STDOUT: .Bool = %Core.Bool
|
||||
// CHECK:STDOUT: import Core//prelude
|
||||
// CHECK:STDOUT: import Core//prelude/...
|
||||
@@ -49,7 +49,7 @@ fn While() {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: package: <namespace> = namespace [template] {
|
||||
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
|
||||
// CHECK:STDOUT: .Core = imports.%Core
|
||||
// CHECK:STDOUT: .Cond = %Cond.decl
|
||||
// CHECK:STDOUT: .F = %F.decl
|
||||
@@ -58,20 +58,20 @@ fn While() {
|
||||
// CHECK:STDOUT: .While = %While.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %Cond.decl: %Cond.type = fn_decl @Cond [template = constants.%Cond] {
|
||||
// CHECK:STDOUT: %Cond.decl: %Cond.type = fn_decl @Cond [concrete = constants.%Cond] {
|
||||
// CHECK:STDOUT: %return.patt: bool = return_slot_pattern
|
||||
// CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param0
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool]
|
||||
// CHECK:STDOUT: %.loc11_14.1: type = value_of_initializer %bool.make_type [template = bool]
|
||||
// CHECK:STDOUT: %.loc11_14.2: type = converted %bool.make_type, %.loc11_14.1 [template = bool]
|
||||
// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [concrete = bool]
|
||||
// CHECK:STDOUT: %.loc11_14.1: type = value_of_initializer %bool.make_type [concrete = bool]
|
||||
// CHECK:STDOUT: %.loc11_14.2: type = converted %bool.make_type, %.loc11_14.1 [concrete = bool]
|
||||
// CHECK:STDOUT: %return.param: ref bool = out_param runtime_param0
|
||||
// CHECK:STDOUT: %return: ref bool = return_slot %return.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {}
|
||||
// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] {} {}
|
||||
// CHECK:STDOUT: %H.decl: %H.type = fn_decl @H [template = constants.%H] {} {}
|
||||
// CHECK:STDOUT: %While.decl: %While.type = fn_decl @While [template = constants.%While] {} {}
|
||||
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {}
|
||||
// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {} {}
|
||||
// CHECK:STDOUT: %H.decl: %H.type = fn_decl @H [concrete = constants.%H] {} {}
|
||||
// CHECK:STDOUT: %While.decl: %While.type = fn_decl @While [concrete = constants.%While] {} {}
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @Cond() -> bool;
|
||||
@@ -84,24 +84,24 @@ fn While() {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @While() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F]
|
||||
// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F]
|
||||
// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.ref()
|
||||
// CHECK:STDOUT: br !while.cond
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !while.cond:
|
||||
// CHECK:STDOUT: %Cond.ref: %Cond.type = name_ref Cond, file.%Cond.decl [template = constants.%Cond]
|
||||
// CHECK:STDOUT: %Cond.ref: %Cond.type = name_ref Cond, file.%Cond.decl [concrete = constants.%Cond]
|
||||
// CHECK:STDOUT: %Cond.call: init bool = call %Cond.ref()
|
||||
// CHECK:STDOUT: %.loc19_16.1: bool = value_of_initializer %Cond.call
|
||||
// CHECK:STDOUT: %.loc19_16.2: bool = converted %Cond.call, %.loc19_16.1
|
||||
// CHECK:STDOUT: if %.loc19_16.2 br !while.body else br !while.done
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !while.body:
|
||||
// CHECK:STDOUT: %G.ref: %G.type = name_ref G, file.%G.decl [template = constants.%G]
|
||||
// CHECK:STDOUT: %G.ref: %G.type = name_ref G, file.%G.decl [concrete = constants.%G]
|
||||
// CHECK:STDOUT: %G.call: init %empty_tuple.type = call %G.ref()
|
||||
// CHECK:STDOUT: br !while.cond
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !while.done:
|
||||
// CHECK:STDOUT: %H.ref: %H.type = name_ref H, file.%H.decl [template = constants.%H]
|
||||
// CHECK:STDOUT: %H.ref: %H.type = name_ref H, file.%H.decl [concrete = constants.%H]
|
||||
// CHECK:STDOUT: %H.call: init %empty_tuple.type = call %H.ref()
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
|
||||
Reference in New Issue
Block a user