feat(runtime): Refactor/Re-organize runtime/dataStructures#2391
Open
spotandjake wants to merge 4 commits intograin-lang:oscar/gc-rebasedfrom
Open
feat(runtime): Refactor/Re-organize runtime/dataStructures#2391spotandjake wants to merge 4 commits intograin-lang:oscar/gc-rebasedfrom
runtime/dataStructures#2391spotandjake wants to merge 4 commits intograin-lang:oscar/gc-rebasedfrom
Conversation
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This pr cleans up our data structure module in the runtime. The main goal of this pr was to improve type safety and make the api more intuitive.
Changes:
String.StringRefabstract typesreftypes, which are just abstract types wrappingWasmRef, the benefit of this is that it makes some of the reference types incompatible, which helps to prevent applying the wrong function. This has only been done for types that can be concretely typed currently; however, we may want to consider applying this to the number subtypes and eventuallyADTsandRecords.runtime/dataStructureandruntime/debugPrintintoruntime/unsafe.convintodataStructures.convthroughout the stdlib and runtime, this pr eliminates theconvlibrary, making those functions easier to find when you're working with the low-level data structures already.While working on this pr the better type safety actually revealed an issue in
wasi/findPathwhere we were grabbing the wrong value.Closes: #2157
This work is based on: #2378