-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
[stdlib] Add optional small buffer optimization to List
, take 2
#2825
Open
gabrieldemarmiesse
wants to merge
103
commits into
modularml:nightly
Choose a base branch
from
gabrieldemarmiesse:sbo_take_2
base: nightly
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+319
−152
Open
Changes from 4 commits
Commits
Show all changes
103 commits
Select commit
Hold shift + click to select a range
e83c663
Add sbo to List
gabrieldemarmiesse c9b1d74
Merge branch 'nightly' into sbo_take_2
gabrieldemarmiesse d3db455
Dummy modification
gabrieldemarmiesse 935133c
Revert the dummy modification
gabrieldemarmiesse a759dfc
Add the missing Parameter section to the Span constructor
gabrieldemarmiesse ad2a5d8
Squash all
gabrieldemarmiesse 9000440
[stdlib] Add a `unsafe_assume_initialized` constructor to `InlineArray`
gabrieldemarmiesse 94aa4c3
Reword docstring
gabrieldemarmiesse 419eae2
Merge branch 'nightly' into add_new_methods
gabrieldemarmiesse 65f3701
Fix incorrect docstring and test
gabrieldemarmiesse 4ec64d9
Remove func call
gabrieldemarmiesse 2103632
[stdlib] Add static method `InlineArray.unsafe_uninitialized()`
gabrieldemarmiesse a1bb080
Merge branch 'nightly' into add_unsafe_uninitialized_array_constructor
gabrieldemarmiesse bba4183
Merge branch 'nightly' into add_new_methods
gabrieldemarmiesse f92d948
Merge branch 'nightly' into sbo_take_2
gabrieldemarmiesse 9af201a
Merge branch 'nightly' into fix_destructor_inlinearray
gabrieldemarmiesse ad0bc0e
[stdlib] Add trait `CollectionElementNew` to a few structs
gabrieldemarmiesse fe96ef8
[stdlib] Add `CollectionElementNew` trait to `Dict` and `DictEntry`
gabrieldemarmiesse a1a4785
[stdlib] Add the trait `CollectionElementNew` to `List`
gabrieldemarmiesse 3b98599
[stdlib] Add `CollectionElementNew` to new traits
gabrieldemarmiesse 0d2341c
Add unit test for legacy pointer
gabrieldemarmiesse c7a6801
Add test for arc
gabrieldemarmiesse 1a1813a
Add the test for pointer copy
gabrieldemarmiesse 87872f0
[stdlib] Add `CollectionElementNew` to a few structs, part 3
gabrieldemarmiesse af298fd
add the traits explicitly
gabrieldemarmiesse 95e5b79
[stdlib] Add CollectionElementNew to a few structs, part 4
gabrieldemarmiesse 4bcd776
Merge branch 'moar_copy_constructors' into make_dict_list_set_work_wi…
gabrieldemarmiesse 54ec253
Merge branch 'moar_collectionelementnew' into make_dict_list_set_work…
gabrieldemarmiesse 06d075e
Merge branch 'more_explicit_copy_traits' into make_dict_list_set_work…
gabrieldemarmiesse a517dd4
Merge branch 'add_copy_constructors' into make_dict_list_set_work_wit…
gabrieldemarmiesse 22ead11
Merge branch 'more_copy_constructors' into make_dict_list_set_work_wi…
gabrieldemarmiesse 4991574
Merge branch 'give_collectionelementnew_trait_to_list' into make_dict…
gabrieldemarmiesse f8457a3
I only need to fix sort next
gabrieldemarmiesse 336b7e7
Fix most of the sort errors
gabrieldemarmiesse adc370b
Merge branch 'nightly' into make_dict_list_set_work_with_collectionel…
gabrieldemarmiesse a81fe92
Removed diff
gabrieldemarmiesse e326324
[stdlib] All done with a few bugs
gabrieldemarmiesse 3c16445
Merge branch 'explicit_copy_take_2' into make_dict_list_set_work_with…
gabrieldemarmiesse 1f5edef
Reduce diff in types.mojo
gabrieldemarmiesse 8c65ce1
Merge branch 'nightly' into make_dict_list_set_work_with_collectionel…
gabrieldemarmiesse c80e260
Merge branch 'nightly' into add_new_methods
gabrieldemarmiesse 1f37b1c
Merge branch 'nightly' into make_dict_list_set_work_with_collectionel…
gabrieldemarmiesse a89778e
Merge branch 'nightly' into make_dict_list_set_work_with_collectionel…
gabrieldemarmiesse f18f72a
Merge branch 'nightly' into make_dict_list_set_work_with_collectionel…
gabrieldemarmiesse 30c3d62
Fix recursive reference to self issue
gabrieldemarmiesse 57c22d6
Revert the contrustor move
gabrieldemarmiesse 95a1f36
Better comments
gabrieldemarmiesse 954981c
Rewording
gabrieldemarmiesse 65fd9fe
Merge branch 'nightly' into remove_copyable_from_collectionelement
gabrieldemarmiesse cc38b93
[stdlib] Remove `Copyable` From `CollectionElement`
gabrieldemarmiesse 44b7910
[stdlib] Remove `CollectionElementNew` and use only `CollectionElement`
gabrieldemarmiesse d1bf7c5
Merge branch 'nightly' into fix_destructor_inlinearray
gabrieldemarmiesse e319e58
Revert change to inline array, use ptrs now
gabrieldemarmiesse b682743
Reverted most changes
gabrieldemarmiesse 8e13f6b
Merge branch 'nightly' into add_new_methods
gabrieldemarmiesse c7ebc80
Merge branch 'fix_destructor_inlinearray' into add_new_methods
gabrieldemarmiesse 53c2f51
Fix function
gabrieldemarmiesse de3407d
Merge branch 'nightly' into add_unsafe_uninitialized_array_constructor
gabrieldemarmiesse fe8584d
Merge branch 'add_new_methods' into add_unsafe_uninitialized_array_co…
gabrieldemarmiesse d0b92b8
Simplify the API
gabrieldemarmiesse e139d6b
Simplify the api
gabrieldemarmiesse 023f877
Simplify some stuff
gabrieldemarmiesse 6e35670
Simplify again
gabrieldemarmiesse aa5a005
Simplify more
gabrieldemarmiesse f2bf4a4
Add docstring
gabrieldemarmiesse 755176b
Remove this_size and make parameters infer-only
gabrieldemarmiesse d4f3b62
Merge branch 'remove_collectionelementnew' into common_branch
gabrieldemarmiesse ec2a548
Merge branch 'add_unsafe_uninitialized_array_constructor' into common…
gabrieldemarmiesse 5f11c71
Fix all incompatible changes
gabrieldemarmiesse 151c3df
Merge branch 'common_branch' into sbo_take_2
gabrieldemarmiesse 3f88841
Merge branch 'nightly' into sbo_take_2
gabrieldemarmiesse b031e06
Fixed `List.__moveinit__`
gabrieldemarmiesse bed39ae
Re-enabled dtor test
gabrieldemarmiesse 4891d5f
Merge branch 'nightly' into make_dict_list_set_work_with_collectionel…
gabrieldemarmiesse 5876d64
Merge branch 'make_dict_list_set_work_with_collectionelementnew' into…
gabrieldemarmiesse 6c0fea7
Merge branch 'remove_copyable_from_collectionelement' into remove_col…
gabrieldemarmiesse 704390a
Merge branch 'nightly' into fix_destructor_inlinearray
gabrieldemarmiesse 598e4ea
Fix import
gabrieldemarmiesse 92c533b
Merge branch 'fix_destructor_inlinearray' into add_new_methods
gabrieldemarmiesse f9fa2cb
Merge branch 'add_new_methods' into add_unsafe_uninitialized_array_co…
gabrieldemarmiesse a52c1a7
Merge branch 'add_unsafe_uninitialized_array_constructor' into common…
gabrieldemarmiesse e4dd0de
Merge branch 'remove_collectionelementnew' into common_branch
gabrieldemarmiesse c13eb8f
Merge branch 'common_branch' into sbo_take_2
gabrieldemarmiesse 66699ea
Removed unrelated files
gabrieldemarmiesse 172f5c0
Merge branch 'nightly' into make_dict_list_set_work_with_collectionel…
gabrieldemarmiesse f4084a5
Merge branch 'make_dict_list_set_work_with_collectionelementnew' into…
gabrieldemarmiesse 24de66c
Merge branch 'remove_copyable_from_collectionelement' into remove_col…
gabrieldemarmiesse ae0245d
Merge branch 'remove_collectionelementnew' into common_branch
gabrieldemarmiesse 1a0ac75
Merge branch 'common_branch' into sbo_take_2
gabrieldemarmiesse 5883db2
[stdlib] Use memcpy in list when moving trivial types
gabrieldemarmiesse 05b9311
III
gabrieldemarmiesse aa52df9
Merge branch 'nightly' into use_memcpy_for_trivial_types
gabrieldemarmiesse 221db24
Use export instead of a one-off definition
gabrieldemarmiesse cb75011
Merge branch 'use_memcpy_for_trivial_types' into common_branch
gabrieldemarmiesse bfcc65c
Merge branch 'common_branch' into sbo_take_2
gabrieldemarmiesse bc74730
Use memcpy even with sbo
gabrieldemarmiesse 43b92da
Added test
gabrieldemarmiesse 63eced7
Use steal_data()
gabrieldemarmiesse 23a90c2
Merge branch 'use_memcpy_for_trivial_types' into common_branch
gabrieldemarmiesse c90bde4
Merge branch 'common_branch' into sbo_take_2
gabrieldemarmiesse 52ced05
Merge branch 'nightly' into sbo_take_2
gabrieldemarmiesse 934a1f2
Remove changes in object.mojo
gabrieldemarmiesse 08c80dd
Fix compilation issue in tests
gabrieldemarmiesse 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 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to use references in those situations otherwise the compiler wasn't happy at all with the extra parameter. The behavior didn't change. Same for other methods like
__str__
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you file compiler bugs please? Your PRs are definitely hitting a few and I want to make sure they're all captured! Perhaps a comment in the code too referencing such bugs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't mind filing those bugs but can it be after the PR is merged? Making a minimal reproducible example can sometimes take a few minutes but it can also sometimes take a lot of time. I can make another PRs to add the TODOs later if that's okay with you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Of course, totally fine.