mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-04 17:51:05 +01:00
Rewrite pending specifics to use the work stack (#6415)
I was trying to figure out the right way to get specifics to be added to the work. Technically, we could keep the pending_specific list; this is taking a different approach of inserting inside the work stack, which will do extra work moving entries, although typically that should be expected to be small. One challenge of `pending_specifics` is that if we would need to shift them to work after both `Done` (for immediate processing) and `Retry` (for processing after the current instruction is later revisited and done). That feels kind of awkward as additional tracking to do. Also, the common case is probably that there's either 0 or 1 specifics being added, so an additional vector may be significant overhead. That's why I leaned more in this direction of just inserting them in the vector of work.
This commit is contained in:
@@ -109,9 +109,9 @@ fn F() {
|
||||
// CHECK:STDOUT: %MaybeUnformed.cff: type = class_type @MaybeUnformed, @MaybeUnformed(%ptr.4f0) [symbolic]
|
||||
// CHECK:STDOUT: %ptr.as.OptionalStorage.impl.Some.type.911: type = fn_type @ptr.as.OptionalStorage.impl.Some, @ptr.as.OptionalStorage.impl(%T.d9f) [symbolic]
|
||||
// CHECK:STDOUT: %ptr.as.OptionalStorage.impl.Some.2a0: %ptr.as.OptionalStorage.impl.Some.type.911 = struct_value () [symbolic]
|
||||
// CHECK:STDOUT: %type_where: type = facet_type <type where .Self impls <CanDestroy>> [concrete]
|
||||
// CHECK:STDOUT: %ptr.as.OptionalStorage.impl.None.type.8ed: type = fn_type @ptr.as.OptionalStorage.impl.None, @ptr.as.OptionalStorage.impl(%T.d9f) [symbolic]
|
||||
// CHECK:STDOUT: %ptr.as.OptionalStorage.impl.None.41a: %ptr.as.OptionalStorage.impl.None.type.8ed = struct_value () [symbolic]
|
||||
// CHECK:STDOUT: %type_where: type = facet_type <type where .Self impls <CanDestroy>> [concrete]
|
||||
// CHECK:STDOUT: %OptionalStorage.impl_witness.d16: <witness> = impl_witness imports.%OptionalStorage.impl_witness_table.f03, @ptr.as.OptionalStorage.impl(%i32) [concrete]
|
||||
// CHECK:STDOUT: %OptionalStorage.facet.083: %OptionalStorage.type = facet_value %ptr.235, (%OptionalStorage.impl_witness.d16) [concrete]
|
||||
// CHECK:STDOUT: %Optional.97d: type = class_type @Optional, @Optional(%OptionalStorage.facet.083) [concrete]
|
||||
|
||||
Reference in New Issue
Block a user