src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/BinOpExpr.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. |
81 final Type tright = _right.typeCheck(stable); |
81 final Type tright = _right.typeCheck(stable); |
82 final MethodType ptype = lookupPrimop(stable, Ops[_op], |
82 final MethodType ptype = lookupPrimop(stable, Ops[_op], |
83 new MethodType(Type.Void, |
83 new MethodType(Type.Void, |
84 tleft, tright)); |
84 tleft, tright)); |
85 if (ptype != null) { |
85 if (ptype != null) { |
86 final Type arg1 = (Type) ptype.argsType().elementAt(0); |
86 final Type arg1 = (Type) ptype.argsType().get(0); |
87 if (!arg1.identicalTo(tleft)) { |
87 if (!arg1.identicalTo(tleft)) { |
88 _left = new CastExpr(_left, arg1); |
88 _left = new CastExpr(_left, arg1); |
89 } |
89 } |
90 final Type arg2 = (Type) ptype.argsType().elementAt(1); |
90 final Type arg2 = (Type) ptype.argsType().get(1); |
91 if (!arg2.identicalTo(tright)) { |
91 if (!arg2.identicalTo(tright)) { |
92 _right = new CastExpr(_right, arg1); |
92 _right = new CastExpr(_right, arg1); |
93 } |
93 } |
94 return _type = ptype.resultType(); |
94 return _type = ptype.resultType(); |
95 } |
95 } |