Improved SSA and added unused value checks
All checks were successful
/ test (push) Successful in 17s
All checks were successful
/ test (push) Successful in 17s
This commit is contained in:
parent
cc2e98ca49
commit
2b703e9af2
25 changed files with 519 additions and 213 deletions
23
src/ssa/Arguments.go
Normal file
23
src/ssa/Arguments.go
Normal file
|
@ -0,0 +1,23 @@
|
|||
package ssa
|
||||
|
||||
type Arguments struct {
|
||||
Args []Value
|
||||
}
|
||||
|
||||
func (v *Arguments) Dependencies() []Value {
|
||||
return v.Args
|
||||
}
|
||||
|
||||
func (a Arguments) Equals(b Arguments) bool {
|
||||
if len(a.Args) != len(b.Args) {
|
||||
return false
|
||||
}
|
||||
|
||||
for i := range a.Args {
|
||||
if !a.Args[i].Equals(b.Args[i]) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue