Implemented an assembler
All checks were successful
/ test (push) Successful in 28s

This commit is contained in:
Eduard Urbach 2025-06-24 12:55:26 +02:00
parent 2b703e9af2
commit 70c2da4a4d
Signed by: akyoto
GPG key ID: 49226B848C78F6C8
40 changed files with 821 additions and 117 deletions

31
src/ssa/Parameter.go Normal file
View 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)
}