Class: Seafoam::Passes::GraalPass
- Inherits:
-
Seafoam::Pass
- Object
- Seafoam::Pass
- Seafoam::Passes::GraalPass
- Defined in:
- lib/seafoam/passes/graal.rb
Overview
The Graal pass applies if it looks like it was compiled by Graal or Truffle.
Constant Summary
Constants inherited from Seafoam::Pass
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Seafoam::Pass
#applies?, inherited, #initialize
Constructor Details
This class inherits a constructor from Seafoam::Pass
Class Method Details
.applies?(graph) ⇒ Boolean
9 10 11 12 13 |
# File 'lib/seafoam/passes/graal.rb', line 9 def applies?(graph) graph.props.values.any? do |v| TRIGGERS.any? { |t| v.to_s.include?(t) } end end |
Instance Method Details
#apply(graph) ⇒ Object
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/seafoam/passes/graal.rb', line 16 def apply(graph) apply_nodes(graph) apply_edges(graph) hide_frame_state(graph) if @options[:hide_frame_state] hide_pi(graph) if @options[:hide_pi] hide_begin_end(graph) if @options[:hide_begin_end] hide_floating(graph) if @options[:hide_floating] reduce_edges(graph) if @options[:reduce_edges] hide_unused_nodes(graph) end |