The use of ConstantExpr to represent an RK_expr_result-kind ReflectionValue was a misstep, born from a misunderstanding of the purpose of ConstantExpr during early days of this fork. The difficulty with representing RK_expr_result as an APValue is that a naive implementation will introduce a circular dependency between the data layouts of ReflectionValue and APValue. It ought to be possible to work around this, though. This ought to both create opportunities to reduce the number of unnecessary AST nodes created, and to unwind the weird and brittle hack of supporting ConstantExprs that lack an underlying SubExpr.
The use of
ConstantExpr
to represent anRK_expr_result
-kindReflectionValue
was a misstep, born from a misunderstanding of the purpose ofConstantExpr
during early days of this fork. The difficulty with representingRK_expr_result
as anAPValue
is that a naive implementation will introduce a circular dependency between the data layouts ofReflectionValue
andAPValue
. It ought to be possible to work around this, though. This ought to both create opportunities to reduce the number of unnecessary AST nodes created, and to unwind the weird and brittle hack of supportingConstantExpr
s that lack an underlyingSubExpr
.