Conversation
Agent-Logs-Url: https://github.com/dadhi/FastExpressionCompiler/sessions/628c76ba-460c-4a8d-b880-585db5217f72 Co-authored-by: dadhi <39516+dadhi@users.noreply.github.com>
Agent-Logs-Url: https://github.com/dadhi/FastExpressionCompiler/sessions/628c76ba-460c-4a8d-b880-585db5217f72 Co-authored-by: dadhi <39516+dadhi@users.noreply.github.com>
dadhi
left a comment
There was a problem hiding this comment.
CsCheck failed:
untu-latest)
failed 23 minutes ago in 1m 11s
1s
1s
10s
55s
2s
Run dotnet run --no-build -c:Release -f:net10.0 --project test/FastExpressionCompiler.TestsRunner/FastExpressionCompiler.TestsRunner.csproj
//## .NET Latest (Core): Running UnitTests and IssueTests in parallel...
ERROR: Tests FastExpressionCompiler.LightExpression.UnitTests.LightExpressionTests failed with
CsCheck.CsCheckException: Set seed: "eaAXCWRSvcE1" or -e CsCheck_Seed=eaAXCWRSvcE1 to reproduce (5 shrinks, 52 skipped, 100 total).
164763702: Multiply { Left = Multiply { Left = LetMany { Values = FastExpressionCompiler.LightExpression.UnitTests.LightExpressionTests+IntSpec[], Body = ParameterRef { Index = 2 } }, Right = ParameterRef { Index = 0 } }, Right = Constant { Value = -1 } }
Node at index 14 is not an expression node.
at FastExpressionCompiler.FlatExpression.ExprTree.Reader.ReadExpression(Int32 index) in //src/FastExpressionCompiler.LightExpression/FlatExpression.cs:line 1362
at FastExpressionCompiler.FlatExpression.ExprTree.Reader.ReadExpression(Int32 index) in //src/FastExpressionCompiler.LightExpression/FlatExpression.cs:line 1399
Agent-Logs-Url: https://github.com/dadhi/FastExpressionCompiler/sessions/90049206-1092-4941-aabf-e1947566e4bc Co-authored-by: dadhi <39516+dadhi@users.noreply.github.com>
Fixed in 2517e7c. The regression was in |
dadhi
left a comment
There was a problem hiding this comment.
Can we replace Param usage node eith node reference and simplify?
Not safely in this PR as-is. |
dadhi
left a comment
There was a problem hiding this comment.
- Will it simplify the bit manipulation and the code if we split data into
short NodeTypeAndKind; short NextId, uint _data? - For the remaining bit manipulations please add illustrative technical comment about what it does, usually bit its extracts or sets.
Agent-Logs-Url: https://github.com/dadhi/FastExpressionCompiler/sessions/533a794c-41df-446a-ace4-765d0a677da7 Co-authored-by: dadhi <39516+dadhi@users.noreply.github.com>
Good point. I kept the current packed |
dadhi
left a comment
There was a problem hiding this comment.
Please split // [ 8 bits NodeType ][ 8 bits Tag(flags+kind) ][ 16 bits NextIdx ]
in the separate fields if those are the stable and not reused to store something crossing the boundaries of byte + byte + word.
Simplify the bit manipulation and update the usage and test accordignly.
Agent-Logs-Url: https://github.com/dadhi/FastExpressionCompiler/sessions/9f8351be-178c-4a11-ad10-ad59e1688680 Co-authored-by: dadhi <39516+dadhi@users.noreply.github.com>
Done in 02fdc70. I split the stable packed header into explicit fields ( |
dadhi
left a comment
There was a problem hiding this comment.
Ok. I am not sure now how do we store the struct value constant up to 4 bytes in place, and why are we still using ClosureConstantMarker object and not some kinf of flag?
Agent-Logs-Url: https://github.com/dadhi/FastExpressionCompiler/sessions/e1226c7b-fa3d-4d90-8da1-40fc77f4ae55 Co-authored-by: dadhi <39516+dadhi@users.noreply.github.com>
Updated in 105f73e. Struct/primitives that pass |
|
Bs |
FlatExpression needed a representation update for upcoming FE work: parameter identity/scope metadata should be encoded directly in nodes, and child-chain links should support upward navigation without complicating traversal. This PR reshapes node metadata and linking semantics accordingly while preserving constant inlining/closure behavior.
Parameter model: declaration vs usage
ExprNodeKind.ParameterDeclarationandExprNodeKind.ParameterUsage.ExprTree.Parameter(...)now creates declaration nodes.ChildIdx -> declarationIndex, while keepingType/Name/flags for cheap checks.ChildIdx = owner scope index (lambda/block)ChildCount = parameter/variable position in ownerChild-chain/parent linkage model
NextIdx -> parent+ parent-link bit).General reference-node optimization
ExprNodeKind.NodeReferencefor reusable child nodes.ChildIdx -> original).Add(x, x)) without eager cloning.Builder/reader integration
NodeReferenceindirection and maps parameter identity by declaration index.Focused coverage updates