本文整理匯總了Java中som.vmobjects.SArray.getPartiallyEmptyStorage方法的典型用法代碼示例。如果您正苦於以下問題:Java SArray.getPartiallyEmptyStorage方法的具體用法?Java SArray.getPartiallyEmptyStorage怎麽用?Java SArray.getPartiallyEmptyStorage使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類som.vmobjects.SArray
的用法示例。
在下文中一共展示了SArray.getPartiallyEmptyStorage方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: doPartiallyEmptyArray
import som.vmobjects.SArray; //導入方法依賴的package包/類
@Specialization(guards = "arr.isPartiallyEmptyType()")
public final SArray doPartiallyEmptyArray(final SArray arr, final SBlock block) {
PartiallyEmptyArray storage = arr.getPartiallyEmptyStorage(storageType);
int length = storage.getLength();
try {
if (SArray.FIRST_IDX < length) {
execBlock(block, storage.get(SArray.FIRST_IDX));
}
for (long i = SArray.FIRST_IDX + 1; i < length; i++) {
execBlock(block, storage.get(i));
}
} finally {
if (CompilerDirectives.inInterpreter()) {
SomLoop.reportLoopCount(length, this);
}
}
return arr;
}
示例2: doPartiallyEmptyArray
import som.vmobjects.SArray; //導入方法依賴的package包/類
@Specialization(guards = "isPartiallyEmptyType(arr)")
public final SArray doPartiallyEmptyArray(final VirtualFrame frame,
final SArray arr, final SBlock block) {
PartiallyEmptyArray storage = arr.getPartiallyEmptyStorage(storageType);
int length = storage.getLength();
try {
if (SArray.FIRST_IDX < length) {
execBlock(frame, block, storage.get(SArray.FIRST_IDX));
}
for (long i = SArray.FIRST_IDX + 1; i < length; i++) {
execBlock(frame, block, storage.get(i));
}
} finally {
if (CompilerDirectives.inInterpreter()) {
reportLoopCount(length);
}
}
return arr;
}
示例3: doPartiallyEmptySArray
import som.vmobjects.SArray; //導入方法依賴的package包/類
@Specialization(guards = "isPartiallyEmptyType(receiver)")
public final long doPartiallyEmptySArray(final SArray receiver,
final long index, final long value) {
long idx = index - 1;
PartiallyEmptyArray storage = receiver.getPartiallyEmptyStorage(storageType);
setValue(idx, value, storage);
if (storage.getType() != ArrayType.LONG) {
storage.setType(ArrayType.OBJECT);
}
receiver.ifFullTransitionPartiallyEmpty();
return value;
}