[lworld] RFR: 8228634: [lworld] ciField::will_link() returns incorrect result for the withfield bytecode
Tobias Hartmann
thartmann at openjdk.java.net
Fri Dec 11 13:11:22 UTC 2020
In `GraphBuilder::withfield`, `ciField::will_link()` can return false even if the holder klass is loaded (see bug comments). In that case we should not deoptimize but patch the store instruction that writes the new field value. That is required even if the field offset is known because the field could not be accessible/available and we would need to throw an exception during patching. The load/store instructions emitted by `copy_inline_content` to initialize the fields of the new inline type buffer copy should never require patching: We know their offsets (because the holder is loaded) and we don't need to check access restrictions.
Unrelated changes:
- Array loads should not be delayed if the subsequent getfield requires patching (see changes to `GraphBuilder::load_indexed`)
- Replaced the `WithField` and `DefaultValue` IR nodes by a `Deoptimize` node
- Refactoring and removal of dead code
Thanks,
Tobias
-------------
Commit messages:
- Should save state before popping from stack
- 8228634: [lworld] ciField::will_link() returns incorrect result for the withfield bytecode
Changes: https://git.openjdk.java.net/valhalla/pull/301/files
Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=301&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8228634
Stats: 191 lines in 15 files changed: 30 ins; 97 del; 64 mod
Patch: https://git.openjdk.java.net/valhalla/pull/301.diff
Fetch: git fetch https://git.openjdk.java.net/valhalla pull/301/head:pull/301
PR: https://git.openjdk.java.net/valhalla/pull/301
More information about the valhalla-dev
mailing list