Class: Rubinius::ToolSet.current::TS::AST::SendKernelMethod
- Inherits:
-
SendWithArguments
- Object
- Node
- Send
- SendWithArguments
- Rubinius::ToolSet.current::TS::AST::SendKernelMethod
- Defined in:
- lib/rubinius/ast/transforms.rb
Overview
Emits “safe” names for certain fundamental core library methods
Constant Summary collapse
- Methods =
{ :/ => :divide, :__slash__ => :/, :class => :__class__ }
- Arguments =
{ :/ => 1, :__slash__ => 1, :class => 0 }
Instance Attribute Summary
Attributes inherited from SendWithArguments
Attributes inherited from Send
#block, #name, #privately, #receiver, #variable, #vcall_style
Attributes inherited from Node
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from SendWithArguments
Methods inherited from Send
#arguments_sexp, #check_local_reference, #defined, #initialize, #receiver_sexp, #sexp_name, #to_sexp, #value_defined
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, #to_sexp, #transform, transform, transform_comment, transform_kind, transform_kind=, transform_name, #value_defined, #visit, #walk
Constructor Details
This class inherits a constructor from Rubinius::ToolSet.current::TS::AST::SendWithArguments
Class Method Details
.match?(line, receiver, name, arguments, privately) ⇒ Boolean
315 316 317 318 319 320 |
# File 'lib/rubinius/ast/transforms.rb', line 315 def self.match?(line, receiver, name, arguments, privately) return false unless rename = Methods[name] if match_arguments? arguments, Arguments[name] new line, receiver, rename, arguments, privately end end |
Instance Method Details
#bytecode(g) ⇒ Object
322 323 324 325 326 327 328 |
# File 'lib/rubinius/ast/transforms.rb', line 322 def bytecode(g) pos(g) @receiver.bytecode(g) @arguments.bytecode(g) g.send @name, @arguments.size, @privately end |