Feature #7122
convert default getter/setter as plain Java methods
80%
Related issues
History
#1 Updated by Constantin Asofiei about 1 year ago
I don't see any reason to have the BlockManager.function/procedure
wrappers for default scalar getter/setter Java methods (I'm not sure yet if extent, too, and objects/memptr will need special attention). I think it should be safe to just emit the assignment of the property like prop.assign(var);
or return of a copy of the property, like return prop.duplicate();
.
#2 Updated by Constantin Asofiei about 1 year ago
- Assignee set to Constantin Asofiei
- Status changed from New to WIP
#3 Updated by Constantin Asofiei about 1 year ago
- % Done changed from 0 to 80
For default object property getter and setters, emit a plain Java method with a return prop.duplicate();
for a getter, and a prop.assign(var);
for the setter. This is currently done only for scalar properties, with types other than object or memptr.
These changes are in 7026a/14816.
#4 Updated by Constantin Asofiei about 1 year ago
- Related to Bug #7176: cleanup p2j.oo code considering the #7045 and #7122 added
#5 Updated by Constantin Asofiei about 2 months ago
In 8363d, a property getter with only a 'return <literal>.' body will convert to a Java return which will wrap the literal to a BDT, like return new character("literal");
. This avoids the overhead of the BlockManager APIs.