PetScan::get_array_size: add extra cache keyed on array identifier
commit70a5993886191c355aaf851cb9be7ef20fbff14e
authorSven Verdoolaege <skimo@kotnet.org>
Fri, 15 Apr 2016 09:57:23 +0000 (15 11:57 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Fri, 15 Apr 2016 11:00:38 +0000 (15 13:00 +0200)
tree425888f8fd284f5805f34b05ac6fed17b5f5283d
parent2efaf2b683f0ace4a593de7bdfb1f6b5189e1c34
PetScan::get_array_size: add extra cache keyed on array identifier

PetScan::get_array_size already maintains a cache of array sizes
keyed on the array types, but this cache is meant to be used
across different arrays with the same type and therefore cannot
distinguish between different such arrays.
Add an additional cache keyed on the array identifier.
This will allow the array size of a given array to be modified
without affecting the array sizes of other arrays.
In particular, this will allow the size expression of a given array
to be replaced by one with substituted size parameters.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
scan.cc
scan.h