@@ -12,8 +12,8 @@ private module Cached {
12
12
LevelStep ( ) or
13
13
CallStep ( ) or
14
14
ReturnStep ( ) or
15
- StoreStep ( TypeTrackerContent content ) or
16
- LoadStep ( TypeTrackerContent content ) or
15
+ StoreStep ( TypeTrackerContent content ) { basicStoreStep ( _ , _ , content ) } or
16
+ LoadStep ( TypeTrackerContent content ) { basicLoadStep ( _ , _ , content ) } or
17
17
JumpStep ( )
18
18
19
19
pragma [ nomagic]
@@ -218,7 +218,18 @@ module StepSummary {
218
218
}
219
219
}
220
220
221
- private newtype TTypeTracker = MkTypeTracker ( Boolean hasCall , OptionalTypeTrackerContent content )
221
+ private newtype TTypeTracker =
222
+ MkTypeTracker ( Boolean hasCall , OptionalTypeTrackerContent content ) {
223
+ content = noContent ( )
224
+ or
225
+ // Restrict `content` to those that might eventually match a load.
226
+ // We can't rely on `basicStoreStep` since `startInContent` might be used with
227
+ // a content that has no corresponding store.
228
+ exists ( TypeTrackerContent loadContents |
229
+ basicLoadStep ( _, _, loadContents ) and
230
+ compatibleContents ( content , loadContents )
231
+ )
232
+ }
222
233
223
234
/**
224
235
* A summary of the steps needed to track a value to a given dataflow node.
@@ -372,7 +383,15 @@ module TypeTracker {
372
383
}
373
384
374
385
private newtype TTypeBackTracker =
375
- MkTypeBackTracker ( Boolean hasReturn , OptionalTypeTrackerContent content )
386
+ MkTypeBackTracker ( Boolean hasReturn , OptionalTypeTrackerContent content ) {
387
+ content = noContent ( )
388
+ or
389
+ // As in MkTypeTracker, restrict `content` to those that might eventually match a store.
390
+ exists ( TypeTrackerContent storeContent |
391
+ basicStoreStep ( _, _, storeContent ) and
392
+ compatibleContents ( storeContent , content )
393
+ )
394
+ }
376
395
377
396
/**
378
397
* A summary of the steps needed to back-track a use of a value to a given dataflow node.
0 commit comments