A ValueBlock represents a block of data. It is intended
mainly for variable initializations.
abstract ValueBlock : ScopedObject
{
virtual DataType * reference type;
};
concrete ExpressionValueBlock : ValueBlock
{
Expression * owner expression in source_ops;
};
concrete MultiValueBlock : ValueBlock
{
indexed_list<IInteger,ValueBlock * owner> sub_block;
DataType * reference type;
};
concrete RepeatValueBlock : ValueBlock
{
int num_repetitions;
ValueBlock * owner sub_block;
DataType * reference type;
};
concrete UndefinedValueBlock : ValueBlock
{
DataType * reference type;
};
| type | Type of the valueblock. |
| expression | The expression used for initialization. The result_type of this expression is used as the type of ExpressionValueBlock |
| sub_block | An indexed list. The index is the bit_offset from the beginning of the ValueBlock. The value of areas between the sub-blocks, if any, is undefined. It is illegal for the sub-blocks to overlap. |
| num_repetitions | Number of times the ValueBlock is repeated |
| sub_block | The ValueBlock to be repeated. |