Skip to content

fix: use emitCallVoid for describe/test callbacks#315

Merged
cs01 merged 1 commit intomainfrom
fix-describe-native-crash
Mar 13, 2026
Merged

fix: use emitCallVoid for describe/test callbacks#315
cs01 merged 1 commit intomainfrom
fix-describe-native-crash

Conversation

@cs01
Copy link
Copy Markdown
Owner

@cs01 cs01 commented Mar 13, 2026

Summary

  • describe() and test() callbacks were called with emitCall("double", ...) but the lambda functions return void
  • this generated invalid LLVM IR (calling a void function and expecting a double return)
  • switched to emitCallVoid and added closure environment pointer passing for callbacks with captures

the native compiler still crashes on nested describe+test (separate self-hosting bug with nested function calls inside lambda bodies), so describe.ts remains @test-skip. but the generated IR is now correct.

Test plan

  • npm run verify:quick passes
  • JS compiler correctly builds and runs describe.ts

@cs01 cs01 merged commit 058f579 into main Mar 13, 2026
12 checks passed
@cs01 cs01 deleted the fix-describe-native-crash branch March 13, 2026 03:25
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