src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/RelationalExpr.java
equal
deleted
inserted
replaced
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. |
181 // Lookup the table of primops to find the best match |
181 // Lookup the table of primops to find the best match |
182 MethodType ptype = lookupPrimop(stable, Operators.getOpNames(_op), |
182 MethodType ptype = lookupPrimop(stable, Operators.getOpNames(_op), |
183 new MethodType(Type.Void, tleft, tright)); |
183 new MethodType(Type.Void, tleft, tright)); |
184 |
184 |
185 if (ptype != null) { |
185 if (ptype != null) { |
186 Type arg1 = (Type) ptype.argsType().elementAt(0); |
186 Type arg1 = ptype.argsType().get(0); |
187 if (!arg1.identicalTo(tleft)) { |
187 if (!arg1.identicalTo(tleft)) { |
188 _left = new CastExpr(_left, arg1); |
188 _left = new CastExpr(_left, arg1); |
189 } |
189 } |
190 Type arg2 = (Type) ptype.argsType().elementAt(1); |
190 Type arg2 = ptype.argsType().get(1); |
191 if (!arg2.identicalTo(tright)) { |
191 if (!arg2.identicalTo(tright)) { |
192 _right = new CastExpr(_right, arg1); |
192 _right = new CastExpr(_right, arg1); |
193 } |
193 } |
194 return _type = ptype.resultType(); |
194 return _type = ptype.resultType(); |
195 } |
195 } |