Skip to content

Commit

Permalink
Bug fix in reorderStmts
Browse files Browse the repository at this point in the history
Summary:
Tracking of bound variables was wrong. This hopefully shouldn't change
any existing test cases or perf, but it was exposed by other changes
I'm making in subsequent diffs.

Reviewed By: malanka

Differential Revision: D64036030

fbshipit-source-id: a39974e77922cbded5924d77e42a6963784cd2e4
  • Loading branch information
Simon Marlow authored and facebook-github-bot committed Oct 10, 2024
1 parent 1653258 commit e5e9605
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion glean/db/Glean/Query/Reorder.hs
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ reorderGroup g = do
(stmts'',bound'') <- go bound' rest
return (FlatDisjunction [g'] : stmts'', bound'')
go bound (stmt : rest) = do
(stmts', bound') <- go (IntSet.union (vars stmt) bound) rest
(stmts', bound') <- go (IntSet.union (boundVars stmt) bound) rest
return (stmt : stmts', bound')

squash [] = []
Expand Down

0 comments on commit e5e9605

Please sign in to comment.