Skip to content

refactor: reduce boilerplate in ForthOps.td and ForthToMemRef.cpp#18

Merged
tetsuo-cpp merged 2 commits intocanonfrom
reduce-boilerplate
Feb 16, 2026
Merged

refactor: reduce boilerplate in ForthOps.td and ForthToMemRef.cpp#18
tetsuo-cpp merged 2 commits intocanonfrom
reduce-boilerplate

Conversation

@tetsuo-cpp
Copy link
Owner

Summary

  • Introduce Forth_StackOpBase TableGen base class for 43 stack-to-stack ops, cutting each from ~13 lines to ~5
  • Add pushValue helper in ForthToMemRef.cpp to deduplicate 7 push-onto-stack call sites

Closes #17

@tetsuo-cpp tetsuo-cpp merged commit e2cbcb5 into canon Feb 16, 2026
1 check passed
@tetsuo-cpp tetsuo-cpp deleted the reduce-boilerplate branch February 16, 2026 02:06
@tetsuo-cpp tetsuo-cpp changed the title Reduce boilerplate in ForthOps.td and ForthToMemRef.cpp refactor: reduce boilerplate in ForthOps.td and ForthToMemRef.cpp Feb 16, 2026
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.

Reduce boilerplate in ForthOps.td and ForthToMemRef conversion pass

1 participant