1 /* |
1 /* |
2 * reserved comment block |
2 * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT REMOVE OR ALTER! |
3 * @LastModified: Oct 2017 |
4 */ |
4 */ |
5 /* |
5 /* |
6 * Licensed to the Apache Software Foundation (ASF) under one or more |
6 * Licensed to the Apache Software Foundation (ASF) under one or more |
7 * contributor license agreements. See the NOTICE file distributed with |
7 * contributor license agreements. See the NOTICE file distributed with |
8 * this work for additional information regarding copyright ownership. |
8 * this work for additional information regarding copyright ownership. |
19 * limitations under the License. |
19 * limitations under the License. |
20 */ |
20 */ |
21 |
21 |
22 package com.sun.org.apache.xalan.internal.xsltc.compiler; |
22 package com.sun.org.apache.xalan.internal.xsltc.compiler; |
23 |
23 |
24 import java.util.Vector; |
|
25 |
|
26 import com.sun.org.apache.bcel.internal.generic.ALOAD; |
|
27 import com.sun.org.apache.bcel.internal.generic.ASTORE; |
|
28 import com.sun.org.apache.bcel.internal.generic.BranchHandle; |
|
29 import com.sun.org.apache.bcel.internal.generic.ConstantPoolGen; |
24 import com.sun.org.apache.bcel.internal.generic.ConstantPoolGen; |
30 import com.sun.org.apache.bcel.internal.generic.GOTO; |
|
31 import com.sun.org.apache.bcel.internal.generic.IFGT; |
|
32 import com.sun.org.apache.bcel.internal.generic.INVOKEINTERFACE; |
|
33 import com.sun.org.apache.bcel.internal.generic.INVOKESPECIAL; |
|
34 import com.sun.org.apache.bcel.internal.generic.INVOKEVIRTUAL; |
25 import com.sun.org.apache.bcel.internal.generic.INVOKEVIRTUAL; |
35 import com.sun.org.apache.bcel.internal.generic.InstructionHandle; |
|
36 import com.sun.org.apache.bcel.internal.generic.InstructionList; |
26 import com.sun.org.apache.bcel.internal.generic.InstructionList; |
37 import com.sun.org.apache.bcel.internal.generic.LocalVariableGen; |
|
38 import com.sun.org.apache.bcel.internal.generic.NEW; |
|
39 import com.sun.org.apache.bcel.internal.generic.PUSH; |
27 import com.sun.org.apache.bcel.internal.generic.PUSH; |
40 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ClassGenerator; |
28 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ClassGenerator; |
41 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.MethodGenerator; |
29 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.MethodGenerator; |
42 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.StringType; |
30 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.StringType; |
43 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type; |
31 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type; |
44 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.TypeCheckError; |
32 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.TypeCheckError; |
45 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Util; |
33 import java.util.List; |
46 |
34 |
47 /** |
35 /** |
48 * @author Morten Jorgensen |
36 * @author Morten Jorgensen |
49 * @author Santiago Pericas-Geertsen |
37 * @author Santiago Pericas-Geertsen |
50 */ |
38 */ |
80 * "##id" for id() calls). |
68 * "##id" for id() calls). |
81 * |
69 * |
82 * @param fname The function name (should be 'key' or 'id') |
70 * @param fname The function name (should be 'key' or 'id') |
83 * @param arguments A vector containing the arguments the the function |
71 * @param arguments A vector containing the arguments the the function |
84 */ |
72 */ |
85 public KeyCall(QName fname, Vector arguments) { |
73 public KeyCall(QName fname, List<Expression> arguments) { |
86 super(fname, arguments); |
74 super(fname, arguments); |
87 switch(argumentCount()) { |
75 switch(argumentCount()) { |
88 case 1: |
76 case 1: |
89 _name = null; |
77 _name = null; |
90 _value = argument(0); |
78 _value = argument(0); |