Skip to content

Commit 5010254

Browse files
committed
programs-react: propagate arg names from callee JUMPDEST
The invoke spec change moved argument pointers from the caller JUMP to the callee entry JUMPDEST. The call stack builder was updating argumentPointers from the duplicate callee step but not argumentNames, causing names to show as _0 instead of the actual parameter name.
1 parent 9af7a07 commit 5010254

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/programs-react/src/utils/mockTrace.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,9 +315,11 @@ export function buildCallStack(
315315
if (isDuplicate) {
316316
// Use the callee entry step for resolution —
317317
// the argument pointers reference stack slots
318-
// that are valid at the JUMPDEST, not the JUMP
318+
// that are valid at the JUMPDEST, not the JUMP.
319+
// Argument names also live on the callee entry.
319320
const argResult = extractArgInfo(instruction);
320321
top.stepIndex = i;
322+
top.argumentNames = argResult?.names ?? top.argumentNames;
321323
top.argumentPointers = argResult?.pointers;
322324
} else {
323325
const argResult = extractArgInfo(instruction);

0 commit comments

Comments
 (0)