pet_array: explicitly keep track of whether array is innermost
commit4d67fa6f1761c985c19f187f427b5e6da9350cac
authorSven Verdoolaege <skimo@kotnet.org>
Fri, 3 Mar 2017 15:50:38 +0000 (3 16:50 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Wed, 8 Mar 2017 16:49:45 +0000 (8 17:49 +0100)
tree39798297daa4f9f599b2547b0fa51c05d69d9ebf
parente55140987755fd5ccd07e89b0987301e4a38aa96
pet_array: explicitly keep track of whether array is innermost

pet_scop_compute_*_to_inner uses the element_is_record attribute
of a pet_array to determine whether it is innermost.
This is correct in the current code base because any pet_array
that has a record element has its subfields represented as pet_array
objects as well.
In a future commit, only subfields that are relevant for the model
will be added to the list of pet_array objects.
The pet_array therefore needs to explicitly keep track of
whether the array is innermost in the model.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
25 files changed:
emit.c
include/pet.h
parse.c
scan.cc
scop.c
tests/autodetect/decl3.scop
tests/call_struct.scop
tests/inline7.scop
tests/inline8.scop
tests/inline9.scop
tests/struct1.scop
tests/struct10.scop
tests/struct11.scop
tests/struct12.scop
tests/struct13.scop
tests/struct14.scop
tests/struct2.scop
tests/struct3.scop
tests/struct4.scop
tests/struct5.scop
tests/struct6.scop
tests/struct7.scop
tests/struct8.scop
tests/struct9.scop
tests/summary2.scop