PiCO_QL
PiCO_QL copied to clipboard
Derived virtual table columns
Sometimes values that are computed in each iteration of a virtual table traversal are important. For instance, in Valgrind module each VAbits record contains validity and accessibility bits for 4 bytes. We want to extract the bits for each byte without recomputing vabits. A nice solution would be to have a derived struct for each virtual table and a DSL keyword to denote columns as derived. These columns, of scalar types for start, would make up the derived structure.
The dependencies for the derived columns can be computed in *VT_advance, now a method not a macro. Derived columns for virtual tables representing objects can be accommodated through VT variables defined in *VT_decl (make sure that this is available for objects) or through global variables.