1 4 package gnu.kawa.xml; 5 import gnu.bytecode.*; 6 import gnu.mapping.*; 7 import gnu.expr.*; 8 import gnu.kawa.functions.AppendValues; 9 10 13 14 public class UnionNodes extends Procedure2 implements Inlineable 15 { 16 public static final UnionNodes unionNodes = new UnionNodes(); 17 18 public Object apply2 (Object vals1, Object vals2) 19 { 20 SortedNodes nodes = new SortedNodes(); 21 Values.writeValues(vals1, nodes); 22 Values.writeValues(vals2, nodes); 23 return nodes; 24 } 25 26 public void compile (ApplyExp exp, Compilation comp, Target target) 27 { 28 exp = new ApplyExp(AppendValues.appendValues, exp.getArgs()); 29 ConsumerTarget.compileUsingConsumer(exp, comp, target, 30 SortNodes.makeSortedNodesMethod, null); 31 } 32 33 public Type getReturnType (Expression[] args) 34 { 35 return Compilation.typeObject; 36 } 37 38 } 39 | Popular Tags |