Run this after any commit that changes compiler passes, SSA flags, lowering transforms, or runtime conventions. Not exhaustive — a ready-made "suspect this first" list for weird behavior.
The meta-pattern: TinyGo set SSA flags intending to replace a subsystem with its own emission. Every such flag is a fork in the road where the surgery might have taken only one path. Moxie added more forks.
ssa.BareInits set? Then every backend must emit its own cross-package init chain. Verify each backend's generated entry point
iterates packages in dep order and calls pkg.init() for each.
var x = f() where f is in another package. Confirm x is set before main runs.
builder/build.go runtime.initAll construction (~line 524).BuildSerially or NaiveForm set? If yes, SSA skips automatic closure lifting — backends must handle FreeVars manually.
func() value after the constructor returns.
compiler/func.go:parseMakeClosure.any, interface{}) method invoke path — does it reach getMethodsString with zero methods? That yields empty
signature strings and NPE in transform/interface-lowering.go.
non-empty case?
var x any = concreteVal; _ = x.(Method) should not crashthe compiler.
compiler/interface.go, transform/interface-lowering.go.reflect? If so, it must be stubbed in src/ or removed.
errors.As gone? errors.Is uses only type assertions?must error at link time.
src/errors/wrap.mx, mxtext/rewrite.go exemption list.types.Info.InitOrder is still authoritative (it is — checker-level, not backend-level). BareInits does not touch this.
var b = a + 1; var a = 5 — both backends must init a first.vendor/.../ssa/builder.go:3238-3273 (outside BareInits guard). CompilePackage before OptimizePackage.
Currently does not (restrict.go:checkSpawnMoveRestriction only
walks same-block forward). If the surgery extends to flow analysis,
verify dominator-tree traversal.
moxie package isn't imported, spawnsilently skips Codec checks. Should be a hard error.
x := foo(); spawn(worker, x); if cond { use(x) } — theif-branch use is currently not flagged.
compiler/spawn.go, compiler/restrict.go.go f() in user code rejected at SSA? Exemption list in restrict.go:isUserPackage still accurate (runtime*, internal/*,
os, syscall, unsafe)?
coro.mx still needed only for iter package?"tasks"/"asyncify"/"none") — is anything other than "none" reachable? If not, strip the branches.
compiler/compiler.go:1524-1530, compiler/goroutine.go.compiler/defer.go. after Build() - not inside CompilePackage.
Diff the entry point / init-chain structure against a known-good baseline.
tests/ end-to-end.compiler/, transform/, builder/.vendor/golang.org/x/tools/.Don't patch symptoms. Trace back to whether the underlying assumption (SSA flag, pass order, backend responsibility) is what it should be. The bug is usually a seam between TinyGo's assumptions and Moxie's surgery, not a single wrong line.