Class: RLTK::CG::CallInst

Inherits:
Instruction show all
Defined in:
lib/rltk/cg/instruction.rb

Overview

An Instruction representing a function call.

Constant Summary

Constants inherited from Instruction

Instruction::TESTABLE

Instance Attribute Summary

Attributes included from BindingClass

#ptr

Instance Method Summary collapse

Methods inherited from Instruction

from_ptr, #initialize, #next, #parent, #previous

Methods inherited from User

#operands

Methods inherited from Value

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

Methods included from BindingClass

#==

Constructor Details

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

Instance Method Details

#calling_conventionSymbol

Get the calling convention used for this call.

Returns:

  • (Symbol)

See Also:



132
133
134
# File 'lib/rltk/cg/instruction.rb', line 132

def calling_convention
	Bindings.enum_type(:call_conv)[Bindings.get_instruction_call_conv(@ptr)]
end

#calling_convention=(conv) ⇒ Object

Set the calling convention used for this call.

Parameters:

  • conv (Symbol)

    Calling convention to set.

See Also:



141
142
143
144
145
# File 'lib/rltk/cg/instruction.rb', line 141

def calling_convention=(conv)
	Bindings.set_instruction_call_conv(@ptr, Bindings.enum_type(:call_conv)[conv])
	
	conv
end

#tail_call=(bool) ⇒ void

This method returns an undefined value.

Sets the *tail call* property for this call instruction.

Parameters:

  • bool (Boolean)

    If this is a tail call or not



157
158
159
# File 'lib/rltk/cg/instruction.rb', line 157

def tail_call=(bool)
	Bindings.set_tail_call(@ptr, bool.to_i)
end

#tail_call?Boolean

Returns:

  • (Boolean)


148
149
150
# File 'lib/rltk/cg/instruction.rb', line 148

def tail_call?
	Bindings.is_tail_call(@ptr).to_bool
end