Class: CodeTools::AST::PreExe
- Defined in:
- lib/rubinius/code/ast/sends.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#block ⇒ Object
Returns the value of attribute block.
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(line) ⇒ PreExe
constructor
A new instance of PreExe.
- #pre_bytecode(g) ⇒ Object
- #pre_sexp ⇒ Object
- #to_sexp ⇒ Object
Methods inherited from Node
#ascii_graph, #attributes, #bytecode, #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) ⇒ PreExe
Returns a new instance of PreExe.
332 333 334 |
# File 'lib/rubinius/code/ast/sends.rb', line 332 def initialize(line) @line = line end |
Instance Attribute Details
#block ⇒ Object
Returns the value of attribute block.
330 331 332 |
# File 'lib/rubinius/code/ast/sends.rb', line 330 def block @block end |
Instance Method Details
#pre_bytecode(g) ⇒ Object
336 337 338 339 340 341 342 343 344 345 346 347 348 349 |
# File 'lib/rubinius/code/ast/sends.rb', line 336 def pre_bytecode(g) pos(g) g.push_state ClosedScope.new(@line) g.state.push_name :BEGIN g.push_rubinius g.find_const :Runtime @block.bytecode(g) g.send_with_block :pre_exe, 0, false g.state.pop_name g.pop_state end |
#pre_sexp ⇒ Object
354 355 356 |
# File 'lib/rubinius/code/ast/sends.rb', line 354 def pre_sexp @block.to_sexp.insert 1, :pre_exe end |
#to_sexp ⇒ Object
351 352 |
# File 'lib/rubinius/code/ast/sends.rb', line 351 def to_sexp end |