diff options
author | 2024-08-15 00:08:55 +0000 | |
---|---|---|
committer | 2024-08-15 00:08:55 +0000 | |
commit | 09f24e044653b1327ac1c40f3ab150e3f0184f23 (patch) | |
tree | 1d9984d053fa5c8d1203abaa49b8752a1532ff11 /vendor/github.com/tetratelabs/wazero/internal/engine/wazevo/backend/vdef.go | |
parent | update go-fastcopy to v1.1.3 (#3200) (diff) | |
download | gotosocial-09f24e044653b1327ac1c40f3ab150e3f0184f23.tar.xz |
update go-ffmpreg to v0.2.5 (pulls in latest tetratelabs/wazero) (#3203)
Diffstat (limited to 'vendor/github.com/tetratelabs/wazero/internal/engine/wazevo/backend/vdef.go')
-rw-r--r-- | vendor/github.com/tetratelabs/wazero/internal/engine/wazevo/backend/vdef.go | 30 |
1 files changed, 3 insertions, 27 deletions
diff --git a/vendor/github.com/tetratelabs/wazero/internal/engine/wazevo/backend/vdef.go b/vendor/github.com/tetratelabs/wazero/internal/engine/wazevo/backend/vdef.go index edfa962b5..47a275a3a 100644 --- a/vendor/github.com/tetratelabs/wazero/internal/engine/wazevo/backend/vdef.go +++ b/vendor/github.com/tetratelabs/wazero/internal/engine/wazevo/backend/vdef.go @@ -1,43 +1,19 @@ package backend import ( - "github.com/tetratelabs/wazero/internal/engine/wazevo/backend/regalloc" "github.com/tetratelabs/wazero/internal/engine/wazevo/ssa" ) // SSAValueDefinition represents a definition of an SSA value. type SSAValueDefinition struct { - // BlockParamValue is valid if Instr == nil - BlockParamValue ssa.Value - - // BlkParamVReg is valid if Instr == nil - BlkParamVReg regalloc.VReg - + V ssa.Value // Instr is not nil if this is a definition from an instruction. Instr *ssa.Instruction - // N is the index of the return value in the instr's return values list. - N int // RefCount is the number of references to the result. - RefCount int + RefCount uint32 } +// IsFromInstr returns true if this definition is from an instruction. func (d *SSAValueDefinition) IsFromInstr() bool { return d.Instr != nil } - -func (d *SSAValueDefinition) IsFromBlockParam() bool { - return d.Instr == nil -} - -func (d *SSAValueDefinition) SSAValue() ssa.Value { - if d.IsFromBlockParam() { - return d.BlockParamValue - } else { - r, rs := d.Instr.Returns() - if d.N == 0 { - return r - } else { - return rs[d.N-1] - } - } -} |