You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The shared scanSuperAndArgs traversal skips expressions embedded in binding/assignment patterns. Destructuring declarations scan only their initializer; for-in/of scans omit the target, catch scans omit the binding, and parameter checks scan top-level defaults but not parameter patterns. Consequently await, yield, arguments, and super restrictions can be bypassed with pattern defaults or computed keys.
An 18-case differential against actual JSC and Node/V8 confirms 13 invalid programs accepted by both zig-js tree-walker and required VM. A statement preceding the invalid declaration executes, violating early-error non-execution. Two direct invalid controls reject and three valid nested-function/plain-pattern controls remain accepted.
Root fix: traverse pattern computed keys/defaults and nested/rest patterns everywhere the owning early-error scan runs, retaining the distinct boundaries for lexical arrows and ordinary functions. Do not classify binding identifiers as IdentifierReferences. Cover declarations, assignments, loops, catches, function/method/arrow parameters, nested patterns, and valid shadowing/function boundaries. Batch the related restrictions, verify early rejection in both execution modes, and compare affected test262 subtrees before/after.
The initial pattern traversal candidate passes 72 focused units without failures or leaks, improves the original tree/VM specification differential from 5/18 to 18/18, and preserves 5,520 passes with zero failures across eleven targeted corpus comparisons. Review then reproduced nine additional bypasses through logical-assignment operands and dynamic-import specifier/options expressions; the scan omitted those expression kinds too. These paths are now covered in the extended candidate with additional invalid/valid controls. Holding the commit until that exact candidate is rebuilt and verified; the initial results are not claimed as verification of the extension.
Landed in 41104a4, together with the related contextual-scan fix in #921. Pattern computed keys/defaults and parameter, declaration, loop, and catch bindings now receive the owning early-error checks. Logical-assignment and dynamic-import expression paths are traversed too; static-block await iteration/disposal flags are checked without rejecting valid nested async-function/arrow controls. The combined batch fixes 25 distinct early-error cases in both tree-walker and required VM, preserving valid controls and preventing preceding effects. Final verification: 72 focused units, zero failures or leaks; 7,462 corpus passes and zero failures before/after across 16 explicitly scoped comparisons. The commit records every subtree/filter and denominator. Full unit/full test262 suites and universal diagnostic-message parity are not claimed. Parent #904 and related #899 remain open.
Activity
glennmichael123 commentedon Sep 14, 2026
The initial pattern traversal candidate passes 72 focused units without failures or leaks, improves the original tree/VM specification differential from 5/18 to 18/18, and preserves 5,520 passes with zero failures across eleven targeted corpus comparisons. Review then reproduced nine additional bypasses through logical-assignment operands and dynamic-import specifier/options expressions; the scan omitted those expression kinds too. These paths are now covered in the extended candidate with additional invalid/valid controls. Holding the commit until that exact candidate is rebuilt and verified; the initial results are not claimed as verification of the extension.
glennmichael123 commentedon Sep 14, 2026
Landed in 41104a4, together with the related contextual-scan fix in #921. Pattern computed keys/defaults and parameter, declaration, loop, and catch bindings now receive the owning early-error checks. Logical-assignment and dynamic-import expression paths are traversed too; static-block await iteration/disposal flags are checked without rejecting valid nested async-function/arrow controls. The combined batch fixes 25 distinct early-error cases in both tree-walker and required VM, preserving valid controls and preventing preceding effects. Final verification: 72 focused units, zero failures or leaks; 7,462 corpus passes and zero failures before/after across 16 explicitly scoped comparisons. The commit records every subtree/filter and denominator. Full unit/full test262 suites and universal diagnostic-message parity are not claimed. Parent #904 and related #899 remain open.