Skip to content

[codegen] extract interface access methods from member.ts#756

Merged
cs01 merged 2 commits intomainfrom
decompose/extract-interface-access
Apr 27, 2026
Merged

[codegen] extract interface access methods from member.ts#756
cs01 merged 2 commits intomainfrom
decompose/extract-interface-access

Conversation

@cs01
Copy link
Copy Markdown
Owner

@cs01 cs01 commented Apr 27, 2026

Before

member.ts was 3311 lines — the second largest file in the codebase.

After

No user-facing change. Internal refactor only. Interface access logic now lives in src/codegen/expressions/access/interface-access.ts (539 lines), reducing member.ts to 2865 lines.

Description

Extracts 3 methods from MemberAccessGenerator into free functions:

  • handleChainedInterfaceAccess (~315 lines) — resolves chained property access on interface-typed values
  • accessInterfacePropertyWithNamedStruct (~69 lines) — loads field from a named interface struct
  • accessObjectPropertyWithNamedInterface (~86 lines) — loads field from an i8* with known interface type

All functions use the existing MemberAccessGeneratorContext interface. No chained method calls — native compiler compatible.

Part of #727.

@cs01 cs01 merged commit 03a42ba into main Apr 27, 2026
9 checks passed
@cs01 cs01 deleted the decompose/extract-interface-access branch April 27, 2026 05:24
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