Skip to content

Fix module-graphs-does-not-hang and import abrupt return test262 failures#2316

Merged
lahma merged 1 commit into
sebastienros:mainfrom
lahma:no-hang
Mar 6, 2026
Merged

Fix module-graphs-does-not-hang and import abrupt return test262 failures#2316
lahma merged 1 commit into
sebastienros:mainfrom
lahma:no-hang

Conversation

@lahma

@lahma lahma commented Mar 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • AsyncModuleExecutionFulfilled: Set _asyncEvaluation = false in the execList loop per spec step 12.c.iii, fixing TLA module graphs where dynamic import() never settles because already-evaluated modules retain stale async state
  • JintImportExpression: Add IsGeneratorAborted() checks after evaluating specifier/options so import() bails out when generator.return() is called via yield
  • JintSequenceExpression: Track suspension index via SequenceSuspendData to skip already-evaluated sub-expressions on generator resume (preventing duplicate side effects), and add IsGeneratorAborted() to stop evaluation on generator return

Removes test262 exclusions for module-graphs-does-not-hang.js and 2nd-param-evaluation-abrupt-return.js (+3 newly passing test cases, 0 regressions across 92,218 tests).

Test plan

  • dotnet test --filter "module-graphs-does-not-hang" — passes (1 case)
  • dotnet test --filter "2nd-param-evaluation-abrupt-return" — passes (2 cases: strict + sloppy)
  • dotnet test --filter "top-level-await" — 253 passed, 0 failed
  • dotnet test --filter "dynamic-import" — 1,129 passed, 0 failed
  • Full unit tests (Jint.Tests) — 2,761 passed, 0 failed
  • Full test262 suite — 92,218 passed, 0 failed

🤖 Generated with Claude Code

…est262 failures

- Set _asyncEvaluation = false in AsyncModuleExecutionFulfilled execList loop
  per spec step 12.c.iii, preventing dynamic import() from treating already-
  evaluated modules as having pending async dependencies
- Add IsGeneratorAborted() checks in JintImportExpression after evaluating
  specifier and options, so import() bails out on generator.return()
- Track sequence expression suspension index via SequenceSuspendData to skip
  already-evaluated sub-expressions on generator resume (avoiding duplicate
  side effects)
- Add IsGeneratorAborted() check in JintSequenceExpression to stop evaluation
  when generator return is requested

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@lahma
lahma enabled auto-merge (squash) March 6, 2026 15:35
@lahma
lahma merged commit 32ea07f into sebastienros:main Mar 6, 2026
4 checks passed
@lahma
lahma deleted the no-hang branch March 6, 2026 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant