Simplified ssa package
All checks were successful
/ test (push) Successful in 15s

This commit is contained in:
Eduard Urbach 2025-07-03 22:54:30 +02:00
parent b77d876ebb
commit ca9595d1fb
Signed by: akyoto
GPG key ID: 49226B848C78F6C8
28 changed files with 179 additions and 649 deletions

View file

@ -1,16 +1,23 @@
package ssa
import (
"git.urbach.dev/cli/q/src/types"
)
import "git.urbach.dev/cli/q/src/types"
type Value interface {
Debug(bool) string
Dependencies() []Value
Equals(Value) bool
ID() int
IsConst() bool
SetID(int)
String() string
// Type returns the data type.
Type() types.Type
// Users returns all values that reference this value as an input.
Users() []Value
// Inputs returns all values that are needed for this value to be calculated.
Inputs() []Value
// Equals returns true if it's equal to the given value.
Equals(Value) bool
// IsConst returns true if the calculation of the value has no side effects.
IsConst() bool
// Strings returns a human-readable form of the value.
String() string
}