本文整理汇总了Java中jdk.nashorn.internal.codegen.types.Type.SLOT_2属性的典型用法代码示例。如果您正苦于以下问题:Java Type.SLOT_2属性的具体用法?Java Type.SLOT_2怎么用?Java Type.SLOT_2使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类jdk.nashorn.internal.codegen.types.Type
的用法示例。
在下文中一共展示了Type.SLOT_2属性的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}