本文整理汇总了Java中jdk.nashorn.internal.codegen.types.Type.UNDEFINED属性的典型用法代码示例。如果您正苦于以下问题:Java Type.UNDEFINED属性的具体用法?Java Type.UNDEFINED怎么用?Java Type.UNDEFINED使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类jdk.nashorn.internal.codegen.types.Type
的用法示例。
在下文中一共展示了Type.UNDEFINED属性的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: enterReturnNode
@Override
public boolean enterReturnNode(final ReturnNode returnNode) {
if(!reachable) {
return false;
}
final Expression returnExpr = returnNode.getExpression();
final Type returnExprType;
if(returnExpr != null) {
returnExpr.accept(this);
returnExprType = getType(returnExpr);
} else {
returnExprType = Type.UNDEFINED;
}
returnType = Type.widestReturnType(returnType, returnExprType);
doesNotContinueSequentially();
return false;
}
示例2: enterReturnNode
@Override
public boolean enterReturnNode(final ReturnNode returnNode) {
if(!reachable) {
return false;
}
final Expression returnExpr = returnNode.getExpression();
final Type returnExprType;
if(returnExpr != null) {
returnExprType = visitExpressionOnEmptyStack(returnExpr).type;
} else {
assertTypeStackIsEmpty();
returnExprType = Type.UNDEFINED;
}
returnType = Type.widestReturnType(returnType, returnExprType);
doesNotContinueSequentially();
return false;
}
示例3: 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();
}
示例4: optimisticTypeToString
void optimisticTypeToString(final StringBuilder sb, final boolean optimistic) {
sb.append('{');
final Type type = getType();
final String desc = type == Type.UNDEFINED ? "U" : type.getDescriptor();
sb.append(desc.charAt(desc.length() - 1) == ';' ? "O" : desc);
if (isOptimistic() && optimistic) {
sb.append(OPT_IDENTIFIER);
final int pp = ((Optimistic)this).getProgramPoint();
if (UnwarrantedOptimismException.isValid(pp)) {
sb.append('_').append(pp);
}
}
sb.append('}');
}
示例5: getType
@Override
public Type getType(final Function<Symbol, Type> localVariableTypes) {
if(type != null) {
return type;
} else if(symbol != null && symbol.isScope()) {
return Type.OBJECT;
}
final Type symbolType = localVariableTypes.apply(symbol);
return symbolType == null ? Type.UNDEFINED : symbolType;
}
示例6: getType
@Override
public Type getType() {
if(type != null) {
return type;
} else if(symbol != null && symbol.isScope()) {
return Type.OBJECT;
}
return Type.UNDEFINED;
}
示例7: undefinedToNumber
private static Type undefinedToNumber(final Type type) {
return type == Type.UNDEFINED ? Type.NUMBER : type;
}
示例8: undefinedToNumber
private static final Type undefinedToNumber(final Type type) {
return type == Type.UNDEFINED ? Type.NUMBER : type;
}