Class: Rubycc::IR::Global
- Inherits:
-
Data
- Object
- Data
- Rubycc::IR::Global
- Defined in:
- lib/rubycc/ir/ir.rb
Overview
A file-scope variable as laid out by the compiler. name is its symbol
name, size its storage width in bytes and align its required
alignment (its type size for a scalar/pointer, its element size for an
array, its widest member's for a struct). init is either nil — a
zero-initialized global that lives in .bss — or a GlobalInit: the
size-byte little-endian image to place in .data together with the
relocations that patch pointer slots at link time. linkage is :external
for an ordinary file-scope variable (a global symbol) or :internal for a
static one — a file-scope static, or a block-scope static lowered to
a uniquely named file-scope object — emitted STB_LOCAL so it stays private
to this object.
Instance Attribute Summary collapse
-
#align ⇒ Object
readonly
Returns the value of attribute align.
-
#init ⇒ Object
readonly
Returns the value of attribute init.
-
#linkage ⇒ Object
readonly
Returns the value of attribute linkage.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#size ⇒ Object
readonly
Returns the value of attribute size.
Instance Attribute Details
#align ⇒ Object (readonly)
Returns the value of attribute align
365 366 367 |
# File 'lib/rubycc/ir/ir.rb', line 365 def align @align end |
#init ⇒ Object (readonly)
Returns the value of attribute init
365 366 367 |
# File 'lib/rubycc/ir/ir.rb', line 365 def init @init end |
#linkage ⇒ Object (readonly)
Returns the value of attribute linkage
365 366 367 |
# File 'lib/rubycc/ir/ir.rb', line 365 def linkage @linkage end |
#name ⇒ Object (readonly)
Returns the value of attribute name
365 366 367 |
# File 'lib/rubycc/ir/ir.rb', line 365 def name @name end |
#size ⇒ Object (readonly)
Returns the value of attribute size
365 366 367 |
# File 'lib/rubycc/ir/ir.rb', line 365 def size @size end |