This class performs a set of checks similar to what the bytecode verifier does.
This class performs a set of checks similar to what the bytecode verifier does. For each basic block, it checks that:
- for primitive operations: the type and numer of operands match the type of the operation
- for method calls: the method exists in the type of the receiver and the number and type of arguments match the declared type of the method.
- for object creation: the constructor can be called.
- for load/stores: the field/local/param exists and the type of the value matches that of the target.
For a control flow graph it checks that type stacks at entry to each basic block 'agree':
1.0, 06/09/2005
Iulian says: I think there's some outdated logic in the checker. The issue with exception handlers being special for least upper bounds pointed out some refactoring in the lattice class. Maybe a worthwhile refactoring would be to make the checker use the DataFlowAnalysis class, and use the lattice trait. In the implementation of LUB, there's a flag telling if one of the successors is 'exceptional'. The inliner is using this mechanism.
,Better checks for MONITOR_ENTER/EXIT
Better checks for local var initializations