class Stacklang::Function::Variable

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.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(ast : AST | Nil, name : String, offset : Int32, constraint : Stacklang::Type::Any, initialization : Stacklang::AST::Expression | Nil, restricted : Bool = false) #

[View source]

Instance Method Detail

def ast : Stacklang::AST? #

[View source]
def constraint : Stacklang::Type::Any #

[View source]
def initialization : Stacklang::AST::Expression? #

[View source]
def initialized : Bool #

[View source]
def initialized=(initialized : Bool) #

[View source]
def name : String #

[View source]
def offset : Int32 #

[View source]
def register : Registers | Nil #

If the variable is currently held in a register. Work only on restricted variable (temporary var are restricted).


[View source]
def register=(register : Registers | Nil) #

If the variable is currently held in a register. Work only on restricted variable (temporary var are restricted).


[View source]
def restricted : Bool #

[View source]