本文整理汇总了Java中som.vmobjects.SArray.getBooleanStorage方法的典型用法代码示例。如果您正苦于以下问题:Java SArray.getBooleanStorage方法的具体用法?Java SArray.getBooleanStorage怎么用?Java SArray.getBooleanStorage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类som.vmobjects.SArray
的用法示例。
在下文中一共展示了SArray.getBooleanStorage方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: doBooleanArray
import som.vmobjects.SArray; //导入方法依赖的package包/类
@Specialization(guards = "arr.isBooleanType()")
public final SArray doBooleanArray(final SArray arr, final SBlock block) {
boolean[] storage = arr.getBooleanStorage(storageType);
int length = storage.length;
try {
if (SArray.FIRST_IDX < length) {
execBlock(block, storage[SArray.FIRST_IDX]);
}
for (long i = SArray.FIRST_IDX + 1; i < length; i++) {
execBlock(block, storage[(int) i]);
}
} finally {
if (CompilerDirectives.inInterpreter()) {
SomLoop.reportLoopCount(length, this);
}
}
return arr;
}
示例2: doBooleanArray
import som.vmobjects.SArray; //导入方法依赖的package包/类
@Specialization(guards = "isBooleanType(arr)")
public final SArray doBooleanArray(final VirtualFrame frame,
final SArray arr, final SBlock block) {
boolean[] storage = arr.getBooleanStorage(storageType);
int length = storage.length;
try {
if (SArray.FIRST_IDX < length) {
execBlock(frame, block, storage[SArray.FIRST_IDX]);
}
for (long i = SArray.FIRST_IDX + 1; i < length; i++) {
execBlock(frame, block, storage[(int) i]);
}
} finally {
if (CompilerDirectives.inInterpreter()) {
reportLoopCount(length);
}
}
return arr;
}
示例3: doBooleanSArray
import som.vmobjects.SArray; //导入方法依赖的package包/类
@Specialization(guards = "receiver.isBooleanType()")
public final boolean doBooleanSArray(final VirtualFrame frame,
final SArray receiver, final long idx) {
try {
return receiver.getBooleanStorage(storageType)[(int) idx - 1];
} catch (IndexOutOfBoundsException e) {
return (boolean) triggerException(frame, receiver, idx);
}
}
示例4: doBooleanArray
import som.vmobjects.SArray; //导入方法依赖的package包/类
@Specialization(guards = "somArray.isBooleanType()")
public final Object[] doBooleanArray(final SArray somArray,
final Object rcvr) {
boolean[] arr = somArray.getBooleanStorage(storageType);
Object[] args = new Object[arr.length + 1];
args[0] = rcvr;
for (int i = 0; i < arr.length; i++) {
args[i + 1] = arr[i];
}
return args;
}
示例5: doBooleanArray
import som.vmobjects.SArray; //导入方法依赖的package包/类
@Specialization(guards = "isBooleanType(somArray)")
public final Object[] doBooleanArray(final SArray somArray,
final Object rcvr) {
boolean[] arr = somArray.getBooleanStorage(storageType);
Object[] args = new Object[arr.length + 1];
args[0] = rcvr;
for (int i = 0; i < arr.length; i++) {
args[i + 1] = arr[i];
}
return args;
}
示例6: doBooleanSArray
import som.vmobjects.SArray; //导入方法依赖的package包/类
@Specialization(guards = "isBooleanType(receiver)")
public final Object doBooleanSArray(final SArray receiver, final long index,
final boolean value) {
long idx = index - 1;
receiver.getBooleanStorage(storageType)[(int) idx] = value;
return value;
}
示例7: doBooleanSArray
import som.vmobjects.SArray; //导入方法依赖的package包/类
@Specialization(guards = "receiver.isBooleanType()")
public final long doBooleanSArray(final SArray receiver) {
return receiver.getBooleanStorage(storageType).length;
}
示例8: doBooleanSArray
import som.vmobjects.SArray; //导入方法依赖的package包/类
@Specialization(guards = "isBooleanType(receiver)")
public final boolean doBooleanSArray(final SArray receiver, final long idx) {
return receiver.getBooleanStorage(storageType)[(int) idx - 1];
}
示例9: doBooleanSArray
import som.vmobjects.SArray; //导入方法依赖的package包/类
@Specialization(guards = "isBooleanType(receiver)")
public final long doBooleanSArray(final SArray receiver) {
return receiver.getBooleanStorage(storageType).length;
}