当前位置: 首页>>代码示例>>Java>>正文


Java Type.UNKNOWN属性代码示例

本文整理汇总了Java中jdk.nashorn.internal.codegen.types.Type.UNKNOWN属性的典型用法代码示例。如果您正苦于以下问题:Java Type.UNKNOWN属性的具体用法?Java Type.UNKNOWN怎么用?Java Type.UNKNOWN使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在jdk.nashorn.internal.codegen.types.Type的用法示例。


在下文中一共展示了Type.UNKNOWN属性的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getWidestLiveLocals

/**
 * Returns a list of local variable slot types, but for those symbols that have multiple values, only the slot
 * holding the widest type is marked as live.
 * @return a list of widest local variable slot types.
 */
List<Type> getWidestLiveLocals(final List<Type> lvarTypes) {
    final List<Type> widestLiveLocals = new ArrayList<>(lvarTypes);
    boolean keepNextValue = true;
    final int size = widestLiveLocals.size();
    for(int i = size - 1; i-- > 0;) {
        if(symbolBoundary.get(i)) {
            keepNextValue = true;
        }
        final Type t = widestLiveLocals.get(i);
        if(t != Type.UNKNOWN) {
            if(keepNextValue) {
                if(t != Type.SLOT_2) {
                    keepNextValue = false;
                }
            } else {
                widestLiveLocals.set(i, Type.UNKNOWN);
            }
        }
    }
    widestLiveLocals.subList(Math.max(getFirstDeadLocal(widestLiveLocals), firstTemp), widestLiveLocals.size()).clear();
    return widestLiveLocals;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:27,代码来源:Label.java

示例2: getTypeForSlotDescriptor

static Type getTypeForSlotDescriptor(final char typeDesc) {
    // Recognizing both lowercase and uppercase as we're using both to signify symbol boundaries; see
    // MethodEmitter.markSymbolBoundariesInLvarTypesDescriptor().
    switch (typeDesc) {
        case 'I':
        case 'i':
            return Type.INT;
        case 'J':
        case 'j':
            return Type.LONG;
        case 'D':
        case 'd':
            return Type.NUMBER;
        case 'A':
        case 'a':
            return Type.OBJECT;
        case 'U':
        case 'u':
            return Type.UNKNOWN;
        default:
            throw new AssertionError();
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:23,代码来源:CodeGeneratorLexicalContext.java

示例3: ArrayLiteralNode

/**
 * Constructor
 *
 * @param token   token
 * @param finish  finish
 * @param value   array literal value, a Node array
 */
protected ArrayLiteralNode(final long token, final int finish, final Expression[] value) {
    super(Token.recast(token, TokenType.ARRAY), finish, value);
    this.elementType = Type.UNKNOWN;
    this.presets     = null;
    this.postsets    = null;
    this.units       = null;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:14,代码来源:LiteralNode.java

示例4: firstTypeGuess

/**
 * The first type to try to use for this generated runtime node
 *
 * @return a type
 */
public Type firstTypeGuess() {
    Type widest = Type.UNKNOWN;
    for (final Type type : parameterTypes) {
        if (type.isObject()) {
            continue;
        }
        widest = Type.widest(type, widest);
    }
    widest = Type.widest(widest, firstTypeGuessForObject(request));

    return widest;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:17,代码来源:RuntimeCallSite.java

示例5: getFirstDeadLocal

private int getFirstDeadLocal(final List<Type> types) {
    int i = types.size();
    for(final ListIterator<Type> it = types.listIterator(i);
        it.hasPrevious() && it.previous() == Type.UNKNOWN;
        --i) {
        // no body
    }

    // Respect symbol boundaries; we never chop off half a symbol's storage
    while(!symbolBoundary.get(i - 1)) {
        ++i;
    }
    return i;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:14,代码来源:Label.java

示例6: ArrayLiteralNode

/**
 * Constructor
 *
 * @param token   token
 * @param finish  finish
 * @param value   array literal value, a Node array
 * @param hasSpread true if the array has a spread element
 * @param hasTrailingComma true if the array literal has a comma after the last element
 */
protected ArrayLiteralNode(final long token, final int finish, final Expression[] value, final boolean hasSpread, final boolean hasTrailingComma) {
    super(Token.recast(token, TokenType.ARRAY), finish, value);
    this.elementType = Type.UNKNOWN;
    this.presets     = null;
    this.postsets    = null;
    this.splitRanges = null;
    this.hasSpread        = hasSpread;
    this.hasTrailingComma = hasTrailingComma;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:18,代码来源:LiteralNode.java


注:本文中的jdk.nashorn.internal.codegen.types.Type.UNKNOWN属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。