Class: RLTK::CG::ConstantNumber Abstract

Inherits:
Constant show all
Includes:
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 included from AbstractClass

included

Methods inherited from Constant

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



530
531
532
# File 'lib/rltk/cg/value.rb', line 530

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.



535
536
537
# File 'lib/rltk/cg/value.rb', line 535

def type
	self.class.type
end