Skip to content

Decompose wasm.py into wasm/ submodules #100

@aallan

Description

@aallan

Summary

vera/wasm.py is currently 2,317 lines — already past the complexity threshold. The WasmContext class carries a lot of state across operators, primitives, arithmetic, memory, and string handling.

Suggested decomposition

Split into a vera/wasm/ package:

  • context.py — WasmContext class, core state management
  • slots.py — WasmSlotEnv, De Bruijn slot resolution
  • strings.py — StringPool, string encoding/decoding
  • operators.py — arithmetic, comparison, boolean operators
  • memory.py — linear memory, array access, ADT layout
  • __init__.py — re-export public API

When

After C7 series completes. C7e (multi-module codegen) will touch wasm.py significantly, so decomposing before that work is done would be premature.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C8aC8a — RefactoringenhancementNew feature or requestrefactorCode refactoring and structural improvements

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions