This commit is contained in:
parent
2b703e9af2
commit
70c2da4a4d
40 changed files with 821 additions and 117 deletions
31
src/ssa/Parameter.go
Normal file
31
src/ssa/Parameter.go
Normal file
|
@ -0,0 +1,31 @@
|
|||
package ssa
|
||||
|
||||
import "fmt"
|
||||
|
||||
type Parameter struct {
|
||||
Index uint8
|
||||
Liveness
|
||||
HasToken
|
||||
}
|
||||
|
||||
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) String() string {
|
||||
return fmt.Sprintf("arg[%d]", v.Index)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue