Repository navigation
fix(jsc): retain syntax-selected stack source positions - #3
Merged
Merged
Conversation
Keep call, construct, property-read and async-resume stack positions separate from exception expression ranges. Preserve exact instruction and resume-label mappings through bytecode rewriting, optimization and owned cache decoding. Extend the prior native-qualified call-position implementation with property lexer tokens and Node 24 regressions for builtin constructors and returning arrows. Keep proper-tail-call behavior unchanged; the paired Bun adapter preserves constructor syntax and invalidates its runtime transpiler cache. The paired integration builds on robobun's upstream source-position work in oven-sh/bun#35179, oven-sh/bun#37396, and oven-sh/bun#41580. Publication stays with the OpenClaw artifact coordinator.
|
Dependency limit exceeded — report not shown. This pull request scan exceeded the 10,000-dependency limit applied to this scan, so the results are incomplete and may be inaccurate. To avoid reporting false positives, Socket has not posted a report. Upgrade your plan to raise the dependency limit and get complete reports, or view the partial scan in the dashboard. Socket is always free for open source. If this is a non-commercial open source project, contact us to request a free Team account. |
steipete
marked this pull request as ready for review
October 4, 2026 22:51
This was referenced Oct 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Make JSC stack positions select the same syntax tokens as Node 24: call and constructor starts, property reads, and async
awaitcontinuations. Keep those positions separate from exception-expression divots and debugger line tables. Both capturedStackFrameand liveStackVisitorreaders use the metadata; executable line overrides and release-private builtin position policy are preserved.The two sparse vectors are owned by each unlinked code block, remapped through bytecode rewriting/optimization, and decoded into owned storage on both cache paths. The cache revision advances with the metadata. Property reads and calls retain distinct tokens, so
(null.x)()can fail atxbefore reaching the call.The paired Bun adapter in openclaw/bun#114 also preserves error constructors and runtime call syntax. Rewriting
new Error()intoError()moved the reported column and made a returning arrow eligible for JSC proper-tail-call elision. Preservingnewrestores the frame without disabling tail calls. Callee parentheses, computed access, and opening delimiter mappings are required for the broader normal-transpile corpus; TypeScript generic/non-null suffixes and cache invalidation are covered.This continues the source-position work in oven-sh/bun#35179, #37396, and #41580 by @robobun.
Native Linux qualification on one c7a.24xlarge host, with the unchanged W113 lane/Docker/ICU recipe:
6e69d757023aa75398a670f487f90fe2a57e2b99.Qualification caught and corrected a namespace-only result-checker assumption, repeated C++ default arguments in unity builds, private-builtin position leakage, missing transpiler delimiter metadata, TypeScript non-null suffix tracking, and the omitted live-stack reader. Exact position goldens were checked against Node; the original astral inline-snapshot assertion remains intact and passes.
The Bun draft remains stacked on manifest commit
cf636c2f14914b3ba4b319874312d654cc5ea064and also needs the namespace adapter from Bun oven-sh#106. Native baseline and candidate both include that adapter because current engine main requires its API. This PR does not publish artifacts or change the artifact recipe; batch publication stays with the coordinator.