nitc :: Variable :: _assignment_blocks
The blocks in which this variable is assignednitc :: Variable :: _declared_type
The declared type of the variablenitc :: Variable :: _dep_exprs
The expressions of AST of this variable dependsnitc :: Variable :: _original_variable
The original Variable in case of renamingnitc :: Variable :: _parameter
If true, this variable is a parameter of a methodnitc :: Variable :: _read_blocks
Part of the program where this variable is readnitc :: Variable :: _warn_unread
Is the local variable not read and need a warning?nitc :: Variable :: assignment_blocks
The blocks in which this variable is assignednitc :: Variable :: assignment_blocks=
The blocks in which this variable is assignednitc :: Variable :: declared_type
The declared type of the variablenitc :: Variable :: declared_type=
The declared type of the variablenitc :: Variable :: defaultinit
nitc :: Variable :: dep_exprs=
The expressions of AST of this variable dependsnitc :: Variable :: is_adapted=
Was the variable type-adapted?nitc :: Variable :: original_variable
The original Variable in case of renamingnitc :: Variable :: original_variable=
The original Variable in case of renamingnitc :: Variable :: parameter=
If true, this variable is a parameter of a methodnitc :: Variable :: read_blocks
Part of the program where this variable is readnitc :: Variable :: read_blocks=
Part of the program where this variable is readnitc :: Variable :: warn_unread
Is the local variable not read and need a warning?nitc :: Variable :: warn_unread=
Is the local variable not read and need a warning?nitc :: Variable :: _assignment_blocks
The blocks in which this variable is assignednitc :: Variable :: _declared_type
The declared type of the variablenitc :: Variable :: _dep_exprs
The expressions of AST of this variable dependsnitc :: Variable :: _original_variable
The original Variable in case of renamingnitc :: Variable :: _parameter
If true, this variable is a parameter of a methodnitc :: Variable :: _read_blocks
Part of the program where this variable is readnitc :: Variable :: _warn_unread
Is the local variable not read and need a warning?nitc :: Variable :: assignment_blocks
The blocks in which this variable is assignednitc :: Variable :: assignment_blocks=
The blocks in which this variable is assignedcore :: Object :: class_factory
Implementation used byget_class
to create the specific class.
nitc :: Variable :: declared_type
The declared type of the variablenitc :: Variable :: declared_type=
The declared type of the variablenitc :: Variable :: defaultinit
nitc :: HInfoBoxable :: defaultinit
core :: Object :: defaultinit
nitc :: Variable :: dep_exprs=
The expressions of AST of this variable dependsnitc :: HInfoBoxable :: infobox
An new infobox documenting the entitynitc :: Variable :: is_adapted=
Was the variable type-adapted?core :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
core :: Object :: native_class_name
The class name of the object in CString format.nitc :: Variable :: original_variable
The original Variable in case of renamingnitc :: Variable :: original_variable=
The original Variable in case of renamingcore :: Object :: output_class_name
Display class name on stdout (debug only).nitc :: Variable :: parameter=
If true, this variable is a parameter of a methodnitc :: Variable :: read_blocks
Part of the program where this variable is readnitc :: Variable :: read_blocks=
Part of the program where this variable is readnitc :: Variable :: warn_unread
Is the local variable not read and need a warning?nitc :: Variable :: warn_unread=
Is the local variable not read and need a warning?
# A local variable (including parameters, automatic variables and self)
class Variable
# The name of the variable (as used in the program)
var name: String is writable
# Alias of `name`
redef fun to_s do return self.name
# The declaration of the variable, if any
var location: nullable Location = null is writable
# Is the local variable not read and need a warning?
var warn_unread = false is writable
end
src/semantize/scope.nit:34,1--47,3
redef class Variable
# The declared type of the variable
var declared_type: nullable MType = null is writable
# Was the variable type-adapted?
# This is used to speedup type retrieval while it remains `false`
private var is_adapted = false
end
src/semantize/typing.nit:827,1--834,3
redef class Variable
# The expressions of AST of this variable depends
var dep_exprs = new Array[AExpr]
# The blocks in which this variable is assigned
var assignment_blocks: Array[BasicBlock] = new Array[BasicBlock] is lazy
# Part of the program where this variable is read
var read_blocks: Array[BasicBlock] = new Array[BasicBlock] is lazy
# The stack of this variable, used for SSA renaming
var stack = new Array[Variable] is lazy
# The original Variable in case of renaming
var original_variable: nullable Variable = self
# If true, this variable is a parameter of a method
var parameter: Bool = false
end
src/ssa.nit:139,1--157,3
redef class Variable
super HInfoBoxable
redef fun infobox(v)
do
var declared_type = self.declared_type
if declared_type == null then
var res = new HInfoBox(v, "{name}")
res.new_field("local var").append("{name}")
return res
end
var res = new HInfoBox(v, "{name}: {declared_type}")
res.new_field("local var").append("{name}:").add(declared_type.linkto(v))
return res
end
end
src/htmlight.nit:705,1--719,3