diff --git a/.claude/CLAUDE.md b/.claude/CLAUDE.md index 3dccb737..b39a8a57 100644 --- a/.claude/CLAUDE.md +++ b/.claude/CLAUDE.md @@ -18,17 +18,19 @@ Use this file only for Claude-specific execution reminders. ## Claude Checklist -Before reporting done, re-read every touched code/test file and verify: - -- `docs/coding-patterns.md` §0.7-§0.9 was applied: every touched symbol has a reason, simpler algorithms were considered, and another simplification pass found no safe improvement. -- Declaration order follows §1.3 and §2.4: callers before callees, with the allowed exception that `With*` option functions may sit immediately above the constructor they configure. -- Private package functions used by one type became methods on that type, unless they are constructors, shared by multiple types, or clearer inline (§1.5). -- Single-use helpers stayed inline unless extraction names real behavior or removes real duplication (§1.4). -- Struct fields follow the semantic layers in §2.5. -- Tests assert public behavior, use one top-level test per public symbol, inline setup/run/assertions by default, and use `require` (§6). -- Documentation, workflow, or convention changes updated the owning docs listed in §8. - -If any checklist item is intentionally not applied, record the reason in the final summary. +Before reporting done, re-read every changed code and test file and verify: + +- `docs/coding-patterns.md` §2 and §16 were applied. +- Top-down package/API/flow review and bottom-up review of every affected symbol are complete. +- Every symbol has a current owner and reason; duplicate, wrapper, dead, mergeable, or private candidates were resolved. +- Functions keep one abstraction level, single-use helpers remain inline unless they isolate real mechanics, and receiver-owned behavior is a method. +- Declarations form a caller-before-callee staircase; fields and groups follow specification §9. +- Public APIs remain minimal and compatible unless the user explicitly authorized a change. +- Tests use public observable behavior, isolated arrange per subtest, production-matched files, and `require` (specification §12). +- Performance work has a baseline, profile-guided owner, correctness checks, and reproducible before/after evidence (specification §14). +- Documentation, workflow, and conventions were updated in their specification §15 owner documents. + +Record any intentionally skipped simplification, validation, or benchmark target and its reason in the final summary. ## Verification Commands diff --git a/AGENTS.md b/AGENTS.md index 39d58af6..9e5ca05d 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -10,73 +10,76 @@ Keep this file terse and actionable. Put detailed coding rules in `docs/coding-p 1. Follow the user's latest explicit request first. 2. Follow the closest applicable repository instruction file. -3. Use this file as the root repository contract. -4. Use `docs/coding-patterns.md` as the coding-style authority. -5. Match nearby code when it is stricter than this guide. +3. Use this file as the root repository workflow contract. +4. Apply `docs/coding-patterns.md` as the normative coding specification. +5. Match nearby code only when it is more specific and specification-compliant. -If instructions conflict, choose the more specific instruction and mention the conflict in the final summary. +If instructions conflict, choose the more specific instruction and record the conflict in the final summary. ## Quick Commands ```bash -make init # install goimports/godoc and go install ./... -make test # go test -race ./... -make benchmark-pr # quick pull-request benchmark report -make benchmark-core # full canonical package + VM kernel suite +make init # install goimports/godoc and go install ./... +make test # go test -race ./... +make benchmark-pr # quick pull-request benchmark report +make benchmark-core # full canonical package + VM kernel suite make benchmark-compare # optional external runtime comparisons -make fuzz # bounded trust-boundary fuzz smoke -make lint # goimports -w . && go vet ./... -make coverage # CI-style full test run with coverage.out -make coverage-check # enforce recorded total-coverage baseline -make build # build ./dist/minivm +make fuzz # bounded trust-boundary fuzz smoke +make lint # goimports -w . && go vet ./... +make coverage # CI-style full test run with coverage.out +make coverage-check # enforce recorded total-coverage baseline +make build # build ./dist/minivm go test -race ./... go test -race -run TestFoo ./interp/... go test -race -run 'TestInterpreter_WithDebugger|TestDebugger_Breakpoints' ./interp -./dist/minivm # interactive assembly REPL +./dist/minivm # interactive assembly REPL ``` ## Required Workflow -1. Run `git status --short`; never overwrite unrelated user changes. -2. Prefer `codegraph` MCP tools for structural exploration; fall back to grep/read only for literal text or stale indexes. +1. Run `git status --short`; never overwrite or commit unrelated user changes. +2. Prefer structural tools for symbol ownership and call-flow exploration; use grep/read for literal text and final verification. 3. Read task-relevant docs from the Task Router before changing code or tests. -4. Read `docs/coding-patterns.md` through its Fast Path: always apply §0, then the task-specific sections from its When to Read table. -5. Make the smallest correct change. Avoid speculative cleanup outside the task. -6. Validate with the narrowest relevant tests first, then broader tests when the change warrants it. -7. Run the Completion Gate before reporting done, opening a PR, or updating a PR. +4. Apply `docs/coding-patterns.md` §2 and §16 to every code/test change, plus sections selected by §1.3. +5. Review top-down from package contract to mechanics and bottom-up across every affected symbol. Repository-wide refactors MUST inventory every production and test symbol. +6. Make the smallest correct change. Do not add speculative structure or preserve obsolete compatibility without an explicit contract. +7. Validate the narrowest relevant behavior first, then race, static, generated, architecture, and benchmark checks warranted by the change. +8. Run the Completion Gate before reporting done, committing a logical stage, opening a PR, or updating a PR. ## Completion Gate Do not call work complete until every item is true: -1. Every touched code/test file was re-read against `docs/coding-patterns.md` §0.7-§0.9 plus the task-specific sections. -2. Every touched symbol has a current reason to exist. -3. Removable symbols were removed, inlined, merged, narrowed, made private, renamed by role, or replaced by direct local code. -4. A simpler algorithm or control flow was considered; the chosen shape is the simplest correct option found. +1. Every changed file was re-read against `docs/coding-patterns.md` §2 and the task-specific sections. +2. Top-down ownership and bottom-up symbol reviews are complete at the requested scope. +3. Every affected symbol has a current reason to exist; removable symbols were removed, inlined, merged, narrowed, privatized, or renamed by role. +4. The chosen algorithm and control flow are the simplest correct options found without a measured performance regression. 5. Another simplification pass found no safe improvement. -6. Declaration order follows `docs/coding-patterns.md` §1.3 and §2.4: callers before callees, except `With*` option functions may sit immediately above the constructor they configure. -7. Tests follow `docs/coding-patterns.md` §6 and assert behavior rather than private shape. -8. PR, commit, and documentation expectations follow `docs/coding-patterns.md` §7-§8. -9. Any intentionally skipped simplification is recorded in the final summary with the reason. +6. Declarations form a caller-before-callee staircase and follow specification §9. +7. Tests follow specification §12 and assert only public observable behavior. +8. Performance claims include the reproducible evidence required by specification §14. +9. Commits and documentation follow specification §15, and unrelated user changes are absent. +10. Any intentionally skipped simplification or validation is recorded with its reason. -## Coding Pattern Map +## Coding Standard Map -`docs/coding-patterns.md` is the authority. Use this map only to choose what to read. +`docs/coding-patterns.md` is normative. Use this map only for routing. | Need | Read in `docs/coding-patterns.md` | |---|---| -| Before any code/test edit | When to Read, §0 | -| Removing unnecessary structure | §0.1, §0.7-§0.9 | -| Naming, helper extraction, method ownership | §1.2, §1.4, §1.5 | -| File order, type/interface shape, struct fields | §2.1-§2.5 | -| Public API, options, builders, parsers | §3 | -| Errors, panic, recover | §4 | -| Architecture build tags | §5 | -| Tests | §6 | -| Commits, PRs, final review | §7 | -| Documentation updates | §8 | +| Every code/test change | §2, §16 | +| Functions, helpers, naming | §3-§4 | +| Types, constructors, public APIs | §5 | +| Package and runtime ownership | §6-§8 | +| Declaration and field order | §9 | +| Errors and panic/recover | §10 | +| Concurrency and lifecycle | §11 | +| Tests and public specifications | §12 | +| Generated and architecture code | §13 | +| Performance and benchmarks | §14 | +| Commits and documentation | §15 | ## Task Router @@ -169,7 +172,7 @@ Violations cause silent corruption or invalid execution. - Compile-time threaded code advances `c.ip`; runtime threaded execution advances `f.ip`. - JIT handlers return `true` only after lowering the opcode and advancing `s.ip` by its exact width. - On JIT type mismatch or unsupported lowering, return `false` without mutating IR, stack, params, facts, or labels. -- Executable buffers must follow `Unseal -> Append -> Seal -> Call`; `Seal()` must sync the instruction cache on Darwin/ARM64. +- Executable buffers own their write/execute transition inside `asm.Buffer.install`, which must sync the instruction cache on Darwin/ARM64 before resealing; a full buffer is replaced by a larger mapping and the old one is retained so entry pointers stay valid. - Offset-preserving passes must preserve byte offsets; `GVNPass` and `DCEPass` are the known exceptions and must repair branches/handlers. - `asm.Relaxer.Relax` implementations must return a replacement sequence that is already in range; `asm.Assembler.encode`'s fixpoint loop relies on this to relax each branch at most once and terminate. - A JIT trace fragment's own `status`, not the root trace's, decides how its ops lower when they run out; `tracePlan` must skip any `aborted` root or branch, so a fragment that recorded a partial, unsupported prefix is never planned or inlined into a parent trace. @@ -179,16 +182,16 @@ Violations cause silent corruption or invalid execution. ## Tests -Use `docs/testing.md` for ownership and opcode coverage status. Before writing or modifying tests, read relevant docs from the Task Router and apply `docs/coding-patterns.md` §6. +Use `docs/testing.md` for ownership and opcode coverage status. Before writing or modifying tests, read relevant docs from the Task Router and apply `docs/coding-patterns.md` §12. - One top-level test per public symbol: `Test` or `Test_`. - Put sub-cases under `t.Run`; do not split them into parallel top-level tests. -- Inline setup, run sequence, and assertions unless §6.8 allows a helper. +- Keep setup, execution, and assertions visible unless specification §12 permits a real reusable abstraction. - Use `require`, not `assert`. ## Documentation Maintenance -Update docs when behavior, invariants, commands, architecture, pitfalls, workflow, or conventions change. Use the owner matrix in `docs/coding-patterns.md` §8: +Update docs when behavior, invariants, commands, architecture, pitfalls, workflow, or conventions change. Use the owner matrix in `docs/coding-patterns.md` §15: - workflow / convention rules -> update both `AGENTS.md` and `.claude/CLAUDE.md` - invariants / pitfalls -> update `docs/architecture.md` diff --git a/asm/arch.go b/asm/arch.go index f763e9bf..4e690969 100644 --- a/asm/arch.go +++ b/asm/arch.go @@ -32,8 +32,8 @@ type ABI interface { // Relaxer is an optional Arch capability implemented by architectures that // can rewrite a branch instruction with an out-of-range immediate // displacement into an equivalent multi-instruction sequence that fits. -// Assembler.encode type-asserts Arch for Relaxer and, when present, runs a -// fixpoint pass over intra-Code label branches before final encoding. +// Build type-asserts Arch for Relaxer and, when present, runs a fixpoint +// pass over label branches before final encoding. type Relaxer interface { // Relax inspects a PC-relative label-branch instruction and its // resolved byte displacement (target - instruction address). It @@ -62,8 +62,9 @@ type Frame interface { // Leave releases the spill area. Emitted immediately before every // instruction Returns reports true for. Returns nil when slots == 0. Leave(slots int) []Instruction - // Resume reserves the spill area again after an intra-Code call returns - // through the shared epilogue. It must preserve the current spill base. + // Resume reserves the spill area again after a call to a label in the + // same code returns through the shared epilogue. It must preserve the + // current spill base. Resume(slots int) []Instruction // Store writes reg into spill slot. Store(slot int, reg PReg) Instruction @@ -72,7 +73,9 @@ type Frame interface { // Returns reports whether op transfers control out of the callable, so // the allocator must restore the stack with Leave before it. Returns(op uint16) bool - // Calls reports whether op calls another label in the same Code. + // Calls reports whether op calls a label rather than an absolute + // address, so a target bound in the same code returns through the + // shared epilogue. Calls(op uint16) bool } diff --git a/asm/arm64/abi_arm64_test.go b/asm/arm64/abi_arm64_test.go index 6fcacefd..001d29a2 100644 --- a/asm/arm64/abi_arm64_test.go +++ b/asm/arm64/abi_arm64_test.go @@ -29,11 +29,11 @@ func TestNew(t *testing.T) { buf, err := asm.NewBuffer(4096) require.NoError(t, err) defer buf.Free() - linked, err := asm.Link(buf, New(), []*asm.Code{code}, nil) + linked, err := asm.Link(buf, New(), code) require.NoError(t, err) // Use the concrete caller so escape analysis keeps the fresh goroutine's // context on its stack while invoke grows and relocates that stack. - callable, ok := linked[0].Callable.(*caller) + callable, ok := linked.(*caller) require.True(t, ok) errs := make(chan error, 1) diff --git a/asm/arm64/frame_test.go b/asm/arm64/frame_test.go index c2ec12e9..2357efbb 100644 --- a/asm/arm64/frame_test.go +++ b/asm/arm64/frame_test.go @@ -1,26 +1,33 @@ -package arm64 +package arm64_test import ( "testing" - "github.com/siyul-park/minivm/asm" "github.com/stretchr/testify/require" + + "github.com/siyul-park/minivm/asm" + "github.com/siyul-park/minivm/asm/arm64" ) -func TestFrame(t *testing.T) { +func TestArch_Frame(t *testing.T) { t.Run("chunks large spill areas", func(t *testing.T) { + // 512 slots need 4096 bytes, one byte past the unshifted add/sub + // immediate range, so each adjustment splits into two steps that keep + // SP 16-byte aligned throughout. + frame := arm64.New().Frame() + require.Equal(t, []asm.Instruction{ - SUBI(SP, SP, maxFrameAdjust), - SUBI(SP, SP, 16), - ADDI(X26, SP, 0), - }, frame{}.Enter(512)) + arm64.SUBI(arm64.SP, arm64.SP, 4080), + arm64.SUBI(arm64.SP, arm64.SP, 16), + arm64.ADDI(arm64.X26, arm64.SP, 0), + }, frame.Enter(512)) require.Equal(t, []asm.Instruction{ - SUBI(SP, SP, maxFrameAdjust), - SUBI(SP, SP, 16), - }, frame{}.Resume(512)) + arm64.SUBI(arm64.SP, arm64.SP, 4080), + arm64.SUBI(arm64.SP, arm64.SP, 16), + }, frame.Resume(512)) require.Equal(t, []asm.Instruction{ - ADDI(SP, SP, maxFrameAdjust), - ADDI(SP, SP, 16), - }, frame{}.Leave(512)) + arm64.ADDI(arm64.SP, arm64.SP, 4080), + arm64.ADDI(arm64.SP, arm64.SP, 16), + }, frame.Leave(512)) }) } diff --git a/asm/arm64/instr_test.go b/asm/arm64/instr_test.go index c08992a4..445d5dcc 100644 --- a/asm/arm64/instr_test.go +++ b/asm/arm64/instr_test.go @@ -163,12 +163,19 @@ func TestInstructionFactories(t *testing.T) { if !ok { return true } - name, ok := call.Fun.(*ast.Ident) - if !ok { + // Tests live both in this package (Name) and beside it + // (arm64.Name), so accept either call shape. + var name string + switch fn := call.Fun.(type) { + case *ast.Ident: + name = fn.Name + case *ast.SelectorExpr: + name = fn.Sel.Name + default: return true } - if _, ok := factories[name.Name]; ok { - covered[name.Name] = struct{}{} + if _, ok := factories[name]; ok { + covered[name] = struct{}{} } return true }) diff --git a/asm/arm64/relax_test.go b/asm/arm64/relax_test.go index 8cb9835b..8d654c9f 100644 --- a/asm/arm64/relax_test.go +++ b/asm/arm64/relax_test.go @@ -1,97 +1,105 @@ -package arm64 +package arm64_test import ( "testing" - "github.com/siyul-park/minivm/asm" "github.com/stretchr/testify/require" + + "github.com/siyul-park/minivm/asm" + "github.com/siyul-park/minivm/asm/arm64" ) -// TestRelaxer_Relax covers the structural contract of asm.Relaxer.Relax: +// TestArch_Relax covers the structural contract of asm.Relaxer.Relax: // in-range branches are left alone, out-of-range B.cond/CBZ/CBNZ branches // are rewritten into an inverted skip branch plus an in-range unconditional // B to the original label, TBZ/TBNZ (which never carry a LabelOperand in // this codebase) are never relaxed, and a target so far away that even the -// replacement B would be out of range is rejected so encode falls back to +// replacement B would be out of range is rejected so Build falls back to // ErrBranchOutOfRange. -func TestRelaxer_Relax(t *testing.T) { - a := arch{} - lbl := asm.Label(7) +func TestArch_Relax(t *testing.T) { + relaxer, ok := arm64.New().(asm.Relaxer) + require.True(t, ok) + + label := asm.Label(7) + target := asm.LabelOperand{ID: label} + // The inverted branch clears the single unconditional B that follows it; + // branch displacements are relative to the branch itself, so that is +8. + skip := asm.Imm(8) t.Run("in-range branch is left alone", func(t *testing.T) { - _, relaxed := a.Relax(BCondLabel(OpBEQ, lbl), 1<<10) + _, relaxed := relaxer.Relax(arm64.BCondLabel(arm64.OpBEQ, label), 1<<10) require.False(t, relaxed) - _, relaxed = a.Relax(CBZLabel(X1, lbl), 1<<10) + _, relaxed = relaxer.Relax(arm64.CBZLabel(arm64.X1, label), 1<<10) require.False(t, relaxed) }) t.Run("out-of-range B.cond inverts condition and preserves target", func(t *testing.T) { - pairs := [][2]Op{ - {OpBEQ, OpBNE}, {OpBNE, OpBEQ}, - {OpBCS, OpBCC}, {OpBCC, OpBCS}, - {OpBMI, OpBPL}, {OpBPL, OpBMI}, - {OpBVS, OpBVC}, {OpBVC, OpBVS}, - {OpBHI, OpBLS}, {OpBLS, OpBHI}, - {OpBGE, OpBLT}, {OpBLT, OpBGE}, - {OpBGT, OpBLE}, {OpBLE, OpBGT}, + pairs := [][2]arm64.Op{ + {arm64.OpBEQ, arm64.OpBNE}, {arm64.OpBNE, arm64.OpBEQ}, + {arm64.OpBCS, arm64.OpBCC}, {arm64.OpBCC, arm64.OpBCS}, + {arm64.OpBMI, arm64.OpBPL}, {arm64.OpBPL, arm64.OpBMI}, + {arm64.OpBVS, arm64.OpBVC}, {arm64.OpBVC, arm64.OpBVS}, + {arm64.OpBHI, arm64.OpBLS}, {arm64.OpBLS, arm64.OpBHI}, + {arm64.OpBGE, arm64.OpBLT}, {arm64.OpBLT, arm64.OpBGE}, + {arm64.OpBGT, arm64.OpBLE}, {arm64.OpBLE, arm64.OpBGT}, } for _, pair := range pairs { - repl, relaxed := a.Relax(BCondLabel(pair[0], lbl), 1<<20) + repl, relaxed := relaxer.Relax(arm64.BCondLabel(pair[0], label), 1<<20) require.True(t, relaxed, pair[0]) require.Len(t, repl, 2, pair[0]) require.Equal(t, uint16(pair[1]), repl[0].Op, pair[0]) - require.Equal(t, asm.Imm(skipDisp), repl[0].Src2, pair[0]) - require.Equal(t, uint16(OpB), repl[1].Op, pair[0]) - require.Equal(t, asm.LabelOp(lbl), repl[1].Src2, pair[0]) + require.Equal(t, skip, repl[0].Src2, pair[0]) + require.Equal(t, uint16(arm64.OpB), repl[1].Op, pair[0]) + require.Equal(t, target, repl[1].Src2, pair[0]) } }) t.Run("out-of-range CBZ/CBNZ inverts comparison and preserves register", func(t *testing.T) { - repl, relaxed := a.Relax(CBZLabel(X3, lbl), 1<<20) + repl, relaxed := relaxer.Relax(arm64.CBZLabel(arm64.X3, label), 1<<20) require.True(t, relaxed) require.Len(t, repl, 2) - require.Equal(t, uint16(OpCBNZ), repl[0].Op) - require.Equal(t, asm.P(X3), repl[0].Src1) - require.Equal(t, asm.Imm(skipDisp), repl[0].Src2) - require.Equal(t, uint16(OpB), repl[1].Op) - require.Equal(t, asm.LabelOp(lbl), repl[1].Src2) + require.Equal(t, uint16(arm64.OpCBNZ), repl[0].Op) + require.Equal(t, asm.P(arm64.X3), repl[0].Src1) + require.Equal(t, skip, repl[0].Src2) + require.Equal(t, uint16(arm64.OpB), repl[1].Op) + require.Equal(t, target, repl[1].Src2) - repl, relaxed = a.Relax(CBNZLabel(X3, lbl), -(1 << 21)) + repl, relaxed = relaxer.Relax(arm64.CBNZLabel(arm64.X3, label), -(1 << 21)) require.True(t, relaxed) - require.Equal(t, uint16(OpCBZ), repl[0].Op) - require.Equal(t, asm.P(X3), repl[0].Src1) + require.Equal(t, uint16(arm64.OpCBZ), repl[0].Op) + require.Equal(t, asm.P(arm64.X3), repl[0].Src1) }) t.Run("TBZ/TBNZ never carry a label operand and are never relaxed", func(t *testing.T) { - _, relaxed := a.Relax(TBZ(X1, 3, 1<<17), 1<<17) + _, relaxed := relaxer.Relax(arm64.TBZ(arm64.X1, 3, 1<<17), 1<<17) require.False(t, relaxed) - _, relaxed = a.Relax(TBNZ(X1, 3, 1<<17), 1<<17) + _, relaxed = relaxer.Relax(arm64.TBNZ(arm64.X1, 3, 1<<17), 1<<17) require.False(t, relaxed) }) t.Run("target beyond the B's own imm26 range is rejected", func(t *testing.T) { - _, relaxed := a.Relax(BCondLabel(OpBEQ, lbl), 1<<28) + _, relaxed := relaxer.Relax(arm64.BCondLabel(arm64.OpBEQ, label), 1<<28) require.False(t, relaxed) }) t.Run("replacement B observes exact directional imm26 boundaries", func(t *testing.T) { - _, relaxed := a.Relax(BCondLabel(OpBEQ, lbl), (1<<27)-4) + _, relaxed := relaxer.Relax(arm64.BCondLabel(arm64.OpBEQ, label), (1<<27)-4) require.True(t, relaxed) - _, relaxed = a.Relax(BCondLabel(OpBEQ, lbl), 1<<27) + _, relaxed = relaxer.Relax(arm64.BCondLabel(arm64.OpBEQ, label), 1<<27) require.False(t, relaxed) - _, relaxed = a.Relax(BCondLabel(OpBEQ, lbl), -(1<<27)+4) + _, relaxed = relaxer.Relax(arm64.BCondLabel(arm64.OpBEQ, label), -(1<<27)+4) require.True(t, relaxed) - _, relaxed = a.Relax(BCondLabel(OpBEQ, lbl), -(1 << 27)) + _, relaxed = relaxer.Relax(arm64.BCondLabel(arm64.OpBEQ, label), -(1 << 27)) require.False(t, relaxed) }) t.Run("non-branch instruction is never relaxed", func(t *testing.T) { - _, relaxed := a.Relax(ADD(X1, X2, X3), 1<<20) + _, relaxed := relaxer.Relax(arm64.ADD(arm64.X1, arm64.X2, arm64.X3), 1<<20) require.False(t, relaxed) }) } diff --git a/asm/assembler.go b/asm/assembler.go index 268b5017..cc365543 100644 --- a/asm/assembler.go +++ b/asm/assembler.go @@ -6,9 +6,9 @@ import ( ) // Label identifies a position in the emitted instruction stream. Labels are -// allocated via Assembler.Label and bound via Assembler.Bind. Cross-Code -// references remain unresolved inside Code.Relocs until Link supplies their -// target addresses. +// allocated with Assembler.Label and anchored with Assembler.Bind. Build +// resolves every label reference, so a reference to a label that was never +// bound is an error. type Label int // Assembler emits target-architecture instructions into a single-shot @@ -16,22 +16,21 @@ type Label int // vregs to specific pregs with Pin, append instructions with Emit, and // finalize with Build. // -// Each Assembler builds exactly one Code. Reuse is not supported — discard -// after Build returns. +// Each Assembler builds exactly one machine-code block. Reuse is not +// supported — discard after Build returns. type Assembler struct { arch Arch insts []Instruction pins map[int32]PReg labels map[Label]int - entries []Label nextVReg int32 nextLbl Label err error } var ( - ErrConflictingPin = errors.New("conflicting pin") - ErrEntryRequiresFrame = errors.New("non-primary entry cannot use spill frame") + ErrConflictingPin = errors.New("conflicting pin") + ErrUnresolvedLabel = errors.New("unresolved label") ) // New constructs an Assembler targeting the given architecture. @@ -50,27 +49,13 @@ func (a *Assembler) Reg(typ RegType, w RegWidth) VReg { return r } -// Label reserves a label identifier. Bind it later with Bind. +// Label reserves a label identifier. Anchor it later with Bind. func (a *Assembler) Label() Label { id := a.nextLbl a.nextLbl++ return id } -// Entry marks the current position as a named callable entry. The label is bound -// to the current instruction index. Multiple entries allow one Code to expose -// several callables at distinct offsets. -// -// A non-primary entry (bound after instruction 0) is incompatible with a -// spill frame: only the primary entry at offset 0 runs the frame prologue, -// so a call through a later entry would hit the shared epilogue without -// ever reserving the spill area. Build returns ErrEntryRequiresFrame when -// spilling occurs and a non-primary entry exists. -func (a *Assembler) Entry(id Label) { - a.Bind(id) - a.entries = append(a.entries, id) -} - // Bind anchors a label at the current instruction index. func (a *Assembler) Bind(id Label) { a.labels[id] = len(a.insts) @@ -96,202 +81,145 @@ func (a *Assembler) Emit(insts ...Instruction) { a.insts = append(a.insts, insts...) } -// Build finalizes the instruction list into a Code: rewrites operands -// from virtual to physical registers, encodes every instruction, and -// resolves intra-Code label references. External label references survive -// in Code.Relocs for Link to patch. -func (a *Assembler) Build() (*Code, error) { +// Build finalizes the instruction list into machine code: it rewrites +// operands from virtual to physical registers, relaxes out-of-range label +// branches, and encodes every instruction with its label references +// resolved. +func (a *Assembler) Build() ([]byte, error) { if a.err != nil { return nil, a.err } - rw := newRewriter(a.arch, a.insts, a.pins) - rewritten, labels, err := rw.run(a.insts, a.labels, a.entries) + rw, err := newRewriter(a.arch, a.insts, a.pins, int(a.nextVReg)) if err != nil { return nil, err } - - bytes, labels, relocs, err := a.encode(rewritten, labels) + insts, labels, err := rw.run(a.insts, a.labels) if err != nil { return nil, err } - - code := &Code{ - Bytes: bytes, - Labels: labels, - Relocs: relocs, - } - if len(a.entries) > 0 { - code.Entries = append([]Label(nil), a.entries...) - } - return code, nil + return a.encode(insts, labels) } -// encode produces the final byte stream from phys-allocated instructions. -// It runs in two passes: draft encodes instructions with placeholder label -// operands and records byte offsets; final patches intra-Code labels and -// records external labels as relocations. -func (a *Assembler) encode(insts []Instruction, labels map[Label]int) ([]byte, map[Label]int, []Relocation, error) { - insts, labels, err := a.relax(insts, labels) - if err != nil { - return nil, nil, nil, err - } - - encoded, offsets, err := a.draft(insts) - if err != nil { - return nil, nil, nil, err - } - - pos := make(map[Label]int, len(labels)) - for id, idx := range labels { - pos[id] = offsets[idx] - } - - out, relocs, err := a.final(insts, encoded, offsets, pos) - if err != nil { - return nil, nil, nil, err - } - return out, pos, relocs, nil -} - -// relax rewrites out-of-range intra-Code label branches into equivalent -// in-range multi-instruction sequences when the target Arch implements -// Relaxer. It runs a fixpoint loop: draft the current instruction list to -// measure offsets, collect every label branch Relaxer reports as -// out-of-range, splice all of their replacements into one rebuilt -// instruction list, and repeat. Each replacement is constructed by Relax to -// already be in range, so a branch relaxes at most once; batching the -// splices within a pass turns the O(branches × instructions) drafts of a -// one-at-a-time loop into one draft per pass. -func (a *Assembler) relax(insts []Instruction, labels map[Label]int) ([]Instruction, map[Label]int, error) { - relaxer, ok := a.arch.(Relaxer) - if !ok { - return insts, labels, nil - } - +// encode turns phys-allocated instructions into the final byte stream. +// +// Each pass drafts the instruction list — encoding every instruction with a +// placeholder for its label operand — to measure byte offsets, then asks the +// architecture's Relaxer to rewrite label branches whose displacement no +// longer fits. Relax returns a replacement that is already in range, so a +// branch relaxes at most once and the loop terminates; batching every splice +// within a pass keeps drafting proportional to the number of relaxation +// rounds rather than to the number of branches. +func (a *Assembler) encode(insts []Instruction, labels map[Label]int) ([]byte, error) { + relaxer, relaxes := a.arch.(Relaxer) for { - _, offsets, err := a.draft(insts) + draft, offsets, err := a.draft(insts) if err != nil { - return nil, nil, err - } - - idx, repl := a.collect(relaxer, insts, labels, offsets) - if len(idx) == 0 { - return insts, labels, nil - } - insts, labels = splice(insts, labels, idx, repl) - } -} - -// collect drafts every out-of-range intra-Code label branch's -// Relaxer replacement in instruction order. idx and repl are parallel: -// idx[k] is the original index of the branch replaced by repl[k]. -func (a *Assembler) collect( - relaxer Relaxer, insts []Instruction, labels map[Label]int, offsets []int, -) (idx []int, repl [][]Instruction) { - for i, inst := range insts { - lbl, isLabel := inst.Src2.(LabelOperand) - if !isLabel { - continue + return nil, err } - target, intra := labels[lbl.ID] - if !intra { - continue + if relaxes { + if at, repl := a.collect(relaxer, insts, labels, offsets); len(at) > 0 { + insts, labels = splice(insts, labels, at, repl) + continue + } } - disp := int64(offsets[target] - offsets[i]) - replacement, relaxed := relaxer.Relax(inst, disp) - if !relaxed { - continue - } - idx = append(idx, i) - repl = append(repl, replacement) + return a.resolve(insts, draft, offsets, labels) } - return idx, repl } // draft encodes each instruction with #0 substituted for label operands so -// widths can be measured without knowing label offsets. +// widths can be measured before label offsets are known. offsets holds the +// start of every instruction plus the total length. func (a *Assembler) draft(insts []Instruction) ([][]byte, []int, error) { enc := a.arch.Encoder() - encoded := make([][]byte, len(insts)) + draft := make([][]byte, len(insts)) offsets := make([]int, len(insts)+1) for i, inst := range insts { - if inst.Op == OpPseudoLabel || inst.Op == OpPseudoUse { + if inst.Op == OpPseudoUse { offsets[i+1] = offsets[i] continue } - toEncode := inst - if _, ok := toEncode.Src2.(LabelOperand); ok { - toEncode.Src2 = Imm(0) + if _, ok := inst.Src2.(LabelOperand); ok { + inst.Src2 = Imm(0) } - bytes, err := enc.Encode(toEncode) + bytes, err := enc.Encode(inst) if err != nil { return nil, nil, err } - encoded[i] = bytes + draft[i] = bytes offsets[i+1] = offsets[i] + len(bytes) } - return encoded, offsets, nil + return draft, offsets, nil } -// final walks the encoded list, patching intra-Code label references with -// resolved deltas and recording external references as linker relocations. -func (a *Assembler) final( - insts []Instruction, - encoded [][]byte, - offsets []int, - labels map[Label]int, -) ([]byte, []Relocation, error) { - enc := a.arch.Encoder() - out := make([]byte, 0, offsets[len(insts)]) - var relocs []Relocation +// collect drafts a Relaxer replacement for every label branch whose +// displacement is out of range, in instruction order. at and repl are +// parallel: at[k] is the index of the branch replaced by repl[k]. +func (a *Assembler) collect( + relaxer Relaxer, insts []Instruction, labels map[Label]int, offsets []int, +) (at []int, repl [][]Instruction) { for i, inst := range insts { - if inst.Op == OpPseudoLabel || inst.Op == OpPseudoUse { + lbl, ok := inst.Src2.(LabelOperand) + if !ok { continue } + target, bound := labels[lbl.ID] + if !bound { + continue + } + replacement, relaxed := relaxer.Relax(inst, int64(offsets[target]-offsets[i])) + if !relaxed { + continue + } + at = append(at, i) + repl = append(repl, replacement) + } + return at, repl +} + +// resolve concatenates the drafted encodings, re-encoding each label branch +// with its resolved displacement. +func (a *Assembler) resolve( + insts []Instruction, draft [][]byte, offsets []int, labels map[Label]int, +) ([]byte, error) { + enc := a.arch.Encoder() + out := make([]byte, 0, offsets[len(insts)]) + for i, inst := range insts { lbl, isLabel := inst.Src2.(LabelOperand) if !isLabel { - out = append(out, encoded[i]...) + out = append(out, draft[i]...) continue } - target, intra := labels[lbl.ID] - if !intra { - relocs = append(relocs, Relocation{ - InstrIdx: i, - Offset: offsets[i], - Label: lbl.ID, - Inst: inst, - }) - out = append(out, encoded[i]...) - continue + target, bound := labels[lbl.ID] + if !bound { + return nil, fmt.Errorf("%w: label %d", ErrUnresolvedLabel, lbl.ID) } - patched := inst - patched.Src2 = Imm(int64(target - offsets[i])) - bytes, err := enc.Encode(patched) + inst.Src2 = Imm(int64(offsets[target] - offsets[i])) + bytes, err := enc.Encode(inst) if err != nil { - return nil, nil, err + return nil, err } out = append(out, bytes...) } - return out, relocs, nil + return out, nil } -// splice rebuilds insts with every collected replacement spliced -// in and rebases labels across the resulting per-instruction length deltas. -func splice(insts []Instruction, labels map[Label]int, idx []int, repl [][]Instruction) ([]Instruction, map[Label]int) { - prefix := make([]int, len(insts)+1) - for k, i := range idx { - prefix[i+1] = len(repl[k]) - 1 +// splice rebuilds insts with every collected replacement spliced in and +// rebases labels across the resulting per-instruction length deltas. +func splice(insts []Instruction, labels map[Label]int, at []int, repl [][]Instruction) ([]Instruction, map[Label]int) { + shift := make([]int, len(insts)+1) + for k, i := range at { + shift[i+1] = len(repl[k]) - 1 } - for i := 0; i < len(insts); i++ { - prefix[i+1] += prefix[i] + for i := range insts { + shift[i+1] += shift[i] } - out := make([]Instruction, 0, len(insts)+prefix[len(insts)]) + out := make([]Instruction, 0, len(insts)+shift[len(insts)]) k := 0 for i, inst := range insts { - if k < len(idx) && idx[k] == i { + if k < len(at) && at[k] == i { out = append(out, repl[k]...) k++ continue @@ -299,9 +227,9 @@ func splice(insts []Instruction, labels map[Label]int, idx []int, repl [][]Instr out = append(out, inst) } - newLabels := make(map[Label]int, len(labels)) + rebased := make(map[Label]int, len(labels)) for id, pos := range labels { - newLabels[id] = pos + prefix[pos] + rebased[id] = pos + shift[pos] } - return out, newLabels + return out, rebased } diff --git a/asm/assembler_test.go b/asm/assembler_test.go index 6a780a3e..8c1328ba 100644 --- a/asm/assembler_test.go +++ b/asm/assembler_test.go @@ -11,25 +11,20 @@ import ( "github.com/siyul-park/minivm/asm/arm64" ) -// noFrameArch disables spilling so register exhaustion remains observable. +// noFrameArch disables spilling so register exhaustion stays observable. type noFrameArch struct{ asm.Arch } func (noFrameArch) Frame() asm.Frame { return nil } -// TestAssembler_Build covers the public round-trip: Assembler.Build emits a -// Code with the encoded bytes for a trivial add+ret, then Link binds it to -// a buffer and the Callable executes natively. - func TestNew(t *testing.T) { require.NotNil(t, asm.New(arm64.New())) } func TestAssembler_Reg(t *testing.T) { assembler := asm.New(arm64.New()) - first := assembler.Reg(asm.RegTypeInt, asm.Width64) - second := assembler.Reg(asm.RegTypeFloat, asm.Width32) - require.Equal(t, asm.NewVReg(0, asm.RegTypeInt, asm.Width64), first) - require.Equal(t, asm.NewVReg(1, asm.RegTypeFloat, asm.Width32), second) + + require.Equal(t, asm.NewVReg(0, asm.RegTypeInt, asm.Width64), assembler.Reg(asm.RegTypeInt, asm.Width64)) + require.Equal(t, asm.NewVReg(1, asm.RegTypeFloat, asm.Width32), assembler.Reg(asm.RegTypeFloat, asm.Width32)) } func TestAssembler_Label(t *testing.T) { @@ -38,24 +33,53 @@ func TestAssembler_Label(t *testing.T) { } func TestAssembler_Bind(t *testing.T) { - assembler := asm.New(arm64.New()) - label := assembler.Label() - assembler.Bind(label) - code, err := assembler.Build() - require.NoError(t, err) - require.Equal(t, 0, code.Labels[label]) + t.Run("resolves a branch to the bound position", func(t *testing.T) { + assembler := asm.New(arm64.New()) + target := assembler.Label() + assembler.Emit(arm64.BLabel(target)) + assembler.Emit(arm64.RET()) + assembler.Bind(target) + assembler.Emit(arm64.RET()) + + code, err := assembler.Build() + require.NoError(t, err) + // B encodes its displacement as imm26 instruction counts, so the + // branch over one RET is +2: 0x14000002, little endian. + require.Equal(t, []byte{0x02, 0x00, 0x00, 0x14}, code[:4]) + }) + + t.Run("rejects a branch to an unbound label", func(t *testing.T) { + assembler := asm.New(arm64.New()) + assembler.Emit(arm64.BLabel(assembler.Label())) + + _, err := assembler.Build() + require.ErrorIs(t, err, asm.ErrUnresolvedLabel) + }) } -func TestAssembler_Emit(t *testing.T) { +func TestAssembler_Pin(t *testing.T) { assembler := asm.New(arm64.New()) - assembler.Emit(arm64.RET()) - code, err := assembler.Build() - require.NoError(t, err) - require.NotEmpty(t, code.Bytes) + v := assembler.Reg(asm.RegTypeInt, asm.Width64) + + require.NoError(t, assembler.Pin(v, arm64.X0)) + require.NoError(t, assembler.Pin(v, arm64.X0)) + require.ErrorIs(t, assembler.Pin(v, arm64.X1), asm.ErrConflictingPin) + + _, err := assembler.Build() + require.ErrorIs(t, err, asm.ErrConflictingPin) } -func TestAssembler_PseudoUse(t *testing.T) { - t.Run("emits no bytes", func(t *testing.T) { +func TestAssembler_Emit(t *testing.T) { + t.Run("encodes appended instructions", func(t *testing.T) { + assembler := asm.New(arm64.New()) + assembler.Emit(arm64.RET()) + + code, err := assembler.Build() + require.NoError(t, err) + require.NotEmpty(t, code) + }) + + t.Run("pseudo use emits no bytes", func(t *testing.T) { assembler := asm.New(arm64.New()) v := assembler.Reg(asm.RegTypeInt, asm.Width64) assembler.Emit(arm64.LDI(v, 1)...) @@ -69,13 +93,15 @@ func TestAssembler_PseudoUse(t *testing.T) { v = without.Reg(asm.RegTypeInt, asm.Width64) without.Emit(arm64.LDI(v, 1)...) without.Emit(arm64.RET()) + want, err := without.Build() require.NoError(t, err) - require.Equal(t, want.Bytes, code.Bytes) + require.Equal(t, want, code) }) - t.Run("extends live ranges", func(t *testing.T) { + t.Run("pseudo use extends live ranges", func(t *testing.T) { const n = 64 + without := asm.New(noFrameArch{arm64.New()}) for i := 0; i < n; i++ { v := without.Reg(asm.RegTypeInt, asm.Width64) @@ -101,50 +127,28 @@ func TestAssembler_PseudoUse(t *testing.T) { }) } -func TestAssembler_Pin(t *testing.T) { - arch := arm64.New() - - a := asm.New(arch) - v := a.Reg(asm.RegTypeInt, asm.Width64) - - require.NoError(t, a.Pin(v, arm64.X0)) - require.NoError(t, a.Pin(v, arm64.X0)) - require.ErrorIs(t, a.Pin(v, arm64.X1), asm.ErrConflictingPin) - - _, err := a.Build() - require.ErrorIs(t, err, asm.ErrConflictingPin) -} +func TestAssembler_Build(t *testing.T) { + t.Run("rejects a virtual register the assembler never handed out", func(t *testing.T) { + assembler := asm.New(arm64.New()) + assembler.Emit(arm64.MOV(asm.NewVReg(7, asm.RegTypeInt, asm.Width64), arm64.X0)) -func TestAssembler_Entry(t *testing.T) { - // A non-primary entry only runs the shared epilogue on return, never the - // prologue that reserves the spill area, so Build must reject the - // combination explicitly instead of a call through that entry silently - // corrupting SP. - a := asm.New(arm64.New()) - - const n = 64 - vals := make([]asm.VReg, n) - for i := range vals { - vals[i] = a.Reg(asm.RegTypeInt, asm.Width64) - a.Emit(arm64.LDI(vals[i], uint64(i+1))...) - } - acc := vals[0] - for i := 1; i < len(vals); i++ { - next := a.Reg(asm.RegTypeInt, asm.Width64) - a.Emit(arm64.ADD(next, acc, vals[i])) - acc = next - } - a.Emit(arm64.RET()) + _, err := assembler.Build() + require.ErrorIs(t, err, asm.ErrInvalidOperand) + }) - entry := a.Label() - a.Entry(entry) - a.Emit(arm64.RET()) + t.Run("arch without a frame rejects spilling", func(t *testing.T) { + // An Arch whose Frame() returns nil disables spilling: allocation + // fails with ErrNoRegistersAvailable instead of inserting a spill + // frame. Callers that need this (e.g. interp's JIT policy for a + // trace ending in a terminal heap mutation) wrap an existing Arch + // rather than the Assembler exposing a dedicated toggle. + assembler := asm.New(noFrameArch{arm64.New()}) + emitWideSum(assembler, 64) - _, err := a.Build() - require.ErrorIs(t, err, asm.ErrEntryRequiresFrame) -} + _, err := assembler.Build() + require.ErrorIs(t, err, asm.ErrNoRegistersAvailable) + }) -func TestAssembler_Build(t *testing.T) { if runtime.GOARCH != "arm64" { t.Skipf("native invoke requires arm64, got %s", runtime.GOARCH) } @@ -152,261 +156,159 @@ func TestAssembler_Build(t *testing.T) { t.Run("context pointer round trip", func(t *testing.T) { arch := arm64.New() - a := asm.New(arch) - ctx := a.Reg(asm.RegTypeInt, asm.Width64) - va := a.Reg(asm.RegTypeInt, asm.Width64) - vb := a.Reg(asm.RegTypeInt, asm.Width64) - vr := a.Reg(asm.RegTypeInt, asm.Width64) - - require.NoError(t, a.Pin(ctx, arm64.X0)) - - a.Emit(arm64.LDR(va, ctx, 0)) - a.Emit(arm64.LDR(vb, ctx, 8)) - a.Emit(arm64.ADD(vr, va, vb)) - a.Emit(arm64.STR(vr, ctx, 16)) - a.Emit(arm64.RET()) + assembler := asm.New(arch) + ctx := assembler.Reg(asm.RegTypeInt, asm.Width64) + left := assembler.Reg(asm.RegTypeInt, asm.Width64) + right := assembler.Reg(asm.RegTypeInt, asm.Width64) + sum := assembler.Reg(asm.RegTypeInt, asm.Width64) + require.NoError(t, assembler.Pin(ctx, arm64.X0)) + + assembler.Emit(arm64.LDR(left, ctx, 0)) + assembler.Emit(arm64.LDR(right, ctx, 8)) + assembler.Emit(arm64.ADD(sum, left, right)) + assembler.Emit(arm64.STR(sum, ctx, 16)) + assembler.Emit(arm64.RET()) - code, err := a.Build() + code, err := assembler.Build() require.NoError(t, err) - require.NotEmpty(t, code.Bytes) - require.Empty(t, code.Relocs) + require.NotEmpty(t, code) - buf, err := asm.NewBuffer(4096) + buffer, err := asm.NewBuffer(4096) require.NoError(t, err) - defer buf.Free() + defer buffer.Free() - linked, err := asm.Link(buf, arch, []*asm.Code{code}, nil) + callable, err := asm.Link(buffer, arch, code) require.NoError(t, err) - require.Len(t, linked, 1) - - ctxBuf := [3]uint64{3, 4, 0} - require.NoError(t, linked[0].Callable.Call(unsafe.Pointer(&ctxBuf[0]))) - require.Equal(t, [3]uint64{3, 4, 7}, ctxBuf) - }) - - t.Run("arch without a frame rejects spilling", func(t *testing.T) { - // An Arch whose Frame() returns nil disables spilling: allocation - // fails with ErrNoRegistersAvailable instead of inserting a spill - // frame. Callers that need this (e.g. interp's JIT policy for a - // trace ending in a terminal heap mutation) wrap an existing Arch - // rather than the Assembler exposing a dedicated toggle. - a := asm.New(noFrameArch{arm64.New()}) - const n = 64 - vals := make([]asm.VReg, n) - for i := range vals { - vals[i] = a.Reg(asm.RegTypeInt, asm.Width64) - a.Emit(arm64.LDI(vals[i], uint64(i+1))...) - } - acc := vals[0] - for i := 1; i < len(vals); i++ { - next := a.Reg(asm.RegTypeInt, asm.Width64) - a.Emit(arm64.ADD(next, acc, vals[i])) - acc = next - } - a.Emit(arm64.RET()) - - _, err := a.Build() - require.ErrorIs(t, err, asm.ErrNoRegistersAvailable) + values := [3]uint64{3, 4, 0} + require.NoError(t, callable.Call(unsafe.Pointer(&values[0]))) + require.Equal(t, [3]uint64{3, 4, 7}, values) }) t.Run("relaxes out-of-range branches", func(t *testing.T) { // Each case emits a branch whose target is pushed past its +-1MB - // imm19 range by over 1MB of filler, forcing Assembler.encode to relax it. + // imm19 range by over 1MB of filler, forcing Build to relax it. branches := []struct { name string - emit func(a *asm.Assembler, flag asm.VReg, zero asm.Label) + emit func(assembler *asm.Assembler, flag asm.VReg, zero asm.Label) }{ - {"CBZ", func(a *asm.Assembler, flag asm.VReg, zero asm.Label) { - a.Emit(arm64.CBZLabel(flag, zero)) + {"CBZ", func(assembler *asm.Assembler, flag asm.VReg, zero asm.Label) { + assembler.Emit(arm64.CBZLabel(flag, zero)) }}, - {"B.cond", func(a *asm.Assembler, flag asm.VReg, zero asm.Label) { - a.Emit(arm64.CMPI(flag, 0)) - a.Emit(arm64.BCondLabel(arm64.OpBEQ, zero)) + {"B.cond", func(assembler *asm.Assembler, flag asm.VReg, zero asm.Label) { + assembler.Emit(arm64.CMPI(flag, 0)) + assembler.Emit(arm64.BCondLabel(arm64.OpBEQ, zero)) }}, } - for _, tc := range branches { - t.Logf("branch flavor: %s", tc.name) - - arch := arm64.New() - - a := asm.New(arch) - ctx := a.Reg(asm.RegTypeInt, asm.Width64) - flag := a.Reg(asm.RegTypeInt, asm.Width64) - filler := a.Reg(asm.RegTypeInt, asm.Width64) - result := a.Reg(asm.RegTypeInt, asm.Width64) - - require.NoError(t, a.Pin(ctx, arm64.X0)) - - zero := a.Label() - - a.Emit(arm64.LDR(flag, ctx, 0)) - tc.emit(a, flag, zero) - - const fillerCount = 1 << 18 - a.Emit(arm64.LDI(filler, 1)...) - for i := 0; i < fillerCount; i++ { - a.Emit(arm64.ADDI(filler, filler, 1)) - } - - a.Emit(arm64.LDI(result, 1)...) - a.Emit(arm64.STR(result, ctx, 8)) - a.Emit(arm64.RET()) - - a.Bind(zero) - a.Emit(arm64.LDI(result, 0)...) - a.Emit(arm64.STR(result, ctx, 8)) - a.Emit(arm64.RET()) - - code, err := a.Build() - require.NoError(t, err) - require.Greater(t, len(code.Bytes), 1<<20) - - buf, err := asm.NewBuffer(len(code.Bytes) + 4096) - require.NoError(t, err) - defer buf.Free() - - linked, err := asm.Link(buf, arch, []*asm.Code{code}, nil) - require.NoError(t, err) - - notTaken := []uint64{1, 0xFF} - require.NoError(t, linked[0].Callable.Call(unsafe.Pointer(¬Taken[0]))) - require.Equal(t, uint64(1), notTaken[1]) - - taken := []uint64{0, 0xFF} - require.NoError(t, linked[0].Callable.Call(unsafe.Pointer(&taken[0]))) - require.Equal(t, uint64(0), taken[1]) + for _, tt := range branches { + t.Run(tt.name, func(t *testing.T) { + arch := arm64.New() + + assembler := asm.New(arch) + ctx := assembler.Reg(asm.RegTypeInt, asm.Width64) + flag := assembler.Reg(asm.RegTypeInt, asm.Width64) + filler := assembler.Reg(asm.RegTypeInt, asm.Width64) + result := assembler.Reg(asm.RegTypeInt, asm.Width64) + require.NoError(t, assembler.Pin(ctx, arm64.X0)) + + zero := assembler.Label() + + assembler.Emit(arm64.LDR(flag, ctx, 0)) + tt.emit(assembler, flag, zero) + + const fillerCount = 1 << 18 + assembler.Emit(arm64.LDI(filler, 1)...) + for i := 0; i < fillerCount; i++ { + assembler.Emit(arm64.ADDI(filler, filler, 1)) + } + + assembler.Emit(arm64.LDI(result, 1)...) + assembler.Emit(arm64.STR(result, ctx, 8)) + assembler.Emit(arm64.RET()) + + assembler.Bind(zero) + assembler.Emit(arm64.LDI(result, 0)...) + assembler.Emit(arm64.STR(result, ctx, 8)) + assembler.Emit(arm64.RET()) + + code, err := assembler.Build() + require.NoError(t, err) + require.Greater(t, len(code), 1<<20) + + buffer, err := asm.NewBuffer(len(code) + 4096) + require.NoError(t, err) + defer buffer.Free() + + callable, err := asm.Link(buffer, arch, code) + require.NoError(t, err) + + notTaken := []uint64{1, 0xFF} + require.NoError(t, callable.Call(unsafe.Pointer(¬Taken[0]))) + require.Equal(t, uint64(1), notTaken[1]) + + taken := []uint64{0, 0xFF} + require.NoError(t, callable.Call(unsafe.Pointer(&taken[0]))) + require.Equal(t, uint64(0), taken[1]) + }) } }) t.Run("spills under register pressure", func(t *testing.T) { - arch := arm64.New() - - a := asm.New(arch) - ctx := a.Reg(asm.RegTypeInt, asm.Width64) - require.NoError(t, a.Pin(ctx, arm64.X0)) - // Hold far more values live at once than the integer bank has - // allocatable registers, forcing the allocator to spill. Every - // value stays live until the final fold, so the allocator must - // keep spilling and reloading; a balanced SP frame is proven by - // the call returning cleanly with the correct sum. - const n = 256 - var want uint64 - vals := make([]asm.VReg, n) - for i := 0; i < n; i++ { - v := a.Reg(asm.RegTypeInt, asm.Width64) - val := uint64(i*7 + 1) - want += val - a.Emit(arm64.LDI(v, val)...) - vals[i] = v - } - - acc := vals[0] - for i := 1; i < n; i++ { - next := a.Reg(asm.RegTypeInt, asm.Width64) - a.Emit(arm64.ADD(next, acc, vals[i])) - acc = next - } + // allocatable registers, forcing the allocator to spill. Every value + // stays live until the final fold, so the allocator must keep + // spilling and reloading; a balanced SP frame is proven by the call + // returning cleanly with the correct sum. + arch := arm64.New() - a.Emit(arm64.STR(acc, ctx, 0)) - a.Emit(arm64.RET()) + assembler := asm.New(arch) + ctx := assembler.Reg(asm.RegTypeInt, asm.Width64) + require.NoError(t, assembler.Pin(ctx, arm64.X0)) + sum := emitWideSum(assembler, 256) + assembler.Emit(arm64.STR(sum, ctx, 0)) + assembler.Emit(arm64.RET()) - code, err := a.Build() + code, err := assembler.Build() require.NoError(t, err) - require.NotEmpty(t, code.Bytes) - buf, err := asm.NewBuffer(4096) + buffer, err := asm.NewBuffer(4096) require.NoError(t, err) - defer buf.Free() + defer buffer.Free() - linked, err := asm.Link(buf, arch, []*asm.Code{code}, nil) + callable, err := asm.Link(buffer, arch, code) require.NoError(t, err) + want := uint64(0) + for i := 0; i < 256; i++ { + want += uint64(i*7 + 1) + } + // Run on a fresh goroutine each time so the spill frame is exercised + // against a stack the Go runtime may still grow and relocate. for range 64 { - ctxBuf := [1]uint64{} + values := [1]uint64{} done := make(chan error, 1) go func() { - done <- linked[0].Callable.Call(unsafe.Pointer(&ctxBuf[0])) + done <- callable.Call(unsafe.Pointer(&values[0])) }() require.NoError(t, <-done) - require.Equal(t, want, ctxBuf[0]) + require.Equal(t, want, values[0]) } }) +} - t.Run("keeps the spill frame balanced across an external BL", func(t *testing.T) { - // Regression check: the spill-frame injector used to re-reserve the - // spill area after every BL to a LabelOperand, whether the label - // resolved inside this Code (a self-call, which does run this Code's - // epilogue on return) or externally via Link (which does not). The - // stray reservation was never released, drifting SP on every call. - arch := arm64.New() - - enc := arm64.NewEncoder() - retBytes, err := enc.Encode(arm64.RET()) - require.NoError(t, err) - - buf, err := asm.NewBuffer(4096) - require.NoError(t, err) - defer buf.Free() - - // A bare RET stands in for an external callee: it proves nothing - // about the callee's own frame, only that the caller's SP survives - // a call whose target label is never bound in the caller's Code. - stub, err := buf.Write(retBytes) - require.NoError(t, err) - - a := asm.New(arch) - ctx := a.Reg(asm.RegTypeInt, asm.Width64) - require.NoError(t, a.Pin(ctx, arm64.X0)) - - external := a.Label() // never bound in this Code: an external reloc - - const n = 256 - var want uint64 - vals := make([]asm.VReg, n) - for i := 0; i < n; i++ { - v := a.Reg(asm.RegTypeInt, asm.Width64) - val := uint64(i*7 + 1) - want += val - a.Emit(arm64.LDI(v, val)...) - vals[i] = v - } - - // BL clobbers LR; save/restore it around the call as any real caller - // must, so the test isolates the spill-frame bug rather than a - // missing link-register save. - savedLR := a.Reg(asm.RegTypeInt, asm.Width64) - a.Emit(arm64.MOV(savedLR, arm64.LR)) - a.Emit(arm64.BLLabel(external)) - a.Emit(arm64.MOV(arm64.LR, savedLR)) - - acc := vals[0] - for i := 1; i < n; i++ { - next := a.Reg(asm.RegTypeInt, asm.Width64) - a.Emit(arm64.ADD(next, acc, vals[i])) - acc = next - } - a.Emit(arm64.STR(acc, ctx, 0)) - a.Emit(arm64.RET()) - - code, err := a.Build() - require.NoError(t, err) - require.NotEmpty(t, code.Relocs) - - resolve := func(id asm.Label) (unsafe.Pointer, error) { - if id == external { - return stub, nil - } - return nil, asm.ErrUnresolvedLabel - } - linked, err := asm.Link(buf, arch, []*asm.Code{code}, resolve) - require.NoError(t, err) - - for range 8 { - ctxBuf := [1]uint64{} - require.NoError(t, linked[0].Callable.Call(unsafe.Pointer(&ctxBuf[0]))) - require.Equal(t, want, ctxBuf[0]) - } - }) +// emitWideSum loads n distinct values, keeps every one live, and folds them +// into a single register, so the register bank is oversubscribed by n. +func emitWideSum(assembler *asm.Assembler, n int) asm.VReg { + values := make([]asm.VReg, n) + for i := range values { + values[i] = assembler.Reg(asm.RegTypeInt, asm.Width64) + assembler.Emit(arm64.LDI(values[i], uint64(i*7+1))...) + } + sum := values[0] + for _, v := range values[1:] { + next := assembler.Reg(asm.RegTypeInt, asm.Width64) + assembler.Emit(arm64.ADD(next, sum, v)) + sum = next + } + return sum } diff --git a/asm/buffer.go b/asm/buffer.go index 273f851f..799f2101 100644 --- a/asm/buffer.go +++ b/asm/buffer.go @@ -7,20 +7,20 @@ import ( "unsafe" ) -// Buffer is an mmap'd executable memory region. It manages its own W^X -// transitions: callers append bytes via Write, then read back the resulting -// entry pointer via Ptr. Concurrent reads are safe; writes serialize on an -// internal lock and remap pages to RW for the duration of the write. +// Buffer is an mmap'd executable memory region. Link installs machine code +// into it; the Buffer owns the W^X transition around every install, so code +// is executable whenever no install is in flight. Installs serialize on an +// internal lock, and executing installed code concurrently is safe. // -// Older mappings are retained in old so pointers stamped into them by linked -// code stay valid after a grow. +// A region that runs out of space is replaced by a larger mapping and +// retained, so entry pointers callers already hold stay valid and +// executable. type Buffer struct { old []memory mem memory offset int - mu sync.Mutex - sealed bool + mu sync.Mutex } var ErrBufferFull = errors.New("buffer full") @@ -35,34 +35,11 @@ func NewBuffer(size int) (*Buffer, error) { return &Buffer{mem: mem}, nil } -// Write appends bytes to the buffer and returns a pointer to the start of -// the written region. The pointer is stable for the lifetime of the Buffer -// (or until grow re-mmap's). The buffer is left sealed (executable) on -// return. -func (b *Buffer) Write(code []byte) (unsafe.Pointer, error) { - b.mu.Lock() - defer b.mu.Unlock() - - if err := b.unseal(); err != nil { - return nil, err - } - - ptr, err := b.write(code) - if err != nil { - _ = b.seal() - return nil, err - } - - if err := b.seal(); err != nil { - return nil, err - } - return ptr, nil -} - -// Free releases the current and archived mmap mappings. +// Free releases the current and retained mmap mappings. func (b *Buffer) Free() error { b.mu.Lock() defer b.mu.Unlock() + for _, m := range b.old { if err := m.free(); err != nil { return err @@ -72,149 +49,58 @@ func (b *Buffer) Free() error { return b.mem.free() } -func (b *Buffer) writeBatch(codes [][]byte, patch func([]unsafe.Pointer) error) ([]unsafe.Pointer, error) { +// install appends code to the buffer and returns the address it starts at. +// The buffer is executable on return, whether or not the append succeeded. +func (b *Buffer) install(code []byte) (unsafe.Pointer, error) { b.mu.Lock() defer b.mu.Unlock() - if err := b.unseal(); err != nil { + if err := b.mem.writable(); err != nil { return nil, err } - - bases := make([]unsafe.Pointer, len(codes)) - for i, code := range codes { - base, err := b.write(code) - if err != nil { - _ = b.seal() - return nil, err - } - bases[i] = base - } - - if patch != nil { - if err := patch(bases); err != nil { - _ = b.seal() - return nil, err - } + addr, err := b.append(code) + if sealErr := b.mem.executable(); err == nil { + err = sealErr } - - if err := b.seal(); err != nil { + if err != nil { return nil, err } - return bases, nil + return addr, nil } -func (b *Buffer) write(code []byte) (unsafe.Pointer, error) { +// append copies code at the current offset, growing the mapping first when +// it no longer fits. The caller must hold b.mu and have made the current +// mapping writable. +func (b *Buffer) append(code []byte) (unsafe.Pointer, error) { end := b.offset + len(code) if end > len(b.mem) { - // Seal the outgoing region before retention so pointers callers - // stamped into it stay executable. - if err := b.grow(end, memory.executable); err != nil { + if err := b.grow(len(code)); err != nil { return nil, fmt.Errorf("%w: grow to %d", ErrBufferFull, end) } - end = b.offset + len(code) + end = len(code) } copy(b.mem[b.offset:end], code) - ptr := unsafe.Pointer(&b.mem[b.offset]) + addr := unsafe.Pointer(&b.mem[b.offset]) b.offset = end - - return ptr, nil + return addr, nil } -// writeAt overwrites the bytes starting at ptr with code. ptr must point -// inside any region managed by this buffer (current or previously grown). -// Used by Link to patch relocations. -func (b *Buffer) writeAt(ptr unsafe.Pointer, code []byte) (int, error) { - b.mu.Lock() - defer b.mu.Unlock() - - return b.patch(ptr, code, false) -} - -func (b *Buffer) patch(ptr unsafe.Pointer, code []byte, unsealed bool) (int, error) { - mem, off, current, ok := b.locate(ptr, len(code)) - if !ok { - return 0, fmt.Errorf("%w: writeAt out of range", ErrInvalidArgs) - } - if unsealed && current { - // writeBatch already opened the active mapping; keep the seal window - // owned by that outer call. - copy(mem[off:off+len(code)], code) - return len(code), nil - } - - open, close := mem.writable, mem.executable - if current { - open, close = b.unseal, b.seal - } - if err := open(); err != nil { - return 0, err - } - copy(mem[off:off+len(code)], code) - if err := close(); err != nil { - return 0, err - } - return len(code), nil -} - -// locate finds the region containing ptr's n-byte range. current is true -// when the hit is the active mapping (callers must round-trip seal/unseal -// to keep b.sealed consistent). -func (b *Buffer) locate(ptr unsafe.Pointer, n int) (memory, int, bool, bool) { - if off, ok := b.mem.within(ptr, n); ok { - return b.mem, off, true, true - } - for _, r := range b.old { - if off, ok := r.within(ptr, n); ok { - return r, off, false, true - } - } - return nil, 0, false, false -} - -// grow archives the current mapping and installs a freshly mapped region at -// least need bytes long. archive, when non-nil, runs on the outgoing region -// before it is retained (e.g. to flip code back to executable). The caller -// must hold b.mu. -func (b *Buffer) grow(need int, archive func(memory) error) error { - size := len(b.mem) * 2 - if size < need { - size = need - } +// grow retains the current mapping — sealed executable so pointers into it +// keep working — and installs a freshly mapped writable region at least need +// bytes long. The caller must hold b.mu. +func (b *Buffer) grow(need int) error { + size := max(len(b.mem)*2, need) mem, err := allocMemory(size) if err != nil { return err } - if archive != nil { - if err := archive(b.mem); err != nil { - _ = mem.free() - return err - } + if err := b.mem.executable(); err != nil { + _ = mem.free() + return err } b.old = append(b.old, b.mem) b.mem = mem b.offset = 0 return nil } - -func (b *Buffer) unseal() error { - if !b.sealed { - return nil - } - if err := b.mem.writable(); err != nil { - return err - } - b.sealed = false - return nil -} - -func (b *Buffer) seal() error { - if b.sealed { - return nil - } - if err := b.mem.executable(); err != nil { - return err - } - b.sealed = true - return nil -} diff --git a/asm/buffer_test.go b/asm/buffer_test.go index 3ee09c91..cf3dd032 100644 --- a/asm/buffer_test.go +++ b/asm/buffer_test.go @@ -1,87 +1,28 @@ -package asm +package asm_test import ( "testing" - "unsafe" "github.com/stretchr/testify/require" + + "github.com/siyul-park/minivm/asm" ) func TestNewBuffer(t *testing.T) { - buffer, err := NewBuffer(1) - require.NoError(t, err) - defer buffer.Free() - require.NotEmpty(t, buffer.mem) -} - -func TestBuffer_Write(t *testing.T) { - t.Run("appends bytes and returns stable pointer", func(t *testing.T) { - b, err := NewBuffer(64) - require.NoError(t, err) - defer b.Free() - - p1, err := b.Write([]byte{0x01, 0x02, 0x03, 0x04}) - require.NoError(t, err) - require.NotNil(t, p1) - - p2, err := b.Write([]byte{0x05, 0x06}) - require.NoError(t, err) - require.NotEqual(t, p1, p2) - }) - - t.Run("invalid size", func(t *testing.T) { - _, err := NewBuffer(0) - require.ErrorIs(t, err, ErrInvalidSize) - }) - - t.Run("resets offset after grow", func(t *testing.T) { - b, err := NewBuffer(1) - require.NoError(t, err) - defer b.Free() - - _, err = b.Write(make([]byte, len(b.mem))) - require.NoError(t, err) - require.Equal(t, len(b.mem), b.offset) - - _, err = b.Write([]byte{0x01, 0x02, 0x03}) - require.NoError(t, err) - require.Len(t, b.old, 1) - require.Equal(t, 3, b.offset) - }) - - t.Run("patches batch writes without leaving the buffer writable", func(t *testing.T) { - b, err := NewBuffer(64) - require.NoError(t, err) - defer b.Free() - - bases, err := b.writeBatch([][]byte{{0x01}, {0x02, 0x03}}, func(bases []unsafe.Pointer) error { - _, err := b.patch(bases[0], []byte{0x09}, true) - require.NoError(t, err) - require.False(t, b.sealed) - return nil - }) + t.Run("allocates a mapping", func(t *testing.T) { + buffer, err := asm.NewBuffer(1) require.NoError(t, err) - require.True(t, b.sealed) - require.Len(t, bases, 2) - require.Equal(t, byte(0x09), (*[1]byte)(bases[0])[0]) + require.NoError(t, buffer.Free()) }) - t.Run("seals after batch patch error", func(t *testing.T) { - b, err := NewBuffer(64) - require.NoError(t, err) - defer b.Free() - - _, err = b.writeBatch([][]byte{{0x01}, {0x02, 0x03}}, func([]unsafe.Pointer) error { - require.False(t, b.sealed) - return ErrInvalidArgs - }) - require.ErrorIs(t, err, ErrInvalidArgs) - require.True(t, b.sealed) + t.Run("rejects a non-positive size", func(t *testing.T) { + _, err := asm.NewBuffer(0) + require.ErrorIs(t, err, asm.ErrInvalidSize) }) } func TestBuffer_Free(t *testing.T) { - buffer, err := NewBuffer(1) + buffer, err := asm.NewBuffer(1) require.NoError(t, err) require.NoError(t, buffer.Free()) } diff --git a/asm/code.go b/asm/code.go deleted file mode 100644 index 56943904..00000000 --- a/asm/code.go +++ /dev/null @@ -1,25 +0,0 @@ -package asm - -// Code is the output of Assembler.Build: a fully encoded byte sequence with -// its own label table, the externally unresolved label references that need -// Link to patch, and any additional named entry points embedded in the byte -// stream. -// -// Build resolves every label that points inside the same Code. Only -// references to labels bound in other Codes survive in Relocs. -type Code struct { - Bytes []byte - Labels map[Label]int - Relocs []Relocation - Entries []Label -} - -// Relocation records an unresolved label reference inside a Code. At Link -// time the instruction at InstrIdx is re-encoded with the resolved offset -// and overwritten at Offset bytes into Bytes. -type Relocation struct { - InstrIdx int - Offset int - Label Label - Inst Instruction -} diff --git a/asm/instr.go b/asm/instr.go index b5e07800..4d384a0b 100644 --- a/asm/instr.go +++ b/asm/instr.go @@ -1,11 +1,14 @@ package asm -import "fmt" +import ( + "fmt" + "strings" +) // Instruction is the architecture-neutral IR row consumed by the -// assembler. Op is opaque to asm/; each architecture defines its own -// Op constants. Up to four operand slots cover every supported -// instruction shape; unused tails stay nil. +// assembler. Op is opaque to asm; each architecture defines its own Op +// constants. Four operand slots cover every supported instruction shape; +// unused tails stay nil. type Instruction struct { Op uint16 Dst Operand @@ -15,61 +18,59 @@ type Instruction struct { } // OpPseudoUse is a zero-byte pseudo-instruction that extends the live range -// of virtual-register source operands through its position. -const OpPseudoUse uint16 = 0xFFFE +// of its virtual-register source operands through its position. +const OpPseudoUse uint16 = 0xFFFF -// OpPseudoLabel is a pseudo-instruction that marks a label position and -// emits zero bytes during encoding. -const OpPseudoLabel uint16 = 0xFFFF - -// Def returns the destination vreg if Dst is a virtual-register operand. -// Pure operand inspection — no side effects. -func (i Instruction) Def() (VReg, bool) { - if v, ok := i.Dst.(VRegOperand); ok { - return v.Reg, true +func (i Instruction) String() string { + var b strings.Builder + fmt.Fprintf(&b, "%d", i.Op) + sep := " " + for _, op := range [4]Operand{i.Dst, i.Src1, i.Src2, i.Src3} { + if op == nil { + continue + } + b.WriteString(sep) + b.WriteString(op.String()) + sep = ", " } - return VReg{}, false + return b.String() } -// Uses returns every vreg the instruction reads, including memory-base -// references in any operand slot. Order is Dst-base, Src1, Src2, Src3. -func (i Instruction) Uses() []VReg { - memBase := func(op Operand) (VReg, bool) { - mem, ok := op.(MemOperand) - if !ok { - return VReg{}, false - } - v, ok := mem.Base.(VRegOperand) - if !ok { - return VReg{}, false - } - return v.Reg, true - } - var regs []VReg - if base, ok := memBase(i.Dst); ok { - regs = append(regs, base) +// def returns the virtual register the instruction writes. +func (i Instruction) def() (VReg, bool) { + v, ok := i.Dst.(VRegOperand) + return v.Reg, ok +} + +// uses collects every virtual register the instruction reads: the +// destination's memory base, then each source's register or memory base. +// The count is bounded by the four operand slots, so the result never +// escapes to the heap. +func (i Instruction) uses() (regs [4]VReg, n int) { + if v, ok := base(i.Dst); ok { + regs[n] = v + n++ } - for _, op := range []Operand{i.Src1, i.Src2, i.Src3} { + for _, op := range [3]Operand{i.Src1, i.Src2, i.Src3} { if v, ok := op.(VRegOperand); ok { - regs = append(regs, v.Reg) + regs[n] = v.Reg + n++ continue } - if base, ok := memBase(op); ok { - regs = append(regs, base) + if v, ok := base(op); ok { + regs[n] = v + n++ } } - return regs + return regs, n } -func (i Instruction) String() string { - switch { - case i.Dst != nil && i.Src1 != nil && i.Src2 != nil: - return fmt.Sprintf("%v %v, %v, %v", i.Op, i.Dst, i.Src1, i.Src2) - case i.Dst != nil && i.Src1 != nil: - return fmt.Sprintf("%v %v, %v", i.Op, i.Dst, i.Src1) - case i.Dst != nil: - return fmt.Sprintf("%v %v", i.Op, i.Dst) - default: - return fmt.Sprintf("%v", i.Op) +// base returns the virtual register op dereferences as a memory address. +func base(op Operand) (VReg, bool) { + mem, ok := op.(MemOperand) + if !ok { + return VReg{}, false } + v, ok := mem.Base.(VRegOperand) + return v.Reg, ok } diff --git a/asm/instr_test.go b/asm/instr_test.go index 999a2f81..6ce3d275 100644 --- a/asm/instr_test.go +++ b/asm/instr_test.go @@ -1,44 +1,32 @@ -package asm +package asm_test import ( "testing" "github.com/stretchr/testify/require" -) - -func TestInstruction_Def(t *testing.T) { - reg := NewVReg(1, RegTypeInt, Width64) - got, ok := (Instruction{Dst: V(reg)}).Def() - require.True(t, ok) - require.Equal(t, reg, got) - - got, ok = (Instruction{Dst: Imm(1)}).Def() - require.False(t, ok) - require.Zero(t, got) -} - -func TestInstruction_Uses(t *testing.T) { - a := NewVReg(1, RegTypeInt, Width64) - b := NewVReg(2, RegTypeInt, Width64) - c := NewVReg(3, RegTypeInt, Width64) - - inst := Instruction{ - Dst: Mem(V(a), 8), - Src1: V(b), - Src2: Mem(V(c), 16), - Src3: Imm(1), - } - - require.Equal(t, []VReg{a, b, c}, inst.Uses()) - require.Equal(t, []VReg{a, b}, (Instruction{Op: OpPseudoUse, Src1: V(a), Src2: V(b)}).Uses()) -} + "github.com/siyul-park/minivm/asm" +) func TestInstruction_String(t *testing.T) { - reg := NewVReg(1, RegTypeInt, Width64) - - require.Equal(t, "1", (Instruction{Op: 1}).String()) - require.Equal(t, "1 vr1", (Instruction{Op: 1, Dst: V(reg)}).String()) - require.Equal(t, "1 vr1, #2", (Instruction{Op: 1, Dst: V(reg), Src1: Imm(2)}).String()) - require.Equal(t, "1 vr1, #2, #3", (Instruction{Op: 1, Dst: V(reg), Src1: Imm(2), Src2: Imm(3)}).String()) + reg := asm.NewVReg(1, asm.RegTypeInt, asm.Width64) + + tests := []struct { + inst asm.Instruction + str string + }{ + {asm.Instruction{Op: 1}, "1"}, + {asm.Instruction{Op: 1, Dst: asm.V(reg)}, "1 vr1"}, + {asm.Instruction{Op: 1, Src2: asm.Imm(3)}, "1 #3"}, + {asm.Instruction{Op: 1, Dst: asm.V(reg), Src1: asm.Imm(2)}, "1 vr1, #2"}, + { + asm.Instruction{Op: 1, Dst: asm.V(reg), Src1: asm.Imm(2), Src2: asm.Imm(3), Src3: asm.Imm(4)}, + "1 vr1, #2, #3, #4", + }, + } + for _, tt := range tests { + t.Run(tt.str, func(t *testing.T) { + require.Equal(t, tt.str, tt.inst.String()) + }) + } } diff --git a/asm/link.go b/asm/link.go index 8f90910e..9e1db370 100644 --- a/asm/link.go +++ b/asm/link.go @@ -1,115 +1,19 @@ package asm import ( - "errors" "fmt" - "unsafe" ) -// Resolver returns the runtime address of a label bound outside the current -// set of Codes (typically: a previously linked Code, an indirection slot, -// or a host function). Implementations may return ErrUnresolvedLabel to -// signal a hard miss. -type Resolver func(Label) (unsafe.Pointer, error) - -// Linked is the linked native surface for one Code. Callable is the primary -// entry at Code.Bytes[0]; Entries contains additional callables declared by -// Code.Entries and keyed by their labels. -type Linked struct { - Callable Callable - Entries map[Label]Callable -} - -var ErrUnresolvedLabel = errors.New("unresolved label") - -// Link installs each Code into buf, patches its external relocations using -// resolve, and constructs one primary Callable per Code plus additional -// callables for each Code.Entries label, via the architecture's ABI. The -// order of returned Linked values matches the order of codes. -func Link(buf *Buffer, arch Arch, codes []*Code, resolve Resolver) ([]Linked, error) { +// Link installs one Assembler.Build result into buf and binds it as a +// Callable through the architecture's ABI. The returned Callable stays valid +// for the lifetime of buf. +func Link(buf *Buffer, arch Arch, code []byte) (Callable, error) { if buf == nil { return nil, fmt.Errorf("%w: nil buffer", ErrInvalidArgs) } - - chunks := make([][]byte, len(codes)) - for i, c := range codes { - chunks[i] = c.Bytes - } - - bases, err := buf.writeBatch(chunks, func(bases []unsafe.Pointer) error { - return patch(buf, arch, codes, bases, resolve) - }) + addr, err := buf.install(code) if err != nil { return nil, err } - - linked := make([]Linked, len(codes)) - for i, c := range codes { - callable, err := arch.ABI().NewCallable(bases[i]) - if err != nil { - return nil, err - } - linked[i].Callable = callable - - if len(c.Entries) == 0 { - continue - } - linked[i].Entries = make(map[Label]Callable, len(c.Entries)) - for _, id := range c.Entries { - off, ok := c.Labels[id] - if !ok { - return nil, fmt.Errorf("%w: entry label %d", ErrUnresolvedLabel, id) - } - entry, err := arch.ABI().NewCallable(unsafe.Add(bases[i], off)) - if err != nil { - return nil, err - } - linked[i].Entries[id] = entry - } - } - return linked, nil -} - -// patch re-encodes every Relocation whose target lives -// outside the corresponding Code and overwrites the placeholder bytes in -// the buffer. Targets resolve in this priority order: (1) a label bound in -// any of the freshly linked Codes, (2) the provided resolve callback. -func patch(buf *Buffer, arch Arch, codes []*Code, bases []unsafe.Pointer, resolve Resolver) error { - external := make(map[Label]unsafe.Pointer) - for i, c := range codes { - for id, off := range c.Labels { - external[id] = unsafe.Add(bases[i], off) - } - } - - enc := arch.Encoder() - for i, c := range codes { - for _, rel := range c.Relocs { - target, ok := external[rel.Label] - if !ok { - if resolve == nil { - return fmt.Errorf("%w: label %d", ErrUnresolvedLabel, rel.Label) - } - addr, err := resolve(rel.Label) - if err != nil { - return fmt.Errorf("%w: label %d: %w", ErrUnresolvedLabel, rel.Label, err) - } - target = addr - } - - src := unsafe.Add(bases[i], rel.Offset) - delta := int64(uintptr(target)) - int64(uintptr(src)) - - patched := rel.Inst - patched.Src2 = Imm(delta) - code, err := enc.Encode(patched) - if err != nil { - return err - } - if _, err := buf.patch(src, code, true); err != nil { - return err - } - } - } - return nil + return arch.ABI().NewCallable(addr) } diff --git a/asm/link_test.go b/asm/link_test.go index c670dc3d..145b0153 100644 --- a/asm/link_test.go +++ b/asm/link_test.go @@ -5,14 +5,15 @@ import ( "testing" "unsafe" + "github.com/stretchr/testify/require" + "github.com/siyul-park/minivm/asm" "github.com/siyul-park/minivm/asm/arm64" - "github.com/stretchr/testify/require" ) func TestLink(t *testing.T) { t.Run("nil buffer", func(t *testing.T) { - _, err := asm.Link(nil, arm64.New(), nil, nil) + _, err := asm.Link(nil, arm64.New(), nil) require.ErrorIs(t, err, asm.ErrInvalidArgs) }) @@ -20,42 +21,44 @@ func TestLink(t *testing.T) { t.Skipf("native invoke requires arm64, got %s", runtime.GOARCH) } - t.Run("exposes internal entry", func(t *testing.T) { + t.Run("keeps earlier entries callable after the buffer grows", func(t *testing.T) { + // A buffer sized for one entry must grow on the second install. The + // outgoing mapping is retained and resealed, so the first Callable + // stays executable and its Addr keeps pointing at live code. arch := arm64.New() - a := asm.New(arch) - ctx := a.Reg(asm.RegTypeInt, asm.Width64) - v := a.Reg(asm.RegTypeInt, asm.Width64) - require.NoError(t, a.Pin(ctx, arm64.X0)) - - entry := a.Label() - a.Emit(arm64.LDI(v, 3)...) - a.Emit(arm64.STR(v, ctx, 0)) - a.Emit(arm64.RET()) - a.Entry(entry) - a.Emit(arm64.LDR(v, ctx, 0)) - a.Emit(arm64.ADDI(v, v, 1)) - a.Emit(arm64.STR(v, ctx, 0)) - a.Emit(arm64.RET()) - - code, err := a.Build() + buffer, err := asm.NewBuffer(1) require.NoError(t, err) + defer buffer.Free() - buf, err := asm.NewBuffer(4096) - require.NoError(t, err) - defer buf.Free() + callables := make([]asm.Callable, 2) + for i := range callables { + assembler := asm.New(arch) + ctx := assembler.Reg(asm.RegTypeInt, asm.Width64) + value := assembler.Reg(asm.RegTypeInt, asm.Width64) + require.NoError(t, assembler.Pin(ctx, arm64.X0)) - linked, err := asm.Link(buf, arch, []*asm.Code{code}, nil) - require.NoError(t, err) - require.Len(t, linked, 1) - require.Contains(t, linked[0].Entries, entry) + assembler.Emit(arm64.LDI(value, uint64(i+1))...) + assembler.Emit(arm64.STR(value, ctx, 0)) + // Pad past a page so the second install cannot share the first + // mapping. + for range 1024 { + assembler.Emit(arm64.ADDI(value, value, 0)) + } + assembler.Emit(arm64.RET()) + + code, err := assembler.Build() + require.NoError(t, err) - ctxBuf := []uint64{0} - require.NoError(t, linked[0].Callable.Call(unsafe.Pointer(&ctxBuf[0]))) - require.Equal(t, uint64(3), ctxBuf[0]) + callables[i], err = asm.Link(buffer, arch, code) + require.NoError(t, err) + require.NotNil(t, callables[i].Addr()) + } - ctxBuf[0] = 41 - require.NoError(t, linked[0].Entries[entry].Call(unsafe.Pointer(&ctxBuf[0]))) - require.Equal(t, uint64(42), ctxBuf[0]) + for i, callable := range callables { + slot := [1]uint64{} + require.NoError(t, callable.Call(unsafe.Pointer(&slot[0]))) + require.Equal(t, uint64(i+1), slot[0]) + } }) } diff --git a/asm/memory.go b/asm/memory.go index c7fff3c5..9bdf54d2 100644 --- a/asm/memory.go +++ b/asm/memory.go @@ -52,27 +52,6 @@ func (m memory) writable() error { return nil } -func (m memory) ptr() unsafe.Pointer { - if len(m) == 0 { - return nil - } - return unsafe.Pointer(&m[0]) -} - -// within reports whether ptr's n-byte range lies inside m. The returned -// offset is the byte index of ptr from the start of m. -func (m memory) within(ptr unsafe.Pointer, n int) (int, bool) { - if len(m) == 0 { - return 0, false - } - base := uintptr(unsafe.Pointer(&m[0])) - off := uintptr(ptr) - base - if off > uintptr(len(m)) || off+uintptr(n) > uintptr(len(m)) { - return 0, false - } - return int(off), true -} - func (m memory) free() error { if len(m) == 0 { return nil diff --git a/asm/memory_stub.go b/asm/memory_stub.go index 1c7d7918..1b83fc24 100644 --- a/asm/memory_stub.go +++ b/asm/memory_stub.go @@ -6,7 +6,6 @@ import ( "errors" "fmt" "runtime" - "unsafe" ) type memory []byte @@ -32,25 +31,6 @@ func (m memory) writable() error { return fmt.Errorf("%w: unsupported platform %s/%s", ErrMprotectFailed, runtime.GOOS, runtime.GOARCH) } -func (m memory) ptr() unsafe.Pointer { - if len(m) == 0 { - return nil - } - return unsafe.Pointer(&m[0]) -} - -func (m memory) within(ptr unsafe.Pointer, n int) (int, bool) { - if len(m) == 0 { - return 0, false - } - base := uintptr(unsafe.Pointer(&m[0])) - off := uintptr(ptr) - base - if off > uintptr(len(m)) || off+uintptr(n) > uintptr(len(m)) { - return 0, false - } - return int(off), true -} - func (m memory) free() error { if len(m) == 0 { return nil diff --git a/asm/operand.go b/asm/operand.go index 6bf04d82..2488dfe2 100644 --- a/asm/operand.go +++ b/asm/operand.go @@ -52,11 +52,6 @@ func Imm(v int64) ImmOperand { return ImmOperand{Value: v} } -// LabelOp wraps a label id as an operand. -func LabelOp(id Label) LabelOperand { - return LabelOperand{ID: id} -} - // Mem wraps a base + offset memory reference as an operand. func Mem(base Operand, offset int64) MemOperand { return MemOperand{Base: base, Offset: offset} diff --git a/asm/operand_test.go b/asm/operand_test.go index fd058827..6c512728 100644 --- a/asm/operand_test.go +++ b/asm/operand_test.go @@ -1,53 +1,40 @@ -package asm +package asm_test import ( "testing" "github.com/stretchr/testify/require" + + "github.com/siyul-park/minivm/asm" ) func TestV(t *testing.T) { - reg := NewVReg(1, RegTypeInt, Width64) - require.Equal(t, VRegOperand{Reg: reg}, V(reg)) + reg := asm.NewVReg(1, asm.RegTypeInt, asm.Width64) + + require.Equal(t, asm.VRegOperand{Reg: reg}, asm.V(reg)) + require.Equal(t, "vr1", asm.V(reg).String()) } func TestP(t *testing.T) { - reg := NewPReg(1, RegTypeInt, Width64) - require.Equal(t, PRegOperand{Reg: reg}, P(reg)) -} + reg := asm.NewPReg(1, asm.RegTypeInt, asm.Width64) -func TestImm(t *testing.T) { - require.Equal(t, ImmOperand{Value: 1}, Imm(1)) + require.Equal(t, asm.PRegOperand{Reg: reg}, asm.P(reg)) + require.Equal(t, "x1", asm.P(reg).String()) } -func TestLabelOp(t *testing.T) { - require.Equal(t, LabelOperand{ID: 1}, LabelOp(1)) +func TestImm(t *testing.T) { + require.Equal(t, asm.ImmOperand{Value: -1}, asm.Imm(-1)) + require.Equal(t, "#-1", asm.Imm(-1).String()) } func TestMem(t *testing.T) { - base := P(NewPReg(1, RegTypeInt, Width64)) - require.Equal(t, MemOperand{Base: base, Offset: 8}, Mem(base, 8)) -} + base := asm.P(asm.NewPReg(1, asm.RegTypeInt, asm.Width64)) -func TestVRegOperand_String(t *testing.T) { - require.Equal(t, "vr1", V(NewVReg(1, RegTypeInt, Width64)).String()) -} - -func TestPRegOperand_String(t *testing.T) { - require.Equal(t, "x1", P(NewPReg(1, RegTypeInt, Width64)).String()) -} - -func TestImmOperand_String(t *testing.T) { - require.Equal(t, "#-1", Imm(-1).String()) + require.Equal(t, asm.MemOperand{Base: base, Offset: 8}, asm.Mem(base, 8)) + require.Equal(t, "[x1]", asm.Mem(base, 0).String()) + require.Equal(t, "[x1, #8]", asm.Mem(base, 8).String()) } func TestLabelOperand_String(t *testing.T) { - require.Equal(t, "label1", LabelOp(1).String()) -} - -func TestMemOperand_String(t *testing.T) { - base := P(NewPReg(1, RegTypeInt, Width64)) - - require.Equal(t, "[x1]", Mem(base, 0).String()) - require.Equal(t, "[x1, #8]", Mem(base, 8).String()) + require.Equal(t, "label1", asm.LabelOperand{ID: 1}.String()) } diff --git a/asm/reg.go b/asm/reg.go index 91357519..0890fec6 100644 --- a/asm/reg.go +++ b/asm/reg.go @@ -37,8 +37,10 @@ type RegWidth uint8 type RegMask uint64 // RegInfo enumerates the integer and float register banks of an -// architecture and the IDs the assembler must avoid (ABI-reserved, -// frame pointer, link register, etc.). +// architecture. IntReserved and FloatReserved name the IDs the assembler must +// never touch (ABI-reserved, frame pointer, link register, etc.). Scratch +// names integer IDs auto-allocation must leave alone but Assembler.Pin may +// still claim. type RegInfo struct { NumInt uint8 NumFloat uint8 @@ -142,19 +144,6 @@ func (m RegMask) First() uint8 { return uint8(bits.TrailingZeros64(uint64(m))) } -func (m RegMask) PopFirst() (uint8, RegMask) { - if m == 0 { - return 0xFF, m - } - i := uint8(bits.TrailingZeros64(uint64(m))) - m &^= 1 << i - return i, m -} - -func (m RegMask) Count() int { - return bits.OnesCount64(uint64(m)) -} - func (ri RegInfo) Allocatable(typ RegType) RegMask { var count uint8 var reserved RegMask diff --git a/asm/reg_test.go b/asm/reg_test.go index 698e6715..12e3cd08 100644 --- a/asm/reg_test.go +++ b/asm/reg_test.go @@ -1,40 +1,30 @@ -package asm +package asm_test import ( "testing" "github.com/stretchr/testify/require" + + "github.com/siyul-park/minivm/asm" ) func TestNewPReg(t *testing.T) { - reg := NewPReg(1, RegTypeFloat, Width64) + reg := asm.NewPReg(1, asm.RegTypeFloat, asm.Width64) require.Equal(t, uint8(1), reg.ID()) - require.Equal(t, RegTypeFloat, reg.Type()) - require.Equal(t, Width64, reg.Width()) -} - -func TestPReg_ID(t *testing.T) { - require.Equal(t, uint8(3), NewPReg(3, RegTypeInt, Width64).ID()) -} - -func TestPReg_Type(t *testing.T) { - require.Equal(t, RegTypeFloat, NewPReg(3, RegTypeFloat, Width64).Type()) -} - -func TestPReg_Width(t *testing.T) { - require.Equal(t, Width32, NewPReg(3, RegTypeInt, Width32).Width()) + require.Equal(t, asm.RegTypeFloat, reg.Type()) + require.Equal(t, asm.Width64, reg.Width()) } func TestPReg_String(t *testing.T) { tests := []struct { - reg PReg + reg asm.PReg str string }{ - {NewPReg(1, RegTypeInt, Width32), "w1"}, - {NewPReg(1, RegTypeInt, Width64), "x1"}, - {NewPReg(1, RegTypeFloat, Width32), "s1"}, - {NewPReg(1, RegTypeFloat, Width64), "d1"}, + {asm.NewPReg(1, asm.RegTypeInt, asm.Width32), "w1"}, + {asm.NewPReg(1, asm.RegTypeInt, asm.Width64), "x1"}, + {asm.NewPReg(1, asm.RegTypeFloat, asm.Width32), "s1"}, + {asm.NewPReg(1, asm.RegTypeFloat, asm.Width64), "d1"}, } for _, tt := range tests { t.Run(tt.str, func(t *testing.T) { @@ -44,32 +34,20 @@ func TestPReg_String(t *testing.T) { } func TestNewVReg(t *testing.T) { - reg := NewVReg(1, RegTypeFloat, Width64) + reg := asm.NewVReg(1, asm.RegTypeFloat, asm.Width32) require.Equal(t, int32(1), reg.ID()) - require.Equal(t, RegTypeFloat, reg.Type()) - require.Equal(t, Width64, reg.Width()) -} - -func TestVReg_ID(t *testing.T) { - require.Equal(t, int32(3), NewVReg(3, RegTypeInt, Width64).ID()) -} - -func TestVReg_Type(t *testing.T) { - require.Equal(t, RegTypeFloat, NewVReg(3, RegTypeFloat, Width64).Type()) -} - -func TestVReg_Width(t *testing.T) { - require.Equal(t, Width32, NewVReg(3, RegTypeInt, Width32).Width()) + require.Equal(t, asm.RegTypeFloat, reg.Type()) + require.Equal(t, asm.Width32, reg.Width()) } func TestVReg_String(t *testing.T) { tests := []struct { - reg VReg + reg asm.VReg str string }{ - {NewVReg(1, RegTypeInt, Width64), "vr1"}, - {NewVReg(1, RegTypeFloat, Width64), "vf1"}, + {asm.NewVReg(1, asm.RegTypeInt, asm.Width64), "vr1"}, + {asm.NewVReg(1, asm.RegTypeFloat, asm.Width64), "vf1"}, } for _, tt := range tests { t.Run(tt.str, func(t *testing.T) { @@ -79,51 +57,34 @@ func TestVReg_String(t *testing.T) { } func TestNewRegMask(t *testing.T) { - require.True(t, NewRegMask([]uint8{1, 3}).Contains(1)) - require.True(t, NewRegMask([]uint8{1, 3}).Contains(3)) -} - -func TestRegMask_Set(t *testing.T) { - require.True(t, RegMask(0).Set(1).Contains(1)) - require.False(t, RegMask(0).Set(64).Contains(64)) -} - -func TestRegMask_Clear(t *testing.T) { - require.False(t, NewRegMask([]uint8{1}).Clear(1).Contains(1)) - require.True(t, NewRegMask([]uint8{1}).Clear(64).Contains(1)) -} - -func TestRegMask_Contains(t *testing.T) { - mask := NewRegMask([]uint8{1}) + mask := asm.NewRegMask([]uint8{1, 3}) require.True(t, mask.Contains(1)) + require.True(t, mask.Contains(3)) require.False(t, mask.Contains(2)) require.False(t, mask.Contains(64)) } -func TestRegMask_First(t *testing.T) { - require.Equal(t, uint8(1), NewRegMask([]uint8{3, 1}).First()) - require.Equal(t, uint8(0xFF), RegMask(0).First()) +func TestRegMask_Set(t *testing.T) { + require.True(t, asm.RegMask(0).Set(1).Contains(1)) + require.False(t, asm.RegMask(0).Set(64).Contains(64)) } -func TestRegMask_PopFirst(t *testing.T) { - first, rest := NewRegMask([]uint8{1, 3}).PopFirst() - - require.Equal(t, uint8(1), first) - require.False(t, rest.Contains(1)) - require.True(t, rest.Contains(3)) +func TestRegMask_Clear(t *testing.T) { + mask := asm.NewRegMask([]uint8{1}) - first, rest = RegMask(0).PopFirst() - require.Equal(t, uint8(0xFF), first) - require.Zero(t, rest) + require.False(t, mask.Clear(1).Contains(1)) + require.True(t, mask.Clear(64).Contains(1)) } -func TestRegMask_Count(t *testing.T) { - require.Equal(t, 2, NewRegMask([]uint8{1, 3}).Count()) +func TestRegMask_First(t *testing.T) { + require.Equal(t, uint8(1), asm.NewRegMask([]uint8{3, 1}).First()) + require.Equal(t, uint8(0xFF), asm.RegMask(0).First()) } func TestNewRegInfo(t *testing.T) { - info := NewRegInfo(8, 4, []uint8{0, 1}, []uint8{2}, []uint8{7}) + info := asm.NewRegInfo(8, 4, []uint8{0, 1}, []uint8{2}, []uint8{7}) + require.Equal(t, uint8(8), info.NumInt) require.Equal(t, uint8(4), info.NumFloat) require.True(t, info.IntReserved.Contains(0)) @@ -132,7 +93,8 @@ func TestNewRegInfo(t *testing.T) { } func TestRegInfo_Allocatable(t *testing.T) { - info := NewRegInfo(4, 3, []uint8{1}, []uint8{2}, nil) - require.Equal(t, NewRegMask([]uint8{0, 2, 3}), info.Allocatable(RegTypeInt)) - require.Equal(t, NewRegMask([]uint8{0, 1}), info.Allocatable(RegTypeFloat)) + info := asm.NewRegInfo(4, 3, []uint8{1}, []uint8{2}, nil) + + require.Equal(t, asm.NewRegMask([]uint8{0, 2, 3}), info.Allocatable(asm.RegTypeInt)) + require.Equal(t, asm.NewRegMask([]uint8{0, 1}), info.Allocatable(asm.RegTypeFloat)) } diff --git a/asm/regalloc.go b/asm/regalloc.go deleted file mode 100644 index 92a4d9bd..00000000 --- a/asm/regalloc.go +++ /dev/null @@ -1,132 +0,0 @@ -package asm - -import "errors" - -// allocator is the assembler's physical-register pool. It tracks which -// physical registers are free, currently bound to a vreg, or off-limits. -// allocator exposes the bookkeeping primitives — picking, reserving, and -// releasing — while leaving instruction-stream policy (linear scan, -// lifetime tracking, pin preemption) to its caller (rewriter). -// -// Three masks govern selection, each indexed by RegType so the integer and -// float banks share one code path: -// -// - avail: physical registers free to be drawn by alloc. -// - excluded: registers withheld from auto-alloc but still reservable -// via Pin (for example, ABI scratch). -// - blocked: registers that may not be used at all (FP, LR, etc.). -// -// Two maps track the current binding in both directions so callers can ask -// either "what preg does this vreg occupy?" (bindings) or "who owns this -// preg slot?" (owners) without maintaining their own reverse table. -type allocator struct { - avail [2]RegMask - excluded [2]RegMask - blocked [2]RegMask - - bindings map[int32]PReg // vreg id → preg - owners map[regKey]int32 // preg key (type+id) → vreg id -} - -// regKey identifies a physical register slot independent of width — the -// 32-bit (W/S) and 64-bit (X/D) views of the same id share the same slot. -type regKey struct { - typ RegType - id uint8 -} - -var ErrNoRegistersAvailable = errors.New("no registers available") - -func newAllocator(info RegInfo) *allocator { - return &allocator{ - avail: [2]RegMask{ - RegTypeInt: info.Allocatable(RegTypeInt), - RegTypeFloat: info.Allocatable(RegTypeFloat), - }, - bindings: make(map[int32]PReg), - owners: make(map[regKey]int32), - } -} - -// alloc draws a fresh physical register for vreg from the available pool, -// binds them, and returns the assignment. Already-bound vregs return their -// existing binding unchanged. -func (a *allocator) alloc(vreg VReg) (PReg, error) { - if pr, ok := a.bindings[vreg.ID()]; ok { - return pr, nil - } - - typ := vreg.Type() - mask := a.avail[typ] &^ a.excluded[typ] &^ a.blocked[typ] - id := mask.First() - if id == 0xFF { - return PReg{}, ErrNoRegistersAvailable - } - - a.avail[typ] = a.avail[typ].Clear(id) - pr := NewPReg(id, typ, vreg.Width()) - a.bind(vreg, pr) - return pr, nil -} - -// reserve binds vreg to a specific preg, evicting any prior binding for -// vreg. Returns ErrNoRegistersAvailable if preg is blocked. -func (a *allocator) reserve(vreg VReg, preg PReg) error { - if prev, ok := a.bindings[vreg.ID()]; ok { - if prev == preg { - return nil - } - a.free(vreg) - } - - typ := preg.Type() - if a.blocked[typ].Contains(preg.ID()) { - return ErrNoRegistersAvailable - } - a.avail[typ] = a.avail[typ].Clear(preg.ID()) - - a.bind(vreg, preg) - return nil -} - -// free releases vreg's current binding back into the available pool. -func (a *allocator) free(vreg VReg) { - preg, ok := a.bindings[vreg.ID()] - if !ok { - return - } - delete(a.bindings, vreg.ID()) - delete(a.owners, regKey{typ: preg.Type(), id: preg.ID()}) - - typ := preg.Type() - if !a.blocked[typ].Contains(preg.ID()) { - a.avail[typ] = a.avail[typ].Set(preg.ID()) - } -} - -// block marks preg permanently unusable (neither alloc nor reserve can -// claim it). -func (a *allocator) block(preg PReg) { - typ := preg.Type() - a.blocked[typ] = a.blocked[typ].Set(preg.ID()) - a.avail[typ] = a.avail[typ].Clear(preg.ID()) -} - -// exclude marks preg unavailable for alloc but still reservable. ABI -// scratch registers use this so lowerers can pin them explicitly. -func (a *allocator) exclude(preg PReg) { - typ := preg.Type() - a.excluded[typ] = a.excluded[typ].Set(preg.ID()) -} - -// owner reports the vreg that currently holds preg's slot, if any. The -// query is width-insensitive — X0 and W0 occupy the same slot. -func (a *allocator) owner(preg PReg) (int32, bool) { - id, ok := a.owners[regKey{typ: preg.Type(), id: preg.ID()}] - return id, ok -} - -func (a *allocator) bind(vreg VReg, preg PReg) { - a.bindings[vreg.ID()] = preg - a.owners[regKey{typ: preg.Type(), id: preg.ID()}] = vreg.ID() -} diff --git a/asm/rewriter.go b/asm/rewriter.go index b34f5be2..ca14c735 100644 --- a/asm/rewriter.go +++ b/asm/rewriter.go @@ -7,345 +7,376 @@ import ( // rewriter transforms an instruction list whose operands reference virtual // registers into one whose operands reference physical registers. It owns -// the linear-scan policy: bind each vreg as it is used or defined, release -// vregs at their last use, and — when the physical bank is exhausted — -// spill the value whose next use is farthest away to a stack slot, -// reloading it on demand. +// both the physical-register pool and the linear-scan policy: bind each +// vreg as it is used or defined, release it at its last use, and — when the +// bank is exhausted — spill the value whose next use is farthest away to a +// stack slot, reloading it on demand. +// +// Virtual registers are dense, so every per-vreg fact lives in one indexed +// table rather than a map, and owners is its inverse: a bank slot maps to +// the vreg holding it. Slots are width-insensitive, so X0 and W0 name the +// same slot. // // run is a single forward pass. Spilling inserts reload/store instructions -// and a stack frame, so run also remaps the caller's label→index table to -// account for the inserted instructions. +// and a stack frame, so run also rebases the caller's label→index table +// onto the rewritten stream. type rewriter struct { - pool *allocator frame Frame - pins map[int32]PReg - last map[int32]int - widths map[int32]RegWidth - assigned map[int32]PReg - spilled map[int32]bool - slotOf map[int32]int - free []int - slots int + regs []vreg + owners [2][bankSize]int32 + + avail [2]RegMask + allocatable [2]RegMask + + slots int + freed []int out []Instruction } +// vreg is the rewriter's state for one virtual register. +type vreg struct { + pin PReg + reg PReg + + last int + guard int + slot int + + width RegWidth + + pinned bool + mapped bool + bound bool + spilled bool +} + // MaxSpillSlots caps how many spill slots the allocator may use for one -// Code. It sizes the spill area the arm64 invoke trampoline reserves on its +// build. It sizes the spill area the arm64 invoke trampoline reserves on its // native stack frame (see docs/jit-internals.md and asm/arm64/abi_arm64.s); // changing it without updating the trampoline's reserve and interp's // nativeFrameLimit breaks that arithmetic invariant silently. const MaxSpillSlots = 512 -func newRewriter(arch Arch, insts []Instruction, pins map[int32]PReg) *rewriter { +// bankSize is how many physical register slots one bank can hold, fixed by +// RegMask's width. +const bankSize = 64 + +var ErrNoRegistersAvailable = errors.New("no registers available") + +// newRewriter prepares the register table for insts. count is how many +// virtual registers the assembler handed out; every referenced vreg id must +// fall below it. +func newRewriter(arch Arch, insts []Instruction, pins map[int32]PReg, count int) (*rewriter, error) { info := arch.Registers() - pool := newAllocator(info) - for i := uint8(0); i < 64; i++ { - if info.Scratch.Contains(i) { - pool.exclude(NewPReg(i, RegTypeInt, Width64)) + r := &rewriter{ + frame: arch.Frame(), + regs: make([]vreg, count), + avail: [2]RegMask{ + RegTypeInt: info.Allocatable(RegTypeInt), + RegTypeFloat: info.Allocatable(RegTypeFloat), + }, + allocatable: [2]RegMask{ + RegTypeInt: info.Allocatable(RegTypeInt) &^ info.Scratch, + RegTypeFloat: info.Allocatable(RegTypeFloat), + }, + } + for i := range r.regs { + r.regs[i] = vreg{last: -1, guard: -1, slot: -1} + } + for i := range r.owners { + for slot := range r.owners[i] { + r.owners[i][slot] = -1 } } - r := &rewriter{ - pool: pool, - frame: arch.Frame(), - pins: pins, - widths: make(map[int32]RegWidth), - assigned: make(map[int32]PReg), - spilled: make(map[int32]bool), - slotOf: make(map[int32]int), - } - r.last = r.scan(insts) - for id, pr := range pins { - r.widths[id] = pr.Width() - } - return r + if err := r.scan(insts); err != nil { + return nil, err + } + for id, preg := range pins { + if err := r.check(id); err != nil { + return nil, err + } + r.regs[id].pin = preg + r.regs[id].pinned = true + r.regs[id].width = preg.Width() + } + return r, nil } -// run produces the rewritten instruction list together with the remapped -// label table. It walks insts once, binding and spilling as it goes and -// substituting every operand's vreg with its current physical register, -// then injects the spill frame and returns labels rebased onto the -// rewritten stream. -func (r *rewriter) run(insts []Instruction, labels map[Label]int, entries []Label) ([]Instruction, map[Label]int, error) { +// scan records, for every referenced vreg, the highest instruction index +// that references it and the first width it declares. A pin overrides the +// declared width afterwards. +func (r *rewriter) scan(insts []Instruction) error { for i, inst := range insts { - lbl, ok := inst.Src2.(LabelOperand) - if !ok { - continue + uses, n := inst.uses() + for _, v := range uses[:n] { + if err := r.note(v, i); err != nil { + return err + } } - if pos, intra := labels[lbl.ID]; intra && pos <= i { - r.frame = nil - break + if dst, ok := inst.def(); ok { + if err := r.note(dst, i); err != nil { + return err + } } } + return nil +} + +// note records that the instruction at at references v, keeping the highest +// index and the width v declares first. +func (r *rewriter) note(v VReg, at int) error { + if err := r.check(v.ID()); err != nil { + return err + } + s := &r.regs[v.ID()] + s.last = at + if s.width == WidthUndefined { + s.width = v.Width() + } + return nil +} + +// check rejects a vreg the assembler never handed out, so every later +// lookup can index the register table directly. +func (r *rewriter) check(id int32) error { + if id < 0 || int(id) >= len(r.regs) { + return fmt.Errorf("%w: virtual register %d", ErrInvalidOperand, id) + } + return nil +} + +// run produces the rewritten instruction list together with the rebased +// label table. +func (r *rewriter) run(insts []Instruction, labels map[Label]int) ([]Instruction, map[Label]int, error) { + if backEdge(insts, labels) { + r.frame = nil + } - newIdx := make([]int, len(insts)+1) + moved := make([]int, len(insts)+1) for i, inst := range insts { - newIdx[i] = len(r.out) - protected := make(map[int32]bool) - for _, v := range inst.Uses() { - if err := r.use(v, protected); err != nil { - return nil, nil, err - } + moved[i] = len(r.out) + if err := r.step(i, inst); err != nil { + return nil, nil, err } - if dst, ok := inst.Def(); ok { - if err := r.define(dst, protected); err != nil { - return nil, nil, err - } + } + moved[len(insts)] = len(r.out) + + final, rebased := r.inject(labels, moved) + return final, rebased, nil +} + +// step binds every register the instruction at i touches, appends its +// physical-register form, then releases whatever dies at i. +func (r *rewriter) step(i int, inst Instruction) error { + uses, n := inst.uses() + for _, v := range uses[:n] { + if err := r.use(v, i); err != nil { + return err } - r.out = append(r.out, r.substitute(inst)) - for _, v := range inst.Uses() { - if r.last[v.ID()] == i { - r.release(v) - } + } + dst, defines := inst.def() + if defines { + if err := r.define(dst, i); err != nil { + return err } - // A def that is never read again is dead after this instruction; - // without this release its register would stay bound forever, since - // the use loop above only frees operands that appear as reads. - if dst, ok := inst.Def(); ok && r.last[dst.ID()] == i { - r.release(dst) + } + + r.out = append(r.out, r.substitute(inst)) + + for _, v := range uses[:n] { + if r.regs[v.ID()].last == i { + r.release(v.ID()) } } - newIdx[len(insts)] = len(r.out) - return r.inject(labels, entries, newIdx) + // A def that is never read again is dead after this instruction; the use + // loop above only frees operands that appear as reads. + if defines && r.regs[dst.ID()].last == i { + r.release(dst.ID()) + } + return nil } // use ensures v occupies a physical register before the instruction that -// reads it. A pinned vreg reserves its slot; a spilled vreg reloads; an -// unbound vreg allocates. protected records every vreg the current -// instruction touches so satisfying one operand never evicts another. -func (r *rewriter) use(v VReg, protected map[int32]bool) error { - r.note(v) - if _, ok := r.pool.bindings[v.ID()]; ok { - protected[v.ID()] = true - return nil - } - if pin, ok := r.pins[v.ID()]; ok { - return r.pin(v, pin, protected) - } - if r.spilled[v.ID()] { - pr, err := r.obtain(v, protected) - if err != nil { - return err - } - r.out = append(r.out, r.frame.Reload(pr, r.slotOf[v.ID()])) - delete(r.spilled, v.ID()) - protected[v.ID()] = true - return nil - } - if _, err := r.obtain(v, protected); err != nil { +// reads it, reloading it first when it was spilled. +func (r *rewriter) use(v VReg, at int) error { + s := &r.regs[v.ID()] + reload := s.spilled && !s.bound + + preg, err := r.bind(v, at) + if err != nil { return err } - protected[v.ID()] = true + if reload { + r.out = append(r.out, r.frame.Reload(preg, s.slot)) + } + s.spilled = false return nil } // define ensures v's destination register exists before the instruction -// that writes it. -func (r *rewriter) define(v VReg, protected map[int32]bool) error { - r.note(v) - if _, ok := r.pool.bindings[v.ID()]; ok { - protected[v.ID()] = true - return nil - } - if pin, ok := r.pins[v.ID()]; ok { - return r.pin(v, pin, protected) - } - if _, err := r.obtain(v, protected); err != nil { +// that writes it. The new definition supersedes any spilled copy. +func (r *rewriter) define(v VReg, at int) error { + if _, err := r.bind(v, at); err != nil { return err } - protected[v.ID()] = true + r.regs[v.ID()].spilled = false return nil } -// pin reserves v's pinned physical register, evicting any other vreg that -// currently holds the slot. -func (r *rewriter) pin(v VReg, pin PReg, protected map[int32]bool) error { - if id, busy := r.pool.owner(pin); busy && id != v.ID() { - r.pool.free(NewVReg(id, pin.Type(), pin.Width())) +// bind guarantees v holds a physical register and marks it as off-limits to +// eviction while the instruction at at is being rewritten, so satisfying one +// operand never displaces another. +func (r *rewriter) bind(v VReg, at int) (PReg, error) { + s := &r.regs[v.ID()] + s.guard = at + switch { + case s.bound: + return s.reg, nil + case s.pinned: + r.reserve(v.ID(), s.pin) + return s.pin, nil + default: + return r.obtain(v, at) } - if err := r.pool.reserve(v, pin); err != nil { - return fmt.Errorf("%w: vreg %v pin %v: %w", ErrConflictingPin, v, pin, err) - } - r.assigned[v.ID()] = pin - protected[v.ID()] = true - return nil } -// obtain returns a physical register for v, drawing from the free pool or, -// when the bank is exhausted and the arch supports a spill frame, evicting -// the farthest-future integer value to a stack slot first. -func (r *rewriter) obtain(v VReg, protected map[int32]bool) (PReg, error) { - pr, err := r.pool.alloc(v) - if err == nil { - r.assigned[v.ID()] = pr - return pr, nil - } - if !errors.Is(err, ErrNoRegistersAvailable) { - return PReg{}, err +// reserve hands id a specific physical register, evicting whichever vreg +// currently holds that bank slot. +func (r *rewriter) reserve(id int32, preg PReg) { + if held := r.owners[preg.Type()][preg.ID()]; held >= 0 && held != id { + r.free(held) + } + r.avail[preg.Type()] = r.avail[preg.Type()].Clear(preg.ID()) + r.own(id, preg) +} + +// obtain draws a physical register for v, spilling the value whose last use +// lies farthest ahead when the bank is exhausted and the arch supplies a +// spill frame. +func (r *rewriter) obtain(v VReg, at int) (PReg, error) { + if preg, ok := r.alloc(v); ok { + return preg, nil } if r.frame == nil || v.Type() != RegTypeInt { - return PReg{}, err + return PReg{}, ErrNoRegistersAvailable } - victim, ok := r.victim(protected) + victim, ok := r.victim(at) if !ok { - return PReg{}, err + return PReg{}, ErrNoRegistersAvailable } if err := r.spill(victim); err != nil { return PReg{}, err } - pr, err = r.pool.alloc(v) - if err == nil { - r.assigned[v.ID()] = pr + preg, ok := r.alloc(v) + if !ok { + return PReg{}, ErrNoRegistersAvailable + } + return preg, nil +} + +// alloc claims the lowest free physical register from v's bank. +func (r *rewriter) alloc(v VReg) (PReg, bool) { + typ := v.Type() + id := (r.avail[typ] & r.allocatable[typ]).First() + if id == 0xFF { + return PReg{}, false } - return pr, err + preg := NewPReg(id, typ, v.Width()) + r.avail[typ] = r.avail[typ].Clear(id) + r.own(v.ID(), preg) + return preg, true } // victim selects the bound integer vreg whose last use lies farthest ahead -// — the value least likely to be needed soon. Pinned, protected, and -// non-integer bindings are never chosen. -func (r *rewriter) victim(protected map[int32]bool) (int32, bool) { +// — the value least likely to be needed soon. Pinned registers, and every +// register the instruction at at touches, are never chosen. +func (r *rewriter) victim(at int) (int32, bool) { best := int32(-1) - bestLast := -1 - for id, pr := range r.pool.bindings { - if pr.Type() != RegTypeInt { - continue - } - if _, pinned := r.pins[id]; pinned { + last := -1 + for _, id := range r.owners[RegTypeInt] { + if id < 0 { continue } - if protected[id] { + s := &r.regs[id] + if s.pinned || s.guard == at || s.last <= last { continue } - if l := r.last[id]; l > bestLast { - bestLast = l - best = id - } + last = s.last + best = id } - if best < 0 { - return 0, false - } - return best, true + return best, best >= 0 } -// spill writes the victim's live value to its stack slot and frees the -// register it held. +// spill writes id's live value to its stack slot and returns the register it +// held to the pool. func (r *rewriter) spill(id int32) error { - pr := r.pool.bindings[id] - slot, ok := r.slotFor(id) - if !ok { - return ErrNoRegistersAvailable + s := &r.regs[id] + if s.slot < 0 { + slot, ok := r.reserveSlot() + if !ok { + return ErrNoRegistersAvailable + } + s.slot = slot } - r.out = append(r.out, r.frame.Store(slot, pr)) - r.pool.free(NewVReg(id, pr.Type(), pr.Width())) - r.spilled[id] = true + r.out = append(r.out, r.frame.Store(s.slot, s.reg)) + r.free(id) + s.spilled = true return nil } -// slotFor returns id's stable spill slot, assigning a fresh one on first -// spill. -func (r *rewriter) slotFor(id int32) (int, bool) { - if s, ok := r.slotOf[id]; ok { - return s, true - } - var s int - if n := len(r.free); n > 0 { - s = r.free[n-1] - r.free = r.free[:n-1] - } else { - if r.slots >= MaxSpillSlots { - return 0, false - } - s = r.slots - r.slots++ +// reserveSlot hands out a spill slot, reusing one a dead vreg released +// before widening the frame. +func (r *rewriter) reserveSlot() (int, bool) { + if n := len(r.freed); n > 0 { + slot := r.freed[n-1] + r.freed = r.freed[:n-1] + return slot, true + } + if r.slots >= MaxSpillSlots { + return 0, false } - r.slotOf[id] = s - return s, true + r.slots++ + return r.slots - 1, true } -// release returns v's register to the pool at its last use and clears any -// spill bookkeeping. -func (r *rewriter) release(v VReg) { - if _, ok := r.pool.bindings[v.ID()]; ok { - r.pool.free(v) - } - delete(r.spilled, v.ID()) - if s, ok := r.slotOf[v.ID()]; ok { - r.free = append(r.free, s) - delete(r.slotOf, v.ID()) +// release returns id's register and spill slot at its last use. +func (r *rewriter) release(id int32) { + r.free(id) + s := &r.regs[id] + s.spilled = false + if s.slot >= 0 { + r.freed = append(r.freed, s.slot) + s.slot = -1 } } -// note records v's declared width the first time it is seen so operands -// carrying WidthUndefined can resolve to the right physical-register view. -func (r *rewriter) note(v VReg) { - if w := v.Width(); w != WidthUndefined { - if _, ok := r.widths[v.ID()]; !ok { - r.widths[v.ID()] = w - } - } +// free returns id's bank slot to the available pool, leaving the recorded +// assignment intact for resolve. +func (r *rewriter) free(id int32) { + s := &r.regs[id] + if !s.bound { + return + } + typ := s.reg.Type() + r.owners[typ][s.reg.ID()] = -1 + r.avail[typ] = r.avail[typ].Set(s.reg.ID()) + s.bound = false } -// inject finalizes the rewritten stream. With no spills the body passes -// through and labels rebase onto the (1:1) instruction indices. Otherwise a -// frame prologue is prepended, a frame epilogue precedes every return, and -// labels are rebased across both the per-instruction shifts and the -// inserted frame instructions. Resume is injected only after a call whose -// target label is bound in this Code: an external call (resolved later by -// Link) never runs this Code's epilogue, so re-reserving the spill area -// after it would double-adjust SP. -func (r *rewriter) inject(labels map[Label]int, entries []Label, newIdx []int) ([]Instruction, map[Label]int, error) { - if r.slots == 0 || r.frame == nil { - out := make(map[Label]int, len(labels)) - for id, idx := range labels { - out[id] = newIdx[idx] - } - return r.out, out, nil - } - - enter := r.frame.Enter(r.slots) - leave := r.frame.Leave(r.slots) - entry := make(map[Label]bool, len(entries)) - for _, id := range entries { - if labels[id] != 0 { - return nil, nil, fmt.Errorf("%w: entry=%d offset=%d", ErrEntryRequiresFrame, id, labels[id]) - } - entry[id] = true - } - final := make([]Instruction, 0, len(enter)+len(r.out)+len(leave)) - final = append(final, enter...) - - bodyToFinal := make([]int, len(r.out)+1) - for bi, inst := range r.out { - bodyToFinal[bi] = len(final) - if r.frame.Returns(inst.Op) { - final = append(final, leave...) - } - final = append(final, inst) - if lbl, isLabel := inst.Src2.(LabelOperand); isLabel && r.frame.Calls(inst.Op) { - if _, intra := labels[lbl.ID]; intra { - final = append(final, r.frame.Resume(r.slots)...) - } - } - } - bodyToFinal[len(r.out)] = len(final) - - // Internal branches skip the prologue so a back-edge cannot reserve the - // frame again. An external entry bound at instruction zero is different: - // its callable must start at byte zero and execute Enter before the body. - out := make(map[Label]int, len(labels)) - for id, idx := range labels { - if entry[id] { - out[id] = 0 - continue - } - out[id] = bodyToFinal[newIdx[idx]] - } - return final, out, nil +// own records that id holds preg's bank slot. +func (r *rewriter) own(id int32, preg PReg) { + r.free(id) + s := &r.regs[id] + s.reg = preg + s.mapped = true + s.bound = true + r.owners[preg.Type()][preg.ID()] = id } -// substitute returns a copy of inst with every VReg / MemOperand base -// replaced by its currently bound physical register. +// substitute returns a copy of inst with every VReg — including a +// MemOperand base — replaced by its bound physical register. func (r *rewriter) substitute(inst Instruction) Instruction { return Instruction{ Op: inst.Op, @@ -359,57 +390,102 @@ func (r *rewriter) substitute(inst Instruction) Instruction { func (r *rewriter) rewriteOp(op Operand) Operand { switch v := op.(type) { case VRegOperand: - if pr, ok := r.resolve(v.Reg); ok { - return P(pr) + if preg, ok := r.resolve(v.Reg); ok { + return P(preg) } case MemOperand: - base, isVReg := v.Base.(VRegOperand) + vbase, isVReg := v.Base.(VRegOperand) if !isVReg { break } - if pr, ok := r.resolve(base.Reg); ok { - return Mem(P(pr), v.Offset) + if preg, ok := r.resolve(vbase.Reg); ok { + return Mem(P(preg), v.Offset) } } return op } -// resolve looks up v's physical register and produces a PReg with v's -// declared width, falling back to the collected widths map when v itself -// carries WidthUndefined. +// resolve names the physical register standing in for v, viewed at v's +// declared width or, when v carries none, at the width first recorded for +// it. // -// It prefers the live binding but falls back to the last-recorded -// assignment: a single instruction may write a pinned register that one of -// its own sources also occupies (a self-move such as MOV SP, SP), and -// binding the destination evicts that source before substitution reads it. -// The recorded assignment still names the correct physical register for -// the instruction being emitted. +// It reads the most recent assignment rather than only the live binding: one +// instruction may write a pinned register that one of its own sources also +// occupies (a self-move such as MOV SP, SP), and binding the destination +// evicts that source before substitution reads it. The recorded assignment +// still names the correct physical register for the instruction being +// emitted. func (r *rewriter) resolve(v VReg) (PReg, bool) { - pr, ok := r.pool.bindings[v.ID()] - if !ok { - pr, ok = r.assigned[v.ID()] - } - if !ok { + s := r.regs[v.ID()] + if !s.mapped { return PReg{}, false } - w := v.Width() - if w == WidthUndefined { - w = r.widths[v.ID()] + width := v.Width() + if width == WidthUndefined { + width = s.width + } + return NewPReg(s.reg.ID(), s.reg.Type(), width), true +} + +// inject finalizes the rewritten stream. With no spills the body passes +// through and labels rebase onto the shifted instruction indices. Otherwise +// a frame prologue is prepended, a frame epilogue precedes every return, and +// labels are rebased across both the per-instruction shifts and the inserted +// frame instructions. Internal branches therefore skip the prologue, so a +// back-edge cannot reserve the frame twice. +// +// Resume follows only a call whose target label is bound here: a call +// resolved elsewhere never runs this epilogue, so re-reserving the spill +// area after it would double-adjust SP. +func (r *rewriter) inject(labels map[Label]int, moved []int) ([]Instruction, map[Label]int) { + rebased := make(map[Label]int, len(labels)) + if r.slots == 0 || r.frame == nil { + for id, idx := range labels { + rebased[id] = moved[idx] + } + return r.out, rebased + } + + enter := r.frame.Enter(r.slots) + leave := r.frame.Leave(r.slots) + resume := r.frame.Resume(r.slots) + + final := make([]Instruction, 0, len(enter)+len(r.out)+len(leave)) + final = append(final, enter...) + framed := make([]int, len(r.out)+1) + for i, inst := range r.out { + framed[i] = len(final) + if r.frame.Returns(inst.Op) { + final = append(final, leave...) + } + final = append(final, inst) + if lbl, ok := inst.Src2.(LabelOperand); ok && r.frame.Calls(inst.Op) { + if _, bound := labels[lbl.ID]; bound { + final = append(final, resume...) + } + } + } + framed[len(r.out)] = len(final) + + for id, idx := range labels { + rebased[id] = framed[moved[idx]] } - return NewPReg(pr.ID(), pr.Type(), w), true + return final, rebased } -// scan returns the highest instruction index at which each vreg is -// referenced (use or def). -func (*rewriter) scan(insts []Instruction) map[int32]int { - last := make(map[int32]int) +// backEdge reports whether any branch targets an earlier instruction. +// Linear-scan lifetimes only describe a forward-only stream: a value live +// across a loop would be spilled at what merely looks like its last use, so +// code with a back-edge runs without a spill frame instead. +func backEdge(insts []Instruction, labels map[Label]int) bool { for i, inst := range insts { - if dst, ok := inst.Def(); ok { - last[dst.ID()] = i + lbl, ok := inst.Src2.(LabelOperand) + if !ok { + continue } - for _, v := range inst.Uses() { - last[v.ID()] = i + if pos, bound := labels[lbl.ID]; bound && pos <= i { + return true } } - return last + return false } diff --git a/docs/README.md b/docs/README.md index 2f5d1d62..817d2ece 100644 --- a/docs/README.md +++ b/docs/README.md @@ -21,7 +21,7 @@ This directory uses a single-owner model. Each topic owns one area of behavior; | Benchmark results and methodology | `benchmarks.md` | | Debugger API | `debugging.md` | | Current priorities | `roadmap.md` | -| Code style | `coding-patterns.md` | +| Normative Go coding specification | `coding-patterns.md` | | Applied symbol naming decisions | `symbol-naming-audit.md` | | Adding an opcode | `guides/add-opcode.md` | | Adding a JIT backend | `guides/add-architecture.md` | diff --git a/docs/benchmarks.md b/docs/benchmarks.md index 5247289e..76d51476 100644 --- a/docs/benchmarks.md +++ b/docs/benchmarks.md @@ -21,14 +21,15 @@ For implementation details, see `docs/jit-internals.md`. For profiling counters, ## Measurement Environment -All numbers in this document were measured on July 16, 2026 (the `Sieve(256)` minivm rows were re-measured on July 18, 2026 after issue #155): +The cross-runtime comparison table was measured on July 30, 2026. The public +API cost tables below it were measured on July 16, 2026: - Apple M4 Pro, 12 cores - `darwin/arm64` - macOS 26.4.1 - Go 1.26.2 -Every table reports the median of three sequential samples. Lower `ns/op`, `B/op`, and `allocs/op` are better. The runs were executed serially so concurrent benchmark processes did not compete for CPU time. +Every table reports the median of three sequential samples. Lower `ns/op`, `B/op`, and `allocs/op` are better. The runs were executed serially so concurrent benchmark processes did not compete for CPU time. The comparison numbers come from one `-benchtime=300ms` pass over the whole suite, so a short-warmup adaptive mode reads slightly slower there than in a focused single-kernel run. ## Reproduction @@ -57,14 +58,15 @@ go test -run='^$' -bench='^Benchmark(Array|Struct|TypedMap|Map)_Refs$' \ ## Summary -- `RecursiveFib(35)` places `minivm/default` at **46.30 ms**, within about **2.6%** of wazero's **45.11 ms**, while remaining allocation-free after warmup. -- Adaptive native traces reduce `IterativeFib(30)` from **738.6 ns** threaded to **76.14 ns**, `TypedArraySum(256)` from **6.299 us** to **669.0 ns**, and `BranchTree(96)` from **981.8 ns** to **235.1 ns**. +- `RecursiveFib(35)` places `minivm/default` at **46.18 ms**, within about **3.9%** of wazero's **44.45 ms**, while remaining allocation-free after warmup. +- Adaptive native traces reduce `IterativeFib(30)` from **746.3 ns** threaded to **92.15 ns**, `TypedArraySum(256)` from **6.313 us** to **683.2 ns**, and `BranchTree(96)` from **952.0 ns** to **267.1 ns**. +- Fused threaded handlers check stack room once for their own net push instead of once per folded source. That removes about 5,400 generated lines and cuts threaded time on every fusion-heavy kernel: `BranchTree(96)` **-4.3%**, `TypedArraySum(256)` **-4.1%**, `IterativeFib(30)` **-3.6%**, and `Sieve(256)` **-2.8%** (interleaved A/B, median of five). Native and adaptive modes are unchanged within noise. - Primitive array mutation stays on the native loop path in `Sieve(256)`: deferred-ownership elision drops the per-element retain/release pair, so a runtime-allocated array reaches the same cheap native path a typed-array constant already used. All three modes allocate `1,048 B` in `2` allocations. - Loop-invariant container hoisting (issue #153) removes the per-access heap-cell derivation, itab guard, and slice-header reload from hoisted loop bodies. It shrinks the loop callables but leaves wall time unchanged: the removed loads sat off the out-of-order critical path. -- Branch-leg folding (issue #155) records native loop exits as branches and folds hot legs that rejoin the header back into the native loop as real back-edges. On `Sieve(256)` this removes the per-prime entry/exit round trips (scan-loop native entries drop from ~55 to ~1 per run) and cuts `default` from **4.72 us** to **1.61 us** and eager `jit` to **1.57 us**, versus **15.9 us** threaded (interleaved A/B on M4 Pro). The remaining gap to wazero (~0.66 us) is dominated by the per-iteration operand flush. +- Branch-leg folding (issue #155) records native loop exits as branches and folds hot legs that rejoin the header back into the native loop as real back-edges. On `Sieve(256)` this removes the per-prime entry/exit round trips (scan-loop native entries drop from ~55 to ~1 per run) and cuts `default` from **4.72 us** to **2.68 us**, versus **16.2 us** threaded. The remaining gap to wazero (**687.3 ns**) is dominated by the per-iteration operand flush. - Threshold-zero `jit` is not a warmed-JIT guarantee. It matches `default` on Sieve and BranchTree, but is slower on IterativeFib, TypedArraySum, and recursive Fibonacci because it can compile before representative traces are learned. -- Allocation-heavy workloads remain interpreter-bound. `AllocationGraph(128)` is fastest in minivm's threaded mode at **7.617 us**; adaptive and eager modes add profiling cost without native coverage. -- Indirect recursion reaches the native self-call path in adaptive mode: `IndirectRecursiveFib(20)` is **54.94 us** in `default`, versus **568 us** threaded and **42.3 us** in wazero. Eager `jit` stays at **589 us**, consistent with the threshold-zero note above. +- Allocation-heavy workloads remain interpreter-bound. `AllocationGraph(128)` is fastest in minivm's threaded mode at **7.774 us**; adaptive and eager modes add profiling cost without native coverage. +- Indirect recursion reaches the native self-call path in adaptive mode: `IndirectRecursiveFib(20)` is **54.85 us** in `default`, versus **576 us** threaded and **43.3 us** in wazero. Eager `jit` stays at **594 us**, consistent with the threshold-zero note above. These results are workload measurements, not general language rankings. The runtimes use different value models, safety boundaries, host-call conventions, and compilation strategies. @@ -86,96 +88,96 @@ Each minivm kernel times `Interpreter.Run` only. Result extraction, reset, fixtu | Workload | Runtime | ns/op | B/op | allocs/op | |---|---|---:|---:|---:| -| IterativeFib(30) | minivm/default | 76.14 | 0 | 0 | -| IterativeFib(30) | minivm/threaded | 738.6 | 0 | 0 | -| IterativeFib(30) | minivm/jit | 109.1 | 0 | 0 | -| IterativeFib(30) | native Go | 8.757 | 0 | 0 | -| IterativeFib(30) | wazero | 50.26 | 8 | 1 | -| IterativeFib(30) | Tengo | 9,966 | 90,592 | 61 | -| IterativeFib(30) | gopher-lua | 511.6 | 160 | 0 | -| IterativeFib(30) | Goja | 2,218 | 368 | 20 | -| IterativeFib(30) | gpython | 2,590 | 2,448 | 88 | -| IterativeFib(30) | Yaegi | 2,801 | 2,036 | 101 | -| Sieve(256) | minivm/default | 1,610 | 1,048 | 2 | -| Sieve(256) | minivm/threaded | 15,933 | 1,048 | 2 | -| Sieve(256) | minivm/jit | 1,572 | 1,048 | 2 | -| Sieve(256) | native Go | 238.3 | 0 | 0 | -| Sieve(256) | wazero | 662.8 | 8 | 1 | -| Sieve(256) | Tengo | 53,437 | 122,504 | 1,611 | -| Sieve(256) | gopher-lua | 23,269 | 18,416 | 44 | -| Sieve(256) | Goja | 43,554 | 1,872 | 25 | -| Sieve(256) | gpython | 36,598 | 5,704 | 30 | -| Sieve(256) | Yaegi | 18,655 | 1,800 | 37 | -| RecursiveFib(20) | minivm/default | 37,417 | 0 | 0 | -| RecursiveFib(20) | minivm/threaded | 351,637 | 0 | 0 | -| RecursiveFib(20) | minivm/jit | 362,772 | 0 | 0 | -| RecursiveFib(20) | native Go | 13,553 | 0 | 0 | -| RecursiveFib(20) | wazero | 31,262 | 8 | 1 | -| RecursiveFib(20) | Tengo | 841,631 | 319,345 | 28,655 | -| RecursiveFib(20) | gopher-lua | 1,032,737 | 704 | 2 | -| RecursiveFib(20) | Goja | 1,476,390 | 4,680 | 39 | -| RecursiveFib(20) | gpython | 3,764,356 | 9,807,927 | 109,494 | -| RecursiveFib(20) | Yaegi | 3,840,787 | 8,302,122 | 192,840 | -| RecursiveFib(35) | minivm/default | 46,303,288 | 0 | 0 | -| RecursiveFib(35) | minivm/threaded | 490,321,941 | 0 | 0 | -| RecursiveFib(35) | minivm/jit | 508,171,481 | 0 | 0 | -| RecursiveFib(35) | native Go | 19,463,741 | 0 | 0 | -| RecursiveFib(35) | wazero | 45,112,434 | 9 | 1 | -| RecursiveFib(35) | Tengo | 1,180,099,833 | 312,797,184 | 39,088,173 | -| RecursiveFib(35) | gopher-lua | 1,453,945,708 | 971,008 | 3,793 | -| RecursiveFib(35) | Goja | 2,058,714,041 | 375,360 | 46,373 | -| RecursiveFib(35) | gpython | 5,364,887,708 | 13,378,034,960 | 149,350,308 | -| RecursiveFib(35) | Yaegi | 5,537,717,750 | 11,324,340,872 | 263,043,707 | -| IndirectRecursiveFib(20) | minivm/default | 54,937 | 0 | 0 | -| IndirectRecursiveFib(20) | minivm/threaded | 567,896 | 0 | 0 | -| IndirectRecursiveFib(20) | minivm/jit | 589,191 | 0 | 0 | -| IndirectRecursiveFib(20) | native Go | 16,040 | 0 | 0 | -| IndirectRecursiveFib(20) | wazero | 42,331 | 8 | 1 | -| IndirectRecursiveFib(20) | Tengo | 958,917 | 319,345 | 28,655 | -| IndirectRecursiveFib(20) | gopher-lua | 944,516 | 704 | 2 | -| IndirectRecursiveFib(20) | Goja | 1,366,603 | 4,680 | 39 | -| IndirectRecursiveFib(20) | gpython | 3,961,904 | 10,158,200 | 109,494 | -| IndirectRecursiveFib(20) | Yaegi | 11,013,641 | 13,059,857 | 394,041 | -| ClosureCounter(128) | minivm/default | 3,159 | 64 | 2 | -| ClosureCounter(128) | minivm/threaded | 3,021 | 64 | 2 | -| ClosureCounter(128) | minivm/jit | 3,159 | 64 | 2 | -| ClosureCounter(128) | native Go | 34.99 | 0 | 0 | +| IterativeFib(30) | minivm/default | 92.15 | 0 | 0 | +| IterativeFib(30) | minivm/threaded | 746.3 | 0 | 0 | +| IterativeFib(30) | minivm/jit | 95.07 | 0 | 0 | +| IterativeFib(30) | native Go | 9.256 | 0 | 0 | +| IterativeFib(30) | wazero | 52.63 | 8 | 1 | +| IterativeFib(30) | Tengo | 9,406 | 90,592 | 61 | +| IterativeFib(30) | gopher-lua | 513.9 | 160 | 0 | +| IterativeFib(30) | Goja | 2,226 | 368 | 20 | +| IterativeFib(30) | gpython | 2,599 | 2,448 | 88 | +| IterativeFib(30) | Yaegi | 2,856 | 2,036 | 101 | +| Sieve(256) | minivm/default | 2,682 | 1,048 | 2 | +| Sieve(256) | minivm/threaded | 16,239 | 1,048 | 2 | +| Sieve(256) | minivm/jit | 2,696 | 1,048 | 2 | +| Sieve(256) | native Go | 237.2 | 0 | 0 | +| Sieve(256) | wazero | 687.3 | 8 | 1 | +| Sieve(256) | Tengo | 53,630 | 122,504 | 1,611 | +| Sieve(256) | gopher-lua | 23,289 | 18,416 | 44 | +| Sieve(256) | Goja | 43,140 | 1,872 | 25 | +| Sieve(256) | gpython | 35,636 | 5,704 | 30 | +| Sieve(256) | Yaegi | 18,762 | 1,800 | 37 | +| RecursiveFib(20) | minivm/default | 38,266 | 0 | 0 | +| RecursiveFib(20) | minivm/threaded | 357,450 | 0 | 0 | +| RecursiveFib(20) | minivm/jit | 368,423 | 0 | 0 | +| RecursiveFib(20) | native Go | 14,455 | 0 | 0 | +| RecursiveFib(20) | wazero | 31,077 | 8 | 1 | +| RecursiveFib(20) | Tengo | 809,410 | 319,346 | 28,655 | +| RecursiveFib(20) | gopher-lua | 1,055,661 | 704 | 2 | +| RecursiveFib(20) | Goja | 1,456,275 | 4,680 | 39 | +| RecursiveFib(20) | gpython | 3,701,017 | 9,807,924 | 109,494 | +| RecursiveFib(20) | Yaegi | 3,791,815 | 8,302,126 | 192,840 | +| RecursiveFib(35) | minivm/default | 46,175,150 | 0 | 0 | +| RecursiveFib(35) | minivm/threaded | 499,079,076 | 0 | 0 | +| RecursiveFib(35) | minivm/jit | 522,672,192 | 0 | 0 | +| RecursiveFib(35) | native Go | 20,107,461 | 0 | 0 | +| RecursiveFib(35) | wazero | 44,453,238 | 9 | 1 | +| RecursiveFib(35) | Tengo | 1,168,612,000 | 312,797,584 | 39,088,176 | +| RecursiveFib(35) | gopher-lua | 1,477,085,041 | 971,008 | 3,793 | +| RecursiveFib(35) | Goja | 2,099,479,958 | 375,360 | 46,373 | +| RecursiveFib(35) | gpython | 5,578,092,292 | 13,378,028,656 | 149,350,236 | +| RecursiveFib(35) | Yaegi | 5,903,047,625 | 11,324,344,728 | 263,043,676 | +| IndirectRecursiveFib(20) | minivm/default | 54,848 | 0 | 0 | +| IndirectRecursiveFib(20) | minivm/threaded | 576,182 | 0 | 0 | +| IndirectRecursiveFib(20) | minivm/jit | 594,117 | 0 | 0 | +| IndirectRecursiveFib(20) | native Go | 15,981 | 0 | 0 | +| IndirectRecursiveFib(20) | wazero | 43,260 | 8 | 1 | +| IndirectRecursiveFib(20) | Tengo | 953,537 | 319,346 | 28,655 | +| IndirectRecursiveFib(20) | gopher-lua | 954,423 | 704 | 2 | +| IndirectRecursiveFib(20) | Goja | 1,377,150 | 4,680 | 39 | +| IndirectRecursiveFib(20) | gpython | 4,018,147 | 10,158,201 | 109,494 | +| IndirectRecursiveFib(20) | Yaegi | 11,430,601 | 13,059,854 | 394,041 | +| ClosureCounter(128) | minivm/default | 3,362 | 64 | 2 | +| ClosureCounter(128) | minivm/threaded | 2,978 | 64 | 2 | +| ClosureCounter(128) | minivm/jit | 3,372 | 64 | 2 | +| ClosureCounter(128) | native Go | 38.22 | 0 | 0 | | ClosureCounter(128) | wazero | N/A | N/A | N/A | -| ClosureCounter(128) | Tengo | 13,287 | 92,272 | 261 | -| ClosureCounter(128) | gopher-lua | 5,842 | 151 | 3 | -| ClosureCounter(128) | Goja | 10,144 | 1,264 | 13 | -| ClosureCounter(128) | gpython | 27,037 | 58,312 | 659 | -| ClosureCounter(128) | Yaegi | 33,173 | 34,784 | 786 | -| TypedArraySum(256) | minivm/default | 669.0 | 0 | 0 | -| TypedArraySum(256) | minivm/threaded | 6,299 | 0 | 0 | -| TypedArraySum(256) | minivm/jit | 3,537 | 0 | 0 | -| TypedArraySum(256) | native Go | 66.26 | 0 | 0 | -| TypedArraySum(256) | wazero | 153.5 | 8 | 1 | -| TypedArraySum(256) | Tengo | 15,676 | 94,208 | 513 | -| TypedArraySum(256) | gopher-lua | 3,415 | 4,000 | 15 | -| TypedArraySum(256) | Goja | 13,303 | 2,080 | 238 | -| TypedArraySum(256) | gpython | 7,776 | 2,496 | 246 | -| TypedArraySum(256) | Yaegi | 4,002 | 296 | 8 | -| AllocationGraph(128) | minivm/default | 9,226 | 5,120 | 256 | -| AllocationGraph(128) | minivm/threaded | 7,617 | 5,120 | 256 | -| AllocationGraph(128) | minivm/jit | 9,199 | 5,120 | 256 | -| AllocationGraph(128) | native Go | 935.5 | 1,024 | 128 | +| ClosureCounter(128) | Tengo | 13,503 | 92,272 | 261 | +| ClosureCounter(128) | gopher-lua | 5,910 | 151 | 3 | +| ClosureCounter(128) | Goja | 10,173 | 1,264 | 13 | +| ClosureCounter(128) | gpython | 28,235 | 58,312 | 659 | +| ClosureCounter(128) | Yaegi | 34,704 | 34,784 | 786 | +| TypedArraySum(256) | minivm/default | 683.2 | 0 | 0 | +| TypedArraySum(256) | minivm/threaded | 6,313 | 0 | 0 | +| TypedArraySum(256) | minivm/jit | 621.5 | 0 | 0 | +| TypedArraySum(256) | native Go | 73.2 | 0 | 0 | +| TypedArraySum(256) | wazero | 157 | 8 | 1 | +| TypedArraySum(256) | Tengo | 15,507 | 94,208 | 513 | +| TypedArraySum(256) | gopher-lua | 3,413 | 4,000 | 15 | +| TypedArraySum(256) | Goja | 13,399 | 2,080 | 238 | +| TypedArraySum(256) | gpython | 7,652 | 2,496 | 246 | +| TypedArraySum(256) | Yaegi | 4,246 | 296 | 8 | +| AllocationGraph(128) | minivm/default | 9,370 | 5,120 | 256 | +| AllocationGraph(128) | minivm/threaded | 7,774 | 5,120 | 256 | +| AllocationGraph(128) | minivm/jit | 9,362 | 5,120 | 256 | +| AllocationGraph(128) | native Go | 943.8 | 1,024 | 128 | | AllocationGraph(128) | wazero | N/A | N/A | N/A | -| AllocationGraph(128) | Tengo | 13,988 | 96,288 | 388 | -| AllocationGraph(128) | gopher-lua | 6,273 | 14,376 | 256 | -| AllocationGraph(128) | Goja | 25,412 | 78,016 | 770 | -| AllocationGraph(128) | gpython | 5,941 | 5,712 | 266 | -| AllocationGraph(128) | Yaegi | 12,222 | 1,492 | 142 | -| BranchTree(96) | minivm/default | 235.1 | 0 | 0 | -| BranchTree(96) | minivm/threaded | 981.8 | 0 | 0 | -| BranchTree(96) | minivm/jit | 234.0 | 0 | 0 | -| BranchTree(96) | native Go | 79.10 | 0 | 0 | -| BranchTree(96) | wazero | 164.2 | 16 | 1 | -| BranchTree(96) | Tengo | 17,274 | 95,384 | 660 | -| BranchTree(96) | gopher-lua | 8,775 | 2,464 | 9 | -| BranchTree(96) | Goja | 13,901 | 1,992 | 196 | -| BranchTree(96) | gpython | 12,295 | 2,168 | 203 | -| BranchTree(96) | Yaegi | 11,062 | 1,832 | 308 | +| AllocationGraph(128) | Tengo | 14,516 | 96,288 | 388 | +| AllocationGraph(128) | gopher-lua | 6,543 | 14,376 | 256 | +| AllocationGraph(128) | Goja | 26,551 | 78,016 | 770 | +| AllocationGraph(128) | gpython | 5,715 | 5,712 | 266 | +| AllocationGraph(128) | Yaegi | 12,190 | 1,492 | 142 | +| BranchTree(96) | minivm/default | 267.1 | 0 | 0 | +| BranchTree(96) | minivm/threaded | 952 | 0 | 0 | +| BranchTree(96) | minivm/jit | 264.7 | 0 | 0 | +| BranchTree(96) | native Go | 79.98 | 0 | 0 | +| BranchTree(96) | wazero | 172.1 | 16 | 1 | +| BranchTree(96) | Tengo | 18,088 | 95,384 | 660 | +| BranchTree(96) | gopher-lua | 8,716 | 2,464 | 9 | +| BranchTree(96) | Goja | 13,926 | 1,992 | 196 | +| BranchTree(96) | gpython | 12,187 | 2,168 | 203 | +| BranchTree(96) | Yaegi | 10,769 | 1,832 | 308 | Wazero has no equivalent canonical fixture for `ClosureCounter(128)` or `AllocationGraph(128)`, so those rows are `N/A`. diff --git a/docs/coding-patterns.md b/docs/coding-patterns.md index aefd6275..35cbceef 100644 --- a/docs/coding-patterns.md +++ b/docs/coding-patterns.md @@ -1,556 +1,728 @@ -# Coding Patterns +# Go Coding Patterns -Default coding style for minivm contributors and agents. +Normative coding specification for all Go production and test code in minivm. +It defines function shape, naming, type design, package ownership, public APIs, +file layout, errors, concurrency, tests, generated code, performance work, Git, +and documentation. -Use this before writing or changing code. Match nearby code first; use this document when local style is unclear or a new pattern is needed. +Non-compliance in a changed file is a blocking defect, not a style preference. -## When to Read +## Normative Language -Read only what the change touches. +This specification uses **MUST**, **MUST NOT**, **REQUIRED**, **SHOULD**, +**SHOULD NOT**, **RECOMMENDED**, **MAY**, and **OPTIONAL** as described by +[RFC 2119](https://www.rfc-editor.org/rfc/rfc2119) and +[RFC 8174](https://www.rfc-editor.org/rfc/rfc8174) when, and only when, they +appear in uppercase. -| Change | Read | -|---|---| -| function shape, helper extraction, naming | 0. Principles, 1. Functions | -| types, interfaces, fields, constructors | 2. Types | -| public APIs, options, builders, parsers | 3. APIs | -| errors, panic, recover | 4. Errors | -| architecture-specific files | 5. Build Tags | -| tests | 6. Tests | -| commits and PRs | 7. Git and PRs | -| documentation changes | 8. Docs | - -## Source of Truth - -| Concern | Source | -|---|---| -| formatting | `gofmt` | -| package style | nearby code in the same package | -| public API shape | existing public APIs and tests | -| documentation shape | `docs/README.md` | -| architectural ownership | `docs/architecture.md` | - -## 0. Principles - -### 0.1 Simpler is Better - -If two designs provide the same behavior, choose the simpler one: fewer files, types, functions, methods, arguments, names, indirections, and more local code. - -Add abstraction only when it improves readability, removes real duplication, isolates real complexity, or names a meaningful domain step. - -### 0.2 Keep Public Surfaces Small - -Push complexity down. Prefer simple APIs over exposed mechanisms, explicit behavior over hidden magic, local complexity over distributed state, and predictable structure over clever abstraction. - -A difficult behavior should have one clear implementation, not many partially difficult call sites. - -### 0.3 Read Top-Down - -Put important behavior first and details later. - -```text -Run - parse - exec - commit -``` - -Readers should not jump around to reconstruct the main path. - -### 0.4 Be Obvious - -Prefer mechanically obvious code over clever code. Slightly longer code is better when it avoids hidden state, improves debugging, preserves interpreter/JIT symmetry, makes control flow explicit, or keeps behavior easy to verify. - -### 0.5 Preserve Symmetry - -Keep interpreter and JIT paths structurally similar when possible. Symmetry matters more than small local optimizations because it makes behavior easier to compare, test, and maintain. - -### 0.6 Keep Related Code Close - -Keep state, validation, mutation, and cleanup for one behavior near each other. Split only when ownership or readability clearly improves. - -### 0.7 Review Every Symbol - -Every file, type, interface, struct, field, function, method, parameter, result, constant, and variable needs a reason to exist. - -For every touched symbol, ask whether it can be removed, inlined, merged with an existing owner, narrowed in scope, made private, renamed by role, or replaced by direct local code. Review nearby old symbols exposed by the change too. +Changes to this specification MUST update the routing rules in `AGENTS.md` and +`.claude/CLAUDE.md` in the same change. -A refactor is incomplete if it adds structure while leaving now-obvious dead fields, arguments, results, helpers, or wrapper files behind. If the only reason is future flexibility, symmetry without behavior, shorter code, or one-call-site convenience, remove it. +## 1. Scope and Precedence -### 0.8 Prefer Simpler Algorithms +### 1.1 Precedence -Before adding structure, look for a simpler or more efficient algorithm. +Apply the first rule that resolves a question: -Prefer one direct pass over coordinated passes, local state over global maps, exact ownership over cleanup protocols, and data flow matching the runtime model. Do not optimize by hiding behavior; keep correctness, interpreter/JIT parity, and verifier/runtime invariants obvious. +1. Nearby code that already applies a more specific pattern consistently. +2. This specification. +3. General Go convention. -Performance claims need benchmark evidence. +Nearby code does not override this specification merely because a violation is +repeated. A deliberate exception MUST be documented in the change summary with +its reason and removal condition. -### 0.9 Iterate Until Stable +### 1.2 Requirement Levels -Simplify in passes. Removing one symbol, helper, field, pass, or branch often exposes the next simplification. - -Each pass checks: removable symbols, narrower ownership or visibility, simpler control flow, simpler algorithms, then tests/docs matching the final shape. Stop only when another pass finds no safe improvement. - -Record intentionally non-viable simplifications in the final summary so future work does not re-derive them silently. - -## 1. Functions - -### 1.1 Use One Abstraction Level - -Each function should operate at one conceptual level. Do not mix orchestration with parsing details, policy with arithmetic, or high-level flow with byte/index mutation. - -Good functions read like behavior: - -```go -func (r *REPL) Run(ctx context.Context) error { - for { - line, err := r.read() - if err != nil { return err } - - inst, err := r.parse(line) - if err != nil { return err } - - if err := r.exec(ctx, inst); err != nil { return err } - r.commit(inst) - } -} -``` - -If comments explain transitions between unrelated steps, the function likely mixes levels. - -### 1.2 Name by Role - -Names describe caller-visible behavior, not implementation mechanics. Use the shortest standard name that is still clear; prefer one word when package, file, receiver, or context already provides meaning. - -| Avoid | Prefer | +| Term | Meaning | |---|---| -| `rewriteBranchAbsolute` | `normalize` | -| `appendInstrAndUpdateLen` | `commit` | -| `checkEmptyAndFormatProg` | `show` | -| `jitContext` | `lowering` | -| `jitFrame` | `activation` | -| `jitOperand` | `value` | -| `traceOperation` | `step` | - -Receiver context counts: `r.show()` and `r.commit()` are clear on `*REPL`. +| MUST, MUST NOT | Required. | +| SHOULD, SHOULD NOT | Default; deviation requires a stated reason. | +| MAY | Allowed at the author's discretion. | -Avoid names that repeat package/file/subsystem context, non-standard abbreviations, one-letter names outside tight scopes, and implementation-step names when a role name is enough. +### 1.3 Fast Path -Allowed abbreviations: common domain terms such as `ID`, `IP`, `ABI`, `JIT`, `VM`, and `CPU`. +Read only the sections touched by a change, but every code or test change MUST +apply §2 and §16. -Good role words: `value`, `step`, `state`, `frame`, `module`, `target`, `source`, `lowering`, `activation`, `compiler`, `builder`, `cache`, `trace`, `root`, `exit`. - -Short and clear is the goal; cryptic is not. - -### 1.3 Declare Callers Before Callees +| Change | Sections | +|---|---| +| Functions, helpers, or names | 2, 3, 4 | +| Types, fields, constructors, or public APIs | 2, 4, 5 | +| Package boundaries or domain ownership | 6, 7 | +| Interpreter, JIT, assembler, or generated handlers | 7, 8, 13, 14 | +| Declaration or file order | 3, 9 | +| Errors or panic/recover | 10 | +| Concurrency or lifecycle | 11 | +| Tests or benchmarks | 12, 14 | +| Commits or documentation | 15 | -Within a file and section, place high-level functions before helpers they call. Functional options may appear immediately before the constructor they configure so read order matches call sites like `New(prog, WithTick(1))`. +## 2. Core Principles -### 1.4 Extract Only When Useful +1. Code MUST read as a behavior specification: a reader identifies what + happens and which object owns it without simulating mechanics. +2. Each function MUST hold one abstraction level. +3. Behavior MUST live in the package and type that own its rule. +4. Related state and behavior MUST stay together. +5. Exported surface MUST be the smallest complete API. +6. Structure MUST be added only when it removes real complexity. +7. Explicit, readable behavior takes precedence over clever mechanics. +8. Established conventions MUST be preserved unless the change intentionally + replaces them. +9. Interpreter and JIT behavior MUST remain semantically symmetric, while their + implementations MAY differ where the execution model requires it. +10. Performance claims MUST be supported by reproducible benchmark evidence. -Inline simple single-use logic. +### 2.1 Top-Down Design Review -Extract only when a helper removes real duplication, isolates real complexity, names meaningful behavior, or keeps the caller at one abstraction level. Do not extract tiny helpers that hide a short switch, predicate, or loop used once. +Every non-trivial change MUST review, from the public entry point downward: -Let one helper own a branch-or-fallback decision. If it can decide whether it applies and return failure/fallback, callers should not duplicate its preconditions. +1. package responsibility and dependency direction; +2. public contract and ownership boundary; +3. primary behavior and control flow; +4. state and lifecycle ownership; +5. lower-level mechanics. -### 1.5 Methods Show Ownership +A package, type, or abstraction whose responsibility cannot be stated in one +precise sentence SHOULD be split, merged, narrowed, or removed. -A function used by one type belongs on that type, even when the receiver is not used directly. Callbacks should also be methods when ownership belongs to a type. +### 2.2 Bottom-Up Symbol Review -```go -func (l Lowerer) cmp(c *Context) bool { return l.compare(c, l.sign32) } -``` +Every changed file, and every nearby symbol exposed by the change, MUST be +reviewed from leaves upward. Each file, type, interface, field, function, +method, parameter, result, constant, variable, and test helper MUST have a +current reason to exist. -Package functions are for constructors, functions used by multiple types, public general utilities, or helpers used only by other package-level functions. +For each symbol, reviewers MUST ask whether it can be: -Do not extract a tiny single-use method just to satisfy ownership; inline it instead. +- removed; +- inlined; +- merged with an existing owner; +- narrowed in scope or made private; +- renamed by role; +- represented by an existing type or operation; or +- replaced by simpler direct code or a simpler algorithm. -### 1.6 Constructors Are Functions +A refactor is incomplete while it leaves dead fields, arguments, results, +wrappers, aliases, compatibility shims, or one-call indirections made obsolete +by the change. Future flexibility, superficial symmetry, shorter functions, and +one-call-site convenience are not sufficient reasons for a symbol to exist. -Constructors are standalone functions, never methods. +### 2.3 Simplification Loop -```go -func newCompiler(...) *compiler -func New(...) *Optimizer -``` +Simplification MUST continue until another pass finds no safe improvement. Each +pass checks, in order: -A package-primary concrete type may use `New` when package context is unambiguous. Secondary public concrete types use `NewType`; private concrete types use `newType`. +1. removable or mergeable symbols; +2. narrower ownership and visibility; +3. simpler control flow; +4. simpler or more efficient algorithms; +5. tests and docs matching the final contract. -### 1.7 Keep Methods with Their Type +Intentionally rejected simplifications MUST be recorded in the change summary +with the invariant, compatibility constraint, or measured cost that prevented +them. -A file should contain methods for one main type. Split a large type across files by concern if needed, but do not place methods for type A in type B's file just for locality. +## 3. Functions -For JIT code, `interp/jit.go` owns JIT-neutral compiler/module/trace orchestration, `interp/jit_arm64.go` owns ARM64 lowering, and `*Interpreter` JIT bridge behavior stays with `*Interpreter`. +### 3.1 Abstraction Level -## 2. Types +A function MUST NOT mix unrelated levels, including: -Add a type only when it owns data with behavior, names a real domain concept, or prevents repeated error-prone structure. Do not add one to group temporary values, hide a simple tuple, or create future abstraction. +- CLI parsing with VM state mutation; +- bytecode decoding with optimization policy; +- register-allocation mechanics with JIT orchestration; +- profiling aggregation with execution control. -### 2.1 Define Interfaces Where Consumed +The main flow MUST remain visible. Mechanics MAY move behind a behavior-level +name when doing so makes that flow easier to read. -Interfaces belong in the package that consumes behavior, not the package that implements it. They describe what the caller needs. +### 3.2 Declaration Order -### 2.2 Prefer Private Type, Public Instance +Callers MUST be declared before callees. Reading downward MUST reveal +progressively more detail. -When there is one meaningful implementation, use an unexported concrete type with an exported value. +```text +Run + prepare frame + execute code + collect result -```go -type i32Type struct{} -var TypeI32 = i32Type{} +execute + dispatch opcode + handle fallback ``` -### 2.3 Keep Interfaces Small - -Do not create an interface until a consumer needs it. Do not add methods for later. - -Assert compliance near the related type, in the private value section: +A file MUST form a descending staircase of abstraction: -```go -var _ Traceable = (*Struct)(nil) -``` - -### 2.4 File Layout +- symbols at the same level MUST be adjacent and in call order; +- a callee MUST be as close to its caller as its other callers allow; +- a shared callee MUST follow the last caller that introduces it; +- a lower level MUST NOT be interleaved between higher-level symbols; and +- error constructors, formatters, and comparable leaves MUST be last. -Use this order in every `.go` file: +### 3.3 Helper Extraction -1. public types -2. private types -3. public constants -4. private constants -5. public variables -6. private variables -7. `init` functions -8. constructors -9. public functions -10. public methods -11. private methods -12. private functions +A helper MAY be extracted only when it: -Within each group, keep callers before callees. Keep `init` after package variables and before every constructor, function, and method. When a package function becomes a method, move it into method territory; constructors stay in the constructor section. +1. removes real duplication; +2. gives reusable behavior a meaningful name; +3. isolates mechanics required to keep one abstraction level; or +4. is required as a function value by composition. -### 2.5 Order Struct Fields by Meaning +A private helper SHOULD have at least two real callers. A single-use helper MUST +be inlined unless inlining would mix abstraction levels. A surviving single-use +helper MUST name a policy or mechanic, never one sequential step in its caller. -Order fields by how readers understand the type: +A helper MUST NOT exist only to shorten a function, delegate one call, translate +one obvious error, hide one branch, or label a step. -1. lifecycle and policy objects -2. infrastructure -3. program data -4. runtime state -5. mutable counters -6. read-only config -7. sync primitives +A helper MUST belong to the package and type that own its behavior. Collection, +validation, encoding, or comparison rules over another package's types MUST NOT +be reimplemented when that package can own the operation. -Separate layers with a blank line. Put rich behavioral objects near the top, mutable counters above read-only config, plain numeric config near the bottom, and `sync.Mutex` last. Struct literals follow field declaration order. +### 3.4 Methods and Functions -Field names should be short and clear; prefer one word when possible. +- Use a method when behavior belongs to one receiver. +- Use a package function for constructors, behavior shared by unrelated types, + or behavior with no natural receiver. +- Receiver-owned behavior MUST NOT remain a package helper. +- A method MUST NOT be added merely to shorten a call. +- Constructors MUST be package functions, never methods. -## 3. APIs +A private package function used by one type MUST become a method or be inlined, +unless it is a constructor or is materially clearer as a package-level +mechanic. -Public APIs should make the common path obvious, keep advanced behavior explicit, and avoid exposing internal representation without a stable caller need. +## 4. Naming -### 3.1 Constructors +### 4.1 General -A package-primary constructor may use `New`; other public constructors use `New`, and private constructors use `new`. Constructors establish invariants; if a value has no invariants, a struct literal may be clearer. +- Prefer one-word names. +- Add a word only when package, receiver, or local context cannot distinguish + the concept. +- Use one canonical term per concept across packages. +- Names MUST NOT repeat the receiver, package, subsystem, phase, or + representation without a real disambiguation need. +- Abbreviations MUST be established project or domain terms such as `ID`, `IP`, + `ABI`, `JIT`, `VM`, `CPU`, `CFG`, `GVN`, and `DCE`. +- One-letter names MUST be limited to conventional indexes, receivers, and very + small scopes. +- Protocol, ISA, opcode, ABI, and standard-library terms MUST retain their exact + spelling. -### 3.2 Parsers +Names describe caller-visible roles, not mechanics. `Run`, `Build`, `Lower`, +`Encode`, `Relax`, `Capture`, and `Publish` name behavior; names such as +`appendInstructionAndUpdateLength` expose steps instead of roles. -Parser names: +### 4.2 Predicates and Queries -| Function | Meaning | +| Form | Use | |---|---| -| `Parse` | package primary type | -| `Parse` | secondary type | -| `ParseAll` | multiple values, usually from `io.Reader` | - -```go -func Parse(s string) (Type, error) -func ParseFunction(lines []string) (*Function, error) -func ParseAll(r io.Reader) ([]Instruction, error) -``` +| `Has` | membership or registered-value existence | +| `Is` | state predicate | +| `Match` | equality or verifier check | +| `` | direct boolean value | -### 3.3 Options +Append `At` when a predicate is evaluated at a supplied position or time. Domain +verbs such as `Build`, `Compile`, `Capture`, `Publish`, `Relax`, and `Use` are +reserved for computations and transitions, not plain lookups. -Prefer functional options over config structs. Use direct arguments for required behavior and options for rare configuration. Apply defaults first, then options. +### 4.3 Capabilities and Collections -```go -func New(prog *program.Program, opts ...func(*option)) *Interpreter { - opt := option{stack: 1024, heap: 128, threshold: 4096} - for _, fn := range opts { fn(&opt) } - ... -} -``` +Injected capabilities take singular role names. Collections, registries, and +stores take plural names. Qualify a name only when another capability in the +same scope would collide. -### 3.4 Builders - -Builders are mutable; built values are treated as immutable. Discard builders after `Build()`. - -```go -fn := types.NewFunctionBuilder(&types.FunctionType{}). - Params(types.TypeI32). - Locals(types.TypeI32). - Emit(instr.New(instr.LOCAL_GET, 0)). - Build() -``` +## 5. Types and APIs -A builder constructs one thing, validates near construction, and must not become a general mutable config store. +### 5.1 Public Surface -### 3.5 Avoid Premature API Surface +Every exported symbol is a maintenance commitment. -Do not add public methods, options, interfaces, or exported fields unless a real caller needs them. Smaller APIs are easier to maintain, test, and keep compatible. +- Accept interfaces when callers provide behavior. +- Return concrete types from constructors. +- Define interfaces in the package that consumes the behavior. +- Keep public structs small and intentional. +- Exported writable aggregate fields SHOULD NOT be added. +- Aliases, wrappers, or pass-through methods MUST have a distinct contract. +- `Request`, `Response`, `Result`, `Data`, `Info`, or `Context` containers MUST + NOT be added only to group parameters or returns. +- Speculative options, algorithms, extension points, and policy knobs MUST NOT + be exported. +- A type MUST own an invariant, policy, transition, or stable capability. -## 4. Errors +Public APIs outside the scope explicitly authorized by the user MUST remain +source compatible. Compatibility MUST NOT preserve an internal symbol that has +no external contract. -Return errors for expected failure. Panic only for internal invariants. +### 5.2 Constructors and Options -### 4.1 Errors Are API +A constructor MUST require only values that: -Sentinel errors are stable semantic categories, not implementation details. +1. have no safe default; +2. cannot be created internally or supplied later; and +3. are required for primary behavior. -```go -var ( - ErrUnknownOpcode = errors.New("unknown opcode") - ErrStackOverflow = errors.New("stack overflow") -) -``` - -Keep error values stable when callers can reasonably branch on them. - -### 4.2 Wrap Errors with `%w` - -Use `%w` whenever returning an error with context. - -```go -return nil, fmt.Errorf("%w: %d", ErrTooManyParams, len(sig.Params)) -return fmt.Errorf("%w: at=%d", ErrInvalidJump, ip) -``` +Optional construction choices MUST use functional options. Required options +MUST NOT replace clearer direct arguments. Defaults MUST be applied before +options. -### 4.3 Panic Only for Invariants +Constructors validate immediately required dependencies, immutable shape, and +identity. Builders validate the complete value at `Build` or `MustBuild`. +Runtime execution MUST NOT be the first validation boundary for malformed +builder state. -Panic is allowed only for violated internal invariants, usually in hot paths. Normal control flow returns errors. +Options MUST pass through the constructor or builder that owns their contract. +When a type already exposes the complete replacement transition, an option MUST +call that transition rather than duplicate it. -Recover at the execution boundary, not throughout the codebase. Recovery must be local, documented, and tied to a specific boundary. +Declaration order is: -Use structured error types only when callers need more than a message. - -## 5. Build Tags - -Keep architecture-specific code isolated behind build tags, with matching stubs and mirrored test tags. - -```go -//go:build arm64 -``` - -```go -//go:build !arm64 +```text +WithX ... +MustNew or MustBuild +New or Build ``` -Portable behavior belongs in the default implementation. Architecture files provide only the narrow part that must differ. +`MustNew` MUST precede `New`; `MustBuild` MUST immediately precede `Build` when +it delegates to it. -When adding an architecture path, update `docs/compatibility.md` and the relevant implementation guide. +### 5.3 Encapsulation -## 6. Tests +Every exported struct is an ownership boundary, including within its package. +A method on one exported type MUST NOT access another exported type's unexported +state or construct a literal naming that state. It MUST use the smallest public +constructor, behavior, getter, setter, or conversion preserving the callee's +invariants. -Tests cover behavior, not private shape, unless the shape is the protected contract. If a change touches interpreter and JIT paths, test both or explain why one is not applicable. +Private constructors, options, encoding hooks, and implementation functions +belonging to a type MAY access its private state. Unexported collaborators that +form one internal implementation MAY access each other; public proxies MUST NOT +be added only to separate them. -### 6.1 Tests Are Executable Documentation +Getters MUST return defensive copies of mutable slices, maps, bytes, keys, code, +and buffers unless the API explicitly transfers ownership. Setters MUST own the +complete replacement transition and preserve all invariants. Workflow changes +such as compile, publish, install, reset, retain, release, and close MUST be +behavior methods, not field assignment. -Tests should show setup, execution, and expectation in one visible flow. Avoid fixture builders, test-only run wrappers, assertion helpers, and hidden setup helpers. +### 5.4 Values and Representations -Duplicated setup is acceptable when it keeps the tested API visible. +- Prefer values when they protect meaningful invariants. +- Normalize sets by immutable identity. +- Reject duplicate identities before mutating state. +- Store and return sets in deterministic order. +- Custom text, binary, and JSON input/output SHOULD be symmetric unless a + current wire contract requires otherwise. +- Mutable builders MUST NOT leak mutable backing storage into built values. +- `Clone` MUST preserve hidden execution and ownership state required by the + public contract. -```go -t.Run("threaded", func(t *testing.T) { - ctx, cancel := context.WithCancel(context.Background()) - defer cancel() +## 6. Package and Domain Ownership - calls := 0 - i := New(prog, WithTick(1), WithHook(func(i *Interpreter) error { - calls++ - cancel() - return nil - })) - defer i.Close() +A package owns its vocabulary, invariants, policies, and state transitions. +Behavior MUST be placed by its dominant rule, not by how many packages it +references. - require.ErrorIs(t, i.Run(ctx), context.Canceled) - require.Equal(t, 1, calls) -}) -``` - -### 6.2 Test Public Behavior - -Top-level tests target public symbols. - -| Symbol | Test | +| Package role | Owns | |---|---| -| `Foo` | `TestFoo` | -| `NewFoo` | `TestNewFoo` | -| `(Foo).Bar` | `TestFoo_Bar` | +| `instr` | opcode vocabulary, widths, encoding, parsing, metadata | +| `types` | VM values, type invariants, value comparison and tracing | +| `program` | bytecode aggregates, builders, labels, verification boundary | +| `interp` | VM execution state, threaded dispatch, fallback, JIT orchestration | +| `asm` | architecture-neutral assembly IR, allocation, linking, executable buffers | +| `asm/` | architecture encoding, ABI, registers, relaxation | +| `prof` | samples, counters, profile aggregation | +| `pass` | generic pass lifecycle and analysis cache | +| `analysis` | reusable facts without mutation | +| `transform` | one transformation policy per pass | +| `optimize` | optimization pipeline composition | +| `debug` | bytecode debugging policy | +| `cli` | command parsing, application coordination, display | -Do not name top-level tests after private helpers. Test private behavior through the public API that owns the observable behavior. +Prefer extending an existing cohesive aggregate or value before adding an +object. When a package outgrows one responsibility, split it into a sibling +package, not a nested implementation hierarchy. -### 6.3 Match Test Files to Production Files +A coordinator MAY be introduced only when it coordinates multiple owners, +stable dependencies would otherwise repeat, no one aggregate can honestly own +the operation, and the coordinator remains small. Generic `Service`, `Manager`, +`Util`, and `Helper` names MUST NOT be introduced. Existing standard terms such +as `pass.Manager` MAY remain when they accurately name a registry and cache +owner. -Use matching names: `buffer.go` -> `buffer_test.go`, `assembler.go` -> `assembler_test.go`, `jit_arm64.go` -> `jit_arm64_test.go`. +## 7. Runtime and Compiler Boundaries -Tests for a public symbol belong in the test file matching the file that defines the owning type or constructor. +### 7.1 Program and Verification -### 6.4 Keep Nesting Shallow +`program.Program` is the bytecode hand-off boundary. Builders own label repair, +pool interning, and final construction invariants. `program.Verify` owns +validation of untrusted bytecode and MUST remain independent of interpreter +state and optimizer policy. -Aim for at most one `t.Run` level. Do not add wrapper subtests just to group cases. +A pass that changes bytecode offsets MUST repair every branch, handler, and +position-sensitive structure or leave the function unchanged. -Use table tests when setup and assertions share one shape. Use explicit subtests when cases need different setup or clearer labels. Do not mix styles at the same nesting level. +### 7.2 Interpreter -### 6.5 Use `require` +`interp.Interpreter` owns runtime stacks, frames, heap, globals, threaded code, +and per-instance native installation. One interpreter is single-goroutine-owned +during use. Request contexts MUST NOT be stored beyond the active operation. -Always use `require`, not `assert`. +Threaded dispatch is the semantic reference. Runtime hot-path traps MAY panic +internally only when `Run` owns the single recovery boundary and returns the +stable error with the exact instruction position. -```go -require.NoError(t, err) -require.ErrorIs(t, err, ErrFoo) -require.Equal(t, want, got) -``` +### 7.3 JIT -### 6.6 Clean Up Immediately +The JIT is an optimization over threaded semantics. -Defer cleanup right after successful allocation. +- Unsupported lowering MUST leave the exact threaded fallback available. +- A failed speculative lowering MUST NOT partially mutate IR, stack facts, + labels, or ownership state. +- Architecture-neutral planning MUST remain separate from architecture + encoding. +- JIT policy MUST NOT leak into `asm` instruction mechanics. +- Native installation and publication MUST preserve immutable code and + interpreter-local dispatch ownership. +- Interpreter/JIT parity MUST be tested through public observable behavior. -```go -b, err := NewBuffer(64) -require.NoError(t, err) -defer b.Free() -``` +### 7.4 Assembler and Executable Memory -### 6.7 Keep Fixtures Small +`asm` owns virtual registers, allocation, linking, buffers, and executable +memory lifecycle. Architecture packages own concrete instruction encoding and +ABI details. -A test should make important bytecode or runtime behavior visible near the assertion. Prefer table tests for repeated behavior and focused tests for subtle control flow. +Executable buffers MUST own their own write/execute transition, so a buffer is +executable whenever no install is in flight and installs serialize internally. +Relaxation MUST terminate, and each replacement MUST already be encodable at +its final range. Resource cleanup MUST be explicit and idempotent where the +public contract permits repeated cleanup. -### 6.8 No Test Helpers by Default +### 7.5 Profiling -Do not add test helpers for fixtures, programs, contexts, configured objects, assertions, or white-box introspection by default. +`prof` owns recording and aggregation only. It MUST NOT decide JIT policy, +mutate interpreter state, or coordinate compilation. Snapshots returned to +callers MUST be deterministic and MUST NOT expose mutable internal storage. -Before adding a helper, ask: can this be inlined, can this be a table, or does this belong in production code? +## 8. Execution Flow and Algorithm Design -Only add a helper when it is clearly better than visible, local test flow. - -### 6.9 Shared Opcode Tests - -For `interp.Interpreter.Run`, opcode examples live in the package-level `runTests` table. Each row shows bytecode, required constants/types/locals, and final stack values or expected error. - -Behavior that does not fit one row, such as entry-frame `YIELD` resume behavior, should be an explicit subtest after the table loop. - -### 6.10 Benchmarks - -Benchmarks follow the same public owner and hierarchy as correctness tests. Use `BenchmarkNewFoo` for `NewFoo` and `BenchmarkFoo_Bar` for `Foo.Bar`; put workloads and execution modes below that owner. - -Validate each fixture once before timing and validate the final result or checksum after timing. Use deterministic inputs and `b.Loop()`. Keep construction, verification, expected-result computation, reset, cleanup, result checks, and warmup outside the timer unless one is the named operation. - -Name lifecycle states explicitly and consistently within their owner hierarchy, such as `Threaded`/`JITWarm` for interpreter API benchmarks and `threaded`/`jit_warm` for VM kernels. Do not label interpreter fallback as JIT throughput. Prove native emission and entry before timing a warm path when the package can observe them. - -Keep direct interpreter costs in `interp/interp_test.go`, runtime-neutral multi-opcode kernels in `benchmarks/`, and external comparisons behind the `compare` build tag. Do not create benchmark DSLs, service-domain canonical workloads, golden timings, or aggregate scores. - -## 7. Git and PRs - -Keep commits focused. A commit should have one reason to exist. - -### 7.1 Branch and Commit Types - -| Change | Branch | Commit | -|---|---|---| -| bug | `hotfix/` | `fix` | -| feature | `feature/` | `feat` | -| performance | `feature/` | `perf` | -| refactor | - | `refactor` | -| test | - | `test` | -| docs | - | `docs` | - -Use lowercase, concise, hyphen-separated names. - -### 7.2 Commit Format - -Use `(scope): `. +Primary flows MUST be composed at one level: ```text -feat(interp): add trace jit support -fix(asm): correct register allocation -feat!: change bytecode format +parse -> verify -> optimize -> construct -> run -> observe -> close +trace -> plan -> lower -> build -> publish -> install ``` -Rules: imperative mood, at most 72 characters, one logical concern per commit. Breaking changes include `BREAKING CHANGE: ...`. - -### 7.3 Performance Changes - -Performance claims require benchmark evidence: +Mechanics MAY be extracted behind policy names, but shallow wrappers MUST NOT +hide these flows. Prefer: + +- one direct pass over coordinated passes; +- local state over global maps; +- exact ownership over cleanup protocols; +- data flow matching the runtime model; +- bounded worklists over recursive traversal in runtime ownership paths; and +- immutable publication over shared mutation. + +`release` MUST remain iterative. Heap index zero MUST remain `Null`. Frame code +MUST keep function address and callable reference distinct. Detailed runtime and +JIT invariants remain authoritative in `docs/architecture.md`, +`docs/memory-model.md`, and `docs/jit-internals.md`. + +## 9. File Layout + +### 9.1 Declaration Groups + +Declarations in a `.go` file MUST appear in this order: + +1. public types; +2. private types; +3. public constants; +4. private constants; +5. public variables; +6. private variables; +7. `init` functions; +8. public options and functions; +9. public constructors; +10. public methods; +11. clone and explicit conversion methods; +12. standard-library, encoding, database, and protocol hooks; +13. private functions and methods. + +Within a group, symbols MUST follow meaning and call flow, never alphabetical +order. Related symbols MUST remain adjacent. Options MAY sit immediately above +the constructor they configure. + +A struct and all its methods SHOULD remain in one file. A large type MAY be +split by a real concern, but methods MUST NOT be placed in another type's file +for superficial locality. JIT-neutral orchestration belongs in `interp/jit.go`; +architecture lowering belongs in `interp/jit_.go`. + +### 9.2 Method Order + +For a stateless capability, coordinator, adapter, compiler, or encoder: + +1. primary behavior; +2. supporting behavior in top-down call order; +3. lower-level private mechanics. + +For a stateful entity or value: + +1. multi-field behavior near the earliest field it depends on; +2. field groups in struct declaration order; +3. within each group: mutator, predicate or matcher, getter; +4. workflow transitions in natural order; +5. `Clone` and explicit conversions; +6. `String`, marshal/unmarshal, and other interface hooks. + +### 9.3 Struct Fields + +Fields MUST be ordered by reader understanding: + +1. lifecycle and policy objects; +2. infrastructure and shared capabilities; +3. program or domain data; +4. runtime state; +5. mutable counters; +6. read-only configuration; +7. synchronization primitives. + +Groups MUST be separated by a blank line. `sync.Mutex` MUST be last. Struct +literals MUST follow declaration order. + +## 10. Errors + +- Errors MUST NOT be ignored. +- Package-created semantic errors MUST be stable `ErrXxx` sentinels. +- Dependency errors MUST remain unchanged when identity is contractual. +- Only outcomes understood at the current boundary MAY be translated. +- Cancellation, timeout, conflict, corruption, resource exhaustion, and other + operational failures MUST be preserved. +- `fmt.Errorf` MUST NOT create a new semantic category. +- Errors MUST NOT be wrapped only to repeat the failed operation. +- `%w` MUST be used when added context preserves a dependency or sentinel. +- `errors.Is` and `errors.As` MUST be used only when identity controls behavior. +- Error messages MUST NOT expose host values, private code, pointers, or other + sensitive process state. + +| Form | Meaning | +|---|---| +| `ErrNo*` | required capability is not configured | +| `*Required` | required value is absent | +| `Invalid*`, `*Invalid` | supplied value violates its contract | +| `*Incomplete` | construction or wiring is incomplete | -```text -before: ... -after: ... -conclusion: ... -``` +Sentinel names and messages MUST align. Panic is permitted only for impossible +programmer errors, `Must*` APIs, and documented runtime hot-path invariants with +a single recovery boundary. Other runtime failures MUST return errors. -### 7.4 Self-Review Checklist +## 11. Concurrency and Lifecycle -Before opening a PR, check: +- `context.Context` MUST be the first parameter of operations that may block, + perform I/O, or cross a process boundary. +- Contexts MUST NOT be stored in long-lived structs. +- Cancellation and timeout ownership MUST be preserved. +- Shared mutable state MUST have one clear owner and synchronization strategy. +- Goroutine lifetimes MUST be tied to an operation or process lifecycle. +- Long-lived goroutines MUST shut down gracefully. +- Immutable data SHOULD be published atomically instead of mutated under + readers. +- Cleanup methods MUST release native memory and owned references exactly once. +- Race tests MUST cover changes to pools, caches, profilers, publication, or + shared compilation. + +## 12. Tests -- issue is fully resolved; no unrelated changes -- every touched symbol has a reason to exist -- removable symbols were removed, inlined, merged, narrowed, or made private -- the algorithm is the simplest correct option found -- repeated review passes find no safe simplification -- names are short, standard, and consistent -- public surface is minimal -- invariants are preserved -- tests cover behavior -- docs are updated when conventions change +### 12.1 Placement and Ownership + +- Unit tests live beside production code as `*_test.go`. +- Each test file MUST match the production file owning the symbol. +- Catch-all concept files and `test_helpers_test.go` MUST NOT be created. +- Black-box, conformance, and external fixtures belong under `test/` or the + dedicated `benchmarks/` module. +- Test order MUST match source declaration order. -### 7.5 Pull Requests +Write one top-level test per exported constructor, function, or method with an +independent contract. Cases MUST be subtests; sibling top-level tests per case +MUST NOT be created. Setter and getter behavior MUST be tested together under +the setter owner. + +### 12.2 Public Contract Only + +Tests are executable specifications of the public contract. They MUST construct +exported types through exported constructors, builders, or options and verify +behavior through exported functions and methods or an observable boundary. + +Tests MUST NOT: + +- construct literals naming unexported fields; +- read or write unexported state; +- call unexported functions or methods; +- assert private representation; +- add production proxies solely for testing; or +- proxy a real implementation merely to inject failure. + +If behavior cannot be reached publicly, it is either a missing legitimate +contract or unobservable implementation state. Improve the production API only +for a real caller contract; otherwise delete the test and record the lost claim. + +A test-local implementation of an exported extension interface is a public API +client and MAY be used when it does not depend on private state. + +### 12.3 Arrange Isolation + +Each `t.Run` MUST own its complete arrange. Mutable objects MUST NOT be shared +between sibling subtests, and a parent test MUST NOT hold the object graph its +children exercise. Repeated setup is expected. Test helpers MUST NOT hide the +behavior under test or add a second abstraction layer. + +Use real in-memory implementations by default. Reproduce failures with real +states such as cancellation, invalid input, missing values, exhaustion, or +concurrent conflict. If no public real mechanism can produce a condition, the +case MUST NOT be kept alive by a proxy double. + +### 12.4 Assertions and Cleanup + +- Use `require`, not `assert`. +- Defer cleanup immediately after successful allocation. +- Keep setup, behavior, and expectation visible in one flow. +- Aim for at most one `t.Run` level. +- Table tests SHOULD be used when cases share one shape. + +### 12.5 Runtime Parity + +Opcode examples belong to the public `Interpreter.Run` specification. A change +touching threaded, fused, optimized, or JIT paths MUST test every applicable +mode or state why a mode is not applicable. Tests MUST assert returned values, +errors, encoded output, profiling snapshots, or another public observable +boundary, never dispatch-table or lowering internals. + +### 12.6 Fuzzing + +Fuzz tests SHOULD target trust boundaries and semantic parity: instruction and +program parsing, verification, type parsing, and optimizer equivalence. Inputs +MUST be bounded so CI work remains finite. + +## 13. Generated and Architecture-Specific Code + +Generated files MUST be changed through their generator. Generator output MUST +be deterministic, formatted, and verified with `make check-generated`. + +Architecture-specific code MUST use matching build-tagged implementations, +stubs, and tests. Portable behavior belongs in default files; architecture +files contain only the narrow behavior that differs. -Follow the existing PR template. Explain what changed, why it changed, how it was tested, and benchmark impact if relevant. PR titles follow commit-summary style. +Adding or changing an architecture path MUST update `docs/compatibility.md` and +the relevant implementation guide or JIT contract. + +## 14. Performance and Benchmarks + +Correctness and simplicity are prerequisites for optimization. Performance work +MUST: + +1. define the public workload and compared modes; +2. capture a reproducible baseline; +3. profile or otherwise identify the actual hot path; +4. change the smallest owning layer; +5. rerun correctness, race, and parity tests; and +6. report before/after medians with `ns/op`, `B/op`, and `allocs/op`. -## 8. Docs +Benchmarks MUST validate fixtures before timing and results after timing. Setup, +warmup, reset, cleanup, and expected-result computation stay outside the timer +unless they are the named operation. Inputs MUST be deterministic. Warm JIT +benchmarks MUST prove native installation before timing and MUST NOT report +threaded fallback as JIT throughput. -Documentation is part of the codebase. Each topic should have one owner; other docs summarize and link instead of repeating full explanations. +Direct interpreter costs belong in `interp/*_test.go`; runtime-neutral kernels +belong in `benchmarks/`; external comparisons require the `compare` build tag. +Benchmark claims MUST name the hardware, OS, Go version, command, count, and +statistical summary. A regression in an unoptimized path MUST NOT be hidden by +an aggregate score. -Use the standard shape from `docs/README.md`: +The canonical commands are: -1. title and short purpose -2. `When to Read` -3. `Source of Truth` when relevant -4. main content -5. `Maintenance Notes` -6. `Related Docs` +```bash +make benchmark-pr +make benchmark-core +make benchmark-nightly +make benchmark-compare +``` -Keep wording direct and standard. Prefer `minivm`, `threaded interpreter`, `JIT`, `trace`, `opcode`, `value`, `ref`, and `heap` consistently. +## 15. Git and Documentation -Agent instruction files are routing and enforcement surfaces. Keep `AGENTS.md` as the common Claude Code / Codex contract, keep `.claude/CLAUDE.md` as a short Claude overlay that imports `AGENTS.md`, and keep detailed coding rules in their owner docs. +### 15.1 Commits -A convention-changing code change is incomplete without the matching documentation update. +Commits MUST have one reason to exist and use +`(scope): ` with a summary no longer than 72 +characters. -| Change | Update | +| Change | Type | |---|---| -| style, naming, structure | `docs/coding-patterns.md` | -| architecture, ownership, boundaries | `docs/architecture.md` | -| opcode semantics, stack effects, JIT status | `docs/instruction-set.md` | -| JIT contracts, assembler APIs | `docs/jit-internals.md` | -| workflow / convention rules | `AGENTS.md` and `.claude/CLAUDE.md` | -| invariants, pitfalls | `docs/architecture.md` | +| behavior | `feat` | +| defect | `fix` | +| performance | `perf` | +| internal design | `refactor` | +| tests only | `test` | +| documentation | `docs` | -## Agent Rule of Thumb +Breaking changes MUST include `!` and a `BREAKING CHANGE:` body. Performance +commits MUST record baseline, result, and conclusion in the commit body or +linked change summary. -When unsure, choose the smallest correct change. +### 15.2 Documentation Ownership -Prefer local code over a helper, one clear function over fragments, one short role name over mechanism names, one cohesive type over interfaces, explicit flow over clever indirection, one direct algorithm over coordinated state, and nearby style over a new pattern. +Documentation is part of the contract. Each topic has one owner; other docs +summarize and link rather than duplicate it. -The best design keeps behavior obvious, names few things, and leaves the next reader with less to understand. +| Change | Update | +|---|---| +| coding rules, names, structure | this specification | +| architecture, ownership, invariants | `docs/architecture.md` | +| opcode semantics and JIT status | `docs/instruction-set.md` | +| JIT contracts and assembler APIs | `docs/jit-internals.md` | +| benchmark results and methodology | `docs/benchmarks.md` | +| workflow or convention routing | `AGENTS.md`, `.claude/CLAUDE.md` | +| document index or shape | `docs/README.md` | + +Documentation MUST describe current behavior only, use canonical minivm terms, +and remain concise, factual, and reproducible. + +## 16. Completion Checklist + +Before completing a change, verify: + +- [ ] package and type ownership are clear (§6-§8); +- [ ] top-down design and bottom-up symbol reviews are complete (§2.1-§2.2); +- [ ] every touched symbol has a current reason to exist (§2.2); +- [ ] another simplification pass found no safe improvement (§2.3); +- [ ] names use canonical terms (§4); +- [ ] functions hold one abstraction level (§3.1); +- [ ] helpers remove real complexity (§3.3); +- [ ] public APIs are minimal and compatibility constraints are respected (§5); +- [ ] mutable values are defensively copied (§5.3); +- [ ] declarations and tests follow source order (§3.2, §9, §12); +- [ ] runtime, ownership, and fallback invariants remain intact (§7-§8); +- [ ] operational errors preserve identity (§10); +- [ ] concurrency and lifecycle ownership are explicit (§11); +- [ ] generated and architecture paths are synchronized (§13); +- [ ] performance claims have reproducible evidence (§14); +- [ ] relevant tests, race checks, static analysis, and benchmarks pass; and +- [ ] unrelated user changes are absent from every commit. ## Maintenance Notes -When changing coding patterns, keep rules readable from nearby code, avoid process that prevents no real mistakes, preserve useful historical rules unless they conflict with current code, keep terminology aligned with `docs/`, and update `docs/README.md` if the documentation shape changes. +Changes to this specification SHOULD remove ambiguity rather than add process. +New rules MUST prevent a demonstrated class of defect or inconsistency. Examples +MUST use current APIs. Historic decisions belong in focused audit or +architecture docs, not in this standard. -## Related Docs +## Related Documents -- `docs/README.md` - documentation ownership and format -- `docs/architecture.md` - package boundaries and ownership -- `docs/instruction-set.md` - opcode semantics, stack effects, and JIT status -- `docs/jit-internals.md` - JIT contracts and backend expectations -- `docs/guides/add-opcode.md` - opcode implementation workflow -- `docs/guides/add-architecture.md` - architecture backend workflow +- `AGENTS.md` — repository workflow and task router +- `.claude/CLAUDE.md` — Claude-specific execution overlay +- `docs/architecture.md` — package boundaries and runtime ownership +- `docs/testing.md` — public API test ownership inventory +- `docs/benchmarks.md` — measured results and methodology +- `docs/jit-internals.md` — JIT and assembler contracts +- `docs/README.md` — documentation ownership and format diff --git a/docs/instruction-set.md b/docs/instruction-set.md index 5b021aa8..8196e3b3 100644 --- a/docs/instruction-set.md +++ b/docs/instruction-set.md @@ -322,6 +322,12 @@ Examples: - constant ref cell plus `ref.get` - structured-error creation followed by a raise +A fused source stays in a temporary instead of being pushed, so a fused +handler checks stack room once for its own net push rather than once per +folded source. Bounds, segmentation, and underflow checks stay per source. +Trapping arithmetic (`div`/`rem`/`mod`) still materializes its operands on the +stack, so it keeps a check per push. + ## Maintenance Notes When changing the instruction set: diff --git a/docs/jit-internals.md b/docs/jit-internals.md index 67a5bd79..bfe57c8d 100644 --- a/docs/jit-internals.md +++ b/docs/jit-internals.md @@ -221,7 +221,7 @@ callee-saved save area equals the trampoline's total Go frame size, so an edit to any one constant without the others fails a test instead of corrupting the native stack at runtime. -Register allocation (`asm/rewriter.go`) is a single linear-scan pass: it spills the vreg with the farthest-away next use to a stack slot at the stream position where pressure was observed. Rewritten labels target the start of any inserted reload/store prefix, and labels on a return target its inserted frame epilogue. Only a call whose target label is bound inside the same `Code` (an intra-Code self-call, which runs through the shared epilogue on return) reserves the caller's spill area again before continuing; a call to a label resolved externally by `Link` never runs this `Code`'s epilogue, so the rewriter must not re-reserve after it. `Assembler.Entry` documents the matching limitation for non-primary entries: only the primary entry (offset 0) runs the frame prologue, so `Build` returns `asm.ErrEntryRequiresFrame` when spilling occurs and a non-primary entry exists. +Register allocation (`asm/rewriter.go`) is a single linear-scan pass: it spills the vreg with the farthest-away next use to a stack slot at the stream position where pressure was observed. Rewritten labels target the start of any inserted reload/store prefix, and labels on a return target its inserted frame epilogue. A call whose target label is bound in the same build runs through the shared epilogue on return, so the rewriter reserves the caller's spill area again after it. Linear-scan lifetimes describe a forward-only stream, so a build containing a back-edge runs without a spill frame at all: a value live across the loop would otherwise be spilled at what merely looks like its last use. The frame prologue sits ahead of the first instruction, and internal branches rebase past it, so a back-edge can never reserve the frame twice. Linear spill state is unsafe across a loop back-edge, and mutation blocks can combine paths around state materialization. Two layers enforce safety: @@ -344,7 +344,7 @@ A committing flush (`selfCall`, `tailLoop`) transfers operand ownership to the V ARM64 conditional/compare/test branches (`B.cond`, `CBZ`/`CBNZ`, `TBZ`/`TBNZ`) encode a fixed-width signed PC-relative immediate — imm19 (±1MB) for `B.cond`/`CBZ`/`CBNZ`, imm14 (±32KB) for `TBZ`/`TBNZ`, imm26 (±128MB) for `B`/`BL`. `asm/arm64.Encoder.Encode` validates every such offset is 4-byte aligned and fits its field, returning `asm.ErrBranchOutOfRange` instead of silently masking an out-of-range offset into a wrong target. `interp/jit.go` `publish` treats `ErrBranchOutOfRange` the same as `asm.ErrNoRegistersAvailable`: it aborts native lowering for that trace and falls back to threaded dispatch rather than emit a corrupt callable. `asm.Link` can also return `ErrBranchOutOfRange` (from `asm/link.go`'s `patch`, which re-encodes relocations whose target lands outside the branch's field once resolved against another `Code`'s address) — `publish` checks `errors.Is(err, asm.ErrBranchOutOfRange)` at the `Link` call site too and routes it through the same clean fallback, rather than letting it propagate as a hard error the way an unrelated `Link` failure does. -Before that fallback triggers, `asm.Assembler.encode` runs a branch relaxation fixpoint (`asm.Relaxer`, implemented by `asm/arm64.arch.Relax`) between the draft and final encoding passes. Each pass drafts the current instruction list once, collects every intra-Code `B.cond`/`CBZ`/`CBNZ` label branch whose imm19 displacement does not fit, and rewrites all of them together into an inverted-condition branch that skips a following unconditional `B` (imm26, ±128MB) to the original target; it then re-drafts and repeats until a pass finds nothing left to relax. Both replacement instructions are constructed to already be in range, so a given branch relaxes at most once and the loop always terminates, and batching every out-of-range branch within a pass keeps the number of drafts proportional to the number of passes rather than the number of branches; if the unconditional `B` itself would not reach the target (>±128MB), `Relax` returns `false` and `ErrBranchOutOfRange`/the JIT fallback still applies. `TBZ`/`TBNZ` never carry a `LabelOperand` in this codebase (their offset is always a caller-computed immediate — see `asm/arm64/instr.go`), so they never reach `Relax` and the imm14 (±32KB) window has no relaxation path; architectures without a `Relaxer` (amd64) are unaffected — `encode` no-ops the pass. +Before that fallback triggers, `asm.Assembler.encode` runs a branch relaxation fixpoint (`asm.Relaxer`, implemented by `asm/arm64.arch.Relax`) between the draft and final encoding passes. Each pass drafts the current instruction list once, collects every `B.cond`/`CBZ`/`CBNZ` label branch whose imm19 displacement does not fit, and rewrites all of them together into an inverted-condition branch that skips a following unconditional `B` (imm26, ±128MB) to the original target; it then re-drafts and repeats until a pass finds nothing left to relax. Both replacement instructions are constructed to already be in range, so a given branch relaxes at most once and the loop always terminates, and batching every out-of-range branch within a pass keeps the number of drafts proportional to the number of passes rather than the number of branches; if the unconditional `B` itself would not reach the target (>±128MB), `Relax` returns `false` and `ErrBranchOutOfRange`/the JIT fallback still applies. `TBZ`/`TBNZ` never carry a `LabelOperand` in this codebase (their offset is always a caller-computed immediate — see `asm/arm64/instr.go`), so they never reach `Relax` and the imm14 (±32KB) window has no relaxation path; architectures without a `Relaxer` (amd64) are unaffected — `encode` no-ops the pass. ## Loops diff --git a/docs/symbol-naming-audit.md b/docs/symbol-naming-audit.md index 48c5d629..e3b2ad8b 100644 --- a/docs/symbol-naming-audit.md +++ b/docs/symbol-naming-audit.md @@ -55,8 +55,7 @@ The map constructors remain deliberately distinct: | `analysis` | `gnumbering`, `newGNumbering` | `numbering`, `newNumbering` | | `analysis` | `gcompute` | `compute` | | `asm` | `collectRelaxations`, `spliceRelaxations` | `collect`, `splice` | -| `asm` | `patchExternalRelocs` | `patch` | -| `asm` | `regAlloc`, `newRegAlloc` | `allocator`, `newAllocator` | +| `asm` | `regAlloc`, `newRegAlloc` | `rewriter`, `newRewriter` | | `asm` | `scanLastUses` | `scan` | | `cli` | `doBreak` | `breakpoint` | | `cli` | `doClear` | `clearBreakpoint` | @@ -70,8 +69,8 @@ The map constructors remain deliberately distinct: | `interp` | `newCompileInput` | `input` | | `interp` | `applyPlanBlock`, `applyPlanStep` | `applyBlock`, `applyStep` | | `prof` | `function` | `samples` | -| `prof` | `appendEntryCounters`, `activeKeys` | `appendEntries`, `active` | -| `prof` | `mergeCounters`, `counterFor`, `resetCounters` | `merge`, `counter`, `reset` | +| `prof` | `appendEntryCounters`, `activeKeys` | `appendRows` | +| `prof` | `mergeCounters`, `counterFor`, `resetCounters` | `mergeRows`, `register`, `resetRows` | ## Retained Names diff --git a/docs/testing.md b/docs/testing.md index fb551aa7..ee800525 100644 --- a/docs/testing.md +++ b/docs/testing.md @@ -10,7 +10,7 @@ Read when adding or changing a public API, opcode, verifier rule, interpreter be | Concern | Source | |---|---| -| test shape and naming | `docs/coding-patterns.md` §6 | +| test shape and naming | `docs/coding-patterns.md` §12 | | public API behavior | production owner test matching the defining file | | opcode metadata and mnemonic | `instr/type.go` and `TestValid` | | verifier policy | `program/verify.go` and `TestVerify/defines_a_policy_for_every_opcode` | @@ -24,7 +24,6 @@ Read when adding or changing a public API, opcode, verifier rule, interpreter be | Public contract | production-matched package test file | exported constructors, functions, methods, options, errors, and lifecycle behavior | | Runtime specification | `interp.TestInterpreter_Run` | one visible bytecode fixture per opcode behavior, including traps and ownership | | Semantic parity | owning transform, optimizer, or interpreter test | compare observable output across threaded, optimized, fused, JIT, exit, and deoptimization paths | -| Internal invariant | nearest implementation test file | only safety properties unavailable through public behavior | | Fuzz | package `fuzz_test.go` | bounded trust-boundary and semantic differential properties | | Integration | highest public package boundary | real parse-to-close flows without duplicating unit cases | @@ -844,17 +843,6 @@ ARM64 instruction factories are the sole shared-family exception. `TestEncoder_E | `ERROR_CODE` | `error.code` | ✅ | fixed metadata | ✅ | — | ◐ | Runtime corpus only | | `STRING_ITER` | `string.iter` | ✅ | fixed metadata | ✅ | — | ◐ | Runtime corpus only | -## Intentional White-Box Coverage - -White-box tests remain only when exported behavior cannot directly protect the invariant: reference counts and free-list reuse, generated handler completeness, verifier dataflow policies, trace/cache state transitions, journal materialization, register allocation, relocation encoding, executable-buffer W^X and pointer stability, and architecture ABI encoding. - -Within `interp`, `TestCache` protects request coalescing, side-exit priority, -and shared attach/detach/close lifetime; `TestTracer_*` protects capture outcomes, -root reuse, publication, snapshots, and concurrent recording; and -`TestCoroutine_Refs` protects suspended ref-edge discovery. These are private -GC/JIT invariants with no complete public observation point. Pool sharing and -lifecycle remain covered through `TestNewPool` and `TestPool_*`. - ## Automated Gates | Command | Contract | diff --git a/internal/cmd/geninterp/lower.go b/internal/cmd/geninterp/lower.go index a32fb9db..2542b801 100644 --- a/internal/cmd/geninterp/lower.go +++ b/internal/cmd/geninterp/lower.go @@ -13,6 +13,7 @@ type value struct { op instr.Opcode head instr.Opcode compile []jen.Code + room []jen.Code check []jen.Code body []jen.Code drop []jen.Code @@ -462,6 +463,7 @@ func (l loader) finish(result value, current step, indexed bool) (value, error) result.push = materialize(result, retain, l.width) return result, nil } + result.push = append(result.push, result.room...) result.push = append(result.push, result.check...) result.push = append(result.push, result.body...) if current.op == instr.CONST_GET && current.kind == instr.KindAny { @@ -696,7 +698,8 @@ func constHandler(current step, input value) jen.Code { } func materialize(input value, retain bool, advance int) []jen.Code { - body := append([]jen.Code(nil), input.check...) + body := append([]jen.Code(nil), input.room...) + body = append(body, input.check...) body = append(body, input.body...) if retain { body = append(body, jen.Id("i").Dot("retainBox").Call(input.boxed)) @@ -1475,6 +1478,14 @@ func numeric(consumer instr.Opcode, inputs []value, advance int, label string, c } var compile, body []jen.Code + // delta is the operation's net effect on the operand stack: it grows only + // when every operand was folded into a temporary. Fused sources never + // push, so one room check for delta covers the whole handler, and a + // conditional consumer branches instead of pushing and needs none. + delta := len(inputs) - arity + 1 + if !conditional && delta > 0 { + body = append(body, overflow()) + } for _, source := range inputs { compile = append(compile, source.compile...) body = append(body, source.check...) @@ -1508,7 +1519,6 @@ func numeric(consumer instr.Opcode, inputs []value, advance int, label string, c if conditional { body = append(body, jump(jen.Id(result).Dot("Bool").Call(), missing, advance)...) } else { - delta := len(inputs) - arity + 1 if delta > 0 { body = append(body, jen.Id("i").Dot("stack").Index(jen.Id("i").Dot("sp")).Op("=").Id(result), jen.Id("i").Dot("sp").Op("++")) } else { @@ -1805,7 +1815,10 @@ func traps(op instr.Opcode) bool { func load(current step, slot, offset int, label string, standalone bool) (value, error) { loader := newLoader(current.op, slot, offset, label, standalone) result := value{op: current.op, head: current.op, boxed: jen.Id(loader.boxed)} - result.check = append(result.check, overflow()) + // A source only needs stack room when it pushes on its own. Fused into a + // consumer it stays in a temporary, and the consumer checks the room its + // own net push needs. + result.room = append(result.room, overflow()) _, _, indexed := slotInfo(current.op) loader.decode(&result, current.op) diff --git a/internal/jitcheck/fixture_test.go b/internal/jitcheck/fixture_test.go new file mode 100644 index 00000000..5b3ee1a8 --- /dev/null +++ b/internal/jitcheck/fixture_test.go @@ -0,0 +1,47 @@ +package jitcheck_test + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + + "github.com/siyul-park/minivm/instr" + "github.com/siyul-park/minivm/interp" + "github.com/siyul-park/minivm/program" + "github.com/siyul-park/minivm/types" +) + +func TestThreadedRecursion(t *testing.T) { + fb := types.NewFunctionBuilder(&types.FunctionType{Returns: []types.Type{types.TypeI32}}). + Params(types.TypeI32) + base := fb.Label() + fn := fb.Emit(instr.New(instr.LOCAL_GET, 0), instr.New(instr.I32_CONST, 2), instr.New(instr.I32_LT_S)). + BrIf(base). + Emit( + instr.New(instr.LOCAL_GET, 0), instr.New(instr.I32_CONST, 1), instr.New(instr.I32_SUB), + instr.New(instr.CONST_GET, 0), instr.New(instr.CALL), + instr.New(instr.LOCAL_GET, 0), instr.New(instr.I32_CONST, 2), instr.New(instr.I32_SUB), + instr.New(instr.CONST_GET, 0), instr.New(instr.CALL), + instr.New(instr.I32_ADD), instr.New(instr.RETURN), + ). + Bind(base). + Emit(instr.New(instr.LOCAL_GET, 0), instr.New(instr.RETURN)). + MustBuild() + prog := program.New( + []instr.Instruction{ + instr.New(instr.I32_CONST, 12), + instr.New(instr.CONST_GET, 0), + instr.New(instr.CALL), + }, + program.WithConstants(fn), + ) + + i := interp.New(prog, interp.WithThreshold(-1)) + defer func() { require.NoError(t, i.Close()) }() + + require.NoError(t, i.Run(context.Background())) + value, err := i.Pop() + require.NoError(t, err) + require.Equal(t, types.I32(144), value) +} diff --git a/internal/jitcheck/jitcheck_test.go b/internal/jitcheck/jitcheck_test.go new file mode 100644 index 00000000..4ea01b3c --- /dev/null +++ b/internal/jitcheck/jitcheck_test.go @@ -0,0 +1,152 @@ +// Package jitcheck is a temporary black-box harness proving the JIT still +// lowers, spills, links, and executes through interp's public API. +package jitcheck_test + +import ( + "context" + "math" + "runtime" + "testing" + + "github.com/stretchr/testify/require" + + "github.com/siyul-park/minivm/instr" + "github.com/siyul-park/minivm/interp" + "github.com/siyul-park/minivm/prof" + "github.com/siyul-park/minivm/program" + "github.com/siyul-park/minivm/types" +) + +func TestJIT(t *testing.T) { + if runtime.GOARCH != "arm64" { + t.Skip("native JIT is only available on arm64") + } + + t.Run("iterative loop", func(t *testing.T) { + b := program.NewBuilder() + loop := b.Label() + b.Locals(types.TypeI32, types.TypeF64). + Emit(instr.I32_CONST, 0). + Emit(instr.LOCAL_SET, 0). + Emit(instr.F64_CONST, 0). + Emit(instr.LOCAL_SET, 1). + Bind(loop). + Emit(instr.LOCAL_GET, 1). + Emit(instr.F64_CONST, math.Float64bits(1)). + Emit(instr.F64_ADD). + Emit(instr.LOCAL_SET, 1). + Emit(instr.LOCAL_GET, 0). + Emit(instr.I32_CONST, 1). + Emit(instr.I32_ADD). + Emit(instr.LOCAL_TEE, 0). + Emit(instr.I32_CONST, 64). + Emit(instr.I32_LT_S). + BrIf(loop). + Emit(instr.LOCAL_GET, 1) + prog, err := b.Build() + require.NoError(t, err) + + profiler := prof.New() + func() { + i := interp.New(prog, interp.WithTick(1), interp.WithThreshold(0), interp.WithProfiler(profiler)) + defer func() { require.NoError(t, i.Close()) }() + for round := range 24 { + i.Reset() + require.NoError(t, i.Run(context.Background())) + value, err := i.Pop() + require.NoError(t, err) + require.Equal(t, types.F64(64), value, "round %d", round) + } + }() + + emits, ok := profiler.Metric("vm_jit_emits_total") + require.True(t, ok) + require.GreaterOrEqual(t, emits, float64(1)) + }) + + t.Run("recursive calls", func(t *testing.T) { + // A self-recursive trace links a BL back to the internal head label, + // the one backward branch the assembler must resolve inside a build. + fb := types.NewFunctionBuilder(&types.FunctionType{Returns: []types.Type{types.TypeI32}}). + Params(types.TypeI32) + base := fb.Label() + fn := fb.Emit(instr.New(instr.LOCAL_GET, 0), instr.New(instr.I32_CONST, 2), instr.New(instr.I32_LT_S)). + BrIf(base). + Emit( + instr.New(instr.LOCAL_GET, 0), instr.New(instr.I32_CONST, 1), instr.New(instr.I32_SUB), + instr.New(instr.CONST_GET, 0), instr.New(instr.CALL), + instr.New(instr.LOCAL_GET, 0), instr.New(instr.I32_CONST, 2), instr.New(instr.I32_SUB), + instr.New(instr.CONST_GET, 0), instr.New(instr.CALL), + instr.New(instr.I32_ADD), instr.New(instr.RETURN), + ). + Bind(base). + Emit(instr.New(instr.LOCAL_GET, 0), instr.New(instr.RETURN)). + MustBuild() + prog := program.New( + []instr.Instruction{ + instr.New(instr.I32_CONST, 20), + instr.New(instr.CONST_GET, 0), + instr.New(instr.CALL), + }, + program.WithConstants(fn), + ) + + profiler := prof.New() + func() { + i := interp.New(prog, interp.WithThreshold(0), interp.WithProfiler(profiler)) + defer func() { require.NoError(t, i.Close()) }() + for round := range 8 { + i.Reset() + require.NoError(t, i.Run(context.Background())) + value, err := i.Pop() + require.NoError(t, err) + require.Equal(t, types.I32(6765), value, "round %d", round) + } + }() + }) + + t.Run("wide live ranges", func(t *testing.T) { + // 96 simultaneously live locals oversubscribe the integer bank, so a + // correct sum proves register allocation and any spill frame the + // lowering needs stay balanced end to end. + const locals = 96 + + locality := make([]types.Type, locals) + for i := range locality { + locality[i] = types.TypeI64 + } + b := program.NewBuilder() + b.Locals(locality...) + for i := range locals { + b.Emit(instr.I64_CONST, uint64(i+1)).Emit(instr.LOCAL_SET, uint64(i)) + } + b.Emit(instr.LOCAL_GET, 0) + for i := 1; i < locals; i++ { + b.Emit(instr.LOCAL_GET, uint64(i)).Emit(instr.I64_ADD) + } + prog, err := b.Build() + require.NoError(t, err) + + want := int64(0) + for i := range locals { + want += int64(i + 1) + } + + profiler := prof.New() + func() { + i := interp.New(prog, interp.WithTick(1), interp.WithThreshold(0), interp.WithProfiler(profiler)) + defer func() { require.NoError(t, i.Close()) }() + for round := range 24 { + i.Reset() + require.NoError(t, i.Run(context.Background())) + value, err := i.Pop() + require.NoError(t, err) + require.Equal(t, types.I64(want), value, "round %d", round) + } + }() + + emits, ok := profiler.Metric("vm_jit_emits_total") + require.True(t, ok) + require.GreaterOrEqual(t, emits, float64(1)) + }) +} diff --git a/interp/interp.go b/interp/interp.go index 462dd91d..9d15de75 100644 --- a/interp/interp.go +++ b/interp/interp.go @@ -1345,6 +1345,11 @@ func (i *Interpreter) sample(f *frame) uint64 { // enableBackedges rethreads one hot function with exact unconditional // back-edge observation. Cold functions keep the original zero-overhead BR // handler until periodic sampling reaches the configured threshold. +// +// The rethreaded handlers are copied into the table already installed rather +// than replacing it. Compile emits one handler per code byte, so both tables +// describe the same function at the same length, and keeping that slice live +// rewires every frame currently executing addr in place. func (i *Interpreter) enableBackedges(addr int) { if addr < 0 || addr >= len(i.backedges) || i.backedges[addr] { return @@ -1354,27 +1359,22 @@ func (i *Interpreter) enableBackedges(addr int) { return } c := i.threader(true) - previous := i.code[addr] + installed := i.code[addr] compiled := c.Compile(fn.Code, fn.Slots(), types.Kinds(fn.Captures)) // Rethreading replaces only interpreted handlers. Installed native entries // stay live while their saved fallbacks advance to the exact-backedge table. for root := range i.exits { - if root.addr != addr || root.ip < 0 || root.ip >= len(compiled) || root.ip >= len(previous) { + if root.addr != addr || root.ip < 0 || root.ip >= len(compiled) || root.ip >= len(installed) { continue } i.exits[root] = compiled[root.ip] if root.ip == 0 { i.stubs[addr] = compiled[root.ip] } - compiled[root.ip] = previous[root.ip] + compiled[root.ip] = installed[root.ip] } - i.code[addr] = compiled + copy(installed, compiled) i.backedges[addr] = true - for idx := 0; idx < i.fp; idx++ { - if i.frames[idx].addr == addr { - i.frames[idx].code = i.code[addr] - } - } } func (i *Interpreter) stub(addr int) func(*Interpreter) { diff --git a/interp/interp_test.go b/interp/interp_test.go index 2f7f7836..bc331d1a 100644 --- a/interp/interp_test.go +++ b/interp/interp_test.go @@ -2186,6 +2186,41 @@ func TestInterpreter_Run(t *testing.T) { require.Equal(t, 1, i.sp) }) + t.Run("fused sources push once and need one free slot", func(t *testing.T) { + // Both operands stay in temporaries, so the fused handler grows the + // stack by exactly one slot no matter how many sources it folded. + prog := program.New([]instr.Instruction{ + instr.New(instr.I32_CONST, 6), + instr.New(instr.GLOBAL_SET, 0), + instr.New(instr.GLOBAL_GET, 0), + instr.New(instr.GLOBAL_GET, 0), + instr.New(instr.I32_ADD), + }, program.WithGlobals(types.TypeI32)) + i := New(prog, WithStack(1), WithThreshold(-1)) + defer i.Close() + + require.NoError(t, i.Run(context.Background())) + value, err := i.Pop() + require.NoError(t, err) + require.Equal(t, types.I32(12), value) + }) + + t.Run("fused sources report overflow before reading their operands", func(t *testing.T) { + prog := program.New([]instr.Instruction{ + instr.New(instr.I32_CONST, 6), + instr.New(instr.GLOBAL_SET, 0), + instr.New(instr.I32_CONST, 1), + instr.New(instr.GLOBAL_GET, 0), + instr.New(instr.GLOBAL_GET, 0), + instr.New(instr.I32_ADD), + }, program.WithGlobals(types.TypeI32)) + i := New(prog, WithStack(1), WithThreshold(-1)) + defer i.Close() + + require.ErrorIs(t, i.Run(context.Background()), ErrStackOverflow) + require.Equal(t, 1, i.sp) + }) + t.Run("STRUCT_NEW_DEFAULT reports stack overflow before mutating sp", func(t *testing.T) { prog := program.New([]instr.Instruction{ instr.New(instr.I32_CONST, 1), diff --git a/interp/jit.go b/interp/jit.go index a9bd3428..7d75a318 100644 --- a/interp/jit.go +++ b/interp/jit.go @@ -58,7 +58,6 @@ type lowering struct { globals []types.Kind heap []types.Value scratch []asm.PReg - entry asm.Label head asm.Label back asm.Label budget asm.VReg @@ -349,7 +348,6 @@ func (c *compiler) newLowering(input *compileInput, arch asm.Arch) *lowering { globals: input.globals, heap: input.heap, scratch: c.scratchRegs[:scratchCount], - entry: asmb.Label(), head: asmb.Label(), addr: input.address, } @@ -371,17 +369,14 @@ func (c *compiler) publish(mod *module, a anchor, ctx *lowering, arch asm.Arch, } return prof.CompileReasonError, err } - linked, err := asm.Link(c.buffer, arch, []*asm.Code{code}, nil) + callable, err := asm.Link(c.buffer, arch, code) if err != nil { - if errors.Is(err, asm.ErrBranchOutOfRange) { - return prof.CompileReasonBranchRange, nil - } return prof.CompileReasonError, err } - n.callable = linked[0].Callable - n.bytes = len(code.Bytes) + n.callable = callable + n.bytes = len(code) mod.entries[a] = n - mod.bytes += len(code.Bytes) + mod.bytes += len(code) return prof.CompileReasonNone, nil } diff --git a/interp/jit_arm64.go b/interp/jit_arm64.go index f45900d6..1a4d029b 100644 --- a/interp/jit_arm64.go +++ b/interp/jit_arm64.go @@ -93,12 +93,11 @@ func newCompiler() (*compiler, error) { }, nil } -// enter opens the framed callable: the external entry mirrors the +// enter opens the framed callable: the entry at offset zero mirrors the // journal header into the pinned scratch registers, then the internal head — // the BL target for recursive trace calls — saves the link register. func (l arm64Lowerer) enter(ctx *lowering) { a := ctx.assembler - a.Entry(ctx.entry) a.Emit( arm64.MOV(ctx.scratch[scratchCtrl], arm64.X0), arm64.LDP(ctx.scratch[scratchStack], ctx.scratch[scratchGlobals], ctx.scratch[scratchCtrl], int16(journalStack*8)), diff --git a/interp/threaded.go b/interp/threaded.go index eb341b78..e104e125 100644 --- a/interp/threaded.go +++ b/interp/threaded.go @@ -1015,9 +1015,6 @@ var ( } } return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } i.retain(addr) i.stack[i.sp] = r0 i.sp++ @@ -5482,17 +5479,11 @@ var ( v1 := types.Box(uint64(uint32(instr.Instruction(c.code[start+3:]).Operand(0))), types.KindF32).F32() c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 == v1) if v2.Bool() { i.fr.ip += offset @@ -5513,17 +5504,11 @@ var ( v1 := types.Box(uint64(uint32(instr.Instruction(c.code[start+3:]).Operand(0))), types.KindF32).F32() c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 != v1) if v2.Bool() { i.fr.ip += offset @@ -5544,17 +5529,11 @@ var ( v1 := types.Box(uint64(uint32(instr.Instruction(c.code[start+3:]).Operand(0))), types.KindF32).F32() c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 < v1) if v2.Bool() { i.fr.ip += offset @@ -5575,17 +5554,11 @@ var ( v1 := types.Box(uint64(uint32(instr.Instruction(c.code[start+3:]).Operand(0))), types.KindF32).F32() c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 > v1) if v2.Bool() { i.fr.ip += offset @@ -5606,17 +5579,11 @@ var ( v1 := types.Box(uint64(uint32(instr.Instruction(c.code[start+3:]).Operand(0))), types.KindF32).F32() c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 <= v1) if v2.Bool() { i.fr.ip += offset @@ -5637,17 +5604,11 @@ var ( v1 := types.Box(uint64(uint32(instr.Instruction(c.code[start+3:]).Operand(0))), types.KindF32).F32() c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 >= v1) if v2.Bool() { i.fr.ip += offset @@ -5668,17 +5629,11 @@ var ( v1 := types.Boxed(instr.Instruction(c.code[start+3:]).Operand(0)).F64() c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 == v1) if v2.Bool() { i.fr.ip += offset @@ -5699,17 +5654,11 @@ var ( v1 := types.Boxed(instr.Instruction(c.code[start+3:]).Operand(0)).F64() c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 != v1) if v2.Bool() { i.fr.ip += offset @@ -5730,17 +5679,11 @@ var ( v1 := types.Boxed(instr.Instruction(c.code[start+3:]).Operand(0)).F64() c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 < v1) if v2.Bool() { i.fr.ip += offset @@ -5761,17 +5704,11 @@ var ( v1 := types.Boxed(instr.Instruction(c.code[start+3:]).Operand(0)).F64() c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 > v1) if v2.Bool() { i.fr.ip += offset @@ -5792,17 +5729,11 @@ var ( v1 := types.Boxed(instr.Instruction(c.code[start+3:]).Operand(0)).F64() c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 <= v1) if v2.Bool() { i.fr.ip += offset @@ -5823,17 +5754,11 @@ var ( v1 := types.Boxed(instr.Instruction(c.code[start+3:]).Operand(0)).F64() c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 >= v1) if v2.Bool() { i.fr.ip += offset @@ -5857,17 +5782,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -5896,17 +5815,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -5935,17 +5848,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -5974,17 +5881,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -6013,17 +5914,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -6052,17 +5947,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -6091,17 +5980,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -6130,17 +6013,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -6169,17 +6046,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -6208,17 +6079,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -6247,17 +6112,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -6286,17 +6145,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -6325,17 +6178,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -6364,17 +6211,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -6403,17 +6244,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -6442,17 +6277,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -6481,17 +6310,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -6520,17 +6343,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -6559,17 +6376,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -6598,17 +6409,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -6637,17 +6442,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -6676,17 +6475,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -6715,17 +6508,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -6754,17 +6541,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -6793,17 +6574,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -6832,17 +6607,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -6871,17 +6640,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -6910,17 +6673,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -6949,17 +6706,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -6988,17 +6739,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -7027,17 +6772,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -7066,17 +6805,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -7105,17 +6838,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -7145,17 +6872,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -7185,17 +6906,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -7225,17 +6940,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -7265,17 +6974,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -7305,17 +7008,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -7345,17 +7042,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -7385,17 +7076,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -7425,17 +7110,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -7465,17 +7144,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -7505,17 +7178,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -7545,17 +7212,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -7585,17 +7246,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -7625,17 +7280,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -7665,17 +7314,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -7705,17 +7348,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -7745,17 +7382,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -7785,17 +7416,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -7825,17 +7450,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -7865,17 +7484,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -7905,17 +7518,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -7945,17 +7552,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -7985,17 +7586,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -8025,17 +7620,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -8065,17 +7654,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -8105,17 +7688,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -8145,17 +7722,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -8185,17 +7756,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -8225,17 +7790,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -8265,17 +7824,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -8305,17 +7858,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -8345,17 +7892,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -8385,17 +7926,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -8424,17 +7959,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -8463,17 +7992,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -8502,17 +8025,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -8541,17 +8058,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -8580,17 +8091,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -8619,17 +8124,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -8658,17 +8157,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -8697,17 +8190,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -8736,17 +8223,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -8775,17 +8256,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -8814,17 +8289,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -8853,17 +8322,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -8892,17 +8355,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -8931,17 +8388,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -8970,17 +8421,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -9009,17 +8454,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -9048,17 +8487,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -9087,17 +8520,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -9126,17 +8553,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -9165,17 +8586,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -9204,17 +8619,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -9243,17 +8652,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -9282,17 +8685,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -9321,17 +8718,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -9360,17 +8751,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -9399,17 +8784,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -9438,17 +8817,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -9477,17 +8850,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -9516,17 +8883,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -9555,17 +8916,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -9594,17 +8949,11 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -9630,17 +8979,11 @@ var ( v1 := int32(instr.Instruction(c.code[start+3:]).Operand(0)) c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 == v1) if v2.Bool() { i.fr.ip += offset @@ -9661,17 +9004,11 @@ var ( v1 := int32(instr.Instruction(c.code[start+3:]).Operand(0)) c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 != v1) if v2.Bool() { i.fr.ip += offset @@ -9692,17 +9029,11 @@ var ( v1 := int32(instr.Instruction(c.code[start+3:]).Operand(0)) c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 < v1) if v2.Bool() { i.fr.ip += offset @@ -9723,17 +9054,11 @@ var ( v1 := int32(instr.Instruction(c.code[start+3:]).Operand(0)) c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(uint32(v0) < uint32(v1)) if v2.Bool() { i.fr.ip += offset @@ -9754,17 +9079,11 @@ var ( v1 := int32(instr.Instruction(c.code[start+3:]).Operand(0)) c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 > v1) if v2.Bool() { i.fr.ip += offset @@ -9785,17 +9104,11 @@ var ( v1 := int32(instr.Instruction(c.code[start+3:]).Operand(0)) c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(uint32(v0) > uint32(v1)) if v2.Bool() { i.fr.ip += offset @@ -9816,17 +9129,11 @@ var ( v1 := int32(instr.Instruction(c.code[start+3:]).Operand(0)) c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 <= v1) if v2.Bool() { i.fr.ip += offset @@ -9847,17 +9154,11 @@ var ( v1 := int32(instr.Instruction(c.code[start+3:]).Operand(0)) c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(uint32(v0) <= uint32(v1)) if v2.Bool() { i.fr.ip += offset @@ -9878,17 +9179,11 @@ var ( v1 := int32(instr.Instruction(c.code[start+3:]).Operand(0)) c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 >= v1) if v2.Bool() { i.fr.ip += offset @@ -9909,17 +9204,11 @@ var ( v1 := int32(instr.Instruction(c.code[start+3:]).Operand(0)) c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(uint32(v0) >= uint32(v1)) if v2.Bool() { i.fr.ip += offset @@ -9940,17 +9229,11 @@ var ( v1 := int64(instr.Instruction(c.code[start+3:]).Operand(0)) c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 > v1) if v2.Bool() { i.fr.ip += offset @@ -9971,17 +9254,11 @@ var ( v1 := int64(instr.Instruction(c.code[start+3:]).Operand(0)) c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(uint64(v0) > uint64(v1)) if v2.Bool() { i.fr.ip += offset @@ -10002,17 +9279,11 @@ var ( v1 := int64(instr.Instruction(c.code[start+3:]).Operand(0)) c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 <= v1) if v2.Bool() { i.fr.ip += offset @@ -10033,17 +9304,11 @@ var ( v1 := int64(instr.Instruction(c.code[start+3:]).Operand(0)) c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(uint64(v0) <= uint64(v1)) if v2.Bool() { i.fr.ip += offset @@ -10064,17 +9329,11 @@ var ( v1 := int64(instr.Instruction(c.code[start+3:]).Operand(0)) c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 >= v1) if v2.Bool() { i.fr.ip += offset @@ -10095,17 +9354,11 @@ var ( v1 := int64(instr.Instruction(c.code[start+3:]).Operand(0)) c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(uint64(v0) >= uint64(v1)) if v2.Bool() { i.fr.ip += offset @@ -10126,17 +9379,11 @@ var ( v1 := int64(instr.Instruction(c.code[start+3:]).Operand(0)) c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 == v1) if v2.Bool() { i.fr.ip += offset @@ -10157,17 +9404,11 @@ var ( v1 := int64(instr.Instruction(c.code[start+3:]).Operand(0)) c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 != v1) if v2.Bool() { i.fr.ip += offset @@ -10188,17 +9429,11 @@ var ( v1 := int64(instr.Instruction(c.code[start+3:]).Operand(0)) c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 < v1) if v2.Bool() { i.fr.ip += offset @@ -10219,17 +9454,11 @@ var ( v1 := int64(instr.Instruction(c.code[start+3:]).Operand(0)) c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(uint64(v0) < uint64(v1)) if v2.Bool() { i.fr.ip += offset @@ -10249,9 +9478,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -10280,9 +9506,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -10311,9 +9534,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -10342,9 +9562,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -10373,9 +9590,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -10404,9 +9618,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -10443,9 +9654,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxF32(v0 + v1) i.stack[i.sp] = v2 i.sp++ @@ -10472,9 +9680,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxF32(v0 - v1) i.stack[i.sp] = v2 i.sp++ @@ -10501,9 +9706,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxF32(v0 * v1) i.stack[i.sp] = v2 i.sp++ @@ -10662,9 +9864,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxF32(min(v0, v1)) i.stack[i.sp] = v2 i.sp++ @@ -10691,9 +9890,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxF32(max(v0, v1)) i.stack[i.sp] = v2 i.sp++ @@ -10720,9 +9916,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxF32(float32(math.Copysign(float64(v0), float64(v1)))) i.stack[i.sp] = v2 i.sp++ @@ -10749,9 +9942,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 == v1) i.stack[i.sp] = v2 i.sp++ @@ -10778,9 +9968,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 != v1) i.stack[i.sp] = v2 i.sp++ @@ -10807,9 +9994,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 < v1) i.stack[i.sp] = v2 i.sp++ @@ -10836,9 +10020,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 > v1) i.stack[i.sp] = v2 i.sp++ @@ -10865,9 +10046,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 <= v1) i.stack[i.sp] = v2 i.sp++ @@ -10894,9 +10072,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 >= v1) i.stack[i.sp] = v2 i.sp++ @@ -10915,9 +10090,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -10946,9 +10118,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -10977,9 +10146,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -11008,9 +10174,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -11039,9 +10202,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -11070,9 +10230,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -11109,9 +10266,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxF64(v0 + v1) i.stack[i.sp] = v2 i.sp++ @@ -11138,9 +10292,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxF64(v0 - v1) i.stack[i.sp] = v2 i.sp++ @@ -11167,9 +10318,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxF64(v0 * v1) i.stack[i.sp] = v2 i.sp++ @@ -11328,9 +10476,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxF64(math.Min(v0, v1)) i.stack[i.sp] = v2 i.sp++ @@ -11357,9 +10502,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxF64(math.Max(v0, v1)) i.stack[i.sp] = v2 i.sp++ @@ -11386,9 +10528,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxF64(math.Copysign(v0, v1)) i.stack[i.sp] = v2 i.sp++ @@ -11415,9 +10554,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 == v1) i.stack[i.sp] = v2 i.sp++ @@ -11444,9 +10580,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 != v1) i.stack[i.sp] = v2 i.sp++ @@ -11473,9 +10606,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 < v1) i.stack[i.sp] = v2 i.sp++ @@ -11502,9 +10632,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 > v1) i.stack[i.sp] = v2 i.sp++ @@ -11531,9 +10658,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 <= v1) i.stack[i.sp] = v2 i.sp++ @@ -11560,9 +10684,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 >= v1) i.stack[i.sp] = v2 i.sp++ @@ -11581,9 +10702,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -11612,9 +10730,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -11654,9 +10769,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -11691,9 +10803,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -11728,9 +10837,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -11765,9 +10871,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -11802,9 +10905,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -11839,9 +10939,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -11876,9 +10973,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -11913,9 +11007,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -11950,9 +11041,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -12140,9 +11228,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -12177,9 +11262,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -12214,9 +11296,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -12251,9 +11330,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -12288,9 +11364,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -12325,9 +11398,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -12362,9 +11432,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -12399,9 +11466,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -12436,9 +11500,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -12473,9 +11534,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -12510,9 +11568,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -12547,9 +11602,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -12737,9 +11789,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -12774,9 +11823,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -12811,9 +11857,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -12848,9 +11891,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -12885,9 +11925,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -12922,9 +11959,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -12959,9 +11993,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -12996,9 +12027,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -13033,9 +12061,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -13070,9 +12095,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -13107,9 +12129,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -13144,9 +12163,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -13377,9 +12393,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -13414,9 +12427,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -13451,9 +12461,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -13487,9 +12494,6 @@ var ( panic(ErrSegmentationFault) } r0 := i.globals[i0] - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -13522,9 +12526,6 @@ var ( panic(ErrSegmentationFault) } r0 := i.globals[i0] - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -13557,9 +12558,6 @@ var ( panic(ErrSegmentationFault) } r0 := i.globals[i0] - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -13593,9 +12591,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -13630,9 +12625,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -13667,9 +12659,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -13704,9 +12693,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -13741,9 +12727,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -13778,9 +12761,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -13815,9 +12795,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -13852,9 +12829,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -13889,9 +12863,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -13926,9 +12897,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -13963,9 +12931,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -14000,9 +12965,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -14037,9 +12999,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -14074,9 +13033,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -14111,9 +13067,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -14352,9 +13305,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -14389,9 +13339,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -14426,9 +13373,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -14463,9 +13407,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -14500,9 +13441,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -14537,9 +13475,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -14574,9 +13509,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -14611,9 +13543,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -14648,9 +13577,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -14685,9 +13611,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -14722,9 +13645,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -14759,9 +13679,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -14785,9 +13702,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -14816,9 +13730,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -14847,9 +13758,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -14878,9 +13786,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -14920,9 +13825,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -14958,9 +13860,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -14996,9 +13895,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -15034,9 +13930,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -15072,9 +13965,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -15110,9 +14000,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -15148,9 +14035,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -15186,9 +14070,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -15224,9 +14105,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -15418,9 +14296,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -15456,9 +14331,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -15494,9 +14366,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -15532,9 +14401,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -15570,9 +14436,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -15608,9 +14471,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -15646,9 +14506,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -15684,9 +14541,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -15722,9 +14576,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -15760,9 +14611,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -15798,9 +14646,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -15836,9 +14681,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -16030,9 +14872,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -16068,9 +14907,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -16106,9 +14942,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -16144,9 +14977,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -16182,9 +15012,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -16220,9 +15047,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -16258,9 +15082,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -16296,9 +15117,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -16334,9 +15152,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -16372,9 +15187,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -16410,9 +15222,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -16448,9 +15257,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -16686,9 +15492,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -16724,9 +15527,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -16762,9 +15562,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -16799,9 +15596,6 @@ var ( panic(ErrSegmentationFault) } r0 := i.globals[i0] - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -16835,9 +15629,6 @@ var ( panic(ErrSegmentationFault) } r0 := i.globals[i0] - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -16871,9 +15662,6 @@ var ( panic(ErrSegmentationFault) } r0 := i.globals[i0] - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -16908,9 +15696,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -16946,9 +15731,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -16984,9 +15766,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -17022,9 +15801,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -17060,9 +15836,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -17098,9 +15871,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -17136,9 +15906,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -17174,9 +15941,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -17212,9 +15976,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -17250,9 +16011,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -17288,9 +16046,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -17326,9 +16081,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -17364,9 +16116,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -17402,9 +16151,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -17440,9 +16186,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -17686,9 +16429,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -17724,9 +16464,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -17762,9 +16499,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -17800,9 +16534,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -17838,9 +16569,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -17876,9 +16604,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -17914,9 +16639,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -17952,9 +16674,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -17990,9 +16709,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -18028,9 +16744,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -18066,9 +16779,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -18104,9 +16814,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -18142,9 +16849,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -18179,9 +16883,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -18216,9 +16917,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -18253,9 +16951,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -18290,9 +16985,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -18327,9 +17019,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -18364,9 +17053,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -18401,9 +17087,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -18438,9 +17121,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -18628,9 +17308,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -18665,9 +17342,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -18702,9 +17376,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -18739,9 +17410,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -18776,9 +17444,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -18813,9 +17478,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -18850,9 +17512,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -18887,9 +17546,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -18924,9 +17580,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -18961,9 +17614,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -18998,9 +17648,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -19035,9 +17682,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -19225,9 +17869,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -19262,9 +17903,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -19299,9 +17937,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -19336,9 +17971,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -19373,9 +18005,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -19410,9 +18039,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -19447,9 +18073,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -19484,9 +18107,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -19521,9 +18141,6 @@ var ( } r0 := i.globals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -19558,9 +18175,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -19595,9 +18209,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -19632,9 +18243,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -19865,9 +18473,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -19902,9 +18507,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -19939,9 +18541,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -19975,9 +18574,6 @@ var ( panic(ErrSegmentationFault) } r0 := i.globals[i0] - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -20010,9 +18606,6 @@ var ( panic(ErrSegmentationFault) } r0 := i.globals[i0] - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -20045,9 +18638,6 @@ var ( panic(ErrSegmentationFault) } r0 := i.globals[i0] - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -20081,9 +18671,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -20118,9 +18705,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -20155,9 +18739,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -20192,9 +18773,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -20229,9 +18807,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -20266,9 +18841,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -20303,9 +18875,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -20340,9 +18909,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -20377,9 +18943,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -20414,9 +18977,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -20451,9 +19011,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -20488,9 +19045,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -20525,9 +19079,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -20562,9 +19113,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -20599,9 +19147,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -20840,9 +19385,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -20877,9 +19419,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -20914,9 +19453,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -20951,9 +19487,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -20988,9 +19521,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -21025,9 +19555,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -21062,9 +19589,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -21099,9 +19623,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -21136,9 +19657,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -21173,9 +19691,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -21210,9 +19725,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -21247,9 +19759,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -21273,9 +19782,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -21306,9 +19812,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI32(v0 + v1) i.stack[i.sp] = v2 i.sp++ @@ -21335,9 +19838,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI32(v0 - v1) i.stack[i.sp] = v2 i.sp++ @@ -21364,9 +19864,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI32(v0 * v1) i.stack[i.sp] = v2 i.sp++ @@ -21561,9 +20058,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI32(v0 << (v1 & 31)) i.stack[i.sp] = v2 i.sp++ @@ -21590,9 +20084,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI32(v0 >> (v1 & 31)) i.stack[i.sp] = v2 i.sp++ @@ -21619,9 +20110,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI32(int32(uint32(v0) >> (v1 & 31))) i.stack[i.sp] = v2 i.sp++ @@ -21647,9 +20135,6 @@ var ( panic(ErrSegmentationFault) } r0 := i.globals[i0] - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.Boxed(uint64(r0)&uint64(r1) & ^uint64(types.VMask) | (uint64(r0) ^ uint64(r1)&types.VMask)) i.stack[i.sp] = v2 i.sp++ @@ -21675,9 +20160,6 @@ var ( panic(ErrSegmentationFault) } r0 := i.globals[i0] - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.Boxed(uint64(r0) & uint64(r1)) i.stack[i.sp] = v2 i.sp++ @@ -21703,9 +20185,6 @@ var ( panic(ErrSegmentationFault) } r0 := i.globals[i0] - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.Boxed(uint64(r0) | uint64(r1)) i.stack[i.sp] = v2 i.sp++ @@ -21732,9 +20211,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI32(int32(bits.RotateLeft32(uint32(v0), int(v1)))) i.stack[i.sp] = v2 i.sp++ @@ -21761,9 +20237,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI32(int32(bits.RotateLeft32(uint32(v0), -int(v1)))) i.stack[i.sp] = v2 i.sp++ @@ -21790,9 +20263,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 == v1) i.stack[i.sp] = v2 i.sp++ @@ -21819,9 +20289,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 != v1) i.stack[i.sp] = v2 i.sp++ @@ -21848,9 +20315,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 < v1) i.stack[i.sp] = v2 i.sp++ @@ -21877,9 +20341,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(uint32(v0) < uint32(v1)) i.stack[i.sp] = v2 i.sp++ @@ -21906,9 +20367,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 > v1) i.stack[i.sp] = v2 i.sp++ @@ -21935,9 +20393,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(uint32(v0) > uint32(v1)) i.stack[i.sp] = v2 i.sp++ @@ -21964,9 +20419,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 <= v1) i.stack[i.sp] = v2 i.sp++ @@ -21993,9 +20445,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(uint32(v0) <= uint32(v1)) i.stack[i.sp] = v2 i.sp++ @@ -22022,9 +20471,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 >= v1) i.stack[i.sp] = v2 i.sp++ @@ -22051,9 +20497,6 @@ var ( } r0 := i.globals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(uint32(v0) >= uint32(v1)) i.stack[i.sp] = v2 i.sp++ @@ -22072,9 +20515,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -22103,9 +20543,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -22134,9 +20571,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -22165,9 +20599,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -22196,9 +20627,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -22227,9 +20655,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -22258,9 +20683,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -22289,9 +20711,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -22320,9 +20739,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -22351,9 +20767,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -22390,9 +20803,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 > v1) i.stack[i.sp] = v2 i.sp++ @@ -22419,9 +20829,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(uint64(v0) > uint64(v1)) i.stack[i.sp] = v2 i.sp++ @@ -22448,9 +20855,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 <= v1) i.stack[i.sp] = v2 i.sp++ @@ -22477,9 +20881,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(uint64(v0) <= uint64(v1)) i.stack[i.sp] = v2 i.sp++ @@ -22506,9 +20907,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 >= v1) i.stack[i.sp] = v2 i.sp++ @@ -22535,9 +20933,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(uint64(v0) >= uint64(v1)) i.stack[i.sp] = v2 i.sp++ @@ -22564,9 +20959,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := i.boxI64(v0 + v1) i.stack[i.sp] = v2 i.sp++ @@ -22593,9 +20985,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := i.boxI64(v0 - v1) i.stack[i.sp] = v2 i.sp++ @@ -22622,9 +21011,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := i.boxI64(v0 * v1) i.stack[i.sp] = v2 i.sp++ @@ -22823,9 +21209,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := i.boxI64(v0 << (v1 & 63)) i.stack[i.sp] = v2 i.sp++ @@ -22852,9 +21235,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := i.boxI64(v0 >> (v1 & 63)) i.stack[i.sp] = v2 i.sp++ @@ -22881,9 +21261,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := i.boxI64(int64(uint64(v0) >> (v1 & 63))) i.stack[i.sp] = v2 i.sp++ @@ -22910,9 +21287,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := i.boxI64(v0 ^ v1) i.stack[i.sp] = v2 i.sp++ @@ -22939,9 +21313,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := i.boxI64(v0 & v1) i.stack[i.sp] = v2 i.sp++ @@ -22968,9 +21339,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := i.boxI64(v0 | v1) i.stack[i.sp] = v2 i.sp++ @@ -22997,9 +21365,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := i.boxI64(int64(bits.RotateLeft64(uint64(v0), int(v1)))) i.stack[i.sp] = v2 i.sp++ @@ -23026,9 +21391,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := i.boxI64(int64(bits.RotateLeft64(uint64(v0), -int(v1)))) i.stack[i.sp] = v2 i.sp++ @@ -23055,9 +21417,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 == v1) i.stack[i.sp] = v2 i.sp++ @@ -23084,9 +21443,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 != v1) i.stack[i.sp] = v2 i.sp++ @@ -23113,9 +21469,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 < v1) i.stack[i.sp] = v2 i.sp++ @@ -23142,9 +21495,6 @@ var ( } r0 := i.globals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(uint64(v0) < uint64(v1)) i.stack[i.sp] = v2 i.sp++ @@ -23163,9 +21513,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -23194,9 +21541,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -23225,9 +21569,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -23256,9 +21597,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -23286,9 +21624,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -23313,9 +21648,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -23340,9 +21672,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -23367,9 +21696,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -23394,9 +21720,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -23421,9 +21744,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -23448,9 +21768,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -23475,9 +21792,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -23502,9 +21816,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -23640,9 +21951,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -23667,9 +21975,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -23694,9 +21999,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -23721,9 +22023,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -23748,9 +22047,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -23775,9 +22071,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -23802,9 +22095,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -23829,9 +22119,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -23856,9 +22143,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -23883,9 +22167,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -23910,9 +22191,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -23937,9 +22215,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -24075,9 +22350,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -24102,9 +22374,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -24129,9 +22398,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -24156,9 +22422,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -24183,9 +22446,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -24210,9 +22470,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -24237,9 +22494,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -24264,9 +22518,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -24291,9 +22542,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -24318,9 +22566,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -24338,9 +22583,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -24361,9 +22603,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -24388,9 +22627,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -24415,9 +22651,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -24582,9 +22815,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -24609,9 +22839,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -24636,9 +22863,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -24663,9 +22887,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -24689,9 +22910,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -24715,9 +22933,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -24741,9 +22956,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -24768,9 +22980,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -24795,9 +23004,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -24822,9 +23028,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -24849,9 +23052,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -24876,9 +23076,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -24903,9 +23100,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -24930,9 +23124,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -24957,9 +23148,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -24984,9 +23172,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -25011,9 +23196,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -25038,9 +23220,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -25065,9 +23244,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -25092,9 +23268,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -25119,9 +23292,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -25290,9 +23460,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -25317,9 +23484,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -25344,9 +23508,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -25371,9 +23532,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -25398,9 +23556,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -25425,9 +23580,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -25452,9 +23604,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -25479,9 +23628,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -25506,9 +23652,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -25533,9 +23676,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -25560,9 +23700,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -25587,9 +23724,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -25620,18 +23754,12 @@ var ( v1 := types.Box(uint64(uint32(instr.Instruction(c.code[start+2:]).Operand(0))), types.KindF32).F32() c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 == v1) if v2.Bool() { i.fr.ip += offset @@ -25652,18 +23780,12 @@ var ( v1 := types.Box(uint64(uint32(instr.Instruction(c.code[start+2:]).Operand(0))), types.KindF32).F32() c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 != v1) if v2.Bool() { i.fr.ip += offset @@ -25684,18 +23806,12 @@ var ( v1 := types.Box(uint64(uint32(instr.Instruction(c.code[start+2:]).Operand(0))), types.KindF32).F32() c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 < v1) if v2.Bool() { i.fr.ip += offset @@ -25716,18 +23832,12 @@ var ( v1 := types.Box(uint64(uint32(instr.Instruction(c.code[start+2:]).Operand(0))), types.KindF32).F32() c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 > v1) if v2.Bool() { i.fr.ip += offset @@ -25748,18 +23858,12 @@ var ( v1 := types.Box(uint64(uint32(instr.Instruction(c.code[start+2:]).Operand(0))), types.KindF32).F32() c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 <= v1) if v2.Bool() { i.fr.ip += offset @@ -25780,18 +23884,12 @@ var ( v1 := types.Box(uint64(uint32(instr.Instruction(c.code[start+2:]).Operand(0))), types.KindF32).F32() c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 >= v1) if v2.Bool() { i.fr.ip += offset @@ -25812,18 +23910,12 @@ var ( v1 := types.Boxed(instr.Instruction(c.code[start+2:]).Operand(0)).F64() c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 == v1) if v2.Bool() { i.fr.ip += offset @@ -25844,18 +23936,12 @@ var ( v1 := types.Boxed(instr.Instruction(c.code[start+2:]).Operand(0)).F64() c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 != v1) if v2.Bool() { i.fr.ip += offset @@ -25876,18 +23962,12 @@ var ( v1 := types.Boxed(instr.Instruction(c.code[start+2:]).Operand(0)).F64() c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 < v1) if v2.Bool() { i.fr.ip += offset @@ -25908,18 +23988,12 @@ var ( v1 := types.Boxed(instr.Instruction(c.code[start+2:]).Operand(0)).F64() c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 > v1) if v2.Bool() { i.fr.ip += offset @@ -25940,18 +24014,12 @@ var ( v1 := types.Boxed(instr.Instruction(c.code[start+2:]).Operand(0)).F64() c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 <= v1) if v2.Bool() { i.fr.ip += offset @@ -25972,18 +24040,12 @@ var ( v1 := types.Boxed(instr.Instruction(c.code[start+2:]).Operand(0)).F64() c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 >= v1) if v2.Bool() { i.fr.ip += offset @@ -26007,18 +24069,12 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -26048,18 +24104,12 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -26089,18 +24139,12 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -26130,18 +24174,12 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -26171,18 +24209,12 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -26212,18 +24244,12 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -26253,18 +24279,12 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -26294,18 +24314,12 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -26335,18 +24349,12 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -26376,18 +24384,12 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -26417,18 +24419,12 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -26458,18 +24454,12 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -26499,18 +24489,12 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -26540,18 +24524,12 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -26581,18 +24559,12 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -26622,18 +24594,12 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -26663,18 +24629,12 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -26704,18 +24664,12 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -26745,18 +24699,12 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -26786,18 +24734,12 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -26827,18 +24769,12 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -26868,18 +24804,12 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -26909,18 +24839,12 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -26950,18 +24874,12 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -26991,18 +24909,12 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -27032,18 +24944,12 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -27073,18 +24979,12 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -27114,18 +25014,12 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -27155,18 +25049,12 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -27196,18 +25084,12 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -27237,18 +25119,12 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -27278,18 +25154,12 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -27316,18 +25186,12 @@ var ( v1 := int32(instr.Instruction(c.code[start+2:]).Operand(0)) c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 == v1) if v2.Bool() { i.fr.ip += offset @@ -27348,18 +25212,12 @@ var ( v1 := int32(instr.Instruction(c.code[start+2:]).Operand(0)) c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 != v1) if v2.Bool() { i.fr.ip += offset @@ -27380,18 +25238,12 @@ var ( v1 := int32(instr.Instruction(c.code[start+2:]).Operand(0)) c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 < v1) if v2.Bool() { i.fr.ip += offset @@ -27412,18 +25264,12 @@ var ( v1 := int32(instr.Instruction(c.code[start+2:]).Operand(0)) c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(uint32(v0) < uint32(v1)) if v2.Bool() { i.fr.ip += offset @@ -27444,18 +25290,12 @@ var ( v1 := int32(instr.Instruction(c.code[start+2:]).Operand(0)) c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 > v1) if v2.Bool() { i.fr.ip += offset @@ -27476,18 +25316,12 @@ var ( v1 := int32(instr.Instruction(c.code[start+2:]).Operand(0)) c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(uint32(v0) > uint32(v1)) if v2.Bool() { i.fr.ip += offset @@ -27508,18 +25342,12 @@ var ( v1 := int32(instr.Instruction(c.code[start+2:]).Operand(0)) c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 <= v1) if v2.Bool() { i.fr.ip += offset @@ -27540,18 +25368,12 @@ var ( v1 := int32(instr.Instruction(c.code[start+2:]).Operand(0)) c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(uint32(v0) <= uint32(v1)) if v2.Bool() { i.fr.ip += offset @@ -27572,18 +25394,12 @@ var ( v1 := int32(instr.Instruction(c.code[start+2:]).Operand(0)) c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 >= v1) if v2.Bool() { i.fr.ip += offset @@ -27604,18 +25420,12 @@ var ( v1 := int32(instr.Instruction(c.code[start+2:]).Operand(0)) c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(uint32(v0) >= uint32(v1)) if v2.Bool() { i.fr.ip += offset @@ -27636,18 +25446,12 @@ var ( v1 := int64(instr.Instruction(c.code[start+2:]).Operand(0)) c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 > v1) if v2.Bool() { i.fr.ip += offset @@ -27668,18 +25472,12 @@ var ( v1 := int64(instr.Instruction(c.code[start+2:]).Operand(0)) c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(uint64(v0) > uint64(v1)) if v2.Bool() { i.fr.ip += offset @@ -27700,18 +25498,12 @@ var ( v1 := int64(instr.Instruction(c.code[start+2:]).Operand(0)) c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 <= v1) if v2.Bool() { i.fr.ip += offset @@ -27732,18 +25524,12 @@ var ( v1 := int64(instr.Instruction(c.code[start+2:]).Operand(0)) c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(uint64(v0) <= uint64(v1)) if v2.Bool() { i.fr.ip += offset @@ -27764,18 +25550,12 @@ var ( v1 := int64(instr.Instruction(c.code[start+2:]).Operand(0)) c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 >= v1) if v2.Bool() { i.fr.ip += offset @@ -27796,18 +25576,12 @@ var ( v1 := int64(instr.Instruction(c.code[start+2:]).Operand(0)) c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(uint64(v0) >= uint64(v1)) if v2.Bool() { i.fr.ip += offset @@ -27828,18 +25602,12 @@ var ( v1 := int64(instr.Instruction(c.code[start+2:]).Operand(0)) c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 == v1) if v2.Bool() { i.fr.ip += offset @@ -27860,18 +25628,12 @@ var ( v1 := int64(instr.Instruction(c.code[start+2:]).Operand(0)) c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 != v1) if v2.Bool() { i.fr.ip += offset @@ -27892,18 +25654,12 @@ var ( v1 := int64(instr.Instruction(c.code[start+2:]).Operand(0)) c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 < v1) if v2.Bool() { i.fr.ip += offset @@ -27924,18 +25680,12 @@ var ( v1 := int64(instr.Instruction(c.code[start+2:]).Operand(0)) c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(uint64(v0) < uint64(v1)) if v2.Bool() { i.fr.ip += offset @@ -27955,9 +25705,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -27987,9 +25734,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -28019,9 +25763,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -28051,9 +25792,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -28083,9 +25821,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -28115,9 +25850,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -28156,9 +25888,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxF32(v0 + v1) i.stack[i.sp] = v2 i.sp++ @@ -28186,9 +25915,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxF32(v0 - v1) i.stack[i.sp] = v2 i.sp++ @@ -28216,9 +25942,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxF32(v0 * v1) i.stack[i.sp] = v2 i.sp++ @@ -28381,9 +26104,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxF32(min(v0, v1)) i.stack[i.sp] = v2 i.sp++ @@ -28411,9 +26131,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxF32(max(v0, v1)) i.stack[i.sp] = v2 i.sp++ @@ -28441,9 +26158,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxF32(float32(math.Copysign(float64(v0), float64(v1)))) i.stack[i.sp] = v2 i.sp++ @@ -28471,9 +26185,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 == v1) i.stack[i.sp] = v2 i.sp++ @@ -28501,9 +26212,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 != v1) i.stack[i.sp] = v2 i.sp++ @@ -28531,9 +26239,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 < v1) i.stack[i.sp] = v2 i.sp++ @@ -28561,9 +26266,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 > v1) i.stack[i.sp] = v2 i.sp++ @@ -28591,9 +26293,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 <= v1) i.stack[i.sp] = v2 i.sp++ @@ -28621,9 +26320,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 >= v1) i.stack[i.sp] = v2 i.sp++ @@ -28642,9 +26338,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -28674,9 +26367,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -28706,9 +26396,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -28738,9 +26425,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -28770,9 +26454,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -28802,9 +26483,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -28843,9 +26521,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxF64(v0 + v1) i.stack[i.sp] = v2 i.sp++ @@ -28873,9 +26548,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxF64(v0 - v1) i.stack[i.sp] = v2 i.sp++ @@ -28903,9 +26575,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxF64(v0 * v1) i.stack[i.sp] = v2 i.sp++ @@ -29068,9 +26737,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxF64(math.Min(v0, v1)) i.stack[i.sp] = v2 i.sp++ @@ -29098,9 +26764,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxF64(math.Max(v0, v1)) i.stack[i.sp] = v2 i.sp++ @@ -29128,9 +26791,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxF64(math.Copysign(v0, v1)) i.stack[i.sp] = v2 i.sp++ @@ -29158,9 +26818,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 == v1) i.stack[i.sp] = v2 i.sp++ @@ -29188,9 +26845,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 != v1) i.stack[i.sp] = v2 i.sp++ @@ -29218,9 +26872,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 < v1) i.stack[i.sp] = v2 i.sp++ @@ -29248,9 +26899,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 > v1) i.stack[i.sp] = v2 i.sp++ @@ -29278,9 +26926,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 <= v1) i.stack[i.sp] = v2 i.sp++ @@ -29308,9 +26953,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 >= v1) i.stack[i.sp] = v2 i.sp++ @@ -29329,9 +26971,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -29361,9 +27000,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -29393,9 +27029,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -29425,9 +27058,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -29457,9 +27087,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -29489,9 +27116,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -29533,9 +27157,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -29572,9 +27193,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -29611,9 +27229,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -29650,9 +27265,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -29689,9 +27301,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -29728,9 +27337,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -29767,9 +27373,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -29806,9 +27409,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -29845,9 +27445,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -30043,9 +27640,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -30082,9 +27676,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -30121,9 +27712,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -30160,9 +27748,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -30199,9 +27784,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -30238,9 +27820,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -30277,9 +27856,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -30316,9 +27892,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -30355,9 +27928,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -30394,9 +27964,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -30433,9 +28000,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -30472,9 +28036,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -30670,9 +28231,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -30709,9 +28267,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -30748,9 +28303,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -30787,9 +28339,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -30826,9 +28375,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -30865,9 +28411,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -30904,9 +28447,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -30943,9 +28483,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -30982,9 +28519,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -31021,9 +28555,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -31060,9 +28591,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -31099,9 +28627,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -31342,9 +28867,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -31381,9 +28903,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -31420,9 +28939,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -31458,9 +28974,6 @@ var ( } i2 := i.fr.bp + i0 r0 := i.stack[i2] - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -31495,9 +29008,6 @@ var ( } i2 := i.fr.bp + i0 r0 := i.stack[i2] - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -31532,9 +29042,6 @@ var ( } i2 := i.fr.bp + i0 r0 := i.stack[i2] - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -31570,9 +29077,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -31609,9 +29113,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -31648,9 +29149,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -31687,9 +29185,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -31726,9 +29221,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -31765,9 +29257,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -31804,9 +29293,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -31843,9 +29329,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -31882,9 +29365,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -31921,9 +29401,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -31960,9 +29437,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -31999,9 +29473,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -32038,9 +29509,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -32077,9 +29545,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -32116,9 +29581,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -32367,9 +29829,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -32406,9 +29865,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -32445,9 +29901,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -32484,9 +29937,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -32523,9 +29973,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -32562,9 +30009,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -32601,9 +30045,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -32640,9 +30081,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -32679,9 +30117,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -32718,9 +30153,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -32757,9 +30189,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -32796,9 +30225,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -32823,9 +30249,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -32858,9 +30281,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI32(v0 + v1) i.stack[i.sp] = v2 i.sp++ @@ -32888,9 +30308,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI32(v0 - v1) i.stack[i.sp] = v2 i.sp++ @@ -32918,9 +30335,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI32(v0 * v1) i.stack[i.sp] = v2 i.sp++ @@ -33120,9 +30534,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI32(v0 << (v1 & 31)) i.stack[i.sp] = v2 i.sp++ @@ -33150,9 +30561,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI32(v0 >> (v1 & 31)) i.stack[i.sp] = v2 i.sp++ @@ -33180,9 +30588,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI32(int32(uint32(v0) >> (v1 & 31))) i.stack[i.sp] = v2 i.sp++ @@ -33209,9 +30614,6 @@ var ( } i2 := i.fr.bp + i0 r0 := i.stack[i2] - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.Boxed(uint64(r0)&uint64(r1) & ^uint64(types.VMask) | (uint64(r0) ^ uint64(r1)&types.VMask)) i.stack[i.sp] = v2 i.sp++ @@ -33238,9 +30640,6 @@ var ( } i2 := i.fr.bp + i0 r0 := i.stack[i2] - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.Boxed(uint64(r0) & uint64(r1)) i.stack[i.sp] = v2 i.sp++ @@ -33267,9 +30666,6 @@ var ( } i2 := i.fr.bp + i0 r0 := i.stack[i2] - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.Boxed(uint64(r0) | uint64(r1)) i.stack[i.sp] = v2 i.sp++ @@ -33297,9 +30693,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI32(int32(bits.RotateLeft32(uint32(v0), int(v1)))) i.stack[i.sp] = v2 i.sp++ @@ -33327,9 +30720,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI32(int32(bits.RotateLeft32(uint32(v0), -int(v1)))) i.stack[i.sp] = v2 i.sp++ @@ -33357,9 +30747,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 == v1) i.stack[i.sp] = v2 i.sp++ @@ -33387,9 +30774,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 != v1) i.stack[i.sp] = v2 i.sp++ @@ -33417,9 +30801,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 < v1) i.stack[i.sp] = v2 i.sp++ @@ -33447,9 +30828,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(uint32(v0) < uint32(v1)) i.stack[i.sp] = v2 i.sp++ @@ -33477,9 +30855,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 > v1) i.stack[i.sp] = v2 i.sp++ @@ -33507,9 +30882,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(uint32(v0) > uint32(v1)) i.stack[i.sp] = v2 i.sp++ @@ -33537,9 +30909,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 <= v1) i.stack[i.sp] = v2 i.sp++ @@ -33567,9 +30936,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(uint32(v0) <= uint32(v1)) i.stack[i.sp] = v2 i.sp++ @@ -33597,9 +30963,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 >= v1) i.stack[i.sp] = v2 i.sp++ @@ -33627,9 +30990,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(uint32(v0) >= uint32(v1)) i.stack[i.sp] = v2 i.sp++ @@ -33648,9 +31008,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -33680,9 +31037,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -33712,9 +31066,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -33744,9 +31095,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -33776,9 +31124,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -33808,9 +31153,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -33840,9 +31182,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -33872,9 +31211,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -33904,9 +31240,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -33936,9 +31269,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -33977,9 +31307,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 > v1) i.stack[i.sp] = v2 i.sp++ @@ -34007,9 +31334,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(uint64(v0) > uint64(v1)) i.stack[i.sp] = v2 i.sp++ @@ -34037,9 +31361,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 <= v1) i.stack[i.sp] = v2 i.sp++ @@ -34067,9 +31388,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(uint64(v0) <= uint64(v1)) i.stack[i.sp] = v2 i.sp++ @@ -34097,9 +31415,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 >= v1) i.stack[i.sp] = v2 i.sp++ @@ -34127,9 +31442,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(uint64(v0) >= uint64(v1)) i.stack[i.sp] = v2 i.sp++ @@ -34157,9 +31469,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := i.boxI64(v0 + v1) i.stack[i.sp] = v2 i.sp++ @@ -34187,9 +31496,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := i.boxI64(v0 - v1) i.stack[i.sp] = v2 i.sp++ @@ -34217,9 +31523,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := i.boxI64(v0 * v1) i.stack[i.sp] = v2 i.sp++ @@ -34423,9 +31726,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := i.boxI64(v0 << (v1 & 63)) i.stack[i.sp] = v2 i.sp++ @@ -34453,9 +31753,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := i.boxI64(v0 >> (v1 & 63)) i.stack[i.sp] = v2 i.sp++ @@ -34483,9 +31780,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := i.boxI64(int64(uint64(v0) >> (v1 & 63))) i.stack[i.sp] = v2 i.sp++ @@ -34513,9 +31807,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := i.boxI64(v0 ^ v1) i.stack[i.sp] = v2 i.sp++ @@ -34543,9 +31834,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := i.boxI64(v0 & v1) i.stack[i.sp] = v2 i.sp++ @@ -34573,9 +31861,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := i.boxI64(v0 | v1) i.stack[i.sp] = v2 i.sp++ @@ -34603,9 +31888,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := i.boxI64(int64(bits.RotateLeft64(uint64(v0), int(v1)))) i.stack[i.sp] = v2 i.sp++ @@ -34633,9 +31915,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := i.boxI64(int64(bits.RotateLeft64(uint64(v0), -int(v1)))) i.stack[i.sp] = v2 i.sp++ @@ -34663,9 +31942,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 == v1) i.stack[i.sp] = v2 i.sp++ @@ -34693,9 +31969,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 != v1) i.stack[i.sp] = v2 i.sp++ @@ -34723,9 +31996,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 < v1) i.stack[i.sp] = v2 i.sp++ @@ -34753,9 +32023,6 @@ var ( i2 := i.fr.bp + i0 r0 := i.stack[i2] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(uint64(v0) < uint64(v1)) i.stack[i.sp] = v2 i.sp++ @@ -34774,9 +32041,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -34806,9 +32070,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -34838,9 +32099,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -34870,9 +32128,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -34901,9 +32156,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -34929,9 +32181,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -34957,9 +32206,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -34985,9 +32231,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -35013,9 +32256,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -35041,9 +32281,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -35069,9 +32306,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -35097,9 +32331,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -35125,9 +32356,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -35267,9 +32495,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -35295,9 +32520,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -35323,9 +32545,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -35351,9 +32570,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -35379,9 +32595,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -35407,9 +32620,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -35435,9 +32645,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -35463,9 +32670,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -35491,9 +32695,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -35519,9 +32720,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -35547,9 +32745,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -35575,9 +32770,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -35717,9 +32909,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -35745,9 +32934,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -35773,9 +32959,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -35801,9 +32984,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -35829,9 +33009,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -35857,9 +33034,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -35885,9 +33059,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -35913,9 +33084,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -35941,9 +33109,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -35969,9 +33134,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -35989,9 +33151,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -36013,9 +33172,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -36041,9 +33197,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -36069,9 +33222,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -36241,9 +33391,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -36269,9 +33416,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -36297,9 +33441,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -36325,9 +33466,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -36352,9 +33490,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -36379,9 +33514,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -36406,9 +33538,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -36434,9 +33563,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -36462,9 +33588,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -36490,9 +33613,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -36518,9 +33638,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -36546,9 +33663,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -36574,9 +33688,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -36602,9 +33713,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -36630,9 +33738,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -36658,9 +33763,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -36686,9 +33788,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -36714,9 +33813,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -36742,9 +33838,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -36770,9 +33863,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -36798,9 +33888,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -36974,9 +34061,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -37002,9 +34086,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -37030,9 +34111,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -37058,9 +34136,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -37086,9 +34161,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -37114,9 +34186,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -37142,9 +34211,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -37170,9 +34236,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -37198,9 +34261,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -37226,9 +34286,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -37254,9 +34311,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -37282,9 +34336,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i0 >= i.sp { panic(ErrSegmentationFault) } @@ -37315,9 +34366,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := r0.F32() if i.sp < 1 { panic(ErrStackUnderflow) @@ -37342,9 +34390,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := r0.F32() if i.sp < 1 { panic(ErrStackUnderflow) @@ -37369,9 +34414,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := r0.F32() if i.sp < 1 { panic(ErrStackUnderflow) @@ -37396,9 +34438,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := r0.F32() if i.sp < 1 { panic(ErrStackUnderflow) @@ -37423,9 +34462,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := r0.F32() if i.sp < 1 { panic(ErrStackUnderflow) @@ -37450,9 +34486,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := r0.F32() if i.sp < 1 { panic(ErrStackUnderflow) @@ -37477,9 +34510,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := r0.F64() if i.sp < 1 { panic(ErrStackUnderflow) @@ -37504,9 +34534,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := r0.F64() if i.sp < 1 { panic(ErrStackUnderflow) @@ -37531,9 +34558,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := r0.F64() if i.sp < 1 { panic(ErrStackUnderflow) @@ -37558,9 +34582,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := r0.F64() if i.sp < 1 { panic(ErrStackUnderflow) @@ -37585,9 +34606,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := r0.F64() if i.sp < 1 { panic(ErrStackUnderflow) @@ -37612,9 +34630,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := r0.F64() if i.sp < 1 { panic(ErrStackUnderflow) @@ -37639,9 +34654,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := r0.I32() if i.sp < 1 { panic(ErrStackUnderflow) @@ -37666,9 +34678,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := r0.I32() if i.sp < 1 { panic(ErrStackUnderflow) @@ -37693,9 +34702,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := r0.I32() if i.sp < 1 { panic(ErrStackUnderflow) @@ -37720,9 +34726,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := r0.I32() if i.sp < 1 { panic(ErrStackUnderflow) @@ -37747,9 +34750,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := r0.I32() if i.sp < 1 { panic(ErrStackUnderflow) @@ -37774,9 +34774,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := r0.I32() if i.sp < 1 { panic(ErrStackUnderflow) @@ -37801,9 +34798,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := r0.I32() if i.sp < 1 { panic(ErrStackUnderflow) @@ -37828,9 +34822,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := r0.I32() if i.sp < 1 { panic(ErrStackUnderflow) @@ -37855,9 +34846,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := r0.I32() if i.sp < 1 { panic(ErrStackUnderflow) @@ -37882,9 +34870,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := r0.I32() if i.sp < 1 { panic(ErrStackUnderflow) @@ -37909,9 +34894,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := i.borrowI64(r0) if i.sp < 1 { panic(ErrStackUnderflow) @@ -37936,9 +34918,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := i.borrowI64(r0) if i.sp < 1 { panic(ErrStackUnderflow) @@ -37963,9 +34942,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := i.borrowI64(r0) if i.sp < 1 { panic(ErrStackUnderflow) @@ -37990,9 +34966,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := i.borrowI64(r0) if i.sp < 1 { panic(ErrStackUnderflow) @@ -38017,9 +34990,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := i.borrowI64(r0) if i.sp < 1 { panic(ErrStackUnderflow) @@ -38044,9 +35014,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := i.borrowI64(r0) if i.sp < 1 { panic(ErrStackUnderflow) @@ -38071,9 +35038,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := i.borrowI64(r0) if i.sp < 1 { panic(ErrStackUnderflow) @@ -38098,9 +35062,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := i.borrowI64(r0) if i.sp < 1 { panic(ErrStackUnderflow) @@ -38125,9 +35086,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := i.borrowI64(r0) if i.sp < 1 { panic(ErrStackUnderflow) @@ -38152,9 +35110,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := i.borrowI64(r0) if i.sp < 1 { panic(ErrStackUnderflow) @@ -38186,9 +35141,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if r0.Ref() == 0 { i.fr.ip += offset } @@ -38586,9 +35538,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := r0.F32() if i.sp < 1 { panic(ErrStackUnderflow) @@ -38609,9 +35558,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := r0.F32() if i.sp < 1 { panic(ErrStackUnderflow) @@ -38632,9 +35578,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := r0.F32() if i.sp < 1 { panic(ErrStackUnderflow) @@ -38757,9 +35700,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := r0.F32() if i.sp < 1 { panic(ErrStackUnderflow) @@ -38780,9 +35720,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := r0.F32() if i.sp < 1 { panic(ErrStackUnderflow) @@ -38803,9 +35740,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := r0.F32() if i.sp < 1 { panic(ErrStackUnderflow) @@ -38826,9 +35760,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := r0.F32() if i.sp < 1 { panic(ErrStackUnderflow) @@ -38849,9 +35780,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := r0.F32() if i.sp < 1 { panic(ErrStackUnderflow) @@ -38872,9 +35800,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := r0.F32() if i.sp < 1 { panic(ErrStackUnderflow) @@ -38895,9 +35820,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := r0.F32() if i.sp < 1 { panic(ErrStackUnderflow) @@ -38918,9 +35840,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := r0.F32() if i.sp < 1 { panic(ErrStackUnderflow) @@ -38941,9 +35860,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := r0.F32() if i.sp < 1 { panic(ErrStackUnderflow) @@ -38964,9 +35880,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := r0.F64() if i.sp < 1 { panic(ErrStackUnderflow) @@ -38987,9 +35900,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := r0.F64() if i.sp < 1 { panic(ErrStackUnderflow) @@ -39010,9 +35920,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := r0.F64() if i.sp < 1 { panic(ErrStackUnderflow) @@ -39135,9 +36042,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := r0.F64() if i.sp < 1 { panic(ErrStackUnderflow) @@ -39158,9 +36062,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := r0.F64() if i.sp < 1 { panic(ErrStackUnderflow) @@ -39181,9 +36082,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := r0.F64() if i.sp < 1 { panic(ErrStackUnderflow) @@ -39204,9 +36102,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := r0.F64() if i.sp < 1 { panic(ErrStackUnderflow) @@ -39227,9 +36122,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := r0.F64() if i.sp < 1 { panic(ErrStackUnderflow) @@ -39250,9 +36142,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := r0.F64() if i.sp < 1 { panic(ErrStackUnderflow) @@ -39273,9 +36162,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := r0.F64() if i.sp < 1 { panic(ErrStackUnderflow) @@ -39296,9 +36182,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := r0.F64() if i.sp < 1 { panic(ErrStackUnderflow) @@ -39319,9 +36202,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := r0.F64() if i.sp < 1 { panic(ErrStackUnderflow) @@ -39342,9 +36222,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := r0.I32() if i.sp == 0 { panic(ErrStackUnderflow) @@ -39413,9 +36290,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := r0.I32() if i.sp == 0 { panic(ErrStackUnderflow) @@ -39490,9 +36364,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := r0.I32() if i.sp < 1 { panic(ErrStackUnderflow) @@ -39513,9 +36384,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := r0.I32() if i.sp < 1 { panic(ErrStackUnderflow) @@ -39536,9 +36404,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := r0.I32() if i.sp < 1 { panic(ErrStackUnderflow) @@ -39687,9 +36552,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := r0.I32() if i.sp < 1 { panic(ErrStackUnderflow) @@ -39710,9 +36572,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := r0.I32() if i.sp < 1 { panic(ErrStackUnderflow) @@ -39733,9 +36592,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := r0.I32() if i.sp < 1 { panic(ErrStackUnderflow) @@ -39756,9 +36612,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -39778,9 +36631,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -39800,9 +36650,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -39822,9 +36669,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := r0.I32() if i.sp < 1 { panic(ErrStackUnderflow) @@ -39845,9 +36689,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := r0.I32() if i.sp < 1 { panic(ErrStackUnderflow) @@ -39868,9 +36709,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := r0.I32() if i.sp < 1 { panic(ErrStackUnderflow) @@ -39891,9 +36729,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := r0.I32() if i.sp < 1 { panic(ErrStackUnderflow) @@ -39914,9 +36749,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := r0.I32() if i.sp < 1 { panic(ErrStackUnderflow) @@ -39937,9 +36769,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := r0.I32() if i.sp < 1 { panic(ErrStackUnderflow) @@ -39960,9 +36789,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := r0.I32() if i.sp < 1 { panic(ErrStackUnderflow) @@ -39983,9 +36809,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := r0.I32() if i.sp < 1 { panic(ErrStackUnderflow) @@ -40006,9 +36829,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := r0.I32() if i.sp < 1 { panic(ErrStackUnderflow) @@ -40029,9 +36849,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := r0.I32() if i.sp < 1 { panic(ErrStackUnderflow) @@ -40052,9 +36869,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := r0.I32() if i.sp < 1 { panic(ErrStackUnderflow) @@ -40075,9 +36889,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := r0.I32() if i.sp < 1 { panic(ErrStackUnderflow) @@ -40098,9 +36909,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := i.borrowI64(r0) if i.sp < 1 { panic(ErrStackUnderflow) @@ -40121,9 +36929,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := i.borrowI64(r0) if i.sp < 1 { panic(ErrStackUnderflow) @@ -40144,9 +36949,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := i.borrowI64(r0) if i.sp < 1 { panic(ErrStackUnderflow) @@ -40167,9 +36969,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := i.borrowI64(r0) if i.sp < 1 { panic(ErrStackUnderflow) @@ -40190,9 +36989,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := i.borrowI64(r0) if i.sp < 1 { panic(ErrStackUnderflow) @@ -40213,9 +37009,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := i.borrowI64(r0) if i.sp < 1 { panic(ErrStackUnderflow) @@ -40236,9 +37029,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := i.borrowI64(r0) if i.sp < 1 { panic(ErrStackUnderflow) @@ -40259,9 +37049,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := i.borrowI64(r0) if i.sp < 1 { panic(ErrStackUnderflow) @@ -40282,9 +37069,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := i.borrowI64(r0) if i.sp < 1 { panic(ErrStackUnderflow) @@ -40433,9 +37217,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := i.borrowI64(r0) if i.sp < 1 { panic(ErrStackUnderflow) @@ -40456,9 +37237,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := i.borrowI64(r0) if i.sp < 1 { panic(ErrStackUnderflow) @@ -40479,9 +37257,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := i.borrowI64(r0) if i.sp < 1 { panic(ErrStackUnderflow) @@ -40502,9 +37277,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := i.borrowI64(r0) if i.sp < 1 { panic(ErrStackUnderflow) @@ -40525,9 +37297,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := i.borrowI64(r0) if i.sp < 1 { panic(ErrStackUnderflow) @@ -40548,9 +37317,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := i.borrowI64(r0) if i.sp < 1 { panic(ErrStackUnderflow) @@ -40571,9 +37337,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := i.borrowI64(r0) if i.sp < 1 { panic(ErrStackUnderflow) @@ -40594,9 +37357,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := i.borrowI64(r0) if i.sp < 1 { panic(ErrStackUnderflow) @@ -40617,9 +37377,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := i.borrowI64(r0) if i.sp < 1 { panic(ErrStackUnderflow) @@ -40640,9 +37397,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := i.borrowI64(r0) if i.sp < 1 { panic(ErrStackUnderflow) @@ -40663,9 +37417,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := i.borrowI64(r0) if i.sp < 1 { panic(ErrStackUnderflow) @@ -40686,9 +37437,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v0 := i.borrowI64(r0) if i.sp < 1 { panic(ErrStackUnderflow) @@ -40716,9 +37464,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } i.fr.ip += 4 } } @@ -40740,9 +37485,6 @@ var ( } c.ip += 3 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } i.stack[i.sp] = types.BoxI1(r0.Ref() == 0) i.sp++ i.fr.ip += 4 @@ -40765,17 +37507,11 @@ var ( v1 := types.Box(uint64(uint32(instr.Instruction(c.code[start+2:]).Operand(0))), types.KindF32).F32() c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 == v1) if v2.Bool() { i.fr.ip += offset @@ -40796,17 +37532,11 @@ var ( v1 := types.Box(uint64(uint32(instr.Instruction(c.code[start+2:]).Operand(0))), types.KindF32).F32() c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 != v1) if v2.Bool() { i.fr.ip += offset @@ -40827,17 +37557,11 @@ var ( v1 := types.Box(uint64(uint32(instr.Instruction(c.code[start+2:]).Operand(0))), types.KindF32).F32() c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 < v1) if v2.Bool() { i.fr.ip += offset @@ -40858,17 +37582,11 @@ var ( v1 := types.Box(uint64(uint32(instr.Instruction(c.code[start+2:]).Operand(0))), types.KindF32).F32() c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 > v1) if v2.Bool() { i.fr.ip += offset @@ -40889,17 +37607,11 @@ var ( v1 := types.Box(uint64(uint32(instr.Instruction(c.code[start+2:]).Operand(0))), types.KindF32).F32() c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 <= v1) if v2.Bool() { i.fr.ip += offset @@ -40920,17 +37632,11 @@ var ( v1 := types.Box(uint64(uint32(instr.Instruction(c.code[start+2:]).Operand(0))), types.KindF32).F32() c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 >= v1) if v2.Bool() { i.fr.ip += offset @@ -40951,17 +37657,11 @@ var ( v1 := types.Boxed(instr.Instruction(c.code[start+2:]).Operand(0)).F64() c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 == v1) if v2.Bool() { i.fr.ip += offset @@ -40982,17 +37682,11 @@ var ( v1 := types.Boxed(instr.Instruction(c.code[start+2:]).Operand(0)).F64() c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 != v1) if v2.Bool() { i.fr.ip += offset @@ -41013,17 +37707,11 @@ var ( v1 := types.Boxed(instr.Instruction(c.code[start+2:]).Operand(0)).F64() c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 < v1) if v2.Bool() { i.fr.ip += offset @@ -41044,17 +37732,11 @@ var ( v1 := types.Boxed(instr.Instruction(c.code[start+2:]).Operand(0)).F64() c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 > v1) if v2.Bool() { i.fr.ip += offset @@ -41075,17 +37757,11 @@ var ( v1 := types.Boxed(instr.Instruction(c.code[start+2:]).Operand(0)).F64() c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 <= v1) if v2.Bool() { i.fr.ip += offset @@ -41106,17 +37782,11 @@ var ( v1 := types.Boxed(instr.Instruction(c.code[start+2:]).Operand(0)).F64() c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 >= v1) if v2.Bool() { i.fr.ip += offset @@ -41140,17 +37810,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -41179,17 +37843,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -41218,17 +37876,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -41257,17 +37909,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -41296,17 +37942,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -41335,17 +37975,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -41374,17 +38008,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -41413,17 +38041,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -41452,17 +38074,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -41491,17 +38107,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -41530,17 +38140,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -41569,17 +38173,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -41608,17 +38206,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -41647,17 +38239,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -41686,17 +38272,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -41725,17 +38305,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -41764,17 +38338,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -41803,17 +38371,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -41842,17 +38404,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -41881,17 +38437,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -41920,17 +38470,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -41959,17 +38503,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -41998,17 +38536,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -42037,17 +38569,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -42076,17 +38602,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -42115,17 +38635,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -42154,17 +38668,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -42193,17 +38701,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -42232,17 +38734,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -42271,17 +38767,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -42310,17 +38800,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -42349,17 +38833,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -42388,17 +38866,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -42428,17 +38900,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -42468,17 +38934,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -42508,17 +38968,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -42548,17 +39002,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -42588,17 +39036,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -42628,17 +39070,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -42668,17 +39104,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -42708,17 +39138,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -42748,17 +39172,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -42788,17 +39206,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -42828,17 +39240,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -42868,17 +39274,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -42908,17 +39308,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -42948,17 +39342,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -42988,17 +39376,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -43028,17 +39410,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -43068,17 +39444,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -43108,17 +39478,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -43148,17 +39512,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -43188,17 +39546,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -43228,17 +39580,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -43268,17 +39614,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -43308,17 +39648,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -43348,17 +39682,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -43388,17 +39716,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -43428,17 +39750,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -43468,17 +39784,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -43508,17 +39818,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -43548,17 +39852,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -43588,17 +39886,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -43628,17 +39920,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -43668,17 +39954,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -43707,17 +39987,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -43746,17 +40020,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -43785,17 +40053,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -43824,17 +40086,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -43863,17 +40119,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -43902,17 +40152,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -43941,17 +40185,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -43980,17 +40218,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -44019,17 +40251,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -44058,17 +40284,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -44097,17 +40317,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -44136,17 +40350,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -44175,17 +40383,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -44214,17 +40416,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -44253,17 +40449,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -44292,17 +40482,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -44331,17 +40515,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -44370,17 +40548,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -44409,17 +40581,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -44448,17 +40614,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -44487,17 +40647,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -44526,17 +40680,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -44565,17 +40713,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -44604,17 +40746,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -44643,17 +40779,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -44682,17 +40812,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -44721,17 +40845,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -44760,17 +40878,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -44799,17 +40911,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -44838,17 +40944,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -44877,17 +40977,11 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -44913,17 +41007,11 @@ var ( v1 := int32(instr.Instruction(c.code[start+2:]).Operand(0)) c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 == v1) if v2.Bool() { i.fr.ip += offset @@ -44944,17 +41032,11 @@ var ( v1 := int32(instr.Instruction(c.code[start+2:]).Operand(0)) c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 != v1) if v2.Bool() { i.fr.ip += offset @@ -44975,17 +41057,11 @@ var ( v1 := int32(instr.Instruction(c.code[start+2:]).Operand(0)) c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 < v1) if v2.Bool() { i.fr.ip += offset @@ -45006,17 +41082,11 @@ var ( v1 := int32(instr.Instruction(c.code[start+2:]).Operand(0)) c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(uint32(v0) < uint32(v1)) if v2.Bool() { i.fr.ip += offset @@ -45037,17 +41107,11 @@ var ( v1 := int32(instr.Instruction(c.code[start+2:]).Operand(0)) c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 > v1) if v2.Bool() { i.fr.ip += offset @@ -45068,17 +41132,11 @@ var ( v1 := int32(instr.Instruction(c.code[start+2:]).Operand(0)) c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(uint32(v0) > uint32(v1)) if v2.Bool() { i.fr.ip += offset @@ -45099,17 +41157,11 @@ var ( v1 := int32(instr.Instruction(c.code[start+2:]).Operand(0)) c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 <= v1) if v2.Bool() { i.fr.ip += offset @@ -45130,17 +41182,11 @@ var ( v1 := int32(instr.Instruction(c.code[start+2:]).Operand(0)) c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(uint32(v0) <= uint32(v1)) if v2.Bool() { i.fr.ip += offset @@ -45161,17 +41207,11 @@ var ( v1 := int32(instr.Instruction(c.code[start+2:]).Operand(0)) c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 >= v1) if v2.Bool() { i.fr.ip += offset @@ -45192,17 +41232,11 @@ var ( v1 := int32(instr.Instruction(c.code[start+2:]).Operand(0)) c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(uint32(v0) >= uint32(v1)) if v2.Bool() { i.fr.ip += offset @@ -45223,17 +41257,11 @@ var ( v1 := int64(instr.Instruction(c.code[start+2:]).Operand(0)) c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 > v1) if v2.Bool() { i.fr.ip += offset @@ -45254,17 +41282,11 @@ var ( v1 := int64(instr.Instruction(c.code[start+2:]).Operand(0)) c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(uint64(v0) > uint64(v1)) if v2.Bool() { i.fr.ip += offset @@ -45285,17 +41307,11 @@ var ( v1 := int64(instr.Instruction(c.code[start+2:]).Operand(0)) c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 <= v1) if v2.Bool() { i.fr.ip += offset @@ -45316,17 +41332,11 @@ var ( v1 := int64(instr.Instruction(c.code[start+2:]).Operand(0)) c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(uint64(v0) <= uint64(v1)) if v2.Bool() { i.fr.ip += offset @@ -45347,17 +41357,11 @@ var ( v1 := int64(instr.Instruction(c.code[start+2:]).Operand(0)) c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 >= v1) if v2.Bool() { i.fr.ip += offset @@ -45378,17 +41382,11 @@ var ( v1 := int64(instr.Instruction(c.code[start+2:]).Operand(0)) c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(uint64(v0) >= uint64(v1)) if v2.Bool() { i.fr.ip += offset @@ -45409,17 +41407,11 @@ var ( v1 := int64(instr.Instruction(c.code[start+2:]).Operand(0)) c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 == v1) if v2.Bool() { i.fr.ip += offset @@ -45440,17 +41432,11 @@ var ( v1 := int64(instr.Instruction(c.code[start+2:]).Operand(0)) c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 != v1) if v2.Bool() { i.fr.ip += offset @@ -45471,17 +41457,11 @@ var ( v1 := int64(instr.Instruction(c.code[start+2:]).Operand(0)) c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 < v1) if v2.Bool() { i.fr.ip += offset @@ -45502,17 +41482,11 @@ var ( v1 := int64(instr.Instruction(c.code[start+2:]).Operand(0)) c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(uint64(v0) < uint64(v1)) if v2.Bool() { i.fr.ip += offset @@ -45532,9 +41506,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -45563,9 +41534,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -45594,9 +41562,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -45625,9 +41590,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -45656,9 +41618,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -45687,9 +41646,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -45726,9 +41682,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxF32(v0 + v1) i.stack[i.sp] = v2 i.sp++ @@ -45755,9 +41708,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxF32(v0 - v1) i.stack[i.sp] = v2 i.sp++ @@ -45784,9 +41734,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxF32(v0 * v1) i.stack[i.sp] = v2 i.sp++ @@ -45945,9 +41892,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxF32(min(v0, v1)) i.stack[i.sp] = v2 i.sp++ @@ -45974,9 +41918,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxF32(max(v0, v1)) i.stack[i.sp] = v2 i.sp++ @@ -46003,9 +41944,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxF32(float32(math.Copysign(float64(v0), float64(v1)))) i.stack[i.sp] = v2 i.sp++ @@ -46032,9 +41970,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 == v1) i.stack[i.sp] = v2 i.sp++ @@ -46061,9 +41996,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 != v1) i.stack[i.sp] = v2 i.sp++ @@ -46090,9 +42022,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 < v1) i.stack[i.sp] = v2 i.sp++ @@ -46119,9 +42048,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 > v1) i.stack[i.sp] = v2 i.sp++ @@ -46148,9 +42074,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 <= v1) i.stack[i.sp] = v2 i.sp++ @@ -46177,9 +42100,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 >= v1) i.stack[i.sp] = v2 i.sp++ @@ -46198,9 +42118,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -46229,9 +42146,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -46260,9 +42174,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -46291,9 +42202,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -46322,9 +42230,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -46353,9 +42258,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -46392,9 +42294,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxF64(v0 + v1) i.stack[i.sp] = v2 i.sp++ @@ -46421,9 +42320,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxF64(v0 - v1) i.stack[i.sp] = v2 i.sp++ @@ -46450,9 +42346,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxF64(v0 * v1) i.stack[i.sp] = v2 i.sp++ @@ -46611,9 +42504,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxF64(math.Min(v0, v1)) i.stack[i.sp] = v2 i.sp++ @@ -46640,9 +42530,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxF64(math.Max(v0, v1)) i.stack[i.sp] = v2 i.sp++ @@ -46669,9 +42556,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxF64(math.Copysign(v0, v1)) i.stack[i.sp] = v2 i.sp++ @@ -46698,9 +42582,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 == v1) i.stack[i.sp] = v2 i.sp++ @@ -46727,9 +42608,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 != v1) i.stack[i.sp] = v2 i.sp++ @@ -46756,9 +42634,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 < v1) i.stack[i.sp] = v2 i.sp++ @@ -46785,9 +42660,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 > v1) i.stack[i.sp] = v2 i.sp++ @@ -46814,9 +42686,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 <= v1) i.stack[i.sp] = v2 i.sp++ @@ -46843,9 +42712,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 >= v1) i.stack[i.sp] = v2 i.sp++ @@ -46864,9 +42730,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -46895,9 +42758,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -46937,9 +42797,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -46974,9 +42831,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -47011,9 +42865,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -47048,9 +42899,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -47085,9 +42933,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -47122,9 +42967,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -47159,9 +43001,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -47196,9 +43035,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -47233,9 +43069,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -47423,9 +43256,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -47460,9 +43290,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -47497,9 +43324,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -47534,9 +43358,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -47571,9 +43392,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -47608,9 +43426,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -47645,9 +43460,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -47682,9 +43494,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -47719,9 +43528,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -47756,9 +43562,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -47793,9 +43596,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -47830,9 +43630,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -48020,9 +43817,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -48057,9 +43851,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -48094,9 +43885,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -48131,9 +43919,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -48168,9 +43953,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -48205,9 +43987,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -48242,9 +44021,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -48279,9 +44055,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -48316,9 +44089,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -48353,9 +44123,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -48390,9 +44157,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -48427,9 +44191,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -48660,9 +44421,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -48697,9 +44455,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -48734,9 +44489,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -48770,9 +44522,6 @@ var ( panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -48805,9 +44554,6 @@ var ( panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -48840,9 +44586,6 @@ var ( panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -48876,9 +44619,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -48913,9 +44653,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -48950,9 +44687,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -48987,9 +44721,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -49024,9 +44755,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -49061,9 +44789,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -49098,9 +44823,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -49135,9 +44857,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -49172,9 +44891,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -49209,9 +44925,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -49246,9 +44959,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -49283,9 +44993,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -49320,9 +45027,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -49357,9 +45061,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -49394,9 +45095,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -49635,9 +45333,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -49672,9 +45367,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -49709,9 +45401,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -49746,9 +45435,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -49783,9 +45469,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -49820,9 +45503,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -49857,9 +45537,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -49894,9 +45571,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -49931,9 +45605,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -49968,9 +45639,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -50005,9 +45673,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -50042,9 +45707,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.globals) { panic(ErrSegmentationFault) } @@ -50068,9 +45730,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -50099,9 +45758,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -50130,9 +45786,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -50161,9 +45814,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -50203,9 +45853,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -50241,9 +45888,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -50279,9 +45923,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -50317,9 +45958,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -50355,9 +45993,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -50393,9 +46028,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -50431,9 +46063,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -50469,9 +46098,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -50507,9 +46133,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -50701,9 +46324,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -50739,9 +46359,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -50777,9 +46394,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -50815,9 +46429,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -50853,9 +46464,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -50891,9 +46499,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -50929,9 +46534,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -50967,9 +46569,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -51005,9 +46604,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -51043,9 +46639,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -51081,9 +46674,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -51119,9 +46709,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -51313,9 +46900,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -51351,9 +46935,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -51389,9 +46970,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -51427,9 +47005,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -51465,9 +47040,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -51503,9 +47075,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -51541,9 +47110,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -51579,9 +47145,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -51617,9 +47180,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -51655,9 +47215,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -51693,9 +47250,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -51731,9 +47285,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -51969,9 +47520,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -52007,9 +47555,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -52045,9 +47590,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -52082,9 +47624,6 @@ var ( panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -52118,9 +47657,6 @@ var ( panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -52154,9 +47690,6 @@ var ( panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -52191,9 +47724,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -52229,9 +47759,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -52267,9 +47794,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -52305,9 +47829,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -52343,9 +47864,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -52381,9 +47899,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -52419,9 +47934,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -52457,9 +47969,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -52495,9 +48004,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -52533,9 +48039,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -52571,9 +48074,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -52609,9 +48109,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -52647,9 +48144,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -52685,9 +48179,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -52723,9 +48214,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -52969,9 +48457,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -53007,9 +48492,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -53045,9 +48527,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -53083,9 +48562,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -53121,9 +48597,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -53159,9 +48632,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -53197,9 +48667,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -53235,9 +48702,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -53273,9 +48737,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -53311,9 +48772,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -53349,9 +48807,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -53387,9 +48842,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.fr.bp+i1 >= i.sp { panic(ErrSegmentationFault) } @@ -53425,9 +48877,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -53462,9 +48911,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -53499,9 +48945,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -53536,9 +48979,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -53573,9 +49013,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -53610,9 +49047,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -53647,9 +49081,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -53684,9 +49115,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -53721,9 +49149,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -53911,9 +49336,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -53948,9 +49370,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -53985,9 +49404,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -54022,9 +49438,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -54059,9 +49472,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -54096,9 +49506,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -54133,9 +49540,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -54170,9 +49574,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -54207,9 +49608,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -54244,9 +49642,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -54281,9 +49676,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -54318,9 +49710,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -54508,9 +49897,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -54545,9 +49931,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -54582,9 +49965,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -54619,9 +49999,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -54656,9 +50033,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -54693,9 +50067,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -54730,9 +50101,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -54767,9 +50135,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -54804,9 +50169,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.F64() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -54841,9 +50203,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -54878,9 +50237,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -54915,9 +50271,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -55148,9 +50501,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -55185,9 +50535,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -55222,9 +50569,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -55258,9 +50602,6 @@ var ( panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -55293,9 +50634,6 @@ var ( panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -55328,9 +50666,6 @@ var ( panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -55364,9 +50699,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -55401,9 +50733,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -55438,9 +50767,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -55475,9 +50801,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -55512,9 +50835,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -55549,9 +50869,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -55586,9 +50903,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -55623,9 +50937,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -55660,9 +50971,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -55697,9 +51005,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -55734,9 +51039,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -55771,9 +51073,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -55808,9 +51107,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -55845,9 +51141,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -55882,9 +51175,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -56123,9 +51413,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -56160,9 +51447,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -56197,9 +51481,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -56234,9 +51515,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -56271,9 +51549,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -56308,9 +51583,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -56345,9 +51617,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -56382,9 +51651,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -56419,9 +51685,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -56456,9 +51719,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -56493,9 +51753,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -56530,9 +51787,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i1 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -56556,9 +51810,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -56589,9 +51840,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI32(v0 + v1) i.stack[i.sp] = v2 i.sp++ @@ -56618,9 +51866,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI32(v0 - v1) i.stack[i.sp] = v2 i.sp++ @@ -56647,9 +51892,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI32(v0 * v1) i.stack[i.sp] = v2 i.sp++ @@ -56844,9 +52086,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI32(v0 << (v1 & 31)) i.stack[i.sp] = v2 i.sp++ @@ -56873,9 +52112,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI32(v0 >> (v1 & 31)) i.stack[i.sp] = v2 i.sp++ @@ -56902,9 +52138,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI32(int32(uint32(v0) >> (v1 & 31))) i.stack[i.sp] = v2 i.sp++ @@ -56930,9 +52163,6 @@ var ( panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.Boxed(uint64(r0)&uint64(r1) & ^uint64(types.VMask) | (uint64(r0) ^ uint64(r1)&types.VMask)) i.stack[i.sp] = v2 i.sp++ @@ -56958,9 +52188,6 @@ var ( panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.Boxed(uint64(r0) & uint64(r1)) i.stack[i.sp] = v2 i.sp++ @@ -56986,9 +52213,6 @@ var ( panic(ErrSegmentationFault) } r0 := i.fr.upvals[i0] - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.Boxed(uint64(r0) | uint64(r1)) i.stack[i.sp] = v2 i.sp++ @@ -57015,9 +52239,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI32(int32(bits.RotateLeft32(uint32(v0), int(v1)))) i.stack[i.sp] = v2 i.sp++ @@ -57044,9 +52265,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI32(int32(bits.RotateLeft32(uint32(v0), -int(v1)))) i.stack[i.sp] = v2 i.sp++ @@ -57073,9 +52291,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 == v1) i.stack[i.sp] = v2 i.sp++ @@ -57102,9 +52317,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 != v1) i.stack[i.sp] = v2 i.sp++ @@ -57131,9 +52343,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 < v1) i.stack[i.sp] = v2 i.sp++ @@ -57160,9 +52369,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(uint32(v0) < uint32(v1)) i.stack[i.sp] = v2 i.sp++ @@ -57189,9 +52395,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 > v1) i.stack[i.sp] = v2 i.sp++ @@ -57218,9 +52421,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(uint32(v0) > uint32(v1)) i.stack[i.sp] = v2 i.sp++ @@ -57247,9 +52447,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 <= v1) i.stack[i.sp] = v2 i.sp++ @@ -57276,9 +52473,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(uint32(v0) <= uint32(v1)) i.stack[i.sp] = v2 i.sp++ @@ -57305,9 +52499,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 >= v1) i.stack[i.sp] = v2 i.sp++ @@ -57334,9 +52525,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := r0.I32() - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(uint32(v0) >= uint32(v1)) i.stack[i.sp] = v2 i.sp++ @@ -57355,9 +52543,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -57386,9 +52571,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -57417,9 +52599,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -57448,9 +52627,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -57479,9 +52655,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -57510,9 +52683,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -57541,9 +52711,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -57572,9 +52739,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -57603,9 +52767,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -57634,9 +52795,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -57673,9 +52831,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 > v1) i.stack[i.sp] = v2 i.sp++ @@ -57702,9 +52857,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(uint64(v0) > uint64(v1)) i.stack[i.sp] = v2 i.sp++ @@ -57731,9 +52883,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 <= v1) i.stack[i.sp] = v2 i.sp++ @@ -57760,9 +52909,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(uint64(v0) <= uint64(v1)) i.stack[i.sp] = v2 i.sp++ @@ -57789,9 +52935,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 >= v1) i.stack[i.sp] = v2 i.sp++ @@ -57818,9 +52961,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(uint64(v0) >= uint64(v1)) i.stack[i.sp] = v2 i.sp++ @@ -57847,9 +52987,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := i.boxI64(v0 + v1) i.stack[i.sp] = v2 i.sp++ @@ -57876,9 +53013,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := i.boxI64(v0 - v1) i.stack[i.sp] = v2 i.sp++ @@ -57905,9 +53039,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := i.boxI64(v0 * v1) i.stack[i.sp] = v2 i.sp++ @@ -58106,9 +53237,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := i.boxI64(v0 << (v1 & 63)) i.stack[i.sp] = v2 i.sp++ @@ -58135,9 +53263,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := i.boxI64(v0 >> (v1 & 63)) i.stack[i.sp] = v2 i.sp++ @@ -58164,9 +53289,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := i.boxI64(int64(uint64(v0) >> (v1 & 63))) i.stack[i.sp] = v2 i.sp++ @@ -58193,9 +53315,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := i.boxI64(v0 ^ v1) i.stack[i.sp] = v2 i.sp++ @@ -58222,9 +53341,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := i.boxI64(v0 & v1) i.stack[i.sp] = v2 i.sp++ @@ -58251,9 +53367,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := i.boxI64(v0 | v1) i.stack[i.sp] = v2 i.sp++ @@ -58280,9 +53393,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := i.boxI64(int64(bits.RotateLeft64(uint64(v0), int(v1)))) i.stack[i.sp] = v2 i.sp++ @@ -58309,9 +53419,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := i.boxI64(int64(bits.RotateLeft64(uint64(v0), -int(v1)))) i.stack[i.sp] = v2 i.sp++ @@ -58338,9 +53445,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 == v1) i.stack[i.sp] = v2 i.sp++ @@ -58367,9 +53471,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 != v1) i.stack[i.sp] = v2 i.sp++ @@ -58396,9 +53497,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(v0 < v1) i.stack[i.sp] = v2 i.sp++ @@ -58425,9 +53523,6 @@ var ( } r0 := i.fr.upvals[i0] v0 := i.borrowI64(r0) - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } v2 := types.BoxI1(uint64(v0) < uint64(v1)) i.stack[i.sp] = v2 i.sp++ @@ -58446,9 +53541,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -58477,9 +53569,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -58508,9 +53597,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -58539,9 +53625,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -58569,9 +53652,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -58596,9 +53676,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -58623,9 +53700,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -58650,9 +53724,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -58677,9 +53748,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -58704,9 +53772,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -58731,9 +53796,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -58758,9 +53820,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -58785,9 +53844,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -58923,9 +53979,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -58950,9 +54003,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -58977,9 +54027,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -59004,9 +54051,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -59031,9 +54075,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -59058,9 +54099,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -59085,9 +54123,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -59112,9 +54147,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -59139,9 +54171,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -59166,9 +54195,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -59193,9 +54219,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -59220,9 +54243,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -59358,9 +54378,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -59385,9 +54402,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -59412,9 +54426,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -59439,9 +54450,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -59466,9 +54474,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -59493,9 +54498,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -59520,9 +54522,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -59547,9 +54546,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -59574,9 +54570,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -59601,9 +54594,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -59621,9 +54611,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -59644,9 +54631,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -59671,9 +54655,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -59698,9 +54679,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -59865,9 +54843,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -59892,9 +54867,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -59919,9 +54891,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -59946,9 +54915,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -59972,9 +54938,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -59998,9 +54961,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -60024,9 +54984,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -60051,9 +55008,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -60078,9 +55032,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -60105,9 +55056,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -60132,9 +55080,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -60159,9 +55104,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -60186,9 +55128,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -60213,9 +55152,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -60240,9 +55176,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -60267,9 +55200,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -60294,9 +55224,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -60321,9 +55248,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -60348,9 +55272,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -60375,9 +55296,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -60402,9 +55320,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -60573,9 +55488,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -60600,9 +55512,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -60627,9 +55536,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -60654,9 +55560,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -60681,9 +55584,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -60708,9 +55608,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -60735,9 +55632,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -60762,9 +55656,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -60789,9 +55680,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -60816,9 +55704,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -60843,9 +55728,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -60870,9 +55752,6 @@ var ( } c.ip += 2 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i0 >= len(i.fr.upvals) { panic(ErrSegmentationFault) } @@ -60948,9 +55827,6 @@ var ( v0 := int32(instr.Instruction(c.code[start:]).Operand(0)) c.ip += 5 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -60971,9 +55847,6 @@ var ( v0 := int32(instr.Instruction(c.code[start:]).Operand(0)) c.ip += 5 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -60994,9 +55867,6 @@ var ( v0 := int32(instr.Instruction(c.code[start:]).Operand(0)) c.ip += 5 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -61017,9 +55887,6 @@ var ( v0 := int32(instr.Instruction(c.code[start:]).Operand(0)) c.ip += 5 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -61040,9 +55907,6 @@ var ( v0 := int32(instr.Instruction(c.code[start:]).Operand(0)) c.ip += 5 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -61063,9 +55927,6 @@ var ( v0 := int32(instr.Instruction(c.code[start:]).Operand(0)) c.ip += 5 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -61086,9 +55947,6 @@ var ( v0 := int32(instr.Instruction(c.code[start:]).Operand(0)) c.ip += 5 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -61109,9 +55967,6 @@ var ( v0 := int32(instr.Instruction(c.code[start:]).Operand(0)) c.ip += 5 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -61132,9 +55987,6 @@ var ( v0 := int32(instr.Instruction(c.code[start:]).Operand(0)) c.ip += 5 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -61155,9 +56007,6 @@ var ( v0 := int32(instr.Instruction(c.code[start:]).Operand(0)) c.ip += 5 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -61177,9 +56026,6 @@ var ( v0 := int32(instr.Instruction(c.code[start:]).Operand(0)) c.ip += 5 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp == 0 { panic(ErrStackUnderflow) } @@ -61244,9 +56090,6 @@ var ( v0 := int32(instr.Instruction(c.code[start:]).Operand(0)) c.ip += 5 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp == 0 { panic(ErrStackUnderflow) } @@ -61317,9 +56160,6 @@ var ( v0 := int32(instr.Instruction(c.code[start:]).Operand(0)) c.ip += 5 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -61336,9 +56176,6 @@ var ( v0 := int32(instr.Instruction(c.code[start:]).Operand(0)) c.ip += 5 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -61355,9 +56192,6 @@ var ( v0 := int32(instr.Instruction(c.code[start:]).Operand(0)) c.ip += 5 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -61486,9 +56320,6 @@ var ( v0 := int32(instr.Instruction(c.code[start:]).Operand(0)) c.ip += 5 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -61505,9 +56336,6 @@ var ( v0 := int32(instr.Instruction(c.code[start:]).Operand(0)) c.ip += 5 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -61524,9 +56352,6 @@ var ( v0 := int32(instr.Instruction(c.code[start:]).Operand(0)) c.ip += 5 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -61543,9 +56368,6 @@ var ( r0 := types.BoxI32(int32(instr.Instruction(c.code[start:]).Operand(0))) c.ip += 5 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -61562,9 +56384,6 @@ var ( r0 := types.BoxI32(int32(instr.Instruction(c.code[start:]).Operand(0))) c.ip += 5 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -61581,9 +56400,6 @@ var ( r0 := types.BoxI32(int32(instr.Instruction(c.code[start:]).Operand(0))) c.ip += 5 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -61600,9 +56416,6 @@ var ( v0 := int32(instr.Instruction(c.code[start:]).Operand(0)) c.ip += 5 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -61619,9 +56432,6 @@ var ( v0 := int32(instr.Instruction(c.code[start:]).Operand(0)) c.ip += 5 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -61638,9 +56448,6 @@ var ( v0 := int32(instr.Instruction(c.code[start:]).Operand(0)) c.ip += 5 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -61657,9 +56464,6 @@ var ( v0 := int32(instr.Instruction(c.code[start:]).Operand(0)) c.ip += 5 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -61676,9 +56480,6 @@ var ( v0 := int32(instr.Instruction(c.code[start:]).Operand(0)) c.ip += 5 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -61695,9 +56496,6 @@ var ( v0 := int32(instr.Instruction(c.code[start:]).Operand(0)) c.ip += 5 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -61715,9 +56513,6 @@ var ( v0 := int32(instr.Instruction(c.code[start:]).Operand(0)) c.ip += 5 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if v0 != 0 { i.fr.ip += offset } @@ -61732,9 +56527,6 @@ var ( v0 := int32(instr.Instruction(c.code[start:]).Operand(0)) c.ip += 5 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -61751,9 +56543,6 @@ var ( v0 := int32(instr.Instruction(c.code[start:]).Operand(0)) c.ip += 5 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -61770,9 +56559,6 @@ var ( v0 := int32(instr.Instruction(c.code[start:]).Operand(0)) c.ip += 5 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -61789,9 +56575,6 @@ var ( v0 := int32(instr.Instruction(c.code[start:]).Operand(0)) c.ip += 5 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -61808,9 +56591,6 @@ var ( v0 := int32(instr.Instruction(c.code[start:]).Operand(0)) c.ip += 5 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -61827,9 +56607,6 @@ var ( v0 := int32(instr.Instruction(c.code[start:]).Operand(0)) c.ip += 5 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -62104,9 +56881,6 @@ var ( v0 := int64(instr.Instruction(c.code[start:]).Operand(0)) c.ip += 9 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -62127,9 +56901,6 @@ var ( v0 := int64(instr.Instruction(c.code[start:]).Operand(0)) c.ip += 9 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -62150,9 +56921,6 @@ var ( v0 := int64(instr.Instruction(c.code[start:]).Operand(0)) c.ip += 9 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -62173,9 +56941,6 @@ var ( v0 := int64(instr.Instruction(c.code[start:]).Operand(0)) c.ip += 9 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -62196,9 +56961,6 @@ var ( v0 := int64(instr.Instruction(c.code[start:]).Operand(0)) c.ip += 9 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -62219,9 +56981,6 @@ var ( v0 := int64(instr.Instruction(c.code[start:]).Operand(0)) c.ip += 9 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -62242,9 +57001,6 @@ var ( v0 := int64(instr.Instruction(c.code[start:]).Operand(0)) c.ip += 9 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -62265,9 +57021,6 @@ var ( v0 := int64(instr.Instruction(c.code[start:]).Operand(0)) c.ip += 9 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -62288,9 +57041,6 @@ var ( v0 := int64(instr.Instruction(c.code[start:]).Operand(0)) c.ip += 9 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -62311,9 +57061,6 @@ var ( v0 := int64(instr.Instruction(c.code[start:]).Operand(0)) c.ip += 9 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -62333,9 +57080,6 @@ var ( v0 := int64(instr.Instruction(c.code[start:]).Operand(0)) c.ip += 9 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -62352,9 +57096,6 @@ var ( v0 := int64(instr.Instruction(c.code[start:]).Operand(0)) c.ip += 9 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -62371,9 +57112,6 @@ var ( v0 := int64(instr.Instruction(c.code[start:]).Operand(0)) c.ip += 9 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -62390,9 +57128,6 @@ var ( v0 := int64(instr.Instruction(c.code[start:]).Operand(0)) c.ip += 9 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -62409,9 +57144,6 @@ var ( v0 := int64(instr.Instruction(c.code[start:]).Operand(0)) c.ip += 9 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -62428,9 +57160,6 @@ var ( v0 := int64(instr.Instruction(c.code[start:]).Operand(0)) c.ip += 9 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -62447,9 +57176,6 @@ var ( v0 := int64(instr.Instruction(c.code[start:]).Operand(0)) c.ip += 9 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -62466,9 +57192,6 @@ var ( v0 := int64(instr.Instruction(c.code[start:]).Operand(0)) c.ip += 9 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -62485,9 +57208,6 @@ var ( v0 := int64(instr.Instruction(c.code[start:]).Operand(0)) c.ip += 9 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -62616,9 +57336,6 @@ var ( v0 := int64(instr.Instruction(c.code[start:]).Operand(0)) c.ip += 9 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -62635,9 +57352,6 @@ var ( v0 := int64(instr.Instruction(c.code[start:]).Operand(0)) c.ip += 9 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -62654,9 +57368,6 @@ var ( v0 := int64(instr.Instruction(c.code[start:]).Operand(0)) c.ip += 9 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -62673,9 +57384,6 @@ var ( v0 := int64(instr.Instruction(c.code[start:]).Operand(0)) c.ip += 9 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -62692,9 +57400,6 @@ var ( v0 := int64(instr.Instruction(c.code[start:]).Operand(0)) c.ip += 9 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -62711,9 +57416,6 @@ var ( v0 := int64(instr.Instruction(c.code[start:]).Operand(0)) c.ip += 9 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -62730,9 +57432,6 @@ var ( v0 := int64(instr.Instruction(c.code[start:]).Operand(0)) c.ip += 9 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -62749,9 +57448,6 @@ var ( v0 := int64(instr.Instruction(c.code[start:]).Operand(0)) c.ip += 9 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -62768,9 +57464,6 @@ var ( v0 := int64(instr.Instruction(c.code[start:]).Operand(0)) c.ip += 9 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -62787,9 +57480,6 @@ var ( v0 := int64(instr.Instruction(c.code[start:]).Operand(0)) c.ip += 9 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -62806,9 +57496,6 @@ var ( v0 := int64(instr.Instruction(c.code[start:]).Operand(0)) c.ip += 9 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -62825,9 +57512,6 @@ var ( v0 := int64(instr.Instruction(c.code[start:]).Operand(0)) c.ip += 9 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -63102,9 +57786,6 @@ var ( v0 := types.Box(uint64(uint32(instr.Instruction(c.code[start:]).Operand(0))), types.KindF32).F32() c.ip += 5 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -63125,9 +57806,6 @@ var ( v0 := types.Box(uint64(uint32(instr.Instruction(c.code[start:]).Operand(0))), types.KindF32).F32() c.ip += 5 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -63148,9 +57826,6 @@ var ( v0 := types.Box(uint64(uint32(instr.Instruction(c.code[start:]).Operand(0))), types.KindF32).F32() c.ip += 5 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -63171,9 +57846,6 @@ var ( v0 := types.Box(uint64(uint32(instr.Instruction(c.code[start:]).Operand(0))), types.KindF32).F32() c.ip += 5 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -63194,9 +57866,6 @@ var ( v0 := types.Box(uint64(uint32(instr.Instruction(c.code[start:]).Operand(0))), types.KindF32).F32() c.ip += 5 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -63217,9 +57886,6 @@ var ( v0 := types.Box(uint64(uint32(instr.Instruction(c.code[start:]).Operand(0))), types.KindF32).F32() c.ip += 5 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -63239,9 +57905,6 @@ var ( v0 := types.Box(uint64(uint32(instr.Instruction(c.code[start:]).Operand(0))), types.KindF32).F32() c.ip += 5 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -63258,9 +57921,6 @@ var ( v0 := types.Box(uint64(uint32(instr.Instruction(c.code[start:]).Operand(0))), types.KindF32).F32() c.ip += 5 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -63277,9 +57937,6 @@ var ( v0 := types.Box(uint64(uint32(instr.Instruction(c.code[start:]).Operand(0))), types.KindF32).F32() c.ip += 5 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -63386,9 +58043,6 @@ var ( v0 := types.Box(uint64(uint32(instr.Instruction(c.code[start:]).Operand(0))), types.KindF32).F32() c.ip += 5 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -63405,9 +58059,6 @@ var ( v0 := types.Box(uint64(uint32(instr.Instruction(c.code[start:]).Operand(0))), types.KindF32).F32() c.ip += 5 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -63424,9 +58075,6 @@ var ( v0 := types.Box(uint64(uint32(instr.Instruction(c.code[start:]).Operand(0))), types.KindF32).F32() c.ip += 5 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -63443,9 +58091,6 @@ var ( v0 := types.Box(uint64(uint32(instr.Instruction(c.code[start:]).Operand(0))), types.KindF32).F32() c.ip += 5 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -63462,9 +58107,6 @@ var ( v0 := types.Box(uint64(uint32(instr.Instruction(c.code[start:]).Operand(0))), types.KindF32).F32() c.ip += 5 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -63481,9 +58123,6 @@ var ( v0 := types.Box(uint64(uint32(instr.Instruction(c.code[start:]).Operand(0))), types.KindF32).F32() c.ip += 5 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -63500,9 +58139,6 @@ var ( v0 := types.Box(uint64(uint32(instr.Instruction(c.code[start:]).Operand(0))), types.KindF32).F32() c.ip += 5 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -63519,9 +58155,6 @@ var ( v0 := types.Box(uint64(uint32(instr.Instruction(c.code[start:]).Operand(0))), types.KindF32).F32() c.ip += 5 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -63538,9 +58171,6 @@ var ( v0 := types.Box(uint64(uint32(instr.Instruction(c.code[start:]).Operand(0))), types.KindF32).F32() c.ip += 5 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -63700,9 +58330,6 @@ var ( v0 := types.Boxed(instr.Instruction(c.code[start:]).Operand(0)).F64() c.ip += 9 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -63723,9 +58350,6 @@ var ( v0 := types.Boxed(instr.Instruction(c.code[start:]).Operand(0)).F64() c.ip += 9 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -63746,9 +58370,6 @@ var ( v0 := types.Boxed(instr.Instruction(c.code[start:]).Operand(0)).F64() c.ip += 9 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -63769,9 +58390,6 @@ var ( v0 := types.Boxed(instr.Instruction(c.code[start:]).Operand(0)).F64() c.ip += 9 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -63792,9 +58410,6 @@ var ( v0 := types.Boxed(instr.Instruction(c.code[start:]).Operand(0)).F64() c.ip += 9 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -63815,9 +58430,6 @@ var ( v0 := types.Boxed(instr.Instruction(c.code[start:]).Operand(0)).F64() c.ip += 9 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -63837,9 +58449,6 @@ var ( v0 := types.Boxed(instr.Instruction(c.code[start:]).Operand(0)).F64() c.ip += 9 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -63856,9 +58465,6 @@ var ( v0 := types.Boxed(instr.Instruction(c.code[start:]).Operand(0)).F64() c.ip += 9 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -63875,9 +58481,6 @@ var ( v0 := types.Boxed(instr.Instruction(c.code[start:]).Operand(0)).F64() c.ip += 9 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -63984,9 +58587,6 @@ var ( v0 := types.Boxed(instr.Instruction(c.code[start:]).Operand(0)).F64() c.ip += 9 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -64003,9 +58603,6 @@ var ( v0 := types.Boxed(instr.Instruction(c.code[start:]).Operand(0)).F64() c.ip += 9 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -64022,9 +58619,6 @@ var ( v0 := types.Boxed(instr.Instruction(c.code[start:]).Operand(0)).F64() c.ip += 9 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -64041,9 +58635,6 @@ var ( v0 := types.Boxed(instr.Instruction(c.code[start:]).Operand(0)).F64() c.ip += 9 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -64060,9 +58651,6 @@ var ( v0 := types.Boxed(instr.Instruction(c.code[start:]).Operand(0)).F64() c.ip += 9 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -64079,9 +58667,6 @@ var ( v0 := types.Boxed(instr.Instruction(c.code[start:]).Operand(0)).F64() c.ip += 9 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -64098,9 +58683,6 @@ var ( v0 := types.Boxed(instr.Instruction(c.code[start:]).Operand(0)).F64() c.ip += 9 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -64117,9 +58699,6 @@ var ( v0 := types.Boxed(instr.Instruction(c.code[start:]).Operand(0)).F64() c.ip += 9 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } @@ -64136,9 +58715,6 @@ var ( v0 := types.Boxed(instr.Instruction(c.code[start:]).Operand(0)).F64() c.ip += 9 return func(i *Interpreter) { - if i.sp == len(i.stack) { - panic(ErrStackOverflow) - } if i.sp < 1 { panic(ErrStackUnderflow) } diff --git a/prof/collector.go b/prof/collector.go index 96de97a7..47803d20 100644 --- a/prof/collector.go +++ b/prof/collector.go @@ -1,10 +1,6 @@ package prof -import ( - "strconv" - - "github.com/siyul-park/minivm/instr" -) +import "strconv" // Collector records execution samples and named metrics. type Collector struct { @@ -68,12 +64,12 @@ func (c *Collector) Metrics() []Metric { } out = append(out, Metric{ Name: "vm_opcode_samples_total", - Labels: []Label{{Key: "opcode", Value: c.opcodeLabel(byte(code))}}, + Labels: []Label{{Key: "opcode", Value: opcodeLabel(byte(code))}}, Value: float64(n), }) } out = append(out, c.metrics...) - out = c.jit.appendMetrics(out, c) + out = c.jit.appendMetrics(out) return out } @@ -202,10 +198,3 @@ func (c *Collector) reset() { c.metrics = c.metrics[:0] c.jit.reset() } - -func (c *Collector) opcodeLabel(code byte) string { - if typ := instr.TypeOf(instr.Opcode(code)); typ.Mnemonic != "" { - return typ.Mnemonic - } - return "0x" + strconv.FormatInt(int64(code), 16) -} diff --git a/prof/jit.go b/prof/jit.go index 11a5216a..9961cf23 100644 --- a/prof/jit.go +++ b/prof/jit.go @@ -105,7 +105,7 @@ const OpcodeNone = -1 // RecordCapture records one cold-path trace capture result. func (c *Collector) RecordCapture(fn, ip int, outcome CaptureOutcome, reason CaptureReason) { key := captureKey{fn: fn, ip: ip, outcome: outcome, reason: reason} - counter(&c.jit.captures, key).value++ + register(&c.jit.captures, key).value++ } // RecordCompile records one cold-path compile result. @@ -121,30 +121,22 @@ func (c *Collector) RecordCompile( trigger: trigger, frontend: frontend, outcome: outcome, reason: reason, } - counter(&c.jit.compiles, key).value++ + register(&c.jit.compiles, key).value++ } // RecordEmit records one emitted native entry and its generated byte count. func (c *Collector) RecordEmit(fn, ip int, kind EntryKind, frontend Frontend, size int) { key := entryKey{fn: fn, ip: ip, kind: kind, frontend: frontend} - if c.jit.emits == nil { - c.jit.emits = make(map[entryKey]*emitCounts) - } - counters := c.jit.emits[key] - if counters == nil { - counters = &emitCounts{} - c.jit.emits[key] = counters - } - counters.emits++ + register(&c.jit.emits, key).value++ if size > 0 { - counters.bytes += uint64(size) + register(&c.jit.bytes, key).value += uint64(size) } } // RegisterEntry returns the stable counter for one native entry row. func (c *Collector) RegisterEntry(fn, ip int, kind EntryKind, frontend Frontend) *Counter { key := entryKey{fn: fn, ip: ip, kind: kind, frontend: frontend} - return counter(&c.jit.entries, key) + return register(&c.jit.entries, key) } // RegisterExit returns the stable counter for one native exit row. @@ -163,13 +155,13 @@ func (c *Collector) RegisterExit( reason: reason, opcode: opcode, } - return counter(&c.jit.exits, key) + return register(&c.jit.exits, key) } // RegisterYield returns the stable counter for one native yield row. func (c *Collector) RegisterYield(fn, ip int, kind EntryKind, frontend Frontend) *Counter { key := entryKey{fn: fn, ip: ip, kind: kind, frontend: frontend} - return counter(&c.jit.yields, key) + return register(&c.jit.yields, key) } // Inc increments a pre-resolved counter without allocating. diff --git a/prof/jit_metrics.go b/prof/jit_metrics.go index 6273e31e..3179e5a6 100644 --- a/prof/jit_metrics.go +++ b/prof/jit_metrics.go @@ -1,19 +1,35 @@ package prof import ( - "sort" + "cmp" + "slices" "strconv" + + "github.com/siyul-park/minivm/instr" ) +// jitMetrics holds one counter table per JIT metric family. Every table maps +// an immutable key describing the row's labels to a stable counter handle, so +// a registered handle stays valid across merges and resets. type jitMetrics struct { captures map[captureKey]*Counter compiles map[compileKey]*Counter - emits map[entryKey]*emitCounts + emits map[entryKey]*Counter + bytes map[entryKey]*Counter entries map[entryKey]*Counter yields map[entryKey]*Counter exits map[exitKey]*Counter } +// key constrains the label set of one JIT metric row. A row key is a +// comparable value type so it can index a counter table directly, and it +// orders itself against its own type so emitted rows are stable. +type key[K any] interface { + comparable + labels() []Label + compare(other K) int +} + type captureKey struct { fn int ip int @@ -43,334 +59,228 @@ type exitKey struct { opcode int } -type emitCounts struct { - emits uint64 - bytes uint64 -} - -func (m *jitMetrics) appendMetrics(out []Metric, collector *Collector) []Metric { - captures := active(m.captures) - sort.Slice(captures, func(i, j int) bool { return captures[i].less(captures[j]) }) - for _, key := range captures { - out = append(out, Metric{ - Name: "vm_jit_trace_captures_total", - Labels: []Label{ - {Key: "func", Value: strconv.Itoa(key.fn)}, - {Key: "ip", Value: strconv.Itoa(key.ip)}, - {Key: "outcome", Value: key.outcome.label()}, - {Key: "reason", Value: key.reason.label()}, - }, - Value: float64(m.captures[key].value), - }) +var ( + frontendLabels = [...]string{ + FrontendStatic: "static", + FrontendTrace: "trace", } - - compiles := active(m.compiles) - sort.Slice(compiles, func(i, j int) bool { return compiles[i].less(compiles[j]) }) - for _, key := range compiles { - out = append(out, Metric{ - Name: "vm_jit_compiles_total", - Labels: []Label{ - {Key: "func", Value: strconv.Itoa(key.fn)}, - {Key: "ip", Value: strconv.Itoa(key.ip)}, - {Key: "trigger", Value: key.trigger.label()}, - {Key: "frontend", Value: key.frontend.label()}, - {Key: "outcome", Value: key.outcome.label()}, - {Key: "reason", Value: key.reason.label()}, - }, - Value: float64(m.compiles[key].value), - }) + triggerLabels = [...]string{ + TriggerHot: "hot", + TriggerSideExit: "side-exit", } - - emits := make([]entryKey, 0, len(m.emits)) - for key, counts := range m.emits { - if counts.emits > 0 || counts.bytes > 0 { - emits = append(emits, key) - } + entryLabels = [...]string{ + EntryStart: "start", + EntryCall: "call", + EntryLoop: "loop", } - sort.Slice(emits, func(i, j int) bool { return emits[i].less(emits[j]) }) - for _, key := range emits { - labels := key.labels() - counters := m.emits[key] - if counters.emits > 0 { - out = append(out, Metric{Name: "vm_jit_entry_emits_total", Labels: labels, Value: float64(counters.emits)}) - } - if counters.bytes > 0 { - out = append(out, Metric{Name: "vm_jit_entry_bytes_total", Labels: labels, Value: float64(counters.bytes)}) - } + captureOutcomeLabels = [...]string{ + CaptureOutcomePublished: "published", + CaptureOutcomePartial: "partial", + CaptureOutcomeRejected: "rejected", } - - out = appendEntries(out, "vm_jit_native_entries_total", m.entries) - out = appendEntries(out, "vm_jit_native_yields_total", m.yields) - - exits := active(m.exits) - sort.Slice(exits, func(i, j int) bool { return exits[i].less(exits[j]) }) - for _, key := range exits { - opcode := "none" - if key.opcode >= 0 && key.opcode <= 255 { - opcode = collector.opcodeLabel(byte(key.opcode)) - } - out = append(out, Metric{ - Name: "vm_jit_native_exits_total", - Labels: []Label{ - {Key: "func", Value: strconv.Itoa(key.fn)}, - {Key: "ip", Value: strconv.Itoa(key.ip)}, - {Key: "kind", Value: key.kind.label()}, - {Key: "frontend", Value: key.frontend.label()}, - {Key: "reason", Value: key.reason.label()}, - {Key: "opcode", Value: opcode}, - }, - Value: float64(m.exits[key].value), - }) + captureReasonLabels = [...]string{ + CaptureReasonAttemptLimit: "attempt-limit", + CaptureReasonInvalidAnchor: "invalid-anchor", + CaptureReasonHostCall: "host-call", + CaptureReasonTailClosure: "tail-closure", + CaptureReasonUnsupportedOp: "unsupported-op", + CaptureReasonNestedTerminal: "nested-terminal", + CaptureReasonStepTrap: "step-trap", + CaptureReasonOpLimit: "op-limit", } - return out -} - -func (m *jitMetrics) merge(other *jitMetrics) { - merge(&m.captures, other.captures) - merge(&m.compiles, other.compiles) - if len(other.emits) > 0 && m.emits == nil { - m.emits = make(map[entryKey]*emitCounts) + compileOutcomeLabels = [...]string{ + CompileOutcomeEmitted: "emitted", + CompileOutcomeEmpty: "empty", + CompileOutcomeRejected: "rejected", + CompileOutcomeError: "error", } - for key, source := range other.emits { - if source.emits == 0 && source.bytes == 0 { - continue - } - destination := m.emits[key] - if destination == nil { - destination = &emitCounts{} - m.emits[key] = destination - } - destination.emits += source.emits - destination.bytes += source.bytes + compileReasonLabels = [...]string{ + CompileReasonNoInput: "no-input", + CompileReasonNoPlan: "no-plan", + CompileReasonInvalidPlan: "invalid-plan", + CompileReasonLoweringRejected: "lowering-rejected", + CompileReasonRegisterPressure: "register-pressure", + CompileReasonBranchRange: "branch-range", + CompileReasonBackendUnavailable: "backend-unavailable", + CompileReasonError: "error", } - merge(&m.entries, other.entries) - merge(&m.yields, other.yields) - merge(&m.exits, other.exits) -} - -func (m *jitMetrics) reset() { - reset(m.captures) - reset(m.compiles) - for _, counters := range m.emits { - counters.emits = 0 - counters.bytes = 0 + exitLabels = [...]string{ + ExitGuardKind: "guard-kind", + ExitGuardShape: "guard-shape", + ExitGuardBounds: "guard-bounds", + ExitGuardValue: "guard-value", + ExitColdBranch: "cold-branch", + ExitTraceCut: "trace-cut", + ExitTerminalOp: "terminal-op", + ExitLoop: "loop-exit", } - reset(m.entries) - reset(m.yields) - reset(m.exits) +) + +// appendMetrics appends every non-zero row of every family, each family's +// rows sorted by their label set so output is stable across runs. +func (m *jitMetrics) appendMetrics(out []Metric) []Metric { + out = appendRows(out, "vm_jit_trace_captures_total", m.captures) + out = appendRows(out, "vm_jit_compiles_total", m.compiles) + out = appendRows(out, "vm_jit_entry_emits_total", m.emits) + out = appendRows(out, "vm_jit_entry_bytes_total", m.bytes) + out = appendRows(out, "vm_jit_native_entries_total", m.entries) + out = appendRows(out, "vm_jit_native_yields_total", m.yields) + return appendRows(out, "vm_jit_native_exits_total", m.exits) } -func (k captureKey) less(other captureKey) bool { - return k.fn < other.fn || - k.fn == other.fn && (k.ip < other.ip || - k.ip == other.ip && (k.outcome < other.outcome || - k.outcome == other.outcome && k.reason < other.reason)) +func (m *jitMetrics) merge(other *jitMetrics) { + mergeRows(&m.captures, other.captures) + mergeRows(&m.compiles, other.compiles) + mergeRows(&m.emits, other.emits) + mergeRows(&m.bytes, other.bytes) + mergeRows(&m.entries, other.entries) + mergeRows(&m.yields, other.yields) + mergeRows(&m.exits, other.exits) } -func (k compileKey) less(other compileKey) bool { - return k.fn < other.fn || - k.fn == other.fn && (k.ip < other.ip || - k.ip == other.ip && (k.trigger < other.trigger || - k.trigger == other.trigger && (k.frontend < other.frontend || - k.frontend == other.frontend && (k.outcome < other.outcome || - k.outcome == other.outcome && k.reason < other.reason)))) +func (m *jitMetrics) reset() { + resetRows(m.captures) + resetRows(m.compiles) + resetRows(m.emits) + resetRows(m.bytes) + resetRows(m.entries) + resetRows(m.yields) + resetRows(m.exits) } -func (k entryKey) labels() []Label { +func (k captureKey) labels() []Label { return []Label{ {Key: "func", Value: strconv.Itoa(k.fn)}, {Key: "ip", Value: strconv.Itoa(k.ip)}, - {Key: "kind", Value: k.kind.label()}, - {Key: "frontend", Value: k.frontend.label()}, + {Key: "outcome", Value: label(captureOutcomeLabels[:], int(k.outcome))}, + {Key: "reason", Value: label(captureReasonLabels[:], int(k.reason))}, } } -func (k entryKey) less(other entryKey) bool { - return k.fn < other.fn || - k.fn == other.fn && (k.ip < other.ip || - k.ip == other.ip && (k.kind < other.kind || - k.kind == other.kind && k.frontend < other.frontend)) -} - -func (k exitKey) less(other exitKey) bool { - return k.entryKey.less(other.entryKey) || - k.entryKey == other.entryKey && (k.reason < other.reason || - k.reason == other.reason && k.opcode < other.opcode) +func (k captureKey) compare(o captureKey) int { + return cmp.Or( + cmp.Compare(k.fn, o.fn), + cmp.Compare(k.ip, o.ip), + cmp.Compare(k.outcome, o.outcome), + cmp.Compare(k.reason, o.reason), + ) } -func (v Frontend) label() string { - switch v { - case FrontendStatic: - return "static" - case FrontendTrace: - return "trace" - default: - return "none" - } -} - -func (v Trigger) label() string { - switch v { - case TriggerHot: - return "hot" - case TriggerSideExit: - return "side-exit" - default: - return "none" +func (k compileKey) labels() []Label { + return []Label{ + {Key: "func", Value: strconv.Itoa(k.fn)}, + {Key: "ip", Value: strconv.Itoa(k.ip)}, + {Key: "trigger", Value: label(triggerLabels[:], int(k.trigger))}, + {Key: "frontend", Value: label(frontendLabels[:], int(k.frontend))}, + {Key: "outcome", Value: label(compileOutcomeLabels[:], int(k.outcome))}, + {Key: "reason", Value: label(compileReasonLabels[:], int(k.reason))}, } } -func (v EntryKind) label() string { - switch v { - case EntryStart: - return "start" - case EntryCall: - return "call" - case EntryLoop: - return "loop" - default: - return "none" - } +func (k compileKey) compare(o compileKey) int { + return cmp.Or( + cmp.Compare(k.fn, o.fn), + cmp.Compare(k.ip, o.ip), + cmp.Compare(k.trigger, o.trigger), + cmp.Compare(k.frontend, o.frontend), + cmp.Compare(k.outcome, o.outcome), + cmp.Compare(k.reason, o.reason), + ) } -func (v CaptureOutcome) label() string { - switch v { - case CaptureOutcomePublished: - return "published" - case CaptureOutcomePartial: - return "partial" - case CaptureOutcomeRejected: - return "rejected" - default: - return "none" +func (k entryKey) labels() []Label { + return []Label{ + {Key: "func", Value: strconv.Itoa(k.fn)}, + {Key: "ip", Value: strconv.Itoa(k.ip)}, + {Key: "kind", Value: label(entryLabels[:], int(k.kind))}, + {Key: "frontend", Value: label(frontendLabels[:], int(k.frontend))}, } } -func (v CaptureReason) label() string { - switch v { - case CaptureReasonAttemptLimit: - return "attempt-limit" - case CaptureReasonInvalidAnchor: - return "invalid-anchor" - case CaptureReasonHostCall: - return "host-call" - case CaptureReasonTailClosure: - return "tail-closure" - case CaptureReasonUnsupportedOp: - return "unsupported-op" - case CaptureReasonNestedTerminal: - return "nested-terminal" - case CaptureReasonStepTrap: - return "step-trap" - case CaptureReasonOpLimit: - return "op-limit" - default: - return "none" - } +func (k entryKey) compare(other entryKey) int { + return cmp.Or( + cmp.Compare(k.fn, other.fn), + cmp.Compare(k.ip, other.ip), + cmp.Compare(k.kind, other.kind), + cmp.Compare(k.frontend, other.frontend), + ) } -func (v CompileOutcome) label() string { - switch v { - case CompileOutcomeEmitted: - return "emitted" - case CompileOutcomeEmpty: - return "empty" - case CompileOutcomeRejected: - return "rejected" - case CompileOutcomeError: - return "error" - default: - return "none" +func (k exitKey) labels() []Label { + opcode := "none" + if k.opcode >= 0 && k.opcode <= 255 { + opcode = opcodeLabel(byte(k.opcode)) } + return append(k.entryKey.labels(), + Label{Key: "reason", Value: label(exitLabels[:], int(k.reason))}, + Label{Key: "opcode", Value: opcode}, + ) } -func (v CompileReason) label() string { - switch v { - case CompileReasonNoInput: - return "no-input" - case CompileReasonNoPlan: - return "no-plan" - case CompileReasonInvalidPlan: - return "invalid-plan" - case CompileReasonLoweringRejected: - return "lowering-rejected" - case CompileReasonRegisterPressure: - return "register-pressure" - case CompileReasonBranchRange: - return "branch-range" - case CompileReasonBackendUnavailable: - return "backend-unavailable" - case CompileReasonError: - return "error" - default: - return "none" - } +func (k exitKey) compare(o exitKey) int { + return cmp.Or( + k.entryKey.compare(o.entryKey), + cmp.Compare(k.reason, o.reason), + cmp.Compare(k.opcode, o.opcode), + ) } -func (v ExitReason) label() string { - switch v { - case ExitGuardKind: - return "guard-kind" - case ExitGuardShape: - return "guard-shape" - case ExitGuardBounds: - return "guard-bounds" - case ExitGuardValue: - return "guard-value" - case ExitColdBranch: - return "cold-branch" - case ExitTraceCut: - return "trace-cut" - case ExitTerminalOp: - return "terminal-op" - case ExitLoop: - return "loop-exit" - default: - return "none" +// appendRows appends one metric per non-zero row, in label order. +func appendRows[K key[K]](out []Metric, name string, rows map[K]*Counter) []Metric { + active := make([]K, 0, len(rows)) + for row, counter := range rows { + if counter.value > 0 { + active = append(active, row) + } } -} - -func appendEntries(out []Metric, name string, rows map[entryKey]*Counter) []Metric { - keys := active(rows) - sort.Slice(keys, func(i, j int) bool { return keys[i].less(keys[j]) }) - for _, key := range keys { - out = append(out, Metric{Name: name, Labels: key.labels(), Value: float64(rows[key].value)}) + slices.SortFunc(active, func(a, b K) int { return a.compare(b) }) + for _, row := range active { + out = append(out, Metric{Name: name, Labels: row.labels(), Value: float64(rows[row].value)}) } return out } -func active[K comparable](rows map[K]*Counter) []K { - keys := make([]K, 0, len(rows)) - for key, counter := range rows { +func mergeRows[K key[K]](rows *map[K]*Counter, source map[K]*Counter) { + for row, counter := range source { if counter.value > 0 { - keys = append(keys, key) + register(rows, row).value += counter.value } } - return keys } -func merge[K comparable](destination *map[K]*Counter, source map[K]*Counter) { - for key, row := range source { - if row.value > 0 { - counter(destination, key).value += row.value - } +func resetRows[K key[K]](rows map[K]*Counter) { + for _, counter := range rows { + counter.value = 0 } } -func counter[K comparable](rows *map[K]*Counter, key K) *Counter { +// register returns row's counter, creating the table and the counter on first +// use. The handle is stable, so a caller may keep it and increment it directly. +func register[K key[K]](rows *map[K]*Counter, row K) *Counter { if *rows == nil { *rows = make(map[K]*Counter) } - counter := (*rows)[key] + counter := (*rows)[row] if counter == nil { counter = &Counter{} - (*rows)[key] = counter + (*rows)[row] = counter } return counter } -func reset[K comparable](rows map[K]*Counter) { - for _, counter := range rows { - counter.value = 0 +// label names an enum value, falling back to "none" for the zero value and +// for anything outside the declared range. +func label(names []string, value int) string { + if value < 0 || value >= len(names) || names[value] == "" { + return "none" + } + return names[value] +} + +// opcodeLabel names an opcode by mnemonic, falling back to its hex code. +func opcodeLabel(code byte) string { + if typ := instr.TypeOf(instr.Opcode(code)); typ.Mnemonic != "" { + return typ.Mnemonic } + return "0x" + strconv.FormatInt(int64(code), 16) }