Java Code Examples for com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type#ResultTree

The following examples show how to use com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type#ResultTree . 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: Variable.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Runs a type check on either the variable element body or the
 * expression in the 'select' attribute
 */
public Type typeCheck(SymbolTable stable) throws TypeCheckError {

    // Type check the 'select' expression if present
    if (_select != null) {
        _type = _select.typeCheck(stable);
    }
    // Type check the element contents otherwise
    else if (hasContents()) {
        typeCheckContents(stable);
        _type = Type.ResultTree;
    }
    else {
        _type = Type.Reference;
    }
    // The return type is void as the variable element does not leave
    // anything on the JVM's stack. The '_type' global will be returned
    // by the references to this variable, and not by the variable itself.
    return Type.Void;
}
 
Example 2
Source File: CastExpr.java    From openjdk-8-source 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 3
Source File: Variable.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Runs a type check on either the variable element body or the
 * expression in the 'select' attribute
 */
public Type typeCheck(SymbolTable stable) throws TypeCheckError {

    // Type check the 'select' expression if present
    if (_select != null) {
        _type = _select.typeCheck(stable);
    }
    // Type check the element contents otherwise
    else if (hasContents()) {
        typeCheckContents(stable);
        _type = Type.ResultTree;
    }
    else {
        _type = Type.Reference;
    }
    // The return type is void as the variable element does not leave
    // anything on the JVM's stack. The '_type' global will be returned
    // by the references to this variable, and not by the variable itself.
    return Type.Void;
}
 
Example 4
Source File: Variable.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Runs a type check on either the variable element body or the
 * expression in the 'select' attribute
 */
public Type typeCheck(SymbolTable stable) throws TypeCheckError {

    // Type check the 'select' expression if present
    if (_select != null) {
        _type = _select.typeCheck(stable);
    }
    // Type check the element contents otherwise
    else if (hasContents()) {
        typeCheckContents(stable);
        _type = Type.ResultTree;
    }
    else {
        _type = Type.Reference;
    }
    // The return type is void as the variable element does not leave
    // anything on the JVM's stack. The '_type' global will be returned
    // by the references to this variable, and not by the variable itself.
    return Type.Void;
}
 
Example 5
Source File: Variable.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Runs a type check on either the variable element body or the
 * expression in the 'select' attribute
 */
public Type typeCheck(SymbolTable stable) throws TypeCheckError {

    // Type check the 'select' expression if present
    if (_select != null) {
        _type = _select.typeCheck(stable);
    }
    // Type check the element contents otherwise
    else if (hasContents()) {
        typeCheckContents(stable);
        _type = Type.ResultTree;
    }
    else {
        _type = Type.Reference;
    }
    // The return type is void as the variable element does not leave
    // anything on the JVM's stack. The '_type' global will be returned
    // by the references to this variable, and not by the variable itself.
    return Type.Void;
}
 
Example 6
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 7
Source File: CastExpr.java    From openjdk-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 8
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 9
Source File: Variable.java    From Bytecoder with Apache License 2.0 6 votes vote down vote up
/**
 * Runs a type check on either the variable element body or the
 * expression in the 'select' attribute
 */
public Type typeCheck(SymbolTable stable) throws TypeCheckError {

    // Type check the 'select' expression if present
    if (_select != null) {
        _type = _select.typeCheck(stable);
    }
    // Type check the element contents otherwise
    else if (hasContents()) {
        typeCheckContents(stable);
        _type = Type.ResultTree;
    }
    else {
        _type = Type.Reference;
    }
    // The return type is void as the variable element does not leave
    // anything on the JVM's stack. The '_type' global will be returned
    // by the references to this variable, and not by the variable itself.
    return Type.Void;
}
 
Example 10
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 11
Source File: Variable.java    From jdk1.8-source-analysis with Apache License 2.0 6 votes vote down vote up
/**
 * Runs a type check on either the variable element body or the
 * expression in the 'select' attribute
 */
public Type typeCheck(SymbolTable stable) throws TypeCheckError {

    // Type check the 'select' expression if present
    if (_select != null) {
        _type = _select.typeCheck(stable);
    }
    // Type check the element contents otherwise
    else if (hasContents()) {
        typeCheckContents(stable);
        _type = Type.ResultTree;
    }
    else {
        _type = Type.Reference;
    }
    // The return type is void as the variable element does not leave
    // anything on the JVM's stack. The '_type' global will be returned
    // by the references to this variable, and not by the variable itself.
    return Type.Void;
}
 
Example 12
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 13
Source File: Variable.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Runs a type check on either the variable element body or the
 * expression in the 'select' attribute
 */
public Type typeCheck(SymbolTable stable) throws TypeCheckError {

    // Type check the 'select' expression if present
    if (_select != null) {
        _type = _select.typeCheck(stable);
    }
    // Type check the element contents otherwise
    else if (hasContents()) {
        typeCheckContents(stable);
        _type = Type.ResultTree;
    }
    else {
        _type = Type.Reference;
    }
    // The return type is void as the variable element does not leave
    // anything on the JVM's stack. The '_type' global will be returned
    // by the references to this variable, and not by the variable itself.
    return Type.Void;
}
 
Example 14
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 15
Source File: Variable.java    From JDKSourceCode1.8 with MIT License 6 votes vote down vote up
/**
 * Runs a type check on either the variable element body or the
 * expression in the 'select' attribute
 */
public Type typeCheck(SymbolTable stable) throws TypeCheckError {

    // Type check the 'select' expression if present
    if (_select != null) {
        _type = _select.typeCheck(stable);
    }
    // Type check the element contents otherwise
    else if (hasContents()) {
        typeCheckContents(stable);
        _type = Type.ResultTree;
    }
    else {
        _type = Type.Reference;
    }
    // The return type is void as the variable element does not leave
    // anything on the JVM's stack. The '_type' global will be returned
    // by the references to this variable, and not by the variable itself.
    return Type.Void;
}
 
Example 16
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 17
Source File: Variable.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Runs a type check on either the variable element body or the
 * expression in the 'select' attribute
 */
public Type typeCheck(SymbolTable stable) throws TypeCheckError {

    // Type check the 'select' expression if present
    if (_select != null) {
        _type = _select.typeCheck(stable);
    }
    // Type check the element contents otherwise
    else if (hasContents()) {
        typeCheckContents(stable);
        _type = Type.ResultTree;
    }
    else {
        _type = Type.Reference;
    }
    // The return type is void as the variable element does not leave
    // anything on the JVM's stack. The '_type' global will be returned
    // by the references to this variable, and not by the variable itself.
    return Type.Void;
}
 
Example 18
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 19
Source File: Variable.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Runs a type check on either the variable element body or the
 * expression in the 'select' attribute
 */
public Type typeCheck(SymbolTable stable) throws TypeCheckError {

    // Type check the 'select' expression if present
    if (_select != null) {
        _type = _select.typeCheck(stable);
    }
    // Type check the element contents otherwise
    else if (hasContents()) {
        typeCheckContents(stable);
        _type = Type.ResultTree;
    }
    else {
        _type = Type.Reference;
    }
    // The return type is void as the variable element does not leave
    // anything on the JVM's stack. The '_type' global will be returned
    // by the references to this variable, and not by the variable itself.
    return Type.Void;
}
 
Example 20
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()));
}