You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hopefully expreval will not need to be a full fledged VM but there are still operations we probably need to support for basic const evaluation.
Implemented as magics:
arithmetic, comparison
numeric type conversions, casts
sizeof etc
set ops
Implemented as procs in system but will probably be specialized in expreval:
string ops, maybe just basic ones like &, len, comparisons, as strings are represented by string literal tokens in expreval
seq ops and openarrays are probably not used too commonly
maybe set ops can be implemented as procs and overriden in expreval as well
These could be implemented via pragmas like {.vmop: "string.len".} or by hard coding the symbol names in the compiler which might get annoying. But the pragmas would probably build a table from symbols to their respective operations anyway, just at compiler runtime.
Pure function calls in consts/array length exprs are also common but most likely not necessary for the standard library. Templates should work though.
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Hopefully expreval will not need to be a full fledged VM but there are still operations we probably need to support for basic const evaluation.
Implemented as magics:
sizeof
etcImplemented as procs in system but will probably be specialized in expreval:
&
,len
, comparisons, as strings are represented by string literal tokens in exprevalThese could be implemented via pragmas like
{.vmop: "string.len".}
or by hard coding the symbol names in the compiler which might get annoying. But the pragmas would probably build a table from symbols to their respective operations anyway, just at compiler runtime.Pure function calls in consts/array length exprs are also common but most likely not necessary for the standard library. Templates should work though.
The text was updated successfully, but these errors were encountered: