-
Notifications
You must be signed in to change notification settings - Fork 276
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/core: reimplementation of closedness algorithm
Note: there are considerably more test lines, because there is a) more position information, and b) there are more tests. Insofar tests have been removed, it is because the relevant code no longer exits. So effectively, there are about 500 lines less code related to closedness as a result of this change! - Unify and UnifyAccept do all closedness checking wrt the parent locally. The AddVertex and UnifyAccept have been removed from eval. - The old fieldSet is replaced with precomputed values in StructLit. - Most optional and closedness logic has either been removed or moved from package eval to package adt. - Instead of a separate Structs slice and closedness information there is now just a StructInfo slice with integrated CloseInfo. - The Acceptor interface has been removed. - A new algorithm computes closedness bottom up, instead of top-down. See closed.go in ADT for details. - Recorded about a 15% reducing in running time, memory is of the same order. Note that this removes many optimizations of the previous implementation. Some of these (and others) could be added later. Fixes #599 Fixes #618 Change-Id: If6eec0b915b96067bcc4778bf63707827054b4d1 Reviewed-on: https://cue-review.googlesource.com/c/cue/+/7985 Reviewed-by: Marcel van Lohuizen <mpvl@golang.org> Reviewed-by: CUE cueckoo <cueckoo@gmail.com>
- Loading branch information
Showing
36 changed files
with
1,917 additions
and
2,237 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ c: #R & { | |
w: (#list){ | ||
0: (#struct){ | ||
} | ||
1: (#struct){ | ||
1: (struct){ | ||
b: (int){ int } | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.