Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/core/adt: new cycle algorithm
V3 only partially implemented the V2 cycle algorithm. Rather than implementing the rest, we came up with a new algorithm that fits better with the depth-first nature of V3. It is overall considerably simpler than the V2 algorithm. This CL reflects a "mostly done" state. There are still improvements to be made (e.g. inline and let fields), but it is already in better shape that V3 was before. Further fixes will be done in subsequent CLs. Note that this algorith is much simpler. It no longer needs: - track individual reference points (although it still does so for debugging purposes, but it does not use it to influence outcome) - track nodeContext.cyclicReferences - have a special mechanism to detect and disable mutual references - track depth of optional markers - track depth of references - additional finding of evidence of non-cyclic nodes in some cases CHANGES IN TESTS benchmarks/issue1684: more efficient at trimming disjunctions comprehensions/errors: more efficient at trimming disjunctions cycle/comprehenion: changes are strict improvements, even though they do not fix the underlying bugs cycle/constraints: - both shorter and deeper cutoffs cycle/evaluate: - reordering, mostly cycle/inline_non_recursive: - FIXES cycle/inline: - Minor improvements - Does not yet fix underlying bug cycle/structural: - Some processing is now deeper - Some less deep - Some P0-level bugs now FIXED that were somehow not listed in diff/todo/*. eval/v0.7: - NEW BUG: notification mechanism bypassed, it seems. export/030: - performance improvements Issue #2850 Signed-off-by: Marcel van Lohuizen <[email protected]> Change-Id: I280fcf9cb333735fcc1774f980bf34e7ed72c9a9 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1201897 Reviewed-by: Matthew Sackman <[email protected]> TryBot-Result: CUEcueckoo <[email protected]> Unity-Result: CUE porcuepine <[email protected]>
- Loading branch information