Summary
is_realm_nesting_legal in src/typecheck.c uses an if-chain. Replace with a static const bool 2D array indexed by [outer][inner] per spec §8.
Scope
- Read spec §8 nesting matrix and extract all 36 legal/illegal combinations
- Implement as
static const bool realm_nesting_legal[6][6] (indexed by MemoryRealm enum values)
- Replace the if-chain with a single table lookup
- Any promotion rules with conditional logic (e.g., unsafe block overrides) must be flagged in a comment as requiring code outside the table
Acceptance Criteria
Related
Summary
is_realm_nesting_legalinsrc/typecheck.cuses an if-chain. Replace with astatic const bool2D array indexed by[outer][inner]per spec §8.Scope
static const bool realm_nesting_legal[6][6](indexed byMemoryRealmenum values)Acceptance Criteria
Related