next.js
331d81fb - [turbopack] simplify ecmascript effect queue (#97771)

Commit
1 day ago
[turbopack] simplify ecmascript effect queue (#97771) ### What? Use a plain stack for ECMAScript analysis effects and move closure-argument effect extraction into a shared synchronous helper before the async call handlers run. ### Why? The effect queue belongs to a single module-analysis task, so mutex protection is not required for the queue itself. Processing argument effects before entering the async handlers also removes duplicated argument-scanning code and callback generic plumbing. This is an inspection experiment, not a demonstrated performance improvement. The observed benchmark difference was within noise and was measured with a debug native binding, so it is not valid evidence for a micro-optimization. ### How? The queue remains LIFO: effects are still appended in reverse order and consumed with `pop()`. The special `Array.prototype.map` scope handling keeps the same `LeaveScope` ordering. Call and dynamic-import handlers now receive already-unlinked argument values. ### Verification - `cargo fmt -- --check` - `cargo check -p turbopack-ecmascript` - Not run: clippy, Rust test suite, or integration tests (inspection experiment) <!-- NEXT_JS_LLM --> --------- Co-authored-by: vercel-fleet-prod[bot] <318278635+vercel-fleet-prod[bot]@users.noreply.github.com> Co-authored-by: Tobias Koppers <1365881+sokra@users.noreply.github.com>
Author
Parents
Loading