Class: Rubex::AST::Expression::CFunctionCall
- Inherits:
-
MethodCall
show all
- Defined in:
- lib/rubex/ast/expression/method_call/c_function_call.rb
Instance Attribute Summary
Attributes inherited from Base
#entry, #type, #typecast
Instance Method Summary
collapse
Methods inherited from MethodCall
#initialize
Methods inherited from Base
#allocate_temp, #allocate_temps, #analyse_for_target_type, #expression?, #from_ruby_object, #generate_and_dispose_subexprs, #generate_assignment_code, #generate_disposal_code, #has_temp, #possible_typecast, #release_temp, #release_temps, #to_ruby_object
Instance Method Details
#analyse_types(local_scope) ⇒ Object
5
6
7
8
9
10
11
12
13
14
15
|
# File 'lib/rubex/ast/expression/method_call/c_function_call.rb', line 5
def analyse_types(local_scope)
@entry = local_scope.find(@method_name)
super
append_self_argument if !@entry.extern? && !@entry.no_gil
@type = @entry.type.base_type
@arg_list.analyse_for_target_type @type.arg_list, local_scope
@arg_list.allocate_temps local_scope
@arg_list.release_temps local_scope
type_check_arg_types @entry
end
|
#c_code(local_scope) ⇒ Object
22
23
24
|
# File 'lib/rubex/ast/expression/method_call/c_function_call.rb', line 22
def c_code(local_scope)
@c_code
end
|
#generate_evaluation_code(code, local_scope) ⇒ Object
17
18
19
20
|
# File 'lib/rubex/ast/expression/method_call/c_function_call.rb', line 17
def generate_evaluation_code code, local_scope
super
@c_code = code_for_c_method_call local_scope
end
|