| 758 | |
| 759 | |
| 760 | AggregateType::AggregateType(string &&name, bool symbolic) |
| 761 | : Type(string(name)) { |
| 762 | if (!symbolic) |
| 763 | return; |
| 764 | |
| 765 | // create symbolic type with a finite number of children |
| 766 | elements = 4; |
| 767 | sym.resize(elements); |
| 768 | children.resize(elements); |
| 769 | is_padding.resize(elements); |
| 770 | |
| 771 | // FIXME: limitation below is for vectors; what about structs and arrays? |
| 772 | for (unsigned i = 0; i < elements; ++i) { |
| 773 | sym[i] = make_unique<SymbolicType>("v#" + to_string(i) + '_' + name, |
| 774 | (1 << SymbolicType::Int) | |
| 775 | (1 << SymbolicType::Float) | |
| 776 | (1 << SymbolicType::Ptr)); |
| 777 | children[i] = sym[i].get(); |
| 778 | } |
| 779 | } |
| 780 | |
| 781 | AggregateType::AggregateType(string &&name, vector<Type*> &&vchildren, |
| 782 | vector<bool> &&vis_padding) |