當前位置: 首頁>>代碼示例>>Java>>正文


Java SArray.FIRST_IDX屬性代碼示例

本文整理匯總了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;
}
 
開發者ID:smarr,項目名稱:SOMns,代碼行數:17,代碼來源:DoPrim.java

示例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;
}
 
開發者ID:smarr,項目名稱:SOMns,代碼行數:18,代碼來源:DoPrim.java

示例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;
}
 
開發者ID:smarr,項目名稱:SOMns,代碼行數:18,代碼來源:DoPrim.java

示例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;
}
 
開發者ID:smarr,項目名稱:SOMns,代碼行數:18,代碼來源:DoPrim.java

示例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;
}
 
開發者ID:smarr,項目名稱:SOMns,代碼行數:18,代碼來源:DoPrim.java

示例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;
}
 
開發者ID:smarr,項目名稱:SOMns,代碼行數:18,代碼來源:DoPrim.java

示例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;
    }
  }
}
 
開發者ID:smarr,項目名稱:SOMns,代碼行數:15,代碼來源:ArraySetAllStrategy.java

示例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;
}
 
開發者ID:smarr,項目名稱:TruffleSOM,代碼行數:18,代碼來源:DoPrim.java

示例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;
}
 
開發者ID:smarr,項目名稱:TruffleSOM,代碼行數:19,代碼來源:DoPrim.java

示例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;
}
 
開發者ID:smarr,項目名稱:TruffleSOM,代碼行數:19,代碼來源:DoPrim.java

示例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;
}
 
開發者ID:smarr,項目名稱:TruffleSOM,代碼行數:19,代碼來源:DoPrim.java

示例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;
}
 
開發者ID:smarr,項目名稱:TruffleSOM,代碼行數:19,代碼來源:DoPrim.java

示例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;
}
 
開發者ID:smarr,項目名稱:TruffleSOM,代碼行數:19,代碼來源:DoPrim.java

示例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});
  }
}
 
開發者ID:smarr,項目名稱:SOMns,代碼行數:7,代碼來源:ArraySetAllStrategy.java

示例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});
  }
}
 
開發者ID:smarr,項目名稱:TruffleSOM,代碼行數:6,代碼來源:PutAllNode.java


注:本文中的som.vmobjects.SArray.FIRST_IDX屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。