Class: Rubex::AST::Expression::RubyMethodCall
- Inherits:
-
MethodCall
show all
- Defined in:
- lib/rubex/ast/expression/method_call/ruby_method_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
16
17
|
# File 'lib/rubex/ast/expression/method_call/ruby_method_call.rb', line 5
def analyse_types(local_scope)
@entry = local_scope.find(@method_name)
add_as_ruby_method_to_symtab(local_scope) unless @entry
super
@entry.times_called += 1
@arg_list.analyse_types local_scope
@type = Rubex::DataType::RubyObject.new
@arg_list.map! { |a| a.to_ruby_object }
@arg_list.allocate_temps local_scope
@arg_list.release_temps local_scope
prepare_arg_list(local_scope) if !@entry.extern? && !@arg_list.empty?
@has_temp = true
end
|
#c_code(local_scope) ⇒ Object
24
25
26
|
# File 'lib/rubex/ast/expression/method_call/ruby_method_call.rb', line 24
def c_code(local_scope)
@c_code
end
|
#generate_evaluation_code(code, local_scope) ⇒ Object
19
20
21
22
|
# File 'lib/rubex/ast/expression/method_call/ruby_method_call.rb', line 19
def generate_evaluation_code code, local_scope
super
code_for_ruby_method_call code, local_scope
end
|