module AST::Processor::Mixin
def process(node)
This is the second most inefficient call in the compilation phase
processor.
operations and method existence check by caching them inside a
call to node.to_ast) and it tries to optimize away the string
This patch to #process removes a bit of dynamic abilities (removed
def process(node) return if node.nil? @_on_handler_cache ||= {} type = node.type on_handler = @_on_handler_cache[type] ||= begin handler = :"on_#{type}" handler = :handler_missing unless respond_to?(handler) handler end send(on_handler, node) || node end