mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 19:11:09 +01:00
Generate parameter pattern-match IR from pattern IR (#4388)
Also propagate the pattern IR along with the pattern-match IR, and use it where appropriate. Strictly speaking, some parts of the pattern-match IR are allocated eagerly, while traversing the pattern's parse tree, but they still aren't actually emitted until we traverse the associated pattern insts. --------- Co-authored-by: Jon Ross-Perkins <jperkins@google.com>
This commit is contained in:
co-authored by
Jon Ross-Perkins
parent
4a73b36688
commit
9d942f4633
@@ -46,22 +46,24 @@ fn F(n: i32, a: [i32; n]*);
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {
|
||||
// CHECK:STDOUT: %n.patt: i32 = binding_pattern n
|
||||
// CHECK:STDOUT: %n.param_patt: i32 = param_pattern %n.patt, runtime_param0
|
||||
// CHECK:STDOUT: %a.patt: <error> = binding_pattern a
|
||||
// CHECK:STDOUT: %a.param_patt: <error> = param_pattern %a.patt, runtime_param1
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %int.make_type_32.loc14_9: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc14_9.1: type = value_of_initializer %int.make_type_32.loc14_9 [template = i32]
|
||||
// CHECK:STDOUT: %.loc14_9.2: type = converted %int.make_type_32.loc14_9, %.loc14_9.1 [template = i32]
|
||||
// CHECK:STDOUT: %n.param: i32 = param n, runtime_param0
|
||||
// CHECK:STDOUT: %n: i32 = bind_name n, %n.param
|
||||
// CHECK:STDOUT: %int.make_type_32.loc14_18: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %n.ref: i32 = name_ref n, %n
|
||||
// CHECK:STDOUT: %.loc14_25: type = ptr_type <error> [template = <error>]
|
||||
// CHECK:STDOUT: %a.param: <error> = param a, runtime_param1
|
||||
// CHECK:STDOUT: %a: <error> = bind_name a, %a.param
|
||||
// CHECK:STDOUT: %param.loc14_6: i32 = param runtime_param0
|
||||
// CHECK:STDOUT: %n: i32 = bind_name n, %param.loc14_6
|
||||
// CHECK:STDOUT: %param.loc14_14: <error> = param runtime_param1
|
||||
// CHECK:STDOUT: %a: <error> = bind_name a, %param.loc14_14
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32";
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @F(%n: i32, %a: <error>);
|
||||
// CHECK:STDOUT: fn @F(%n.param_patt: i32, %a.param_patt: <error>);
|
||||
// CHECK:STDOUT:
|
||||
|
||||
@@ -49,22 +49,24 @@ fn F(n: i32, n: i32);
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {
|
||||
// CHECK:STDOUT: %n.patt.loc17_6: i32 = binding_pattern n
|
||||
// CHECK:STDOUT: %n.param_patt.loc17_7: i32 = param_pattern %n.patt.loc17_6, runtime_param0
|
||||
// CHECK:STDOUT: %n.patt.loc17_14: i32 = binding_pattern n
|
||||
// CHECK:STDOUT: %n.param_patt.loc17_15: i32 = param_pattern %n.patt.loc17_14, runtime_param1
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %int.make_type_32.loc17_9: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc17_9.1: type = value_of_initializer %int.make_type_32.loc17_9 [template = i32]
|
||||
// CHECK:STDOUT: %.loc17_9.2: type = converted %int.make_type_32.loc17_9, %.loc17_9.1 [template = i32]
|
||||
// CHECK:STDOUT: %n.param.loc17_6: i32 = param n, runtime_param0
|
||||
// CHECK:STDOUT: %n.loc17_6: i32 = bind_name n, %n.param.loc17_6
|
||||
// CHECK:STDOUT: %int.make_type_32.loc17_17: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc17_17.1: type = value_of_initializer %int.make_type_32.loc17_17 [template = i32]
|
||||
// CHECK:STDOUT: %.loc17_17.2: type = converted %int.make_type_32.loc17_17, %.loc17_17.1 [template = i32]
|
||||
// CHECK:STDOUT: %n.param.loc17_14: i32 = param n, runtime_param1
|
||||
// CHECK:STDOUT: %n.loc17_14: i32 = bind_name n, %n.param.loc17_14
|
||||
// CHECK:STDOUT: %param.loc17_6: i32 = param runtime_param0
|
||||
// CHECK:STDOUT: %n.loc17_6: i32 = bind_name n, %param.loc17_6
|
||||
// CHECK:STDOUT: %param.loc17_14: i32 = param runtime_param1
|
||||
// CHECK:STDOUT: %n.loc17_14: i32 = bind_name n, %param.loc17_14
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32";
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @F(%n.loc17_6: i32, %n.loc17_14: i32);
|
||||
// CHECK:STDOUT: fn @F(%n.param_patt.loc17_7: i32, %n.param_patt.loc17_15: i32);
|
||||
// CHECK:STDOUT:
|
||||
|
||||
+92
-88
@@ -304,32 +304,34 @@ import library "extern_api";
|
||||
// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {} {}
|
||||
// CHECK:STDOUT: %B.decl: %B.type = fn_decl @B [template = constants.%B] {
|
||||
// CHECK:STDOUT: %b.patt: i32 = binding_pattern b
|
||||
// CHECK:STDOUT: %b.param_patt: i32 = param_pattern %b.patt, runtime_param0
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %int.make_type_32.loc5_9: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc5_9.1: type = value_of_initializer %int.make_type_32.loc5_9 [template = i32]
|
||||
// CHECK:STDOUT: %.loc5_9.2: type = converted %int.make_type_32.loc5_9, %.loc5_9.1 [template = i32]
|
||||
// CHECK:STDOUT: %b.param: i32 = param b, runtime_param0
|
||||
// CHECK:STDOUT: %b: i32 = bind_name b, %b.param
|
||||
// CHECK:STDOUT: %int.make_type_32.loc5_17: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc5_17.1: type = value_of_initializer %int.make_type_32.loc5_17 [template = i32]
|
||||
// CHECK:STDOUT: %.loc5_17.2: type = converted %int.make_type_32.loc5_17, %.loc5_17.1 [template = i32]
|
||||
// CHECK:STDOUT: %return: ref i32 = var <return slot>
|
||||
// CHECK:STDOUT: %param: i32 = param runtime_param0
|
||||
// CHECK:STDOUT: %b: i32 = bind_name b, %param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %C.decl: %C.type = fn_decl @C [template = constants.%C] {
|
||||
// CHECK:STDOUT: %c.patt: %.3 = binding_pattern c
|
||||
// CHECK:STDOUT: %c.param_patt: %.3 = param_pattern %c.patt, runtime_param0
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %int.make_type_32.loc6_10: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc6_14.1: %.2 = tuple_literal (%int.make_type_32.loc6_10)
|
||||
// CHECK:STDOUT: %.loc6_14.2: type = value_of_initializer %int.make_type_32.loc6_10 [template = i32]
|
||||
// CHECK:STDOUT: %.loc6_14.3: type = converted %int.make_type_32.loc6_10, %.loc6_14.2 [template = i32]
|
||||
// CHECK:STDOUT: %.loc6_14.4: type = converted %.loc6_14.1, constants.%.3 [template = constants.%.3]
|
||||
// CHECK:STDOUT: %c.param: %.3 = param c, runtime_param0
|
||||
// CHECK:STDOUT: %c: %.3 = bind_name c, %c.param
|
||||
// CHECK:STDOUT: %int.make_type_32.loc6_25: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc6_25.1: type = value_of_initializer %int.make_type_32.loc6_25 [template = i32]
|
||||
// CHECK:STDOUT: %.loc6_25.2: type = converted %int.make_type_32.loc6_25, %.loc6_25.1 [template = i32]
|
||||
// CHECK:STDOUT: %.loc6_28: type = struct_type {.c: i32} [template = constants.%.4]
|
||||
// CHECK:STDOUT: %return: ref %.4 = var <return slot>
|
||||
// CHECK:STDOUT: %param: %.3 = param runtime_param0
|
||||
// CHECK:STDOUT: %c: %.3 = bind_name c, %param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %D.decl: %D.type = fn_decl @D [template = constants.%D] {} {}
|
||||
// CHECK:STDOUT: %NS: <namespace> = namespace [template] {
|
||||
@@ -342,9 +344,9 @@ import library "extern_api";
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32";
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @B(%b: i32) -> i32;
|
||||
// CHECK:STDOUT: fn @B(%b.param_patt: i32) -> i32;
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @C(%c: %.3) -> %.4;
|
||||
// CHECK:STDOUT: fn @C(%c.param_patt: %.3) -> %.4;
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: extern fn @D();
|
||||
// CHECK:STDOUT:
|
||||
@@ -399,32 +401,34 @@ import library "extern_api";
|
||||
// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {} {}
|
||||
// CHECK:STDOUT: %B.decl: %B.type = fn_decl @B [template = constants.%B] {
|
||||
// CHECK:STDOUT: %b.patt: i32 = binding_pattern b
|
||||
// CHECK:STDOUT: %b.param_patt: i32 = param_pattern %b.patt, runtime_param0
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %int.make_type_32.loc5_44: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc5_44.1: type = value_of_initializer %int.make_type_32.loc5_44 [template = i32]
|
||||
// CHECK:STDOUT: %.loc5_44.2: type = converted %int.make_type_32.loc5_44, %.loc5_44.1 [template = i32]
|
||||
// CHECK:STDOUT: %b.param: i32 = param b, runtime_param0
|
||||
// CHECK:STDOUT: %b: i32 = bind_name b, %b.param
|
||||
// CHECK:STDOUT: %int.make_type_32.loc5_52: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc5_52.1: type = value_of_initializer %int.make_type_32.loc5_52 [template = i32]
|
||||
// CHECK:STDOUT: %.loc5_52.2: type = converted %int.make_type_32.loc5_52, %.loc5_52.1 [template = i32]
|
||||
// CHECK:STDOUT: %return: ref i32 = var <return slot>
|
||||
// CHECK:STDOUT: %param: i32 = param runtime_param0
|
||||
// CHECK:STDOUT: %b: i32 = bind_name b, %param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %C.decl: %C.type = fn_decl @C [template = constants.%C] {
|
||||
// CHECK:STDOUT: %c.patt: %.3 = binding_pattern c
|
||||
// CHECK:STDOUT: %c.param_patt: %.3 = param_pattern %c.patt, runtime_param0
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %int.make_type_32.loc6_45: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc6_49.1: %.2 = tuple_literal (%int.make_type_32.loc6_45)
|
||||
// CHECK:STDOUT: %.loc6_49.2: type = value_of_initializer %int.make_type_32.loc6_45 [template = i32]
|
||||
// CHECK:STDOUT: %.loc6_49.3: type = converted %int.make_type_32.loc6_45, %.loc6_49.2 [template = i32]
|
||||
// CHECK:STDOUT: %.loc6_49.4: type = converted %.loc6_49.1, constants.%.3 [template = constants.%.3]
|
||||
// CHECK:STDOUT: %c.param: %.3 = param c, runtime_param0
|
||||
// CHECK:STDOUT: %c: %.3 = bind_name c, %c.param
|
||||
// CHECK:STDOUT: %int.make_type_32.loc6_60: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc6_60.1: type = value_of_initializer %int.make_type_32.loc6_60 [template = i32]
|
||||
// CHECK:STDOUT: %.loc6_60.2: type = converted %int.make_type_32.loc6_60, %.loc6_60.1 [template = i32]
|
||||
// CHECK:STDOUT: %.loc6_63: type = struct_type {.c: i32} [template = constants.%.4]
|
||||
// CHECK:STDOUT: %return: ref %.4 = var <return slot>
|
||||
// CHECK:STDOUT: %param: %.3 = param runtime_param0
|
||||
// CHECK:STDOUT: %c: %.3 = bind_name c, %param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %D.decl: %D.type = fn_decl @D [template = constants.%D] {} {}
|
||||
// CHECK:STDOUT: %NS: <namespace> = namespace [template] {
|
||||
@@ -437,9 +441,9 @@ import library "extern_api";
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32";
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: extern fn @B(%b: i32) -> i32;
|
||||
// CHECK:STDOUT: extern fn @B(%b.param_patt: i32) -> i32;
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: extern fn @C(%c: %.3) -> %.4;
|
||||
// CHECK:STDOUT: extern fn @C(%c.param_patt: %.3) -> %.4;
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: extern fn @D();
|
||||
// CHECK:STDOUT:
|
||||
@@ -469,14 +473,14 @@ import library "extern_api";
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
// CHECK:STDOUT: %import_ref.1: %A.type = import_ref Main//api, inst+3, loaded [template = constants.%A]
|
||||
// CHECK:STDOUT: %import_ref.2: %B.type = import_ref Main//api, inst+22, loaded [template = constants.%B]
|
||||
// CHECK:STDOUT: %import_ref.3: %C.type = import_ref Main//api, inst+43, loaded [template = constants.%C]
|
||||
// CHECK:STDOUT: %import_ref.4: %D.type = import_ref Main//api, inst+46, loaded [template = constants.%D]
|
||||
// CHECK:STDOUT: %import_ref.5: <namespace> = import_ref Main//api, inst+49, loaded
|
||||
// CHECK:STDOUT: %import_ref.2: %B.type = import_ref Main//api, inst+23, loaded [template = constants.%B]
|
||||
// CHECK:STDOUT: %import_ref.3: %C.type = import_ref Main//api, inst+45, loaded [template = constants.%C]
|
||||
// CHECK:STDOUT: %import_ref.4: %D.type = import_ref Main//api, inst+48, loaded [template = constants.%D]
|
||||
// CHECK:STDOUT: %import_ref.5: <namespace> = import_ref Main//api, inst+51, loaded
|
||||
// CHECK:STDOUT: %NS: <namespace> = namespace %import_ref.5, [template] {
|
||||
// CHECK:STDOUT: .E = %import_ref.6
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %import_ref.6: %E.type = import_ref Main//api, inst+50, loaded [template = constants.%E]
|
||||
// CHECK:STDOUT: %import_ref.6: %E.type = import_ref Main//api, inst+52, loaded [template = constants.%E]
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
|
||||
// CHECK:STDOUT: .Int32 = %import_ref.7
|
||||
// CHECK:STDOUT: import Core//prelude
|
||||
@@ -536,9 +540,9 @@ import library "extern_api";
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32";
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @B(%b: i32) -> i32;
|
||||
// CHECK:STDOUT: fn @B(%b.param_patt: i32) -> i32;
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @C(%c: %.4) -> %.3;
|
||||
// CHECK:STDOUT: fn @C(%c.param_patt: %.4) -> %.3;
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: extern fn @D();
|
||||
// CHECK:STDOUT:
|
||||
@@ -555,10 +559,10 @@ import library "extern_api";
|
||||
// CHECK:STDOUT: assign file.%b.var, %B.call
|
||||
// CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.3 [template = constants.%C]
|
||||
// CHECK:STDOUT: %.loc8_23: i32 = int_literal 1 [template = constants.%.2]
|
||||
// CHECK:STDOUT: %.loc8_25: %.4 = tuple_literal (%.loc8_23)
|
||||
// CHECK:STDOUT: %.loc8_25.1: %.4 = tuple_literal (%.loc8_23)
|
||||
// CHECK:STDOUT: %tuple: %.4 = tuple_value (%.loc8_23) [template = constants.%tuple]
|
||||
// CHECK:STDOUT: %.loc8_21: %.4 = converted %.loc8_25, %tuple [template = constants.%tuple]
|
||||
// CHECK:STDOUT: %C.call: init %.3 = call %C.ref(%.loc8_21)
|
||||
// CHECK:STDOUT: %.loc8_25.2: %.4 = converted %.loc8_25.1, %tuple [template = constants.%tuple]
|
||||
// CHECK:STDOUT: %C.call: init %.3 = call %C.ref(%.loc8_25.2)
|
||||
// CHECK:STDOUT: assign file.%c.var, %C.call
|
||||
// CHECK:STDOUT: %D.ref: %D.type = name_ref D, imports.%import_ref.4 [template = constants.%D]
|
||||
// CHECK:STDOUT: %D.call: init %.1 = call %D.ref()
|
||||
@@ -595,14 +599,14 @@ import library "extern_api";
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
// CHECK:STDOUT: %import_ref.1: %A.type = import_ref Main//api, inst+3, loaded [template = constants.%A]
|
||||
// CHECK:STDOUT: %import_ref.2: %B.type = import_ref Main//api, inst+22, loaded [template = constants.%B]
|
||||
// CHECK:STDOUT: %import_ref.3: %C.type = import_ref Main//api, inst+43, loaded [template = constants.%C]
|
||||
// CHECK:STDOUT: %import_ref.4: %D.type = import_ref Main//api, inst+46, loaded [template = constants.%D]
|
||||
// CHECK:STDOUT: %import_ref.5: <namespace> = import_ref Main//api, inst+49, loaded
|
||||
// CHECK:STDOUT: %import_ref.2: %B.type = import_ref Main//api, inst+23, loaded [template = constants.%B]
|
||||
// CHECK:STDOUT: %import_ref.3: %C.type = import_ref Main//api, inst+45, loaded [template = constants.%C]
|
||||
// CHECK:STDOUT: %import_ref.4: %D.type = import_ref Main//api, inst+48, loaded [template = constants.%D]
|
||||
// CHECK:STDOUT: %import_ref.5: <namespace> = import_ref Main//api, inst+51, loaded
|
||||
// CHECK:STDOUT: %NS: <namespace> = namespace %import_ref.5, [template] {
|
||||
// CHECK:STDOUT: .E = file.%E.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %import_ref.6: %E.type = import_ref Main//api, inst+50, loaded [template = constants.%E]
|
||||
// CHECK:STDOUT: %import_ref.6: %E.type = import_ref Main//api, inst+52, loaded [template = constants.%E]
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
|
||||
// CHECK:STDOUT: .Int32 = %import_ref.7
|
||||
// CHECK:STDOUT: import Core//prelude
|
||||
@@ -638,12 +642,12 @@ import library "extern_api";
|
||||
// CHECK:STDOUT: %int.make_type_32.loc23_16: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc23_16.1: type = value_of_initializer %int.make_type_32.loc23_16 [template = i32]
|
||||
// CHECK:STDOUT: %.loc23_16.2: type = converted %int.make_type_32.loc23_16, %.loc23_16.1 [template = i32]
|
||||
// CHECK:STDOUT: %b.param: i32 = param b, runtime_param0
|
||||
// CHECK:STDOUT: %b.loc23: i32 = bind_name b, %b.param
|
||||
// CHECK:STDOUT: %int.make_type_32.loc23_24: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc23_24.1: type = value_of_initializer %int.make_type_32.loc23_24 [template = i32]
|
||||
// CHECK:STDOUT: %.loc23_24.2: type = converted %int.make_type_32.loc23_24, %.loc23_24.1 [template = i32]
|
||||
// CHECK:STDOUT: %return.var: ref i32 = var <return slot>
|
||||
// CHECK:STDOUT: %param: i32 = param runtime_param0
|
||||
// CHECK:STDOUT: %b: i32 = bind_name b, %param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %C.decl: %C.type = fn_decl @C [template = constants.%C] {} {
|
||||
// CHECK:STDOUT: %int.make_type_32.loc32_17: init type = call constants.%Int32() [template = i32]
|
||||
@@ -651,13 +655,13 @@ import library "extern_api";
|
||||
// CHECK:STDOUT: %.loc32_21.2: type = value_of_initializer %int.make_type_32.loc32_17 [template = i32]
|
||||
// CHECK:STDOUT: %.loc32_21.3: type = converted %int.make_type_32.loc32_17, %.loc32_21.2 [template = i32]
|
||||
// CHECK:STDOUT: %.loc32_21.4: type = converted %.loc32_21.1, constants.%.3 [template = constants.%.3]
|
||||
// CHECK:STDOUT: %c.param: %.3 = param c, runtime_param0
|
||||
// CHECK:STDOUT: %c.loc32: %.3 = bind_name c, %c.param
|
||||
// CHECK:STDOUT: %int.make_type_32.loc32_32: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc32_32.1: type = value_of_initializer %int.make_type_32.loc32_32 [template = i32]
|
||||
// CHECK:STDOUT: %.loc32_32.2: type = converted %int.make_type_32.loc32_32, %.loc32_32.1 [template = i32]
|
||||
// CHECK:STDOUT: %.loc32_35: type = struct_type {.c: i32} [template = constants.%.4]
|
||||
// CHECK:STDOUT: %return.var: ref %.4 = var <return slot>
|
||||
// CHECK:STDOUT: %param: %.3 = param runtime_param0
|
||||
// CHECK:STDOUT: %c: %.3 = bind_name c, %param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %D.decl: %D.type = fn_decl @D [template = constants.%D] {} {}
|
||||
// CHECK:STDOUT: %E.decl: %E.type = fn_decl @E [template = constants.%E] {} {}
|
||||
@@ -690,9 +694,9 @@ import library "extern_api";
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32";
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @B(%b.1: i32) -> i32;
|
||||
// CHECK:STDOUT: fn @B(%b.param_patt: i32) -> i32;
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @C(%c.1: %.3) -> %.4;
|
||||
// CHECK:STDOUT: fn @C(%c.param_patt: %.3) -> %.4;
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: extern fn @D();
|
||||
// CHECK:STDOUT:
|
||||
@@ -709,10 +713,10 @@ import library "extern_api";
|
||||
// CHECK:STDOUT: assign file.%b.var, %B.call
|
||||
// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C]
|
||||
// CHECK:STDOUT: %.loc54_23: i32 = int_literal 1 [template = constants.%.5]
|
||||
// CHECK:STDOUT: %.loc54_25: %.3 = tuple_literal (%.loc54_23)
|
||||
// CHECK:STDOUT: %.loc54_25.1: %.3 = tuple_literal (%.loc54_23)
|
||||
// CHECK:STDOUT: %tuple: %.3 = tuple_value (%.loc54_23) [template = constants.%tuple]
|
||||
// CHECK:STDOUT: %.loc54_21: %.3 = converted %.loc54_25, %tuple [template = constants.%tuple]
|
||||
// CHECK:STDOUT: %C.call: init %.4 = call %C.ref(%.loc54_21)
|
||||
// CHECK:STDOUT: %.loc54_25.2: %.3 = converted %.loc54_25.1, %tuple [template = constants.%tuple]
|
||||
// CHECK:STDOUT: %C.call: init %.4 = call %C.ref(%.loc54_25.2)
|
||||
// CHECK:STDOUT: assign file.%c.var, %C.call
|
||||
// CHECK:STDOUT: %D.ref: %D.type = name_ref D, file.%D.decl [template = constants.%D]
|
||||
// CHECK:STDOUT: %D.call: init %.1 = call %D.ref()
|
||||
@@ -749,14 +753,14 @@ import library "extern_api";
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
// CHECK:STDOUT: %import_ref.1: %A.type = import_ref Main//extern_api, inst+3, loaded [template = constants.%A]
|
||||
// CHECK:STDOUT: %import_ref.2: %B.type = import_ref Main//extern_api, inst+22, loaded [template = constants.%B]
|
||||
// CHECK:STDOUT: %import_ref.3: %C.type = import_ref Main//extern_api, inst+43, loaded [template = constants.%C]
|
||||
// CHECK:STDOUT: %import_ref.4: %D.type = import_ref Main//extern_api, inst+46, loaded [template = constants.%D]
|
||||
// CHECK:STDOUT: %import_ref.5: <namespace> = import_ref Main//extern_api, inst+49, loaded
|
||||
// CHECK:STDOUT: %import_ref.2: %B.type = import_ref Main//extern_api, inst+23, loaded [template = constants.%B]
|
||||
// CHECK:STDOUT: %import_ref.3: %C.type = import_ref Main//extern_api, inst+45, loaded [template = constants.%C]
|
||||
// CHECK:STDOUT: %import_ref.4: %D.type = import_ref Main//extern_api, inst+48, loaded [template = constants.%D]
|
||||
// CHECK:STDOUT: %import_ref.5: <namespace> = import_ref Main//extern_api, inst+51, loaded
|
||||
// CHECK:STDOUT: %NS: <namespace> = namespace %import_ref.5, [template] {
|
||||
// CHECK:STDOUT: .E = file.%E.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %import_ref.6: %E.type = import_ref Main//extern_api, inst+50, loaded [template = constants.%E]
|
||||
// CHECK:STDOUT: %import_ref.6: %E.type = import_ref Main//extern_api, inst+52, loaded [template = constants.%E]
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
|
||||
// CHECK:STDOUT: .Int32 = %import_ref.7
|
||||
// CHECK:STDOUT: import Core//prelude
|
||||
@@ -792,12 +796,12 @@ import library "extern_api";
|
||||
// CHECK:STDOUT: %int.make_type_32.loc7_16: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc7_16.1: type = value_of_initializer %int.make_type_32.loc7_16 [template = i32]
|
||||
// CHECK:STDOUT: %.loc7_16.2: type = converted %int.make_type_32.loc7_16, %.loc7_16.1 [template = i32]
|
||||
// CHECK:STDOUT: %b.param: i32 = param b, runtime_param0
|
||||
// CHECK:STDOUT: %b.loc7: i32 = bind_name b, %b.param
|
||||
// CHECK:STDOUT: %int.make_type_32.loc7_24: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc7_24.1: type = value_of_initializer %int.make_type_32.loc7_24 [template = i32]
|
||||
// CHECK:STDOUT: %.loc7_24.2: type = converted %int.make_type_32.loc7_24, %.loc7_24.1 [template = i32]
|
||||
// CHECK:STDOUT: %return.var: ref i32 = var <return slot>
|
||||
// CHECK:STDOUT: %param: i32 = param runtime_param0
|
||||
// CHECK:STDOUT: %b: i32 = bind_name b, %param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %C.decl: %C.type = fn_decl @C [template = constants.%C] {} {
|
||||
// CHECK:STDOUT: %int.make_type_32.loc8_17: init type = call constants.%Int32() [template = i32]
|
||||
@@ -805,13 +809,13 @@ import library "extern_api";
|
||||
// CHECK:STDOUT: %.loc8_21.2: type = value_of_initializer %int.make_type_32.loc8_17 [template = i32]
|
||||
// CHECK:STDOUT: %.loc8_21.3: type = converted %int.make_type_32.loc8_17, %.loc8_21.2 [template = i32]
|
||||
// CHECK:STDOUT: %.loc8_21.4: type = converted %.loc8_21.1, constants.%.3 [template = constants.%.3]
|
||||
// CHECK:STDOUT: %c.param: %.3 = param c, runtime_param0
|
||||
// CHECK:STDOUT: %c.loc8: %.3 = bind_name c, %c.param
|
||||
// CHECK:STDOUT: %int.make_type_32.loc8_32: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc8_32.1: type = value_of_initializer %int.make_type_32.loc8_32 [template = i32]
|
||||
// CHECK:STDOUT: %.loc8_32.2: type = converted %int.make_type_32.loc8_32, %.loc8_32.1 [template = i32]
|
||||
// CHECK:STDOUT: %.loc8_35: type = struct_type {.c: i32} [template = constants.%.4]
|
||||
// CHECK:STDOUT: %return.var: ref %.4 = var <return slot>
|
||||
// CHECK:STDOUT: %param: %.3 = param runtime_param0
|
||||
// CHECK:STDOUT: %c: %.3 = bind_name c, %param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %D.decl: %D.type = fn_decl @D [template = constants.%D] {} {}
|
||||
// CHECK:STDOUT: %E.decl: %E.type = fn_decl @E [template = constants.%E] {} {}
|
||||
@@ -844,9 +848,9 @@ import library "extern_api";
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32";
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: extern fn @B(%b.1: i32) -> i32;
|
||||
// CHECK:STDOUT: extern fn @B(%b.param_patt: i32) -> i32;
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: extern fn @C(%c.1: %.3) -> %.4;
|
||||
// CHECK:STDOUT: extern fn @C(%c.param_patt: %.3) -> %.4;
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: extern fn @D();
|
||||
// CHECK:STDOUT:
|
||||
@@ -863,10 +867,10 @@ import library "extern_api";
|
||||
// CHECK:STDOUT: assign file.%b.var, %B.call
|
||||
// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C]
|
||||
// CHECK:STDOUT: %.loc14_23: i32 = int_literal 1 [template = constants.%.5]
|
||||
// CHECK:STDOUT: %.loc14_25: %.3 = tuple_literal (%.loc14_23)
|
||||
// CHECK:STDOUT: %.loc14_25.1: %.3 = tuple_literal (%.loc14_23)
|
||||
// CHECK:STDOUT: %tuple: %.3 = tuple_value (%.loc14_23) [template = constants.%tuple]
|
||||
// CHECK:STDOUT: %.loc14_21: %.3 = converted %.loc14_25, %tuple [template = constants.%tuple]
|
||||
// CHECK:STDOUT: %C.call: init %.4 = call %C.ref(%.loc14_21)
|
||||
// CHECK:STDOUT: %.loc14_25.2: %.3 = converted %.loc14_25.1, %tuple [template = constants.%tuple]
|
||||
// CHECK:STDOUT: %C.call: init %.4 = call %C.ref(%.loc14_25.2)
|
||||
// CHECK:STDOUT: assign file.%c.var, %C.call
|
||||
// CHECK:STDOUT: %D.ref: %D.type = name_ref D, file.%D.decl [template = constants.%D]
|
||||
// CHECK:STDOUT: %D.call: init %.1 = call %D.ref()
|
||||
@@ -902,19 +906,19 @@ import library "extern_api";
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
// CHECK:STDOUT: %import_ref.1: %A.type = import_ref Main//api, inst+3, loaded [template = constants.%A]
|
||||
// CHECK:STDOUT: %import_ref.2: %B.type = import_ref Main//api, inst+22, loaded [template = constants.%B]
|
||||
// CHECK:STDOUT: %import_ref.3: %C.type = import_ref Main//api, inst+43, loaded [template = constants.%C]
|
||||
// CHECK:STDOUT: %import_ref.4: %D.type = import_ref Main//api, inst+46, loaded [template = constants.%D]
|
||||
// CHECK:STDOUT: %import_ref.5: <namespace> = import_ref Main//api, inst+49, loaded
|
||||
// CHECK:STDOUT: %import_ref.2: %B.type = import_ref Main//api, inst+23, loaded [template = constants.%B]
|
||||
// CHECK:STDOUT: %import_ref.3: %C.type = import_ref Main//api, inst+45, loaded [template = constants.%C]
|
||||
// CHECK:STDOUT: %import_ref.4: %D.type = import_ref Main//api, inst+48, loaded [template = constants.%D]
|
||||
// CHECK:STDOUT: %import_ref.5: <namespace> = import_ref Main//api, inst+51, loaded
|
||||
// CHECK:STDOUT: %NS: <namespace> = namespace %import_ref.5, [template] {
|
||||
// CHECK:STDOUT: .E = %import_ref.6
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %import_ref.6: %E.type = import_ref Main//api, inst+50, loaded [template = constants.%E]
|
||||
// CHECK:STDOUT: %import_ref.6: %E.type = import_ref Main//api, inst+52, loaded [template = constants.%E]
|
||||
// CHECK:STDOUT: %import_ref.7 = import_ref Main//extern_api, inst+3, unloaded
|
||||
// CHECK:STDOUT: %import_ref.8 = import_ref Main//extern_api, inst+22, unloaded
|
||||
// CHECK:STDOUT: %import_ref.9 = import_ref Main//extern_api, inst+43, unloaded
|
||||
// CHECK:STDOUT: %import_ref.10 = import_ref Main//extern_api, inst+46, unloaded
|
||||
// CHECK:STDOUT: %import_ref.11 = import_ref Main//extern_api, inst+50, unloaded
|
||||
// CHECK:STDOUT: %import_ref.8 = import_ref Main//extern_api, inst+23, unloaded
|
||||
// CHECK:STDOUT: %import_ref.9 = import_ref Main//extern_api, inst+45, unloaded
|
||||
// CHECK:STDOUT: %import_ref.10 = import_ref Main//extern_api, inst+48, unloaded
|
||||
// CHECK:STDOUT: %import_ref.11 = import_ref Main//extern_api, inst+52, unloaded
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
|
||||
// CHECK:STDOUT: .Int32 = %import_ref.12
|
||||
// CHECK:STDOUT: import Core//prelude
|
||||
@@ -974,9 +978,9 @@ import library "extern_api";
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32";
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @B(%b: i32) -> i32;
|
||||
// CHECK:STDOUT: fn @B(%b.param_patt: i32) -> i32;
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @C(%c: %.4) -> %.3;
|
||||
// CHECK:STDOUT: fn @C(%c.param_patt: %.4) -> %.3;
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: extern fn @D();
|
||||
// CHECK:STDOUT:
|
||||
@@ -993,10 +997,10 @@ import library "extern_api";
|
||||
// CHECK:STDOUT: assign file.%b.var, %B.call
|
||||
// CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.3 [template = constants.%C]
|
||||
// CHECK:STDOUT: %.loc54_23: i32 = int_literal 1 [template = constants.%.2]
|
||||
// CHECK:STDOUT: %.loc54_25: %.4 = tuple_literal (%.loc54_23)
|
||||
// CHECK:STDOUT: %.loc54_25.1: %.4 = tuple_literal (%.loc54_23)
|
||||
// CHECK:STDOUT: %tuple: %.4 = tuple_value (%.loc54_23) [template = constants.%tuple]
|
||||
// CHECK:STDOUT: %.loc54_21: %.4 = converted %.loc54_25, %tuple [template = constants.%tuple]
|
||||
// CHECK:STDOUT: %C.call: init %.3 = call %C.ref(%.loc54_21)
|
||||
// CHECK:STDOUT: %.loc54_25.2: %.4 = converted %.loc54_25.1, %tuple [template = constants.%tuple]
|
||||
// CHECK:STDOUT: %C.call: init %.3 = call %C.ref(%.loc54_25.2)
|
||||
// CHECK:STDOUT: assign file.%c.var, %C.call
|
||||
// CHECK:STDOUT: %D.ref: %D.type = name_ref D, imports.%import_ref.4 [template = constants.%D]
|
||||
// CHECK:STDOUT: %D.call: init %.1 = call %D.ref()
|
||||
@@ -1032,19 +1036,19 @@ import library "extern_api";
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
// CHECK:STDOUT: %import_ref.1: %A.type = import_ref Main//extern_api, inst+3, loaded [template = constants.%A]
|
||||
// CHECK:STDOUT: %import_ref.2: %B.type = import_ref Main//extern_api, inst+22, loaded [template = constants.%B]
|
||||
// CHECK:STDOUT: %import_ref.3: %C.type = import_ref Main//extern_api, inst+43, loaded [template = constants.%C]
|
||||
// CHECK:STDOUT: %import_ref.4: %D.type = import_ref Main//extern_api, inst+46, loaded [template = constants.%D]
|
||||
// CHECK:STDOUT: %import_ref.5: <namespace> = import_ref Main//extern_api, inst+49, loaded
|
||||
// CHECK:STDOUT: %import_ref.2: %B.type = import_ref Main//extern_api, inst+23, loaded [template = constants.%B]
|
||||
// CHECK:STDOUT: %import_ref.3: %C.type = import_ref Main//extern_api, inst+45, loaded [template = constants.%C]
|
||||
// CHECK:STDOUT: %import_ref.4: %D.type = import_ref Main//extern_api, inst+48, loaded [template = constants.%D]
|
||||
// CHECK:STDOUT: %import_ref.5: <namespace> = import_ref Main//extern_api, inst+51, loaded
|
||||
// CHECK:STDOUT: %NS: <namespace> = namespace %import_ref.5, [template] {
|
||||
// CHECK:STDOUT: .E = %import_ref.6
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %import_ref.6: %E.type = import_ref Main//extern_api, inst+50, loaded [template = constants.%E]
|
||||
// CHECK:STDOUT: %import_ref.6: %E.type = import_ref Main//extern_api, inst+52, loaded [template = constants.%E]
|
||||
// CHECK:STDOUT: %import_ref.7 = import_ref Main//api, inst+3, unloaded
|
||||
// CHECK:STDOUT: %import_ref.8 = import_ref Main//api, inst+22, unloaded
|
||||
// CHECK:STDOUT: %import_ref.9 = import_ref Main//api, inst+43, unloaded
|
||||
// CHECK:STDOUT: %import_ref.10 = import_ref Main//api, inst+46, unloaded
|
||||
// CHECK:STDOUT: %import_ref.11 = import_ref Main//api, inst+50, unloaded
|
||||
// CHECK:STDOUT: %import_ref.8 = import_ref Main//api, inst+23, unloaded
|
||||
// CHECK:STDOUT: %import_ref.9 = import_ref Main//api, inst+45, unloaded
|
||||
// CHECK:STDOUT: %import_ref.10 = import_ref Main//api, inst+48, unloaded
|
||||
// CHECK:STDOUT: %import_ref.11 = import_ref Main//api, inst+52, unloaded
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
|
||||
// CHECK:STDOUT: .Int32 = %import_ref.12
|
||||
// CHECK:STDOUT: import Core//prelude
|
||||
@@ -1104,9 +1108,9 @@ import library "extern_api";
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32";
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: extern fn @B(%b: i32) -> i32;
|
||||
// CHECK:STDOUT: extern fn @B(%b.param_patt: i32) -> i32;
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: extern fn @C(%c: %.4) -> %.3;
|
||||
// CHECK:STDOUT: extern fn @C(%c.param_patt: %.4) -> %.3;
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: extern fn @D();
|
||||
// CHECK:STDOUT:
|
||||
@@ -1123,10 +1127,10 @@ import library "extern_api";
|
||||
// CHECK:STDOUT: assign file.%b.var, %B.call
|
||||
// CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.3 [template = constants.%C]
|
||||
// CHECK:STDOUT: %.loc53_23: i32 = int_literal 1 [template = constants.%.2]
|
||||
// CHECK:STDOUT: %.loc53_25: %.4 = tuple_literal (%.loc53_23)
|
||||
// CHECK:STDOUT: %.loc53_25.1: %.4 = tuple_literal (%.loc53_23)
|
||||
// CHECK:STDOUT: %tuple: %.4 = tuple_value (%.loc53_23) [template = constants.%tuple]
|
||||
// CHECK:STDOUT: %.loc53_21: %.4 = converted %.loc53_25, %tuple [template = constants.%tuple]
|
||||
// CHECK:STDOUT: %C.call: init %.3 = call %C.ref(%.loc53_21)
|
||||
// CHECK:STDOUT: %.loc53_25.2: %.4 = converted %.loc53_25.1, %tuple [template = constants.%tuple]
|
||||
// CHECK:STDOUT: %C.call: init %.3 = call %C.ref(%.loc53_25.2)
|
||||
// CHECK:STDOUT: assign file.%c.var, %C.call
|
||||
// CHECK:STDOUT: %D.ref: %D.type = name_ref D, imports.%import_ref.4 [template = constants.%D]
|
||||
// CHECK:STDOUT: %D.call: init %.1 = call %D.ref()
|
||||
@@ -1142,14 +1146,14 @@ import library "extern_api";
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
// CHECK:STDOUT: %import_ref.1 = import_ref Main//api, inst+3, unloaded
|
||||
// CHECK:STDOUT: %import_ref.2 = import_ref Main//api, inst+22, unloaded
|
||||
// CHECK:STDOUT: %import_ref.3 = import_ref Main//api, inst+43, unloaded
|
||||
// CHECK:STDOUT: %import_ref.4 = import_ref Main//api, inst+46, unloaded
|
||||
// CHECK:STDOUT: %import_ref.5: <namespace> = import_ref Main//api, inst+49, loaded
|
||||
// CHECK:STDOUT: %import_ref.2 = import_ref Main//api, inst+23, unloaded
|
||||
// CHECK:STDOUT: %import_ref.3 = import_ref Main//api, inst+45, unloaded
|
||||
// CHECK:STDOUT: %import_ref.4 = import_ref Main//api, inst+48, unloaded
|
||||
// CHECK:STDOUT: %import_ref.5: <namespace> = import_ref Main//api, inst+51, loaded
|
||||
// CHECK:STDOUT: %NS: <namespace> = namespace %import_ref.5, [template] {
|
||||
// CHECK:STDOUT: .E = %import_ref.6
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %import_ref.6 = import_ref Main//api, inst+50, unloaded
|
||||
// CHECK:STDOUT: %import_ref.6 = import_ref Main//api, inst+52, unloaded
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
|
||||
// CHECK:STDOUT: import Core//prelude
|
||||
// CHECK:STDOUT: import Core//prelude/operators
|
||||
@@ -1179,14 +1183,14 @@ import library "extern_api";
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
// CHECK:STDOUT: %import_ref.1 = import_ref Main//extern_api, inst+3, unloaded
|
||||
// CHECK:STDOUT: %import_ref.2 = import_ref Main//extern_api, inst+22, unloaded
|
||||
// CHECK:STDOUT: %import_ref.3 = import_ref Main//extern_api, inst+43, unloaded
|
||||
// CHECK:STDOUT: %import_ref.4 = import_ref Main//extern_api, inst+46, unloaded
|
||||
// CHECK:STDOUT: %import_ref.5: <namespace> = import_ref Main//extern_api, inst+49, loaded
|
||||
// CHECK:STDOUT: %import_ref.2 = import_ref Main//extern_api, inst+23, unloaded
|
||||
// CHECK:STDOUT: %import_ref.3 = import_ref Main//extern_api, inst+45, unloaded
|
||||
// CHECK:STDOUT: %import_ref.4 = import_ref Main//extern_api, inst+48, unloaded
|
||||
// CHECK:STDOUT: %import_ref.5: <namespace> = import_ref Main//extern_api, inst+51, loaded
|
||||
// CHECK:STDOUT: %NS: <namespace> = namespace %import_ref.5, [template] {
|
||||
// CHECK:STDOUT: .E = %import_ref.6
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %import_ref.6 = import_ref Main//extern_api, inst+50, unloaded
|
||||
// CHECK:STDOUT: %import_ref.6 = import_ref Main//extern_api, inst+52, unloaded
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
|
||||
// CHECK:STDOUT: import Core//prelude
|
||||
// CHECK:STDOUT: import Core//prelude/operators
|
||||
|
||||
@@ -175,10 +175,11 @@ class C {
|
||||
// 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: %self.patt: %C = binding_pattern self
|
||||
// CHECK:STDOUT: %self.param_patt: %C = param_pattern %self.patt, runtime_param0
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C]
|
||||
// CHECK:STDOUT: %self.param: %C = param self, runtime_param0
|
||||
// CHECK:STDOUT: %self: %C = bind_name self, %self.param
|
||||
// CHECK:STDOUT: %param: %C = param runtime_param0
|
||||
// CHECK:STDOUT: %self: %C = bind_name self, %param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc14: <witness> = complete_type_witness %.2 [template = constants.%.3]
|
||||
// CHECK:STDOUT:
|
||||
@@ -190,5 +191,5 @@ class C {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @F();
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @G[%self: %C]();
|
||||
// CHECK:STDOUT: fn @G[%self.param_patt: %C]();
|
||||
// CHECK:STDOUT:
|
||||
|
||||
+11
-8
@@ -87,28 +87,31 @@ fn E() {}
|
||||
// CHECK:STDOUT: %A.decl.loc19: %A.type = fn_decl @A [template = constants.%A] {} {}
|
||||
// CHECK:STDOUT: %B.decl.loc21: %B.type = fn_decl @B [template = constants.%B] {
|
||||
// CHECK:STDOUT: %x.patt: %.1 = binding_pattern x
|
||||
// CHECK:STDOUT: %x.param_patt: %.1 = param_pattern %x.patt, runtime_param0
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %.loc21_10.1: %.1 = tuple_literal ()
|
||||
// CHECK:STDOUT: %.loc21_10.2: type = converted %.loc21_10.1, constants.%.1 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %x.param.loc21: %.1 = param x, runtime_param0
|
||||
// CHECK:STDOUT: %x.loc21: %.1 = bind_name x, %x.param.loc21
|
||||
// CHECK:STDOUT: %param.loc21: %.1 = param runtime_param0
|
||||
// CHECK:STDOUT: %x.loc21: %.1 = bind_name x, %param.loc21
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %B.decl.loc29: %B.type = fn_decl @B [template = constants.%B] {
|
||||
// CHECK:STDOUT: %x.patt: %.1 = binding_pattern x
|
||||
// CHECK:STDOUT: %x.param_patt: %.1 = param_pattern %x.patt, runtime_param0
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %.loc29_10.1: %.1 = tuple_literal ()
|
||||
// CHECK:STDOUT: %.loc29_10.2: type = converted %.loc29_10.1, constants.%.1 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %x.param.loc29: %.1 = param x, runtime_param0
|
||||
// CHECK:STDOUT: %x.loc29: %.1 = bind_name x, %x.param.loc29
|
||||
// CHECK:STDOUT: %param.loc29: %.1 = param runtime_param0
|
||||
// CHECK:STDOUT: %x.loc29: %.1 = bind_name x, %param.loc29
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %C.decl: %C.type = fn_decl @C [template = constants.%C] {} {}
|
||||
// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.2] {
|
||||
// CHECK:STDOUT: %x.patt: %.1 = binding_pattern x
|
||||
// CHECK:STDOUT: %x.param_patt: %.1 = param_pattern %x.patt, runtime_param0
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %.loc39_10.1: %.1 = tuple_literal ()
|
||||
// CHECK:STDOUT: %.loc39_10.2: type = converted %.loc39_10.1, constants.%.1 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %x.param: %.1 = param x, runtime_param0
|
||||
// CHECK:STDOUT: %x: %.1 = bind_name x, %x.param
|
||||
// CHECK:STDOUT: %param: %.1 = param runtime_param0
|
||||
// CHECK:STDOUT: %x: %.1 = bind_name x, %param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %D.decl.loc41: %D.type = fn_decl @D [template = constants.%D] {} {}
|
||||
// CHECK:STDOUT: %D.decl.loc49: %D.type = fn_decl @D [template = constants.%D] {} {}
|
||||
@@ -118,11 +121,11 @@ fn E() {}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @A();
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @B(%x.loc21: %.1);
|
||||
// CHECK:STDOUT: fn @B(%x.param_patt: %.1);
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @C();
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @.1(%x: %.1);
|
||||
// CHECK:STDOUT: fn @.1(%x.param_patt: %.1);
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @D() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
|
||||
+3
-3
@@ -55,7 +55,7 @@ fn A => 0;
|
||||
// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {} {}
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @A();
|
||||
// CHECK:STDOUT: fn @A;
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- fail_todo_brace_body.carbon
|
||||
// CHECK:STDOUT:
|
||||
@@ -72,7 +72,7 @@ fn A => 0;
|
||||
// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {} {}
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @A() {
|
||||
// CHECK:STDOUT: fn @A {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
@@ -92,5 +92,5 @@ fn A => 0;
|
||||
// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {} {}
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @A();
|
||||
// CHECK:STDOUT: fn @A;
|
||||
// CHECK:STDOUT:
|
||||
|
||||
@@ -48,27 +48,29 @@ fn G(a: i32);
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {
|
||||
// CHECK:STDOUT: %a.patt: i32 = binding_pattern a
|
||||
// CHECK:STDOUT: %a.param_patt: i32 = param_pattern %a.patt, runtime_param0
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %int.make_type_32 [template = i32]
|
||||
// CHECK:STDOUT: %.loc11_9.2: type = converted %int.make_type_32, %.loc11_9.1 [template = i32]
|
||||
// CHECK:STDOUT: %a.param: i32 = param a, runtime_param0
|
||||
// CHECK:STDOUT: %a: i32 = bind_name a, %a.param
|
||||
// CHECK:STDOUT: %param: i32 = param runtime_param0
|
||||
// CHECK:STDOUT: %a: i32 = bind_name a, %param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] {
|
||||
// CHECK:STDOUT: %a.patt: i32 = binding_pattern a
|
||||
// CHECK:STDOUT: %a.param_patt: i32 = param_pattern %a.patt, runtime_param0
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc13_9.1: type = value_of_initializer %int.make_type_32 [template = i32]
|
||||
// CHECK:STDOUT: %.loc13_9.2: type = converted %int.make_type_32, %.loc13_9.1 [template = i32]
|
||||
// CHECK:STDOUT: %a.param: i32 = param a, runtime_param0
|
||||
// CHECK:STDOUT: %a: i32 = bind_name a, %a.param
|
||||
// CHECK:STDOUT: %param: i32 = param runtime_param0
|
||||
// CHECK:STDOUT: %a: i32 = bind_name a, %param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32";
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @F(%a: i32);
|
||||
// CHECK:STDOUT: fn @F(%a.param_patt: i32);
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @G(%a: i32);
|
||||
// CHECK:STDOUT: fn @G(%a.param_patt: i32);
|
||||
// CHECK:STDOUT:
|
||||
|
||||
Reference in New Issue
Block a user