com.sun.org.apache.xalan.internal.xsltc.compiler.util.NodeType Java Examples

The following examples show how to use com.sun.org.apache.xalan.internal.xsltc.compiler.util.NodeType. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CastExpr.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Type checking a cast expression amounts to verifying that the
 * type conversion is legal. Cast expressions are created during
 * type checking, but typeCheck() is usually not called on them.
 * As a result, this method is called from the constructor.
 */
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
    Type tleft = _left.getType();
    if (tleft == null) {
        tleft = _left.typeCheck(stable);
    }
    if (tleft instanceof NodeType) {
        tleft = Type.Node;  // multiple instances
    }
    else if (tleft instanceof ResultTreeType) {
        tleft = Type.ResultTree; // multiple instances
    }
    if (InternalTypeMap.maps(tleft, _type) != null) {
        return _type;
    }
    // throw new TypeCheckError(this);
    throw new TypeCheckError(new ErrorMsg(
        ErrorMsg.DATA_CONVERSION_ERR, tleft.toString(), _type.toString()));
}
 
Example #2
Source File: CastExpr.java    From JDKSourceCode1.8 with MIT License 6 votes vote down vote up
/**
 * Type checking a cast expression amounts to verifying that the
 * type conversion is legal. Cast expressions are created during
 * type checking, but typeCheck() is usually not called on them.
 * As a result, this method is called from the constructor.
 */
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
    Type tleft = _left.getType();
    if (tleft == null) {
        tleft = _left.typeCheck(stable);
    }
    if (tleft instanceof NodeType) {
        tleft = Type.Node;  // multiple instances
    }
    else if (tleft instanceof ResultTreeType) {
        tleft = Type.ResultTree; // multiple instances
    }
    if (InternalTypeMap.maps(tleft, _type) != null) {
        return _type;
    }
    // throw new TypeCheckError(this);
    throw new TypeCheckError(new ErrorMsg(
        ErrorMsg.DATA_CONVERSION_ERR, tleft.toString(), _type.toString()));
}
 
Example #3
Source File: ApplyTemplates.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
    if (_select != null) {
        _type = _select.typeCheck(stable);
        if (_type instanceof NodeType || _type instanceof ReferenceType) {
            _select = new CastExpr(_select, Type.NodeSet);
            _type = Type.NodeSet;
        }
        if (_type instanceof NodeSetType||_type instanceof ResultTreeType) {
            typeCheckContents(stable); // with-params
            return Type.Void;
        }
        throw new TypeCheckError(this);
    }
    else {
        typeCheckContents(stable);          // with-params
        return Type.Void;
    }
}
 
Example #4
Source File: CastExpr.java    From Bytecoder with Apache License 2.0 6 votes vote down vote up
/**
 * Type checking a cast expression amounts to verifying that the
 * type conversion is legal. Cast expressions are created during
 * type checking, but typeCheck() is usually not called on them.
 * As a result, this method is called from the constructor.
 */
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
    Type tleft = _left.getType();
    if (tleft == null) {
        tleft = _left.typeCheck(stable);
    }
    if (tleft instanceof NodeType) {
        tleft = Type.Node;  // multiple instances
    }
    else if (tleft instanceof ResultTreeType) {
        tleft = Type.ResultTree; // multiple instances
    }
    if (InternalTypeMap.maps(tleft, _type) != null) {
        return _type;
    }
    // throw new TypeCheckError(this);
    throw new TypeCheckError(new ErrorMsg(
        ErrorMsg.DATA_CONVERSION_ERR, tleft.toString(), _type.toString()));
}
 
Example #5
Source File: ApplyTemplates.java    From jdk1.8-source-analysis with Apache License 2.0 6 votes vote down vote up
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
    if (_select != null) {
        _type = _select.typeCheck(stable);
        if (_type instanceof NodeType || _type instanceof ReferenceType) {
            _select = new CastExpr(_select, Type.NodeSet);
            _type = Type.NodeSet;
        }
        if (_type instanceof NodeSetType||_type instanceof ResultTreeType) {
            typeCheckContents(stable); // with-params
            return Type.Void;
        }
        throw new TypeCheckError(this);
    }
    else {
        typeCheckContents(stable);          // with-params
        return Type.Void;
    }
}
 
Example #6
Source File: CastExpr.java    From jdk1.8-source-analysis with Apache License 2.0 6 votes vote down vote up
/**
 * Type checking a cast expression amounts to verifying that the
 * type conversion is legal. Cast expressions are created during
 * type checking, but typeCheck() is usually not called on them.
 * As a result, this method is called from the constructor.
 */
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
    Type tleft = _left.getType();
    if (tleft == null) {
        tleft = _left.typeCheck(stable);
    }
    if (tleft instanceof NodeType) {
        tleft = Type.Node;  // multiple instances
    }
    else if (tleft instanceof ResultTreeType) {
        tleft = Type.ResultTree; // multiple instances
    }
    if (InternalTypeMap.maps(tleft, _type) != null) {
        return _type;
    }
    // throw new TypeCheckError(this);
    throw new TypeCheckError(new ErrorMsg(
        ErrorMsg.DATA_CONVERSION_ERR, tleft.toString(), _type.toString()));
}
 
Example #7
Source File: ApplyTemplates.java    From Bytecoder with Apache License 2.0 6 votes vote down vote up
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
    if (_select != null) {
        _type = _select.typeCheck(stable);
        if (_type instanceof NodeType || _type instanceof ReferenceType) {
            _select = new CastExpr(_select, Type.NodeSet);
            _type = Type.NodeSet;
        }
        if (_type instanceof NodeSetType||_type instanceof ResultTreeType) {
            typeCheckContents(stable); // with-params
            return Type.Void;
        }
        throw new TypeCheckError(this);
    }
    else {
        typeCheckContents(stable);          // with-params
        return Type.Void;
    }
}
 
Example #8
Source File: CastExpr.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Type checking a cast expression amounts to verifying that the
 * type conversion is legal. Cast expressions are created during
 * type checking, but typeCheck() is usually not called on them.
 * As a result, this method is called from the constructor.
 */
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
    Type tleft = _left.getType();
    if (tleft == null) {
        tleft = _left.typeCheck(stable);
    }
    if (tleft instanceof NodeType) {
        tleft = Type.Node;  // multiple instances
    }
    else if (tleft instanceof ResultTreeType) {
        tleft = Type.ResultTree; // multiple instances
    }
    if (InternalTypeMap.maps(tleft, _type) != null) {
        return _type;
    }
    // throw new TypeCheckError(this);
    throw new TypeCheckError(new ErrorMsg(
        ErrorMsg.DATA_CONVERSION_ERR, tleft.toString(), _type.toString()));
}
 
Example #9
Source File: ApplyTemplates.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
    if (_select != null) {
        _type = _select.typeCheck(stable);
        if (_type instanceof NodeType || _type instanceof ReferenceType) {
            _select = new CastExpr(_select, Type.NodeSet);
            _type = Type.NodeSet;
        }
        if (_type instanceof NodeSetType||_type instanceof ResultTreeType) {
            typeCheckContents(stable); // with-params
            return Type.Void;
        }
        throw new TypeCheckError(this);
    }
    else {
        typeCheckContents(stable);          // with-params
        return Type.Void;
    }
}
 
Example #10
Source File: ApplyTemplates.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
    if (_select != null) {
        _type = _select.typeCheck(stable);
        if (_type instanceof NodeType || _type instanceof ReferenceType) {
            _select = new CastExpr(_select, Type.NodeSet);
            _type = Type.NodeSet;
        }
        if (_type instanceof NodeSetType||_type instanceof ResultTreeType) {
            typeCheckContents(stable); // with-params
            return Type.Void;
        }
        throw new TypeCheckError(this);
    }
    else {
        typeCheckContents(stable);          // with-params
        return Type.Void;
    }
}
 
Example #11
Source File: CastExpr.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Type checking a cast expression amounts to verifying that the
 * type conversion is legal. Cast expressions are created during
 * type checking, but typeCheck() is usually not called on them.
 * As a result, this method is called from the constructor.
 */
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
    Type tleft = _left.getType();
    if (tleft == null) {
        tleft = _left.typeCheck(stable);
    }
    if (tleft instanceof NodeType) {
        tleft = Type.Node;  // multiple instances
    }
    else if (tleft instanceof ResultTreeType) {
        tleft = Type.ResultTree; // multiple instances
    }
    if (InternalTypeMap.maps(tleft, _type) != null) {
        return _type;
    }
    // throw new TypeCheckError(this);
    throw new TypeCheckError(new ErrorMsg(
        ErrorMsg.DATA_CONVERSION_ERR, tleft.toString(), _type.toString()));
}
 
Example #12
Source File: CastExpr.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Type checking a cast expression amounts to verifying that the
 * type conversion is legal. Cast expressions are created during
 * type checking, but typeCheck() is usually not called on them.
 * As a result, this method is called from the constructor.
 */
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
    Type tleft = _left.getType();
    if (tleft == null) {
        tleft = _left.typeCheck(stable);
    }
    if (tleft instanceof NodeType) {
        tleft = Type.Node;  // multiple instances
    }
    else if (tleft instanceof ResultTreeType) {
        tleft = Type.ResultTree; // multiple instances
    }
    if (InternalTypeMap.maps(tleft, _type) != null) {
        return _type;
    }
    // throw new TypeCheckError(this);
    throw new TypeCheckError(new ErrorMsg(
        ErrorMsg.DATA_CONVERSION_ERR, tleft.toString(), _type.toString()));
}
 
Example #13
Source File: ApplyTemplates.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
    if (_select != null) {
        _type = _select.typeCheck(stable);
        if (_type instanceof NodeType || _type instanceof ReferenceType) {
            _select = new CastExpr(_select, Type.NodeSet);
            _type = Type.NodeSet;
        }
        if (_type instanceof NodeSetType||_type instanceof ResultTreeType) {
            typeCheckContents(stable); // with-params
            return Type.Void;
        }
        throw new TypeCheckError(this);
    }
    else {
        typeCheckContents(stable);          // with-params
        return Type.Void;
    }
}
 
Example #14
Source File: CastExpr.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Type checking a cast expression amounts to verifying that the
 * type conversion is legal. Cast expressions are created during
 * type checking, but typeCheck() is usually not called on them.
 * As a result, this method is called from the constructor.
 */
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
    Type tleft = _left.getType();
    if (tleft == null) {
        tleft = _left.typeCheck(stable);
    }
    if (tleft instanceof NodeType) {
        tleft = Type.Node;  // multiple instances
    }
    else if (tleft instanceof ResultTreeType) {
        tleft = Type.ResultTree; // multiple instances
    }
    if (InternalTypeMap.maps(tleft, _type) != null) {
        return _type;
    }
    // throw new TypeCheckError(this);
    throw new TypeCheckError(new ErrorMsg(
        ErrorMsg.DATA_CONVERSION_ERR, tleft.toString(), _type.toString()));
}
 
Example #15
Source File: FilteredAbsoluteLocationPath.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
    if (_path != null) {
        final Type ptype = _path.typeCheck(stable);
        if (ptype instanceof NodeType) {            // promote to node-set
            _path = new CastExpr(_path, Type.NodeSet);
        }
    }
    return _type = Type.NodeSet;
}
 
Example #16
Source File: FilterParentPath.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
/**
 * Type check a FilterParentPath. If the filter is not a node-set add a
 * cast to node-set only if it is of reference type. This type coercion is
 * needed for expressions like $x/LINE where $x is a parameter reference.
 */
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
    final Type ftype = _filterExpr.typeCheck(stable);
    if (ftype instanceof NodeSetType == false) {
        if (ftype instanceof ReferenceType)  {
            _filterExpr = new CastExpr(_filterExpr, Type.NodeSet);
        }
        /*
        else if (ftype instanceof ResultTreeType)  {
            _filterExpr = new CastExpr(_filterExpr, Type.NodeSet);
        }
        */
        else if (ftype instanceof NodeType)  {
            _filterExpr = new CastExpr(_filterExpr, Type.NodeSet);
        }
        else {
            throw new TypeCheckError(this);
        }
    }

    // Wrap single node path in a node set
    final Type ptype = _path.typeCheck(stable);
    if (!(ptype instanceof NodeSetType)) {
        _path = new CastExpr(_path, Type.NodeSet);
    }

    return _type = Type.NodeSet;
}
 
Example #17
Source File: ForEach.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
    _type = _select.typeCheck(stable);

    if (_type instanceof ReferenceType || _type instanceof NodeType) {
        _select = new CastExpr(_select, Type.NodeSet);
        typeCheckContents(stable);
        return Type.Void;
    }
    if (_type instanceof NodeSetType||_type instanceof ResultTreeType) {
        typeCheckContents(stable);
        return Type.Void;
    }
    throw new TypeCheckError(this);
}
 
Example #18
Source File: FilterParentPath.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Type check a FilterParentPath. If the filter is not a node-set add a
 * cast to node-set only if it is of reference type. This type coercion is
 * needed for expressions like $x/LINE where $x is a parameter reference.
 */
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
    final Type ftype = _filterExpr.typeCheck(stable);
    if (ftype instanceof NodeSetType == false) {
        if (ftype instanceof ReferenceType)  {
            _filterExpr = new CastExpr(_filterExpr, Type.NodeSet);
        }
        /*
        else if (ftype instanceof ResultTreeType)  {
            _filterExpr = new CastExpr(_filterExpr, Type.NodeSet);
        }
        */
        else if (ftype instanceof NodeType)  {
            _filterExpr = new CastExpr(_filterExpr, Type.NodeSet);
        }
        else {
            throw new TypeCheckError(this);
        }
    }

    // Wrap single node path in a node set
    final Type ptype = _path.typeCheck(stable);
    if (!(ptype instanceof NodeSetType)) {
        _path = new CastExpr(_path, Type.NodeSet);
    }

    return _type = Type.NodeSet;
}
 
Example #19
Source File: AbsoluteLocationPath.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
    if (_path != null) {
        final Type ptype = _path.typeCheck(stable);
        if (ptype instanceof NodeType) {            // promote to node-set
            _path = new CastExpr(_path, Type.NodeSet);
        }
    }
    return _type = Type.NodeSet;
}
 
Example #20
Source File: Variable.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * This method is part of a little trick that is needed to use local
 * variables inside nested for-each loops. See the initializeVariables()
 * method in the ForEach class for an explanation
 */
public void initialize(ClassGenerator classGen, MethodGenerator methodGen) {
    final ConstantPoolGen cpg = classGen.getConstantPool();
    final InstructionList il = methodGen.getInstructionList();

    // This is only done for local variables that are actually used
    if (isLocal() && !_refs.isEmpty()) {
        // Create a variable slot if none is allocated
        if (_local == null) {
            _local = methodGen.addLocalVariable2(getEscapedName(),
                                                 _type.toJCType(),
                                                 null);
        }
        // Push the default value on the JVM's stack
        if ((_type instanceof IntType) ||
            (_type instanceof NodeType) ||
            (_type instanceof BooleanType))
            il.append(new ICONST(0)); // 0 for node-id, integer and boolean
        else if (_type instanceof RealType)
            il.append(new DCONST(0)); // 0.0 for floating point numbers
        else
            il.append(new ACONST_NULL()); // and 'null' for anything else

        // Mark the store as the start of the live range of the variable
        _local.setStart(il.append(_type.STORE(_local.getIndex())));

    }
}
 
Example #21
Source File: ForEach.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
    _type = _select.typeCheck(stable);

    if (_type instanceof ReferenceType || _type instanceof NodeType) {
        _select = new CastExpr(_select, Type.NodeSet);
        typeCheckContents(stable);
        return Type.Void;
    }
    if (_type instanceof NodeSetType||_type instanceof ResultTreeType) {
        typeCheckContents(stable);
        return Type.Void;
    }
    throw new TypeCheckError(this);
}
 
Example #22
Source File: AbsoluteLocationPath.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
    if (_path != null) {
        final Type ptype = _path.typeCheck(stable);
        if (ptype instanceof NodeType) {            // promote to node-set
            _path = new CastExpr(_path, Type.NodeSet);
        }
    }
    return _type = Type.NodeSet;
}
 
Example #23
Source File: FilterParentPath.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Type check a FilterParentPath. If the filter is not a node-set add a
 * cast to node-set only if it is of reference type. This type coercion is
 * needed for expressions like $x/LINE where $x is a parameter reference.
 */
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
    final Type ftype = _filterExpr.typeCheck(stable);
    if (ftype instanceof NodeSetType == false) {
        if (ftype instanceof ReferenceType)  {
            _filterExpr = new CastExpr(_filterExpr, Type.NodeSet);
        }
        /*
        else if (ftype instanceof ResultTreeType)  {
            _filterExpr = new CastExpr(_filterExpr, Type.NodeSet);
        }
        */
        else if (ftype instanceof NodeType)  {
            _filterExpr = new CastExpr(_filterExpr, Type.NodeSet);
        }
        else {
            throw new TypeCheckError(this);
        }
    }

    // Wrap single node path in a node set
    final Type ptype = _path.typeCheck(stable);
    if (!(ptype instanceof NodeSetType)) {
        _path = new CastExpr(_path, Type.NodeSet);
    }

    return _type = Type.NodeSet;
}
 
Example #24
Source File: AbsoluteLocationPath.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
    if (_path != null) {
        final Type ptype = _path.typeCheck(stable);
        if (ptype instanceof NodeType) {            // promote to node-set
            _path = new CastExpr(_path, Type.NodeSet);
        }
    }
    return _type = Type.NodeSet;
}
 
Example #25
Source File: FilteredAbsoluteLocationPath.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
    if (_path != null) {
        final Type ptype = _path.typeCheck(stable);
        if (ptype instanceof NodeType) {            // promote to node-set
            _path = new CastExpr(_path, Type.NodeSet);
        }
    }
    return _type = Type.NodeSet;
}
 
Example #26
Source File: ForEach.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
    _type = _select.typeCheck(stable);

    if (_type instanceof ReferenceType || _type instanceof NodeType) {
        _select = new CastExpr(_select, Type.NodeSet);
        typeCheckContents(stable);
        return Type.Void;
    }
    if (_type instanceof NodeSetType||_type instanceof ResultTreeType) {
        typeCheckContents(stable);
        return Type.Void;
    }
    throw new TypeCheckError(this);
}
 
Example #27
Source File: Variable.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * This method is part of a little trick that is needed to use local
 * variables inside nested for-each loops. See the initializeVariables()
 * method in the ForEach class for an explanation
 */
public void initialize(ClassGenerator classGen, MethodGenerator methodGen) {
    final ConstantPoolGen cpg = classGen.getConstantPool();
    final InstructionList il = methodGen.getInstructionList();

    // This is only done for local variables that are actually used
    if (isLocal() && !_refs.isEmpty()) {
        // Create a variable slot if none is allocated
        if (_local == null) {
            _local = methodGen.addLocalVariable2(getEscapedName(),
                                                 _type.toJCType(),
                                                 null);
        }
        // Push the default value on the JVM's stack
        if ((_type instanceof IntType) ||
            (_type instanceof NodeType) ||
            (_type instanceof BooleanType))
            il.append(new ICONST(0)); // 0 for node-id, integer and boolean
        else if (_type instanceof RealType)
            il.append(new DCONST(0)); // 0.0 for floating point numbers
        else
            il.append(new ACONST_NULL()); // and 'null' for anything else

        // Mark the store as the start of the live range of the variable
        _local.setStart(il.append(_type.STORE(_local.getIndex())));

    }
}
 
Example #28
Source File: CopyOf.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
    final Type tselect = _select.typeCheck(stable);
    if (tselect instanceof NodeType ||
        tselect instanceof NodeSetType ||
        tselect instanceof ReferenceType ||
        tselect instanceof ResultTreeType) {
        // falls through
    }
    else {
        _select = new CastExpr(_select, Type.String);
    }
    return Type.Void;
}
 
Example #29
Source File: FilterParentPath.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
/**
 * Type check a FilterParentPath. If the filter is not a node-set add a
 * cast to node-set only if it is of reference type. This type coercion is
 * needed for expressions like $x/LINE where $x is a parameter reference.
 */
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
    final Type ftype = _filterExpr.typeCheck(stable);
    if (ftype instanceof NodeSetType == false) {
        if (ftype instanceof ReferenceType)  {
            _filterExpr = new CastExpr(_filterExpr, Type.NodeSet);
        }
        /*
        else if (ftype instanceof ResultTreeType)  {
            _filterExpr = new CastExpr(_filterExpr, Type.NodeSet);
        }
        */
        else if (ftype instanceof NodeType)  {
            _filterExpr = new CastExpr(_filterExpr, Type.NodeSet);
        }
        else {
            throw new TypeCheckError(this);
        }
    }

    // Wrap single node path in a node set
    final Type ptype = _path.typeCheck(stable);
    if (!(ptype instanceof NodeSetType)) {
        _path = new CastExpr(_path, Type.NodeSet);
    }

    return _type = Type.NodeSet;
}
 
Example #30
Source File: CopyOf.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
    final Type tselect = _select.typeCheck(stable);
    if (tselect instanceof NodeType ||
        tselect instanceof NodeSetType ||
        tselect instanceof ReferenceType ||
        tselect instanceof ResultTreeType) {
        // falls through
    }
    else {
        _select = new CastExpr(_select, Type.String);
    }
    return Type.Void;
}