| Commit message (Collapse) | Author | Age | |
|---|---|---|---|
| * | expose value of constant integers in module reflection (#6367) | Alexandre Bléron | 2025-02-26 |
| | | | | | | | | | | | | | | | | | | | * Expose value of constant integers in module reflection This commit adds `VariableReflection::getDefaultValueInt` to get the value of a variable if it is a compile-time constant integer. TODO: currently it works only if the initializer expression is an integer literal, references to other constant values are not handled. * Update VarDecl folded constant value during DeclBodyVisitor Constant folding for integer values is already done internally by _validateCircularVarDefinition, this just reuses the result. * Address review comments & formatting * Formatting --------- Co-authored-by: Yong He <yonghe@outlook.com> | ||
| * | Add an example for using the reflection API (#5839) | Theresa Foley | 2024-12-12 |
| * Add an example for using the reflection API The example program is meant to accompany a document that goes into more detail about the mental model behind the reflection API and the way this program drives it. Ideally this program can land before the document goes live, and then the document can be published with a link to the example. After that, the example could be updated to include links into the live document. Along with adding the example program, this change also adds some convenience functions to the reflection API to avoid cases where the program would otherwise need to cast between `slang::ParameterCategory` and `SlangParameterCategory`. * format code * fixup: error noticed by clang --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com> | |||
