Vl-expr-size-assigncontext
Size and resolve assignment patterns in an expression, given the type of its LHS.
- Signature
(vl-expr-size-assigncontext lhs-type x in-pattern ss ctx warnings)
→
(mv successp new-x new-warnings)
- Arguments
- lhs-type — The type that we want x to assume.
Guard (vl-datatype-p lhs-type).
- x — The expression to size/type.
Guard (vl-expr-p x).
- in-pattern — are we inside an assignment pattern?.
- ss — Identifier bindings.
Guard (vl-scopestack-p ss).
- ctx — Context for sizing error messages.
Guard (vl-context-p ctx).
- warnings — Ordinary warnings accumulator.
Guard (vl-warninglist-p warnings).
- Returns
- successp — Type (booleanp successp).
- new-x — Type (vl-expr-p new-x).
- new-warnings — Type (vl-warninglist-p new-warnings).
If successful, returns a sized (welltyped) expression. If the
LHS type is an unpacked datatype, then the size of the expression is the
datatype size and the type is unsigned.
Subtopics
- Vl-arrayslice-expr-size-assigncontext
- Check and size a range-select expression in an unpacked type context.
- Vl-index-expr-size-assigncontext
- Check and size an index expression in an unpacked type context.
- Vl-atom-size-assigncontext
- Check and size an atom in an unpacked type context.