Class: RLTK::CG::ConstantNumber Abstract

Inherits:
Constant show all
Includes:
Filigree::AbstractClass
Defined in:
lib/rltk/cg/value.rb

Overview

This class is abstract.

All number constants inherit from this class.

Direct Known Subclasses

ConstantInteger, ConstantReal

Instance Attribute Summary

Attributes included from BindingClass

#ptr

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Constant

#addr_space_cast, #bitcast_to, #get_element_ptr, #get_element_ptr_in_bounds, #initialize

Methods inherited from User

#operands

Methods inherited from Value

#==, #attributes, #bitcast, #constant?, #dump, #hash, #initialize, #name, #name=, #null?, #print, #trunc, #trunc_or_bitcast, #undefined?, #zextend, #zextend_or_bitcast

Methods included from BindingClass

#==

Constructor Details

This class inherits a constructor from RLTK::CG::Constant

Class Method Details

.typeType

Returns The corresponding Type sub-class that is used to represent the type of this value.

Returns:

  • (Type)

    The corresponding Type sub-class that is used to represent the type of this value.



537
538
539
# File 'lib/rltk/cg/value.rb', line 537

def self.type
	@type ||= RLTK::CG.const_get(self.short_name + 'Type').instance
end

Instance Method Details

#typeType

Returns The corresponding Type sub-class that is used to represent the type of this value.

Returns:

  • (Type)

    The corresponding Type sub-class that is used to represent the type of this value.



542
543
544
# File 'lib/rltk/cg/value.rb', line 542

def type
	self.class.type
end