[lworld] Handling of missing ValueTypes attributes (original) (raw)
Ioi Lam ioi.lam at oracle.com
Mon Jul 9 22:44:24 UTC 2018
- Previous message (by thread): valhalla/valhalla repo
- Next message (by thread): [lworld] Handling of missing ValueTypes attributes
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
In lworld, how are we suppose to handle cases where the ValueTypes attribute should have been there for a classfile, but is missing?
E.g.,
class MyHack { Point getPoint() { if (onceInAWhile) { return Point.makePoint(1, 2); } else { return null; } } }
Normally, Point will be included in MyHack's ValueTypes attribute, and the Point class will be aggressively loaded. So we'd know for sure that getPoint returns a ValueType.
However, someone can write this class by hand and omit the ValueTypes attribute. In that case, I think the program's output should be the same as if the ValueTypes attribute had been present, although performance may differ (slower, more heap allocations, etc).
Is this understanding correct?
Thanks
- Ioi
- Previous message (by thread): valhalla/valhalla repo
- Next message (by thread): [lworld] Handling of missing ValueTypes attributes
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]