Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to use multiple sequence points for the same opcode #170

Closed
fyrchik opened this issue May 16, 2022 · 3 comments
Closed

Allow to use multiple sequence points for the same opcode #170

fyrchik opened this issue May 16, 2022 · 3 comments
Labels
wontfix This will not be worked on

Comments

@fyrchik
Copy link

fyrchik commented May 16, 2022

Usually it is expected that one opcode will correspond to some point in a source file. However, neo-go compiler is able to inline functions (mostly syscalls), thus leading to a situation where a single opcode can correspond to 2 different function "calls".

We tried emitting NOP for such case nspcc-dev/neo-go#2434 . I believe the best solution would be to have support for this in the debugger itself. I vaguely recall seing some NOPs in the C# compiler, but not sure if it was for the same reason.

@devhawk
Copy link
Contributor

devhawk commented Aug 15, 2022

If there were multiple sequence points for a single opcode, how would the debugger choose which to display?

I'm not familiar with the neo go compiler internals. In the NCCS Neo C# compiler, optimization and inlining are controlled via the --no-optimize and --no-inline flags. specifying those flags is similar to producing a debug build, which has the best debug experience. Not specifying those flags is similar to producing a release build, which has better performance but a degraded debug experience.

@devhawk devhawk added the question Further information is requested label Aug 15, 2022
@roman-khimov
Copy link

We're trying to avoid adding more and more flags to the compiler as much as we can, but it looks like we can't avoid doing this here.

@devhawk
Copy link
Contributor

devhawk commented Aug 17, 2022

We're trying to avoid adding more and more flags to the compiler as much as we can, but it looks like we can't avoid doing this here.

Controlling optimization level via CLI flags is pretty standard practice for compilers in my experience

@devhawk devhawk added wontfix This will not be worked on and removed question Further information is requested labels Aug 17, 2022
@devhawk devhawk closed this as completed Aug 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants