Data Mapping Algorithm for PL/I Compiler
Original Publication Date: 1982-Dec-01
Included in the Prior Art Database: 2005-Feb-10
The layout of data structure in ANSI standard PL/I is quite complex in order to align data to improve performance and at the same time minimize the storage required. The present algorithm shows how in-line code can be generated to enable a PL/I compiler to use efficient interpretive techniques to map data structures. Data structures are mapped for two main purposes: (1) to allocate them, in which case the overall length needs to be known together with the alignment requirement, and (2) to reference a part, or possibly all, of, them in which case the offset from the beginning of the structure of the part required needs to be known. The algorithm described in this article achieves both.