Class: CodeTools::AST::SplatWrapped

Inherits:
SplatAssignment show all
Defined in:
lib/rubinius/ast/variables.rb

Instance Attribute Summary

Attributes inherited from SplatAssignment

#value

Attributes inherited from Node

#line

Instance Method Summary collapse

Methods inherited from SplatAssignment

#initialize

Methods inherited from Node

#ascii_graph, #attributes, #children, #defined, #initialize, 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

This class inherits a constructor from CodeTools::AST::SplatAssignment

Instance Method Details

#bytecode(g) ⇒ Object



384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
# File 'lib/rubinius/ast/variables.rb', line 384

def bytecode(g)
  pos(g)

  assign = g.new_label

  g.dup
  g.push_cpath_top
  g.find_const :Array
  g.swap
  g.kind_of
  g.git assign
  g.make_array 1

  assign.set!
  @value.bytecode(g)
end

#to_sexpObject



401
402
403
# File 'lib/rubinius/ast/variables.rb', line 401

def to_sexp
  @value.to_sexp
end