assemblyscript
assemblyscript copied to clipboard
fix: addDebugInfo before convertExpression
Fixes #2833 .
add debugLocation before convertExpression. For code snippet:
function add(a: i32, b: i32): i32 {
return a + b;
}
add(1, 2);
Before this PR, we emit:
addDebugLocation(drop, line = 5, column = 2); // In there, we should emit `call` instruction
addDebugLocation(drop, line = 5, column = 2);
With this PR, we emit:
addDebugLocation(call, line = 5, column = 2);
addDebugLocation(drop, line = 5, column = 2);
- [x] I've read the contributing guidelines
- [x] I've added my name and email to the NOTICE file
I think we can emit debug location for both outside expr and inside expr.
This PR has been automatically marked as stale because it has not had recent activity. It will be closed in one week if no further activity occurs. Thank you for your contributions!
This PR has been automatically closed due to lack of recent activity, but feel free to reopen it as long as you merge in the main branch afterwards.