-
Notifications
You must be signed in to change notification settings - Fork 923
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
feat: add the column number feature of Error Object and its stack #143
base: master
Are you sure you want to change the base?
Conversation
Observed in generated code for static initializers. We could in theory track and correct it in js_parse_class() but doing it as a peephole optimization is both easier and more general.
@bellard can this be merged now 👏 |
No. Your patch is too complicated and does not correctly handle optimisations. It is much simpler and efficient to combine the line and the column numbers in OP_line_num with (line_num << N) | col_num). Your tests could be useful though. |
@ErosZy would you be able to update the PR 👆 |
@bellard @richarddd Sorry, I'm a bit confused because a |
I know to little of QJS bytecode but cant we use a singel opcode and track them individually? Is a column really a separate OP? |
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.0.10 to 5.0.12. - [Release notes](https://github.com/vitejs/vite/releases) - [Changelog](https://github.com/vitejs/vite/blob/v5.0.12/packages/vite/CHANGELOG.md) - [Commits](https://github.com/vitejs/vite/commits/v5.0.12/packages/vite) --- updated-dependencies: - dependency-name: vite dependency-type: direct:development ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
What kind of change does this PR introduce?
Does this PR introduce a breaking change?
Yes, it had added column table, which will affect the layout of bytecode.
Why submit this PR?
The column number is very important for some functions:
Does the test262 pass?
Yes, it passed. the PR does not add any new test262 failure items. We also added a bit of testing for column number, whose behavior is consistent with the other popular engines.