You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Before this, we had to use PRECOMP_NO_CHECK() for any entries that
involved field offsets that came after NOT_IN_PRECOMPILED() fields,
because the offsets would differ between JIT and AOT. That removed
the check in dart.cc that the offsets match, but that just meant
that precompiled code that used these offsets were wrong.
One possible workaround is to just lift any field definitions whose
offset might be used in precompiled code before any NOT_IN_PRECOMPILED()
defined fields, but this means otherwise unnecessary changes in the
Layout classes.
Instead, just fix the runtime offset generation/retrieval by splitting
the list of offsets into two parts: offsets common to all modes and
offsets only valid in JIT mode. While this complicates the code that
generates and imports these offsets, it ensures that our code generation
actually uses the right offsets for the target mode.
In addition, by doing this split we can add checks for uses of JIT-only
offsets when in precompiled mode. Adding these checks found some uses of
JIT-only field offsets in code compiled in precompiled mode. (These
uses may have been benign if the stubs that included the uses were never
called in the precompiled runtime, but now there's explicitly a check
for precompiled mode around these uses.)
Also remove the unused ARRAY_STRUCTFIELD type from offset lists.
Change-Id: I083ab5997d3a5245b5f1487b614b62faee47d405
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155780
Commit-Queue: Tess Strickland <[email protected]>
Reviewed-by: Daco Harkes <[email protected]>
Reviewed-by: Martin Kustermann <[email protected]>
0 commit comments