本文整理汇总了Java中jdk.nashorn.internal.codegen.types.Type.BOOLEAN属性的典型用法代码示例。如果您正苦于以下问题:Java Type.BOOLEAN属性的具体用法?Java Type.BOOLEAN怎么用?Java Type.BOOLEAN使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类jdk.nashorn.internal.codegen.types.Type
的用法示例。
在下文中一共展示了Type.BOOLEAN属性的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getTypeChar
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();
}
示例2: popBitwise
/**
* 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;
}
示例3: loadADD
private void loadADD(final UnaryNode unaryNode, final TypeBounds resultBounds) {
loadExpression(unaryNode.getExpression(), resultBounds.booleanToInt().notWiderThan(Type.NUMBER));
if(method.peekType() == Type.BOOLEAN) {
// It's a no-op in bytecode, but we must make sure it is treated as an int for purposes of type signatures
method.convert(Type.INT);
}
}
示例4: booleanToInt
private static Type booleanToInt(final Type type) {
return type == Type.BOOLEAN ? Type.INT : type;
}
示例5: getType
@Override
public Type getType(final Function<Symbol, Type> localVariableTypes) {
return Type.BOOLEAN;
}
示例6: getWidestOperationType
@Override
public Type getWidestOperationType() {
return Type.BOOLEAN;
}
示例7: booleanToInt
private static Type booleanToInt(final Type t) {
return t == Type.BOOLEAN ? Type.INT : t;
}
示例8: getType
@Override
public Type getType() {
return Type.BOOLEAN;
}