class Stacklang::Function::Variable
- Stacklang::Function::Variable
- Reference
- Object
Overview
Represent a variable on stack with a register cache. Or a temporary value in a stack cache. Note: variables are not implicitely zero-initialized.
Defined in:
stacklang/compiler/function/function.crConstructors
Instance Method Summary
- #ast : Stacklang::AST?
- #constraint : Stacklang::Type::Any
- #initialization : Stacklang::AST::Expression?
- #initialized : Bool
- #initialized=(initialized : Bool)
- #name : String
- #offset : Int32
-
#register : Registers | Nil
If the variable is currently held in a register.
-
#register=(register : Registers | Nil)
If the variable is currently held in a register.
- #restricted : Bool
Constructor Detail
def self.new(ast : AST | Nil, name : String, offset : Int32, constraint : Stacklang::Type::Any, initialization : Stacklang::AST::Expression | Nil, restricted : Bool = false)
#
Instance Method Detail
If the variable is currently held in a register. Work only on restricted variable (temporary var are restricted).
If the variable is currently held in a register. Work only on restricted variable (temporary var are restricted).