Convert out-of-line metadata into inline metadata storage - #76
Open
mingxwa wants to merge 1 commit into
Open
Conversation
compact_facade_meta_traits holds metadata inline when it fits in a pointer and out of line otherwise, so two facades can differ in the storage their metadata lands in. Both storages converted only from a storage of their own kind, so a conversion from an out-of-line source to an inline destination did not exist. Give inplace_meta_storage a converting assignment from static_meta_storage that copies the converted metadata into itself, and define static_meta_storage first so that it can be named there. The reverse direction stays absent: static_meta_storage holds a pointer to the static metadata of a facade, and a metadata reached from an inline storage lives inside a proxy rather than in static storage. Remove the converting constructors of both storages and the copy members of inplace_meta_storage. No caller constructs one storage from another, and the copy members only restated what is implicitly declared, since a constructor template is never a copy constructor and an assignment template is never a copy assignment operator. Cover a substitution whose two facades land in different storages. On this branch the substitution translates the metadata through an indirect call and does not reach the new conversion, so the test passes either way. It is the case that starts exercising the conversion once a proxy carries metadata across facades directly.
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.
Changes
inplace_meta_storagefromstatic_meta_storage, so metadata held out of line can be carried into a proxy whose own metadata is held inline.static_meta_storageahead ofinplace_meta_storage, which is what lets the new assignment name it.Resolves #75