Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Make Tree::Optimizer::Pass options to Tree::Optimizer.register work.

  • Loading branch information...
commit 231e92033cabce8a38054cf014696c40af20c17e 1 parent e36f8c9
authored August 06, 2010

Showing 1 changed file with 4 additions and 1 deletion. Show diff stats Hide diff stats

  1. 5  src/Tree/Optimizer.nqp
5  src/Tree/Optimizer.nqp
@@ -33,7 +33,10 @@ method find-pass ($name) {
33 33
 }
34 34
 
35 35
 method register ($transformation, *%adverbs) {
36  
-    my $pass := Tree::Optimizer::Pass.new($transformation, |%adverbs);
  36
+    my $pass := 
  37
+      ($transformation ~~ Tree::Optimizer::Pass
  38
+       ?? $transformation
  39
+       !! Tree::Optimizer::Pass.new($transformation, |%adverbs));
37 40
     %!passes{$pass.name} := $pass;
38 41
     for $pass.dependencies -> $dependency {
39 42
         self.add-dependency($pass.name, $dependency);

0 notes on commit 231e920

Please sign in to comment.
Something went wrong with that request. Please try again.