Exec-obj-declon
Execute an object declaration.
- Signature
(exec-obj-declon declon compst fenv limit) → new-compst
- Arguments
- declon — Guard (obj-declonp declon).
- compst — Guard (compustatep compst).
- fenv — Guard (fun-envp fenv).
- limit — Guard (natp limit).
- Returns
- new-compst — Type (compustate-resultp new-compst).
For now this is only for object declarations in blocks,
consistently with the guard of this function.
We ensure that the declaration
has no extern storage class specifier
(we do not support that in blocks),
then we execute the initializer (which we require here),
then we add the variable to the top scope of the top frame.
The initializer value must have the same type as the variable,
which automatically excludes the case of the variable being void,
since type-of-value never returns void
(under its guard).
For now we disallow array objects;
these will be supported later.