本文整理汇总了Java中som.vmobjects.SArray.FIRST_IDX属性的典型用法代码示例。如果您正苦于以下问题:Java SArray.FIRST_IDX属性的具体用法?Java SArray.FIRST_IDX怎么用?Java SArray.FIRST_IDX使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类som.vmobjects.SArray
的用法示例。
在下文中一共展示了SArray.FIRST_IDX属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: doEmptyArray
@Specialization(guards = "arr.isEmptyType()")
public final SArray doEmptyArray(final SArray arr, final SBlock block) {
int length = arr.getEmptyStorage(storageType);
try {
if (SArray.FIRST_IDX < length) {
execBlock(block, Nil.nilObject);
}
for (long i = SArray.FIRST_IDX + 1; i < length; i++) {
execBlock(block, Nil.nilObject);
}
} finally {
if (CompilerDirectives.inInterpreter()) {
SomLoop.reportLoopCount(length, this);
}
}
return arr;
}
示例2: doPartiallyEmptyArray
@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;
}
示例3: doObjectArray
@Specialization(guards = "arr.isObjectType()")
public final SArray doObjectArray(final SArray arr, final SBlock block) {
Object[] storage = arr.getObjectStorage(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;
}
示例4: doLongArray
@Specialization(guards = "arr.isLongType()")
public final SArray doLongArray(final SArray arr, final SBlock block) {
long[] storage = arr.getLongStorage(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;
}
示例5: doDoubleArray
@Specialization(guards = "arr.isDoubleType()")
public final SArray doDoubleArray(final SArray arr, final SBlock block) {
double[] storage = arr.getDoubleStorage(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;
}
示例6: doBooleanArray
@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;
}
示例7: evalBlockWithArgForRemaining
public static void evalBlockWithArgForRemaining(final SBlock block,
final long length, final Object[] storage,
final BlockDispatchNode blockDispatch, final Object first, final IsValue isValue) {
if (!isValue.executeEvaluated(first)) {
signalNotAValue();
}
for (int i = SArray.FIRST_IDX + 1; i < length; i++) {
Object result = blockDispatch.executeDispatch(new Object[] {block, (long) i + 1});
if (!isValue.executeEvaluated(result)) {
signalNotAValue();
} else {
storage[i] = result;
}
}
}
示例8: doEmptyArray
@Specialization(guards = "isEmptyType(arr)")
public final SArray doEmptyArray(final VirtualFrame frame,
final SArray arr, final SBlock block) {
int length = arr.getEmptyStorage(storageType);
try {
if (SArray.FIRST_IDX < length) {
execBlock(frame, block, Nil.nilObject);
}
for (long i = SArray.FIRST_IDX + 1; i < length; i++) {
execBlock(frame, block, Nil.nilObject);
}
} finally {
if (CompilerDirectives.inInterpreter()) {
reportLoopCount(length);
}
}
return arr;
}
示例9: doPartiallyEmptyArray
@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;
}
示例10: doObjectArray
@Specialization(guards = "isObjectType(arr)")
public final SArray doObjectArray(final VirtualFrame frame,
final SArray arr, final SBlock block) {
Object[] storage = arr.getObjectStorage(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;
}
示例11: doLongArray
@Specialization(guards = "isLongType(arr)")
public final SArray doLongArray(final VirtualFrame frame,
final SArray arr, final SBlock block) {
long[] storage = arr.getLongStorage(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;
}
示例12: doDoubleArray
@Specialization(guards = "isDoubleType(arr)")
public final SArray doDoubleArray(final VirtualFrame frame,
final SArray arr, final SBlock block) {
double[] storage = arr.getDoubleStorage(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;
}
示例13: doBooleanArray
@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;
}
示例14: evalBlockForRemaining
public static void evalBlockForRemaining(final SBlock block,
final long length, final Object[] storage,
final BlockDispatchNode blockDispatch) {
for (int i = SArray.FIRST_IDX + 1; i < length; i++) {
storage[i] = blockDispatch.executeDispatch(new Object[] {block});
}
}
示例15: evalBlockForRemaining
private void evalBlockForRemaining(final VirtualFrame frame,
final SBlock block, final long length, final Object[] storage) {
for (int i = SArray.FIRST_IDX + 1; i < length; i++) {
storage[i] = this.block.executeDispatch(frame, new Object[] {block});
}
}