assemblyscript icon indicating copy to clipboard operation
assemblyscript copied to clipboard

fix: addDebugInfo before convertExpression

Open XMadrid opened this issue 1 year ago • 1 comments

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

XMadrid avatar Apr 03 '24 09:04 XMadrid

I think we can emit debug location for both outside expr and inside expr.

XMadrid avatar Apr 07 '24 05:04 XMadrid

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!

github-actions[bot] avatar Jun 07 '24 23:06 github-actions[bot]

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.

github-actions[bot] avatar Jun 14 '24 23:06 github-actions[bot]