Class: Rubycc::IR::Generator::Local
- Inherits:
-
Data
- Object
- Data
- Rubycc::IR::Generator::Local
- Defined in:
- lib/rubycc/ir/generator.rb
Overview
A declared variable's binding and its declared Rubycc::Type. When
global is false it is a local: storage is a virtual-register number
for a scalar (int or pointer) and a stack object id for an array, which
one following from type.array?. When global is true it is a
file-scope variable and storage is its symbol name (a String), whose
address :global_addr materializes. const records whether the object is
top-level const-qualified, so a write to it (a plain assignment, a
compound assignment or "++"/"--") is diagnosed as writing a read-only
variable; reads and "&" are unaffected.
Instance Attribute Summary collapse
-
#const ⇒ Object
readonly
Returns the value of attribute const.
-
#global ⇒ Object
readonly
Returns the value of attribute global.
-
#storage ⇒ Object
readonly
Returns the value of attribute storage.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Attribute Details
#const ⇒ Object (readonly)
Returns the value of attribute const
27 28 29 |
# File 'lib/rubycc/ir/generator.rb', line 27 def const @const end |
#global ⇒ Object (readonly)
Returns the value of attribute global
27 28 29 |
# File 'lib/rubycc/ir/generator.rb', line 27 def global @global end |
#storage ⇒ Object (readonly)
Returns the value of attribute storage
27 28 29 |
# File 'lib/rubycc/ir/generator.rb', line 27 def storage @storage end |
#type ⇒ Object (readonly)
Returns the value of attribute type
27 28 29 |
# File 'lib/rubycc/ir/generator.rb', line 27 def type @type end |