Skip to content

Commit

Permalink
RuntimeCall -> RuntimeCallIsValid
Browse files Browse the repository at this point in the history
  • Loading branch information
zygoloid committed Dec 31, 2024
1 parent c1722c3 commit 633476f
Show file tree
Hide file tree
Showing 35 changed files with 534 additions and 534 deletions.
156 changes: 78 additions & 78 deletions toolchain/check/testdata/builtins/float/add.carbon

Large diffs are not rendered by default.

156 changes: 78 additions & 78 deletions toolchain/check/testdata/builtins/float/div.carbon

Large diffs are not rendered by default.

36 changes: 18 additions & 18 deletions toolchain/check/testdata/builtins/float/eq.carbon
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ fn F(true_: True, false_: False) {
false_ as (if Eq(1.0, 2.0) then True else False);
}

fn RuntimeCall(a: f64, b: f64) -> bool {
fn RuntimeCallIsValid(a: f64, b: f64) -> bool {
return Eq(a, b);
}

Expand Down Expand Up @@ -53,8 +53,8 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.eq";
// CHECK:STDOUT: %true: bool = bool_literal true [template]
// CHECK:STDOUT: %float.2: f64 = float_literal 2 [template]
// CHECK:STDOUT: %false: bool = bool_literal false [template]
// CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template]
// CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template]
// CHECK:STDOUT: %RuntimeCallIsValid.type: type = fn_type @RuntimeCallIsValid [template]
// CHECK:STDOUT: %RuntimeCallIsValid: %RuntimeCallIsValid.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
Expand All @@ -73,7 +73,7 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.eq";
// CHECK:STDOUT: .True = %True.decl
// CHECK:STDOUT: .False = %False.decl
// CHECK:STDOUT: .F = %F.decl
// CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl
// CHECK:STDOUT: .RuntimeCallIsValid = %RuntimeCallIsValid.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core.import = import Core
// CHECK:STDOUT: %Eq.decl: %Eq.type = fn_decl @Eq [template = constants.%Eq] {
Expand Down Expand Up @@ -121,7 +121,7 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.eq";
// CHECK:STDOUT: %False.ref.loc7: type = name_ref False, file.%False.decl [template = constants.%False]
// CHECK:STDOUT: %false_: %False = bind_name false_, %false_.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] {
// CHECK:STDOUT: %RuntimeCallIsValid.decl: %RuntimeCallIsValid.type = fn_decl @RuntimeCallIsValid [template = constants.%RuntimeCallIsValid] {
// CHECK:STDOUT: %a.patt: f64 = binding_pattern a
// CHECK:STDOUT: %a.param_patt: f64 = value_param_pattern %a.patt, runtime_param0
// CHECK:STDOUT: %b.patt: f64 = binding_pattern b
Expand All @@ -130,22 +130,22 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.eq";
// CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2
// CHECK:STDOUT: } {
// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool]
// CHECK:STDOUT: %.loc12_35.1: type = value_of_initializer %bool.make_type [template = bool]
// CHECK:STDOUT: %.loc12_35.2: type = converted %bool.make_type, %.loc12_35.1 [template = bool]
// CHECK:STDOUT: %.loc12_42.1: type = value_of_initializer %bool.make_type [template = bool]
// CHECK:STDOUT: %.loc12_42.2: type = converted %bool.make_type, %.loc12_42.1 [template = bool]
// CHECK:STDOUT: %a.param: f64 = value_param runtime_param0
// CHECK:STDOUT: %.loc12_19.1: type = splice_block %.loc12_19.3 [template = f64] {
// CHECK:STDOUT: %int_64.loc12_19: Core.IntLiteral = int_value 64 [template = constants.%int_64]
// CHECK:STDOUT: %float.make_type.loc12_19: init type = call constants.%Float(%int_64.loc12_19) [template = f64]
// CHECK:STDOUT: %.loc12_19.2: type = value_of_initializer %float.make_type.loc12_19 [template = f64]
// CHECK:STDOUT: %.loc12_19.3: type = converted %float.make_type.loc12_19, %.loc12_19.2 [template = f64]
// CHECK:STDOUT: %.loc12_26.1: type = splice_block %.loc12_26.3 [template = f64] {
// CHECK:STDOUT: %int_64.loc12_26: Core.IntLiteral = int_value 64 [template = constants.%int_64]
// CHECK:STDOUT: %float.make_type.loc12_26: init type = call constants.%Float(%int_64.loc12_26) [template = f64]
// CHECK:STDOUT: %.loc12_26.2: type = value_of_initializer %float.make_type.loc12_26 [template = f64]
// CHECK:STDOUT: %.loc12_26.3: type = converted %float.make_type.loc12_26, %.loc12_26.2 [template = f64]
// CHECK:STDOUT: }
// CHECK:STDOUT: %a: f64 = bind_name a, %a.param
// CHECK:STDOUT: %b.param: f64 = value_param runtime_param1
// CHECK:STDOUT: %.loc12_27.1: type = splice_block %.loc12_27.3 [template = f64] {
// CHECK:STDOUT: %int_64.loc12_27: Core.IntLiteral = int_value 64 [template = constants.%int_64]
// CHECK:STDOUT: %float.make_type.loc12_27: init type = call constants.%Float(%int_64.loc12_27) [template = f64]
// CHECK:STDOUT: %.loc12_27.2: type = value_of_initializer %float.make_type.loc12_27 [template = f64]
// CHECK:STDOUT: %.loc12_27.3: type = converted %float.make_type.loc12_27, %.loc12_27.2 [template = f64]
// CHECK:STDOUT: %.loc12_34.1: type = splice_block %.loc12_34.3 [template = f64] {
// CHECK:STDOUT: %int_64.loc12_34: Core.IntLiteral = int_value 64 [template = constants.%int_64]
// CHECK:STDOUT: %float.make_type.loc12_34: init type = call constants.%Float(%int_64.loc12_34) [template = f64]
// CHECK:STDOUT: %.loc12_34.2: type = value_of_initializer %float.make_type.loc12_34 [template = f64]
// CHECK:STDOUT: %.loc12_34.3: type = converted %float.make_type.loc12_34, %.loc12_34.2 [template = f64]
// CHECK:STDOUT: }
// CHECK:STDOUT: %b: f64 = bind_name b, %b.param
// CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2
Expand Down Expand Up @@ -214,7 +214,7 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.eq";
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @RuntimeCall(%a.param_patt: f64, %b.param_patt: f64) -> bool {
// CHECK:STDOUT: fn @RuntimeCallIsValid(%a.param_patt: f64, %b.param_patt: f64) -> bool {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %Eq.ref: %Eq.type = name_ref Eq, file.%Eq.decl [template = constants.%Eq]
// CHECK:STDOUT: %a.ref: f64 = name_ref a, %a
Expand Down
36 changes: 18 additions & 18 deletions toolchain/check/testdata/builtins/float/greater.carbon
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ fn F(true_: True, false_: False) {
true_ as (if Greater(0.0, Negate(1.0)) then True else False);
}

fn RuntimeCall(a: f64, b: f64) -> bool {
fn RuntimeCallIsValid(a: f64, b: f64) -> bool {
return Greater(a, b);
}

Expand Down Expand Up @@ -52,8 +52,8 @@ fn RuntimeCall(a: f64, b: f64) -> bool {
// CHECK:STDOUT: %float.3: f64 = float_literal 0 [template]
// CHECK:STDOUT: %true: bool = bool_literal true [template]
// CHECK:STDOUT: %float.4: f64 = float_literal -1 [template]
// CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template]
// CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template]
// CHECK:STDOUT: %RuntimeCallIsValid.type: type = fn_type @RuntimeCallIsValid [template]
// CHECK:STDOUT: %RuntimeCallIsValid: %RuntimeCallIsValid.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
Expand All @@ -73,7 +73,7 @@ fn RuntimeCall(a: f64, b: f64) -> bool {
// CHECK:STDOUT: .True = %True.decl
// CHECK:STDOUT: .False = %False.decl
// CHECK:STDOUT: .F = %F.decl
// CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl
// CHECK:STDOUT: .RuntimeCallIsValid = %RuntimeCallIsValid.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core.import = import Core
// CHECK:STDOUT: %Greater.decl: %Greater.type = fn_decl @Greater [template = constants.%Greater] {
Expand Down Expand Up @@ -142,7 +142,7 @@ fn RuntimeCall(a: f64, b: f64) -> bool {
// CHECK:STDOUT: %False.ref.loc8: type = name_ref False, file.%False.decl [template = constants.%False]
// CHECK:STDOUT: %false_: %False = bind_name false_, %false_.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] {
// CHECK:STDOUT: %RuntimeCallIsValid.decl: %RuntimeCallIsValid.type = fn_decl @RuntimeCallIsValid [template = constants.%RuntimeCallIsValid] {
// CHECK:STDOUT: %a.patt: f64 = binding_pattern a
// CHECK:STDOUT: %a.param_patt: f64 = value_param_pattern %a.patt, runtime_param0
// CHECK:STDOUT: %b.patt: f64 = binding_pattern b
Expand All @@ -151,22 +151,22 @@ fn RuntimeCall(a: f64, b: f64) -> bool {
// CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2
// CHECK:STDOUT: } {
// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool]
// CHECK:STDOUT: %.loc16_35.1: type = value_of_initializer %bool.make_type [template = bool]
// CHECK:STDOUT: %.loc16_35.2: type = converted %bool.make_type, %.loc16_35.1 [template = bool]
// CHECK:STDOUT: %.loc16_42.1: type = value_of_initializer %bool.make_type [template = bool]
// CHECK:STDOUT: %.loc16_42.2: type = converted %bool.make_type, %.loc16_42.1 [template = bool]
// CHECK:STDOUT: %a.param: f64 = value_param runtime_param0
// CHECK:STDOUT: %.loc16_19.1: type = splice_block %.loc16_19.3 [template = f64] {
// CHECK:STDOUT: %int_64.loc16_19: Core.IntLiteral = int_value 64 [template = constants.%int_64]
// CHECK:STDOUT: %float.make_type.loc16_19: init type = call constants.%Float(%int_64.loc16_19) [template = f64]
// CHECK:STDOUT: %.loc16_19.2: type = value_of_initializer %float.make_type.loc16_19 [template = f64]
// CHECK:STDOUT: %.loc16_19.3: type = converted %float.make_type.loc16_19, %.loc16_19.2 [template = f64]
// CHECK:STDOUT: %.loc16_26.1: type = splice_block %.loc16_26.3 [template = f64] {
// CHECK:STDOUT: %int_64.loc16_26: Core.IntLiteral = int_value 64 [template = constants.%int_64]
// CHECK:STDOUT: %float.make_type.loc16_26: init type = call constants.%Float(%int_64.loc16_26) [template = f64]
// CHECK:STDOUT: %.loc16_26.2: type = value_of_initializer %float.make_type.loc16_26 [template = f64]
// CHECK:STDOUT: %.loc16_26.3: type = converted %float.make_type.loc16_26, %.loc16_26.2 [template = f64]
// CHECK:STDOUT: }
// CHECK:STDOUT: %a: f64 = bind_name a, %a.param
// CHECK:STDOUT: %b.param: f64 = value_param runtime_param1
// CHECK:STDOUT: %.loc16_27.1: type = splice_block %.loc16_27.3 [template = f64] {
// CHECK:STDOUT: %int_64.loc16_27: Core.IntLiteral = int_value 64 [template = constants.%int_64]
// CHECK:STDOUT: %float.make_type.loc16_27: init type = call constants.%Float(%int_64.loc16_27) [template = f64]
// CHECK:STDOUT: %.loc16_27.2: type = value_of_initializer %float.make_type.loc16_27 [template = f64]
// CHECK:STDOUT: %.loc16_27.3: type = converted %float.make_type.loc16_27, %.loc16_27.2 [template = f64]
// CHECK:STDOUT: %.loc16_34.1: type = splice_block %.loc16_34.3 [template = f64] {
// CHECK:STDOUT: %int_64.loc16_34: Core.IntLiteral = int_value 64 [template = constants.%int_64]
// CHECK:STDOUT: %float.make_type.loc16_34: init type = call constants.%Float(%int_64.loc16_34) [template = f64]
// CHECK:STDOUT: %.loc16_34.2: type = value_of_initializer %float.make_type.loc16_34 [template = f64]
// CHECK:STDOUT: %.loc16_34.3: type = converted %float.make_type.loc16_34, %.loc16_34.2 [template = f64]
// CHECK:STDOUT: }
// CHECK:STDOUT: %b: f64 = bind_name b, %b.param
// CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2
Expand Down Expand Up @@ -302,7 +302,7 @@ fn RuntimeCall(a: f64, b: f64) -> bool {
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @RuntimeCall(%a.param_patt: f64, %b.param_patt: f64) -> bool {
// CHECK:STDOUT: fn @RuntimeCallIsValid(%a.param_patt: f64, %b.param_patt: f64) -> bool {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %Greater.ref: %Greater.type = name_ref Greater, file.%Greater.decl [template = constants.%Greater]
// CHECK:STDOUT: %a.ref: f64 = name_ref a, %a
Expand Down
36 changes: 18 additions & 18 deletions toolchain/check/testdata/builtins/float/greater_eq.carbon
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ fn F(true_: True, false_: False) {
true_ as (if GreaterEq(0.0, Negate(1.0)) then True else False);
}

fn RuntimeCall(a: f64, b: f64) -> bool {
fn RuntimeCallIsValid(a: f64, b: f64) -> bool {
return GreaterEq(a, b);
}

Expand Down Expand Up @@ -52,8 +52,8 @@ fn RuntimeCall(a: f64, b: f64) -> bool {
// CHECK:STDOUT: %true: bool = bool_literal true [template]
// CHECK:STDOUT: %float.3: f64 = float_literal 0 [template]
// CHECK:STDOUT: %float.4: f64 = float_literal -1 [template]
// CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template]
// CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template]
// CHECK:STDOUT: %RuntimeCallIsValid.type: type = fn_type @RuntimeCallIsValid [template]
// CHECK:STDOUT: %RuntimeCallIsValid: %RuntimeCallIsValid.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
Expand All @@ -73,7 +73,7 @@ fn RuntimeCall(a: f64, b: f64) -> bool {
// CHECK:STDOUT: .True = %True.decl
// CHECK:STDOUT: .False = %False.decl
// CHECK:STDOUT: .F = %F.decl
// CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl
// CHECK:STDOUT: .RuntimeCallIsValid = %RuntimeCallIsValid.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core.import = import Core
// CHECK:STDOUT: %GreaterEq.decl: %GreaterEq.type = fn_decl @GreaterEq [template = constants.%GreaterEq] {
Expand Down Expand Up @@ -142,7 +142,7 @@ fn RuntimeCall(a: f64, b: f64) -> bool {
// CHECK:STDOUT: %False.ref.loc8: type = name_ref False, file.%False.decl [template = constants.%False]
// CHECK:STDOUT: %false_: %False = bind_name false_, %false_.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] {
// CHECK:STDOUT: %RuntimeCallIsValid.decl: %RuntimeCallIsValid.type = fn_decl @RuntimeCallIsValid [template = constants.%RuntimeCallIsValid] {
// CHECK:STDOUT: %a.patt: f64 = binding_pattern a
// CHECK:STDOUT: %a.param_patt: f64 = value_param_pattern %a.patt, runtime_param0
// CHECK:STDOUT: %b.patt: f64 = binding_pattern b
Expand All @@ -151,22 +151,22 @@ fn RuntimeCall(a: f64, b: f64) -> bool {
// CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2
// CHECK:STDOUT: } {
// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool]
// CHECK:STDOUT: %.loc16_35.1: type = value_of_initializer %bool.make_type [template = bool]
// CHECK:STDOUT: %.loc16_35.2: type = converted %bool.make_type, %.loc16_35.1 [template = bool]
// CHECK:STDOUT: %.loc16_42.1: type = value_of_initializer %bool.make_type [template = bool]
// CHECK:STDOUT: %.loc16_42.2: type = converted %bool.make_type, %.loc16_42.1 [template = bool]
// CHECK:STDOUT: %a.param: f64 = value_param runtime_param0
// CHECK:STDOUT: %.loc16_19.1: type = splice_block %.loc16_19.3 [template = f64] {
// CHECK:STDOUT: %int_64.loc16_19: Core.IntLiteral = int_value 64 [template = constants.%int_64]
// CHECK:STDOUT: %float.make_type.loc16_19: init type = call constants.%Float(%int_64.loc16_19) [template = f64]
// CHECK:STDOUT: %.loc16_19.2: type = value_of_initializer %float.make_type.loc16_19 [template = f64]
// CHECK:STDOUT: %.loc16_19.3: type = converted %float.make_type.loc16_19, %.loc16_19.2 [template = f64]
// CHECK:STDOUT: %.loc16_26.1: type = splice_block %.loc16_26.3 [template = f64] {
// CHECK:STDOUT: %int_64.loc16_26: Core.IntLiteral = int_value 64 [template = constants.%int_64]
// CHECK:STDOUT: %float.make_type.loc16_26: init type = call constants.%Float(%int_64.loc16_26) [template = f64]
// CHECK:STDOUT: %.loc16_26.2: type = value_of_initializer %float.make_type.loc16_26 [template = f64]
// CHECK:STDOUT: %.loc16_26.3: type = converted %float.make_type.loc16_26, %.loc16_26.2 [template = f64]
// CHECK:STDOUT: }
// CHECK:STDOUT: %a: f64 = bind_name a, %a.param
// CHECK:STDOUT: %b.param: f64 = value_param runtime_param1
// CHECK:STDOUT: %.loc16_27.1: type = splice_block %.loc16_27.3 [template = f64] {
// CHECK:STDOUT: %int_64.loc16_27: Core.IntLiteral = int_value 64 [template = constants.%int_64]
// CHECK:STDOUT: %float.make_type.loc16_27: init type = call constants.%Float(%int_64.loc16_27) [template = f64]
// CHECK:STDOUT: %.loc16_27.2: type = value_of_initializer %float.make_type.loc16_27 [template = f64]
// CHECK:STDOUT: %.loc16_27.3: type = converted %float.make_type.loc16_27, %.loc16_27.2 [template = f64]
// CHECK:STDOUT: %.loc16_34.1: type = splice_block %.loc16_34.3 [template = f64] {
// CHECK:STDOUT: %int_64.loc16_34: Core.IntLiteral = int_value 64 [template = constants.%int_64]
// CHECK:STDOUT: %float.make_type.loc16_34: init type = call constants.%Float(%int_64.loc16_34) [template = f64]
// CHECK:STDOUT: %.loc16_34.2: type = value_of_initializer %float.make_type.loc16_34 [template = f64]
// CHECK:STDOUT: %.loc16_34.3: type = converted %float.make_type.loc16_34, %.loc16_34.2 [template = f64]
// CHECK:STDOUT: }
// CHECK:STDOUT: %b: f64 = bind_name b, %b.param
// CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2
Expand Down Expand Up @@ -302,7 +302,7 @@ fn RuntimeCall(a: f64, b: f64) -> bool {
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @RuntimeCall(%a.param_patt: f64, %b.param_patt: f64) -> bool {
// CHECK:STDOUT: fn @RuntimeCallIsValid(%a.param_patt: f64, %b.param_patt: f64) -> bool {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %GreaterEq.ref: %GreaterEq.type = name_ref GreaterEq, file.%GreaterEq.decl [template = constants.%GreaterEq]
// CHECK:STDOUT: %a.ref: f64 = name_ref a, %a
Expand Down
Loading

0 comments on commit 633476f

Please sign in to comment.