q/src/ssa/Value.go
Eduard Urbach ca9595d1fb
All checks were successful
/ test (push) Successful in 15s
Simplified ssa package
2025-07-03 22:54:30 +02:00

23 lines
No EOL
561 B
Go

package ssa
import "git.urbach.dev/cli/q/src/types"
type Value interface {
// 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
}