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
27
src/ssa/Syscall.go
Normal file
27
src/ssa/Syscall.go
Normal file
|
@ -0,0 +1,27 @@
|
|||
package ssa
|
||||
|
||||
import "fmt"
|
||||
|
||||
type Syscall struct {
|
||||
Arguments
|
||||
Liveness
|
||||
HasToken
|
||||
}
|
||||
|
||||
func (a *Syscall) Equals(v Value) bool {
|
||||
b, sameType := v.(*Syscall)
|
||||
|
||||
if !sameType {
|
||||
return false
|
||||
}
|
||||
|
||||
return a.Arguments.Equals(b.Arguments)
|
||||
}
|
||||
|
||||
func (v *Syscall) IsConst() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (v *Syscall) String() string {
|
||||
return fmt.Sprintf("syscall%v", v.Args)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue