Fix globals/materialize handling for proxy + ctype test and avoid brittle boolean lookup#3
Merged
TriedAngle merged 1 commit intomasterfrom Feb 23, 2026
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
interpreter::tests::proxy_generic_field_access_uses_ctype_layoutto fail withTypeError { expected: "global cell" }due to recent changes around FFI/callback handling and module binding representations. The test relied on globalTrue/Falselookup which exposed the mismatch between raw binding cells and assoc objects.Description
materialize::resolve_module_assocby detecting when a stored binding is a raw value (not an assoc cell) and wrapping it into an assocSlotObject(creating an assoc cell, storing the original value into it and updating the module bindings map), ensuring subsequent code expecting a global cell sees the correct shape.interpreter::load_assocby returning raw values directly when the constant is not aSlotsassoc pointing at theassoc_mapinstead of erroring with aTypeError.True/Falselookups with boolean receiver objects derived from(1 _FixnumEq: 1)/(1 _FixnumEq: 2)so the test no longer depends on a particular global binding representation.Testing
cargo test -p vmand observed the single failing test (initial run failed).cargo test -p vm proxy_generic_field_access_uses_ctype_layout -- --nocaptureafter changes and it passed.cargo test -p vmand all tests passed (213+ tests);cargo fmtwas not executed due to rustfmt component not being available in the environment.Codex Task