> Right now some of the call sites assets that ResolvedFieldEntry corresponds > to the correct fieldDescriptor, and that these fields are in fact flattened. > It was suggested that this would be more robust if this was folded into the > construction of the FlatFieldPayload construction. > > I moved these asserts up the construction hierarchy so that we also verify > the unsafe flat field access. Because these can access nested flat values, > some extra utility was added to find nested flat fields from an offset. > > After this change the `FlatFieldPayload` check that the `fieldDescriptor*` > constructor and the `ResolvedFieldEntry*` is a valid non-nested flat field in > the containing object. > > And the `FlatValuePayload::construct_from_parts` verifies that there is an > field at that offset of of the correct InlineKlass. (Either a direct field or > array element, or a nested flat field inside an flat field or array element) > > _Also the unsafe access logging was missing a ResourceMark, and changed it so > it does not assert on bad offset, as I moved the assertions into the > FlatValuePayload construction._ > > Testing: > * Running tier 1 - 4 with `--enable-preview` > * Running all Valhalla tests
Axel Boldt-Christmas has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision: - Rename `from_offset` to `containing_offset` - Merge remote-tracking branch 'upstream_valhalla/lworld' into JDK-8378519 - 8378519: [lworld] Fold fieldDescriptor / ResolvedFieldEntry checks into the FlatFieldPayload constructor ------------- Changes: - all: https://git.openjdk.org/valhalla/pull/2186/files - new: https://git.openjdk.org/valhalla/pull/2186/files/1f90c232..a313cba8 Webrevs: - full: https://webrevs.openjdk.org/?repo=valhalla&pr=2186&range=01 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=2186&range=00-01 Stats: 236 lines in 17 files changed: 145 ins; 41 del; 50 mod Patch: https://git.openjdk.org/valhalla/pull/2186.diff Fetch: git fetch https://git.openjdk.org/valhalla.git pull/2186/head:pull/2186 PR: https://git.openjdk.org/valhalla/pull/2186
