src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/LogicalExpr.java
changeset 47359 e1a6c0168741
parent 47216 71c04702a3d5
child 47712 bde0215f1f70
equal deleted inserted replaced
47358:d07d5f7cab35 47359:e1a6c0168741
     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.
   135         MethodType haveType = lookupPrimop(stable, Ops[_op], wantType);
   135         MethodType haveType = lookupPrimop(stable, Ops[_op], wantType);
   136 
   136 
   137         // Yes, the operation is supported
   137         // Yes, the operation is supported
   138         if (haveType != null) {
   138         if (haveType != null) {
   139             // Check if left-hand side operand must be type casted
   139             // Check if left-hand side operand must be type casted
   140             Type arg1 = (Type)haveType.argsType().elementAt(0);
   140             Type arg1 = (Type)haveType.argsType().get(0);
   141             if (!arg1.identicalTo(tleft))
   141             if (!arg1.identicalTo(tleft))
   142                 _left = new CastExpr(_left, arg1);
   142                 _left = new CastExpr(_left, arg1);
   143             // Check if right-hand side operand must be type casted
   143             // Check if right-hand side operand must be type casted
   144             Type arg2 = (Type) haveType.argsType().elementAt(1);
   144             Type arg2 = (Type) haveType.argsType().get(1);
   145             if (!arg2.identicalTo(tright))
   145             if (!arg2.identicalTo(tright))
   146                 _right = new CastExpr(_right, arg1);
   146                 _right = new CastExpr(_right, arg1);
   147             // Return the result type for the operator we will use
   147             // Return the result type for the operator we will use
   148             return _type = haveType.resultType();
   148             return _type = haveType.resultType();
   149         }
   149         }