-
Notifications
You must be signed in to change notification settings - Fork 0
More type metadata #69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 10 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
215151c
Unrelated: optionally keep json files from a UI test run
jberthold a1b920f
Add more type metadata
jberthold ed936ef
fix golden tests by sorting all type metadata and deleting ref.s to o…
jberthold aa91206
quality:-)
jberthold 8554189
debugging jq problem in CI
jberthold fabcd05
use syntax compatible with jq-1.6 (cursing about the error messages)
jberthold 7a40600
use separate ClosureType variant, delete its strings for golden tests
jberthold 9499006
flatten type metadata arrays for golden tests
jberthold da730cb
revert Closure constr., remove all function type strings for golden t…
jberthold 0c9914d
add Array's TyConst type to collect_ty
jberthold 739cbbe
Named argument for `TupleType`
jberthold 59e3239
Fix TupleType usage, adjust golden test filter and expectations
jberthold 65dd3e4
fmt
jberthold File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 |
---|---|---|
@@ -1,27 +1,29 @@ | ||
# Remove the hashes at the end of mangled names | ||
.functions = ( [ .functions[] | if .[1].NormalSym then .[1].NormalSym = .[1].NormalSym[:-17] else . end ] ) | ||
| .items = ( [ .items[] | if .symbol_name then .symbol_name = .symbol_name[:-17] else . end ] ) | ||
# delete unstable alloc, function, and type IDs | ||
| .allocs = ( [ .allocs[] ] | map(del(.[0])) ) | ||
| .functions = ( [ .functions[] ] | map(del(.[0])) ) | ||
| .types = ( [ .types[] ] | map(del(.[0])) ) | ||
| | ||
# Apply the normalisation filter | ||
{ allocs: | ||
( [ .allocs[] ] | ||
# delete unstable alloc ID | ||
| map(del(.[0])) | ||
), | ||
functions: | ||
( [ .functions[] ] | ||
# delete unstable function ID | ||
| map(del(.[0])) | ||
), | ||
items: | ||
( [ .items[] ] | ||
), | ||
types: | ||
( [ .types[] ] | ||
# delete unstable Ty ID (int, first in list) | ||
| map(del(.[0])) | ||
# delete unstable adt_def from Struct and Enum | ||
| map(del(.[0].StructType.adt_def)) | ||
| map(del(.[0].EnumType.adt_def)) | ||
) | ||
{ allocs: .allocs, | ||
functions: .functions, | ||
items: .items, | ||
types: ( [ | ||
# sort by constructors and remove unstable IDs within each | ||
( .types | map(select(.[0].PrimitiveType)) ), | ||
# delete unstable adt_ref IDs | ||
( .types | map(select(.[0].EnumType) | del(.[0].EnumType.adt_def)) ), | ||
( .types | map(select(.[0].StructType) | del(.[0].StructType.adt_def)) ), | ||
( .types | map(select(.[0].UnionType) | del(.[0].UnionType.adt_def)) ), | ||
# delete unstable Ty IDs for arrays and tuples | ||
( .types | map(select(.[0].ArrayType) | del(.[0].ArrayType[0])) ), | ||
( .types | map(select(.[0].TupleType) | .[0].TupleType = "elided") ), | ||
# replace unstable Ty IDs for references by zero | ||
( .types | map(select(.[0].PtrType) | .[0].PtrType = "elided") ), | ||
( .types | map(select(.[0].RefType) | .[0].RefType = "elided") ), | ||
# keep function type strings | ||
( .types | map(select(.[0].FunType) | .[0].FunType = "elided") ) | ||
] | flatten(1) ) | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.