Skip to content

Add default-lib test steps to release CI; TableGen op refactor#189

Merged
ASDAlexander77 merged 6 commits into
mainfrom
feature/tdops-interfaces
Jul 8, 2026
Merged

Add default-lib test steps to release CI; TableGen op refactor#189
ASDAlexander77 merged 6 commits into
mainfrom
feature/tdops-interfaces

Conversation

@ASDAlexander77

Copy link
Copy Markdown
Owner

Summary

  • Run tests.ps1 (Windows) / tests.sh (Linux) against the built default library right after the "Build Default Library" step in the release workflow, failing the job if any test fails.
  • Refactor TypeScriptOps.td to dedupe repeated unary/binary op shapes via TableGen base classes/mixins and mark side-effect-free ops Pure.
  • Fix extension registration in tsland.cpp.

Test plan

  • Push a v* tag / manually trigger create-release.yml and confirm the new "Test Default Library" steps run and fail the job on a forced test failure.
  • Confirm existing ctest suite and default-lib build still pass on both Windows and Linux jobs.

🤖 Generated with Claude Code

ASDAlexander77 and others added 6 commits July 7, 2026 23:21
Adds the Pure trait to TypeOfOp, TypeOfAnyOp, SizeOfOp, HasValueOp,
ValueOp, ValueOrDefaultOp, OptionalUndefOp, GetThisOp,
ArithmeticUnaryOp, and ArithmeticBinaryOp, unlocking CSE/DCE for these
common ops. Each was checked against its LLVM lowering to confirm it
never allocates or has other side effects.

OptionalOp, OptionalValueOp, and GetMethodOp are documented as
deliberately excluded: their lowering routes through the generic
CastLogicHelper::cast() dispatcher, which can call ch.MemoryAlloc via
castToAny/castToArrayType depending on the runtime type - the same
hazard already called out in the CreateUnionInstanceOp comment.

Considered adding SymbolUserOpInterface to ClassRefOp/InterfaceRefOp/
NamespaceRefOp/etc., but their symbol identifiers resolve against the
frontend's own class/interface/namespace info tables in MLIRGen.cpp,
not MLIR Symbol ops in the IR, so there is nothing for
SymbolTableCollection to verify against - skipped as unsafe.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Adds two shared base classes to remove copy-pasted TableGen boilerplate,
with no change to generated op identity, mnemonics, or C++ API:

- TypeScript_MemCopyLikeOpBase: factors the identical getSource()/
  getTarget() extraClassDeclaration duplicated across LoadSaveOp,
  CopyStructOp, MemoryCopyOp, and MemoryMoveOp.

- TypeScript_YieldOpBase: factors the identical Variadic<AnyType>:$results
  argument and no-op builder duplicated across ResultOp, GlobalResultOp,
  and BodyResultInternalOp (each still gets its own ParentOneOf list, so
  they remain distinct ops/mnemonics - this only dedupes shared shape,
  not the Internal-op staging distinctions used to prevent recursive
  rewrites during dialect lowering).

Verified MLIRTypeScriptOpsIncGen and MLIRTypeScript (incl. MLIRGen.cpp
call sites) both rebuild clean.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
… use base classes for shared traits and arguments
@ASDAlexander77 ASDAlexander77 merged commit 92f2d3a into main Jul 8, 2026
2 checks passed
@ASDAlexander77 ASDAlexander77 deleted the feature/tdops-interfaces branch July 8, 2026 22:17
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