MCPcopy Create free account
hub / github.com/AliveToolkit/alive2 / AggregateType

Method AggregateType

ir/type.cpp:760–779  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

758
759
760AggregateType::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
781AggregateType::AggregateType(string &&name, vector<Type*> &&vchildren,
782 vector<bool> &&vis_padding)

Callers

nothing calls this directly

Calls 3

to_stringFunction · 0.85
getMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected