Class: CodeTools::AST::PushArgs
- Inherits:
-
Node
- Object
- Node
- CodeTools::AST::PushArgs
show all
- Defined in:
- lib/rubinius/code/ast/values.rb
Instance Attribute Summary collapse
Attributes inherited from Node
#line
Instance Method Summary
collapse
Methods inherited from Node
#ascii_graph, #attributes, #children, #defined, match_arguments?, match_send?, #new_block_generator, #new_generator, #node_name, #or_bytecode, #pos, #set_child, #transform, transform, transform_comment, transform_kind, transform_kind=, transform_name, #value_defined, #visit, #walk
Constructor Details
#initialize(line, arguments, value) ⇒ PushArgs
205
206
207
208
209
|
# File 'lib/rubinius/code/ast/values.rb', line 205
def initialize(line, arguments, value)
@line = line
@arguments = arguments
@value = value
end
|
Instance Attribute Details
#arguments ⇒ Object
Returns the value of attribute arguments.
203
204
205
|
# File 'lib/rubinius/code/ast/values.rb', line 203
def arguments
@arguments
end
|
#value ⇒ Object
Returns the value of attribute value.
203
204
205
|
# File 'lib/rubinius/code/ast/values.rb', line 203
def value
@value
end
|
Instance Method Details
#bytecode(g) ⇒ Object
211
212
213
214
215
216
|
# File 'lib/rubinius/code/ast/values.rb', line 211
def bytecode(g)
@arguments.bytecode(g)
@value.bytecode(g)
g.make_array 1
g.send :+, 1
end
|
#size ⇒ Object
222
223
224
|
# File 'lib/rubinius/code/ast/values.rb', line 222
def size
1
end
|
#splat? ⇒ Boolean
226
227
228
|
# File 'lib/rubinius/code/ast/values.rb', line 226
def splat?
@arguments.splat?
end
|
#to_sexp ⇒ Object
218
219
220
|
# File 'lib/rubinius/code/ast/values.rb', line 218
def to_sexp
[:argspush, @arguments.to_sexp, @value.to_sexp]
end
|