本文整理汇总了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;
}
示例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();
}
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}