mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 21:31:24 +01:00
Replace form insts with actions (#7100)
See [here](https://docs.google.com/document/d/1rWcueFwIfZox6GKVGxiUG4cBzjrZ6djXiIDGyJDtrE4/edit?tab=t.0) for the design doc. This also removes the default value of the `result_type_inst_id` parameter of `HandleAction`, moves it before the action in the parameter list, and documents it. This solves two problems: - The default made it easy to forget, leading to unnecessary `TypeOfInst` instructions. - When it was present, putting it after the fairly "bulky" action argument tended to make the callsite harder to read.
This commit is contained in:
+3
-3
@@ -132,8 +132,8 @@ fn ConversionExplicit(s: Cpp.ConditionallyExplicitFalse) {
|
||||
// CHECK:STDOUT: --- conversions.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
||||
// CHECK:STDOUT: %Source: type = class_type @Source [concrete]
|
||||
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
||||
// CHECK:STDOUT: %Dest: type = class_type @Dest [concrete]
|
||||
// CHECK:STDOUT: %Source.cpp_operator.type: type = fn_type @Source.cpp_operator [concrete]
|
||||
// CHECK:STDOUT: %Source.cpp_operator: %Source.cpp_operator.type = struct_value () [concrete]
|
||||
@@ -317,8 +317,8 @@ fn ConversionExplicit(s: Cpp.ConditionallyExplicitFalse) {
|
||||
// CHECK:STDOUT: --- conditionally_explicit.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
||||
// CHECK:STDOUT: %Source: type = class_type @Source [concrete]
|
||||
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
||||
// CHECK:STDOUT: %ConditionallyExplicit.c52b91.1: type = class_type @ConditionallyExplicit.1 [concrete]
|
||||
// CHECK:STDOUT: %pattern_type.285f84.1: type = pattern_type %ConditionallyExplicit.c52b91.1 [concrete]
|
||||
// CHECK:STDOUT: %ptr.1fc: type = ptr_type %Source [concrete]
|
||||
@@ -526,8 +526,8 @@ fn ConversionExplicit(s: Cpp.ConditionallyExplicitFalse) {
|
||||
// CHECK:STDOUT: --- fail_conditionally_explicit_implicit.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
||||
// CHECK:STDOUT: %Source: type = class_type @Source [concrete]
|
||||
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
||||
// CHECK:STDOUT: %ConditionallyExplicit.c52b91.1: type = class_type @ConditionallyExplicit.1 [concrete]
|
||||
// CHECK:STDOUT: %pattern_type.285f84.1: type = pattern_type %ConditionallyExplicit.c52b91.1 [concrete]
|
||||
// CHECK:STDOUT: %ConditionallyExplicit.c52b91.2: type = class_type @ConditionallyExplicit.2 [concrete]
|
||||
|
||||
+1
-1
@@ -195,8 +195,8 @@ fn EqualWitnesses(p: Wrap(Cpp.Copyable)*) -> Wrap(Cpp.Copyable)* {
|
||||
// CHECK:STDOUT: --- copy_copyable.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
||||
// CHECK:STDOUT: %Copyable: type = class_type @Copyable [concrete]
|
||||
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
||||
// CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete]
|
||||
// CHECK:STDOUT: %Copyable.Copyable.type: type = fn_type @Copyable.Copyable [concrete]
|
||||
// CHECK:STDOUT: %Copyable.Copyable: %Copyable.Copyable.type = struct_value () [concrete]
|
||||
|
||||
@@ -349,9 +349,9 @@ fn EqualWitnesses(p: Wrap(Cpp.PublicDestructor)*) -> Wrap(Cpp.PublicDestructor)*
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %Derived: type = class_type @Derived [concrete]
|
||||
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
||||
// CHECK:STDOUT: %ProtectedDestructor: type = class_type @ProtectedDestructor [concrete]
|
||||
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
|
||||
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
||||
// CHECK:STDOUT: %struct_type.base.e31: type = struct_type {.base: %ProtectedDestructor} [concrete]
|
||||
// CHECK:STDOUT: %pattern_type.9f6: type = pattern_type %Derived [concrete]
|
||||
// CHECK:STDOUT: %empty_struct.a40: %empty_struct_type = struct_value () [concrete]
|
||||
@@ -402,9 +402,9 @@ fn EqualWitnesses(p: Wrap(Cpp.PublicDestructor)*) -> Wrap(Cpp.PublicDestructor)*
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %Derived: type = class_type @Derived [concrete]
|
||||
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
||||
// CHECK:STDOUT: %PrivateDestructor: type = class_type @PrivateDestructor [concrete]
|
||||
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
|
||||
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
||||
// CHECK:STDOUT: %struct_type.base.616: type = struct_type {.base: %PrivateDestructor} [concrete]
|
||||
// CHECK:STDOUT: %pattern_type.9f6: type = pattern_type %Derived [concrete]
|
||||
// CHECK:STDOUT: %empty_struct.a40: %empty_struct_type = struct_value () [concrete]
|
||||
|
||||
@@ -414,8 +414,8 @@ fn InitFromStruct() {
|
||||
// CHECK:STDOUT: --- implicit_conversions.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
||||
// CHECK:STDOUT: %Source: type = class_type @Source [concrete]
|
||||
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
||||
// CHECK:STDOUT: %Dest: type = class_type @Dest [concrete]
|
||||
// CHECK:STDOUT: %pattern_type.69a: type = pattern_type %Dest [concrete]
|
||||
// CHECK:STDOUT: %Source.cpp_operator.type: type = fn_type @Source.cpp_operator [concrete]
|
||||
@@ -613,8 +613,8 @@ fn InitFromStruct() {
|
||||
// CHECK:STDOUT: --- fail_access.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
||||
// CHECK:STDOUT: %Source: type = class_type @Source [concrete]
|
||||
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
||||
// CHECK:STDOUT: %InaccessibleConstructor: type = class_type @InaccessibleConstructor [concrete]
|
||||
// CHECK:STDOUT: %pattern_type.b73: type = pattern_type %InaccessibleConstructor [concrete]
|
||||
// CHECK:STDOUT: %ptr.1fc: type = ptr_type %Source [concrete]
|
||||
|
||||
Reference in New Issue
Block a user