private void runCompilerPasses(List<CompilerPass> passes, IGVDumper dumper) { // All passes are disabled in scopes where BEGIN and END scopes might // screw around with escaped variables. Optimizing for them is not // worth the effort. It is simpler to just go fully safe in scopes // influenced by their presence. if (isUnsafeScope()) { passes = getManager().getSafePasses(this); } if (dumper != null) dumper.dump(getCFG(), "Start"); CompilerPassScheduler scheduler = IRManager.schedulePasses(passes); for (CompilerPass pass : scheduler) { pass.run(this); if (dumper != null) dumper.dump(getCFG(), pass.getShortLabel()); } if (RubyInstanceConfig.IR_UNBOXING) { CompilerPass pass = new UnboxingPass(); pass.run(this); if (dumper != null) dumper.dump(getCFG(), pass.getShortLabel()); } if (dumper != null) dumper.close(); }
private void runCompilerPasses(List<CompilerPass> passes, IGVDumper dumper) { // All passes are disabled in scopes where BEGIN and END scopes might // screw around with escaped variables. Optimizing for them is not // worth the effort. It is simpler to just go fully safe in scopes // influenced by their presence. if (isUnsafeScope()) { passes = getManager().getSafePasses(this); } if (dumper != null) dumper.dump(getCFG(), "Start"); CompilerPassScheduler scheduler = IRManager.schedulePasses(passes); for (CompilerPass pass : scheduler) { pass.run(this); if (dumper != null) dumper.dump(getCFG(), pass.getShortLabel()); } if (RubyInstanceConfig.IR_UNBOXING) { CompilerPass pass = new UnboxingPass(); pass.run(this); if (dumper != null) dumper.dump(getCFG(), pass.getShortLabel()); } if (dumper != null) dumper.close(); }