q/src/ssa/Parameter.go
Eduard Urbach 3301cf5542
All checks were successful
/ test (push) Successful in 15s
Improved ssa compiler
2025-07-02 16:55:24 +02:00

46 lines
No EOL
608 B
Go

package ssa
import (
"fmt"
"git.urbach.dev/cli/q/src/types"
)
type Parameter struct {
Index uint8
Name string
Typ types.Type
Id
Liveness
Source
}
func (v *Parameter) Dependencies() []Value {
return nil
}
func (a *Parameter) Equals(v Value) bool {
b, sameType := v.(*Parameter)
if !sameType {
return false
}
return a.Index == b.Index
}
func (v *Parameter) IsConst() bool {
return true
}
func (v *Parameter) Debug() string {
return v.String()
}
func (v *Parameter) String() string {
return fmt.Sprintf("in[%d]", v.Index)
}
func (v *Parameter) Type() types.Type {
return v.Typ
}