Skip to content
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

Layout.FromMethod without boxing #5580

Merged
merged 1 commit into from
Aug 28, 2024
Merged

Layout.FromMethod without boxing #5580

merged 1 commit into from
Aug 28, 2024

Conversation

snakefoot
Copy link
Contributor

@snakefoot snakefoot commented Aug 28, 2024

Resolves #5575 and Resolves #5262

  • Layout<T> can now be constructed to use different typed-value-engines:
    • Fixed Value where Layout<T> becomes its own type-value-engine (To reduce memory allocations)
    • Dynamic Layout where Layout<T> creates a type-value-engine that can parse value from Layout-result.
    • Dynamic Method where Layout<T> creates a type-value-engine that returns value directly from Func (without boxing).
  • Updated ValueTypeLayoutInfo to not rely on creating generic Layout<T>. Probably need to re-visit the ValueType-property and DefaultValue-property for AOT-support.
    • Have tried to keep the fixed-value optimization, since no longer directly depending on Layout<T>, but instead re-uses the value-type-engine for Dynamic Layout.

@snakefoot snakefoot added this to the 5.3.4 milestone Aug 28, 2024
Copy link

sonarcloud bot commented Aug 28, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Typed Layout FromMethod without boxing ValueTypeLayoutInfo - Without using MakeGenericType for typed Layout
1 participant