Java Code Examples for jdk.nashorn.internal.codegen.types.Type#BOOLEAN

The following examples show how to use jdk.nashorn.internal.codegen.types.Type#BOOLEAN . 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: LocalVariableConversion.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
private static char getTypeChar(final Type type) {
    if(type == Type.UNDEFINED) {
        return 'U';
    } else if(type.isObject()) {
        return 'O';
    } else if(type == Type.BOOLEAN) {
        return 'Z';
    }
    return type.getBytecodeStackType();
}
 
Example 2
Source File: MethodEmitter.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Pop a type from the existing stack, ensuring that it is an integer type
 * (integer or long). Boolean type is popped as int type.
 *
 * @return the type
 */
private BitwiseType popBitwise() {
    final Type type = popType();
    if(type == Type.BOOLEAN) {
        return Type.INT;
    }
    return (BitwiseType)type;
}
 
Example 3
Source File: LocalVariableConversion.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
private static char getTypeChar(final Type type) {
    if(type == Type.UNDEFINED) {
        return 'U';
    } else if(type.isObject()) {
        return 'O';
    } else if(type == Type.BOOLEAN) {
        return 'Z';
    }
    return type.getBytecodeStackType();
}
 
Example 4
Source File: MethodEmitter.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Pop a type from the existing stack, ensuring that it is an integer type
 * (integer or long). Boolean type is popped as int type.
 *
 * @return the type
 */
private BitwiseType popBitwise() {
    final Type type = popType();
    if(type == Type.BOOLEAN) {
        return Type.INT;
    }
    return (BitwiseType)type;
}
 
Example 5
Source File: MethodEmitter.java    From jdk8u_nashorn with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Pop a type from the existing stack, ensuring that it is an integer type
 * (integer or long). Boolean type is popped as int type.
 *
 * @return the type
 */
private BitwiseType popBitwise() {
    final Type type = popType();
    if(type == Type.BOOLEAN) {
        return Type.INT;
    }
    return (BitwiseType)type;
}
 
Example 6
Source File: MethodEmitter.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Pop a type from the existing stack, ensuring that it is an integer type
 * (integer or long). Boolean type is popped as int type.
 *
 * @return the type
 */
private BitwiseType popBitwise() {
    final Type type = popType();
    if(type == Type.BOOLEAN) {
        return Type.INT;
    }
    return (BitwiseType)type;
}
 
Example 7
Source File: MethodEmitter.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Pop a type from the existing stack, ensuring that it is an integer type
 * (integer or long). Boolean type is popped as int type.
 *
 * @return the type
 */
private BitwiseType popBitwise() {
    final Type type = popType();
    if(type == Type.BOOLEAN) {
        return Type.INT;
    }
    return (BitwiseType)type;
}
 
Example 8
Source File: MethodEmitter.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Pop a type from the existing stack, ensuring that it is an integer type
 * (integer or long). Boolean type is popped as int type.
 *
 * @return the type
 */
private BitwiseType popBitwise() {
    final Type type = popType();
    if(type == Type.BOOLEAN) {
        return Type.INT;
    }
    return (BitwiseType)type;
}
 
Example 9
Source File: BinaryNode.java    From jdk8u_nashorn with GNU General Public License v2.0 4 votes vote down vote up
private static Type booleanToInt(final Type type) {
    return type == Type.BOOLEAN ? Type.INT : type;
}
 
Example 10
Source File: LiteralNode.java    From nashorn with GNU General Public License v2.0 4 votes vote down vote up
@Override
public Type getWidestOperationType() {
    return Type.BOOLEAN;
}
 
Example 11
Source File: LiteralNode.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
@Override
public Type getWidestOperationType() {
    return Type.BOOLEAN;
}
 
Example 12
Source File: LiteralNode.java    From jdk8u_nashorn with GNU General Public License v2.0 4 votes vote down vote up
@Override
public Type getWidestOperationType() {
    return Type.BOOLEAN;
}
 
Example 13
Source File: LiteralNode.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
@Override
public Type getWidestOperationType() {
    return Type.BOOLEAN;
}
 
Example 14
Source File: LiteralNode.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
@Override
public Type getType() {
    return Type.BOOLEAN;
}
 
Example 15
Source File: LiteralNode.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
@Override
public Type getWidestOperationType() {
    return Type.BOOLEAN;
}
 
Example 16
Source File: LiteralNode.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
@Override
public Type getType() {
    return Type.BOOLEAN;
}
 
Example 17
Source File: LiteralNode.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
@Override
public Type getType() {
    return Type.BOOLEAN;
}
 
Example 18
Source File: LiteralNode.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
@Override
public Type getType() {
    return Type.BOOLEAN;
}
 
Example 19
Source File: LiteralNode.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
@Override
public Type getWidestOperationType() {
    return Type.BOOLEAN;
}
 
Example 20
Source File: LiteralNode.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
@Override
public Type getType() {
    return Type.BOOLEAN;
}