Repository navigation
SlotMap's contains, is_empty and len family are declared in the library (part of #3483) - #3612
Merged
Merged
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.
Part of #3483; the issue stays open.
Six of
SlotMap's methods are library declarations inlib/std/collections.with(impl[T] SlotMap[T]):contains,len,len32,len64,ulen32,is_empty. Each body is one call of the runtime function the code generator used to call by hand.Deleted with them: the
SLOTMAP_CONTAINS/SLOTMAP_LEN*intrinsic members, their arms in the LLVM code generator, their mappings in the C backend, the list entries inMirCoreandCodegenTraits, theBuiltinSigsrow, and the name-based return types inSemaCheck.One thing the move showed:
is_emptyon aSlotMaphad no declaration of its own and was derived from the built-inlen. Withlendeclared andis_emptynot, the call reached MIR as a generic call with no contract.is_emptyis declared too.Still built in for
SlotMap:new,insert,get,slot,remove,replace,get_disjoint, andSlotMapSlot'sget/set. They move ownership in and out of the storage, which is the next step.Evidence at 7687122: both compilers check the source; release build;
:unit-return-review,:ceremony-census,:self-audit,:native-compile-error-tests,:behavior-testsgreen (14 tests useSlotMap, unchanged); battery green;:release-checkssurvey: all targets green.