Class: Rubinius::AST::Send
Direct Known Subclasses
AccessUndefined, BlockGiven, SendLoop, SendPrivately, SendWithArguments
Instance Attribute Summary collapse
-
#block ⇒ Object
Returns the value of attribute block.
-
#check_for_local ⇒ Object
Returns the value of attribute check_for_local.
-
#name ⇒ Object
Returns the value of attribute name.
-
#privately ⇒ Object
Returns the value of attribute privately.
-
#receiver ⇒ Object
Returns the value of attribute receiver.
-
#variable ⇒ Object
Returns the value of attribute variable.
Attributes inherited from Node
Instance Method Summary collapse
- #arguments_sexp ⇒ Object
- #check_local_reference(g) ⇒ Object
-
#initialize(line, receiver, name, privately = false, vcall_style = false) ⇒ Send
constructor
A new instance of Send.
- #receiver_sexp ⇒ Object
- #sexp_name ⇒ Object
- #to_sexp ⇒ Object
Methods inherited from Node
#ascii_graph, #attributes, #children, match_arguments?, match_send?, #new_block_generator, #new_generator, #node_name, node_name, #pos, #set_child, transform, #transform, transform_comment, transform_kind, transform_kind=, transform_name, #visit, #walk
Constructor Details
#initialize(line, receiver, name, privately = false, vcall_style = false) ⇒ Send
Returns a new instance of Send.
9 10 11 12 13 14 15 16 17 |
# File 'lib/compiler/ast/sends.rb', line 9 def initialize(line, receiver, name, privately=false, vcall_style=false) @line = line @receiver = receiver @name = name @privately = privately @block = nil @check_for_local = false @vcall_style = vcall_style end |
Instance Attribute Details
#block ⇒ Object
Returns the value of attribute block.
6 7 8 |
# File 'lib/compiler/ast/sends.rb', line 6 def block @block end |
#check_for_local ⇒ Object
Returns the value of attribute check_for_local.
7 8 9 |
# File 'lib/compiler/ast/sends.rb', line 7 def check_for_local @check_for_local end |
#name ⇒ Object
Returns the value of attribute name.
6 7 8 |
# File 'lib/compiler/ast/sends.rb', line 6 def name @name end |
#privately ⇒ Object
Returns the value of attribute privately.
6 7 8 |
# File 'lib/compiler/ast/sends.rb', line 6 def privately @privately end |
#receiver ⇒ Object
Returns the value of attribute receiver.
6 7 8 |
# File 'lib/compiler/ast/sends.rb', line 6 def receiver @receiver end |
#variable ⇒ Object
Returns the value of attribute variable.
6 7 8 |
# File 'lib/compiler/ast/sends.rb', line 6 def variable @variable end |
Instance Method Details
#arguments_sexp ⇒ Object
33 34 35 36 37 38 39 |
# File 'lib/compiler/ast/sends.rb', line 33 def arguments_sexp return nil if @vcall_style sexp = [:arglist] sexp << @block.to_sexp if @block.kind_of? BlockPass sexp end |
#check_local_reference(g) ⇒ Object
19 20 21 22 23 |
# File 'lib/compiler/ast/sends.rb', line 19 def check_local_reference(g) if @receiver.kind_of? Self and (@check_for_local or g.state.eval?) g.state.scope.search_local(@name) end end |
#receiver_sexp ⇒ Object
29 30 31 |
# File 'lib/compiler/ast/sends.rb', line 29 def receiver_sexp @privately ? nil : @receiver.to_sexp end |
#sexp_name ⇒ Object
25 26 27 |
# File 'lib/compiler/ast/sends.rb', line 25 def sexp_name :call end |