Feature #8124
rework conversion and runtime support for BLOCK-LEVEL and ROUTINE-LEVEL statements
0%
Related issues
History
#1 Updated by Greg Shah 5 months ago
Instead of emitting onBlockLevel(Condition.ERROR, Action.THROW);
or onRoutineLevel(Condition.ERROR, Action.THROW);
into the execute()
method, I think we should just emit a class-level annotation. It is really just a boolean flag anyway. This would be the case for both procedures and OO .cls
files. The result would be much cleaner (code wise). I also wonder if it might be more efficient since some additional execute()
methods will now be empty (so they can be dropped in the OO case).
This will also remove context local data. This is a class feature that cannot change at runtime, it is shared across all instances of the class, so there is no need for context local here.
I also don't know why we emit the condition and action parameters since they cannot vary and really have no meaning. But if we get rid of these calls anyway, it would be even better.
#3 Updated by Constantin Asofiei 4 months ago
Some notes about this: ROUTINE/BLOCK-LEVEL affect the 'file' and not the 'instance'. So, for OO, each top-level call needs to know the 'file where it was defined' - conversion already knows this, but all BlockManager top-level APIs from p2j.oo code need to be reviewed that they use the .class argument.