Skip to content

tests: add fat closure acceptance targets#27466

Closed
MartenH wants to merge 1 commit into
vlang:masterfrom
MartenH:test-fat-closures
Closed

tests: add fat closure acceptance targets#27466
MartenH wants to merge 1 commit into
vlang:masterfrom
MartenH:test-fat-closures

Conversation

@MartenH

@MartenH MartenH commented Jun 15, 2026

Copy link
Copy Markdown

This is a small draft/test-target PR for the fat-closure direction discussed around #27446/#27445.

It intentionally does not carry the frame-epoch reclamation runtime. Instead it adds opt-in acceptance tests for the desired representation boundary:

  • under -d fat_closures, pure V stored closures should be GC-visible values and should not emit builtin.closure trampoline creation/init code;
  • explicit closure-to-raw-function-pointer coercions still have a tested boundary where a C-callable shim is expected.

Normal test runs pass because the checks are gated behind fat_closures. To exercise the target today:

v -d fat_closures -gc none test vlib/v/tests/fns/fat_closure_acceptance_test.v

That currently fails on the pure-V closure assertion, as intended: it is the executable acceptance target for a future fat-closure implementation.

@MartenH MartenH closed this Jun 16, 2026
@MartenH MartenH deleted the test-fat-closures branch June 16, 2026 11:09
@MartenH

MartenH commented Jun 16, 2026

Copy link
Copy Markdown
Author

After doing more research this is quite and undertaking and consider all the changes in memory management I decided to close at this tine

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