Class: Rubex::AST::Expression::ActualArgList

Inherits:
Base
  • Object
show all
Extended by:
Forwardable
Includes:
Enumerable
Defined in:
lib/rubex/ast/expression/actual_arg_list.rb

Instance Attribute Summary

Attributes inherited from Base

#entry, #type, #typecast

Instance Method Summary collapse

Methods inherited from Base

#allocate_temp, #allocate_temps, #c_code, #expression?, #from_ruby_object, #generate_and_dispose_subexprs, #generate_assignment_code, #has_temp, #possible_typecast, #release_temp, #release_temps, #to_ruby_object

Constructor Details

#initialize(args) ⇒ ActualArgList

Returns a new instance of ActualArgList.



18
19
20
21
# File 'lib/rubex/ast/expression/actual_arg_list.rb', line 18

def initialize args
  @args = args
  @subexprs = []
end

Instance Method Details

#analyse_for_target_type(arg_list, local_scope) ⇒ Object



30
31
32
33
34
35
# File 'lib/rubex/ast/expression/actual_arg_list.rb', line 30

def analyse_for_target_type(arg_list, local_scope)
  @args.each_with_index do |arg, i|
    arg.analyse_for_target_type arg_list[i].type, local_scope
    @subexprs << arg
  end
end

#analyse_types(local_scope) ⇒ Object



23
24
25
26
27
28
# File 'lib/rubex/ast/expression/actual_arg_list.rb', line 23

def analyse_types(local_scope)
  @args.each do |arg|
    arg.analyse_types local_scope
    @subexprs << arg
  end
end

#each(&block) ⇒ Object



10
11
12
# File 'lib/rubex/ast/expression/actual_arg_list.rb', line 10

def each(&block)
  @args.each(&block)
end

#generate_disposal_code(code) ⇒ Object



41
42
43
# File 'lib/rubex/ast/expression/actual_arg_list.rb', line 41

def generate_disposal_code(code)
  @args.each { |a| a.generate_disposal_code(code) }
end

#generate_evaluation_code(code, local_scope) ⇒ Object



37
38
39
# File 'lib/rubex/ast/expression/actual_arg_list.rb', line 37

def generate_evaluation_code(code, local_scope)
  @args.each { |a| a.generate_evaluation_code(code, local_scope) }
end

#map!(&block) ⇒ Object



14
15
16
# File 'lib/rubex/ast/expression/actual_arg_list.rb', line 14

def map!(&block)
  @args.map!(&block)
end