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
{{ message }}
Repository navigation
FlatExpression: explore canonical representation pros and cons #531
Canonical means that equivalent (up to Parameter names and Constant values) FE nodes should be in the same order in ExpressionTree and so trivially comparable via loop. See #530.
Explore does this representation actually helps in
FEC collect phase - besides the slready collected closure constants - what about nested lambdas, blocks, label and gotos, etc. being collected by CompilerContext in TryCollectInfo methods
In emit phase, e.g. to trivially emit arithmetic expressions on stack from the natural stack order in FE.
in other regards - look at tasks solved by FEC now and next tasks: full fledged interpreter and C# parser (and potentially for other langs)
Explore and implement IsInOrder and PutInOrder methods.
Ordering should be done inplace modifying this ExpressionTree.
It may be implemented by doing a min amount of nodes swap.
While doing InOrder we may also:
drop/consider empty unrichable nodes, the check may retutn thr numbet of such nodes
we need to compact gaps created by empty nodes to ensure the indexes are the same
Activity
dadhi commentedon May 6, 2026
We do not need normalization. Now that we have a link from last child to parent we can likely go in a single loop.