Skip to content

Convert out-of-line metadata into inline metadata storage - #76

Open
mingxwa wants to merge 1 commit into
ngcpp:feature/v5from
mingxwa:user/mingxwa/meta-storage-conversion
Open

Convert out-of-line metadata into inline metadata storage#76
mingxwa wants to merge 1 commit into
ngcpp:feature/v5from
mingxwa:user/mingxwa/meta-storage-conversion

Conversation

@mingxwa

@mingxwa mingxwa commented Sep 7, 2026

Copy link
Copy Markdown
Member

Changes

  • Added a converting assignment to inplace_meta_storage from static_meta_storage, so metadata held out of line can be carried into a proxy whose own metadata is held inline.
  • Moved static_meta_storage ahead of inplace_meta_storage, which is what lets the new assignment name it.
  • Added a substitution test (will cover this path after [super! 5/6] Add super facades #74).

Resolves #75

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.
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.

1 participant