Because java optimises accesses to final fields, modifying them at runtime will result in unexpected behaviour. (and fiber shouldn't be modifying those in the first place)
This means we are forced to disallow use of final in POJOs.
However, this also means developers can directly set the values in a POJO, making it desynchronised with the IR it was merged into.
Implement a system to prevent this.
- Have developers merge the POJO back into the IR after mutating.
- Have the IR track POJOs and a
ir.markDirty() method that checks for modifications
Because java optimises accesses to
finalfields, modifying them at runtime will result in unexpected behaviour. (and fiber shouldn't be modifying those in the first place)This means we are forced to disallow use of
finalin POJOs.However, this also means developers can directly set the values in a POJO, making it desynchronised with the IR it was merged into.
Implement a system to prevent this.
ir.markDirty()method that checks for modifications