Skip to content

Sort ExportedType table when writing to comply with new ECMA Augments#559

Merged
wtfsck merged 1 commit into0xd4d:masterfrom
ElektroKill:sort-exported-type-table
May 30, 2024
Merged

Sort ExportedType table when writing to comply with new ECMA Augments#559
wtfsck merged 1 commit into0xd4d:masterfrom
ElektroKill:sort-exported-type-table

Conversation

@ElektroKill
Copy link
Contributor

fixes #558

The algorithm suggested in the issue was adjusted to allow more than one nested type per exported type.

Something to consider:
The current algorithm does not dispose of the enumerators generated just like the method in

public static IEnumerable<TypeDef> Types(IEnumerable<TypeDef> types) {
. This should be fine since list enumerators don't contain any logic in their Dipose method but this is something we'd probably need to add to both implementations for future-proofing and potential reuse. Perhaps we could also extract this traversal into an additional class for future use.

@wtfsck wtfsck merged commit 1e0ec26 into 0xd4d:master May 30, 2024
@wtfsck
Copy link
Contributor

wtfsck commented May 30, 2024

Thanks, added an issue about disposing of enumerators: #560

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sort ExportedType table in the same way as the TypeDef table

2 participants