HomePhorge

Fix TokenizedStorage to store values with alignment

Referenced Files
None
Subscribers
None

Description

Fix TokenizedStorage to store values with alignment

TokenizedStorage stored values packed directly one after the other,
which broke alignment requirements. This is not well tolerated by some
architectures. This patch fixes TokenizedStorage to respect alignment
requirement of stored values.

  • TypeForNumber got a new field Align for the alignment requirement
  • Alignment requirement of the first type in a Token can be queried by alignmentOfHeadOfToken()
  • TokenizedStorage calculates offsets() considering not only the size but also the alignment requirement of the type of each stored value; Arena is allocated accordingly.

Details

Provenance
Dávid JuhászAuthored on Jun 9 2020, 7:17 PM
juhaszPushed on Jun 11 2020, 4:53 PM
Parents
R20:91ceb60c6288: added experimental data
Branches
Unknown
Tags
Unknown

Event Timeline

Dávid Juhász <juhasz.david.scholar@gmail.com> committed R20:d69226454c5a: Fix TokenizedStorage to store values with alignment (authored by Dávid Juhász <juhasz.david.scholar@gmail.com>).Jun 11 2020, 4:53 PM