1 package polyglot.frontend; 2 3 import polyglot.ast.*; 4 import polyglot.util.InternalCompilerError; 5 6 10 public class SpawnPass extends AbstractPass { 11 Job job; 12 Pass.ID begin; 13 Pass.ID end; 14 15 public SpawnPass(Pass.ID id, Job job, Pass.ID begin, Pass.ID end) { 16 super(id); 17 this.job = job; 18 this.begin = begin; 19 this.end = end; 20 } 21 22 public boolean run() { 23 if (job.ast() == null) { 24 throw new InternalCompilerError("Null AST."); 25 } 26 27 Job j = job.spawn(job.context(), job.ast(), begin, end); 28 return j.status(); 29 } 30 } 31 | Popular Tags |