Class: RCGTK::Contractor

Inherits:
Builder show all
Includes:
Filigree::Visitor
Defined in:
lib/rcgtk/contractor.rb

Constant Summary

Constants inherited from Builder

Builder::CLASS_FINALIZER

Instance Attribute Summary

Attributes included from BindingClass

#ptr

Instance Method Summary collapse

Methods inherited from Builder

#add, #addr_space_cast, #alloca, #and, #array_alloca, #array_malloc, #ashr, #atomic_rmw, #bitcast, #branch, #build, #build_inst, #call, #cond_branch, #current_block, #exact_sdiv, #extract_element, #extract_value, #fadd, #fdiv, #fence, #floating_point_cast, #floating_point_extend, #floating_point_to_signed_int, #floating_point_to_unsigned_int, #floating_point_truncate, #fmul, #fneg, #fp_comparison, #free, #frem, #fsub, #get_element_ptr, #get_element_ptr_in_bounds, #gloabl_string_pointer, global, #global_string, #initialize, #insert_element, #insert_value, #int_comparison, #int_to_ptr, #integer_cast, #invoke, #is_not_null, #is_null, #load, #lshr, #malloc, #mul, #neg, #not, #nsw_add, #nsw_mul, #nsw_neg, #nsw_sub, #nuw_add, #nuw_mul, #nuw_neg, #nuw_sub, #or, #phi, #position, #position_at_end, #position_before, #ptr_cast, #ptr_diff, #ptr_to_int, #ret, #ret_aggregate, #ret_void, #sdiv, #select, #shift, #shift_left, #shift_right, #shuffle_vector, #sign_extend, #sign_extend_or_bitcast, #signed_int_to_floating_point, #srem, #store, #struct_get_element_ptr, #sub, #switch, #truncate, #truncate_or_bitcast, #udiv, #unreachable, #unsigned_int_to_floating_point, #urem, #xor, #zero_extend, #zero_extend_or_bitcast

Methods included from BindingClass

#==

Constructor Details

This class inherits a constructor from RCGTK::Builder

Instance Method Details

#visit(object, at: nil, rcb: false) ⇒ Object

Visit an object in the context of this builder. See the Filigree::Visitor’s visit method for more details about the basic behaviour of this method. The special options for this method are:

Parameters:

  • object (Object)

    The object to visit.

  • at (BasicBlock) (defaults to: nil)

    Where to position the contractor before visiting the object.

  • rcb (Boolean) (defaults to: false)

    If specified the method will also return the block where the contractor is currently positioned.

Returns:

  • (Object)


43
44
45
46
47
48
49
# File 'lib/rcgtk/contractor.rb', line 43

def visit(object, at: nil, rcb: false)
	target at if at

	result = wrapped_visit(object)

	if rcb then [result, current_block] else result end
end

#wrapped_visitObject

Alias out the RLTK::Visitor.visit method.



32
# File 'lib/rcgtk/contractor.rb', line 32

alias :wrapped_visit :visit