in Compiler Design
337 views
0 votes
0 votes

Generalize formula $(6.7)$ to multidimensional arrays, and indicate what values can be stored in the symbol table and used to compute offsets. Consider the following cases:

  1.  An array $A$ of two dimensions, in row-major form. The first dimension has indexes running from $l_{1}$ to $h_{l}$, and the second dimension has indexes from $l_{2}$ to $h_{2}$. The width of a single array element is $w.$
  2.  The same as $(a)$, but with the array stored in column-major form.
  3. An array $A$ of $k$ dimensions, stored in row-major form, with elements of
  4. size $w$. The $j^{th}$ dimension has indexes running from $l_{j}$ to $h_{j}$.The same as $(c)$ but with the array stored in column-major form.
in Compiler Design
337 views

Please log in or register to answer this question.

Related questions