From 11d5f472242a6318a2b6561504edf5950b3cbe3a Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Mon, 26 Jan 2026 14:25:53 -0800 Subject: [PATCH 1/2] simpl --- src/passes/ReorderLocals.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/passes/ReorderLocals.cpp b/src/passes/ReorderLocals.cpp index a569a4ce8c4..1bb5bc9cfce 100644 --- a/src/passes/ReorderLocals.cpp +++ b/src/passes/ReorderLocals.cpp @@ -119,8 +119,7 @@ struct ReorderLocals : public WalkerPass> { Function* func; std::vector& oldToNew; - ReIndexer(Function* func, std::vector& oldToNew) - : func(func), oldToNew(oldToNew) {} + ReIndexer(std::vector& oldToNew) : oldToNew(oldToNew) {} void visitLocalGet(LocalGet* curr) { curr->index = oldToNew[curr->index]; @@ -130,7 +129,7 @@ struct ReorderLocals : public WalkerPass> { curr->index = oldToNew[curr->index]; } }; - ReIndexer reIndexer(curr, oldToNew); + ReIndexer reIndexer(oldToNew); reIndexer.walk(curr->body); // apply to the names auto oldLocalNames = curr->localNames; From cf543c320dd1c53e9615ab5041a370ca81497d49 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Tue, 27 Jan 2026 11:42:30 -0800 Subject: [PATCH 2/2] clean --- src/passes/ReorderLocals.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/passes/ReorderLocals.cpp b/src/passes/ReorderLocals.cpp index 1bb5bc9cfce..900c4f9109e 100644 --- a/src/passes/ReorderLocals.cpp +++ b/src/passes/ReorderLocals.cpp @@ -116,7 +116,6 @@ struct ReorderLocals : public WalkerPass> { } // apply the renaming to AST nodes struct ReIndexer : public PostWalker { - Function* func; std::vector& oldToNew; ReIndexer(std::vector& oldToNew) : oldToNew(oldToNew) {}