Add default-lib test steps to release CI; TableGen op refactor#189
Merged
Conversation
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
… fix extension registration in tsland.cpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
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.TypeScriptOps.tdto dedupe repeated unary/binary op shapes via TableGen base classes/mixins and mark side-effect-free opsPure.tsland.cpp.Test plan
v*tag / manually triggercreate-release.ymland confirm the new "Test Default Library" steps run and fail the job on a forced test failure.🤖 Generated with Claude Code