当前位置: 首页>>代码示例>>Java>>正文


Java SArray.getDoubleStorage方法代码示例

本文整理汇总了Java中som.vmobjects.SArray.getDoubleStorage方法的典型用法代码示例。如果您正苦于以下问题:Java SArray.getDoubleStorage方法的具体用法?Java SArray.getDoubleStorage怎么用?Java SArray.getDoubleStorage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在som.vmobjects.SArray的用法示例。


在下文中一共展示了SArray.getDoubleStorage方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: doDoubleArray

import som.vmobjects.SArray; //导入方法依赖的package包/类
@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,代码行数:19,代码来源:DoPrim.java

示例2: doDoubleArray

import som.vmobjects.SArray; //导入方法依赖的package包/类
@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,代码行数:20,代码来源:DoPrim.java

示例3: doDoubleSArray

import som.vmobjects.SArray; //导入方法依赖的package包/类
@Specialization(guards = "receiver.isDoubleType()")
public final double doDoubleSArray(final VirtualFrame frame,
    final SArray receiver, final long idx) {
  try {
    return receiver.getDoubleStorage(storageType)[(int) idx - 1];
  } catch (IndexOutOfBoundsException e) {
    return (double) triggerException(frame, receiver, idx);
  }
}
 
开发者ID:smarr,项目名称:SOMns,代码行数:10,代码来源:AtPrim.java

示例4: doDoubleArray

import som.vmobjects.SArray; //导入方法依赖的package包/类
@Specialization(guards = "somArray.isDoubleType()")
public final Object[] doDoubleArray(final SArray somArray,
    final Object rcvr) {
  double[] arr = somArray.getDoubleStorage(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;
}
 
开发者ID:smarr,项目名称:SOMns,代码行数:12,代码来源:ToArgumentsArrayNode.java

示例5: doDoubleArray

import som.vmobjects.SArray; //导入方法依赖的package包/类
@Specialization(guards = "isDoubleType(somArray)")
public final Object[] doDoubleArray(final SArray somArray,
    final Object rcvr) {
  double[] arr = somArray.getDoubleStorage(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;
}
 
开发者ID:smarr,项目名称:TruffleSOM,代码行数:12,代码来源:ToArgumentsArrayNode.java

示例6: doDoubleSArray

import som.vmobjects.SArray; //导入方法依赖的package包/类
@Specialization(guards = "isDoubleType(receiver)")
public final Object doDoubleSArray(final SArray receiver, final long index,
    final double value) {
  long idx = index - 1;
  receiver.getDoubleStorage(storageType)[(int) idx] = value;
  return value;
}
 
开发者ID:smarr,项目名称:TruffleSOM,代码行数:8,代码来源:AtPutPrim.java

示例7: doDoubleSArray

import som.vmobjects.SArray; //导入方法依赖的package包/类
@Specialization(guards = "receiver.isDoubleType()")
public final long doDoubleSArray(final SArray receiver) {
  return receiver.getDoubleStorage(storageType).length;
}
 
开发者ID:smarr,项目名称:SOMns,代码行数:5,代码来源:SizeAndLengthPrim.java

示例8: doDoubleSArray

import som.vmobjects.SArray; //导入方法依赖的package包/类
@Specialization(guards = "isDoubleType(receiver)")
public final double doDoubleSArray(final SArray receiver, final long idx) {
  return receiver.getDoubleStorage(storageType)[(int) idx - 1];
}
 
开发者ID:smarr,项目名称:TruffleSOM,代码行数:5,代码来源:AtPrim.java

示例9: doDoubleSArray

import som.vmobjects.SArray; //导入方法依赖的package包/类
@Specialization(guards = "isDoubleType(receiver)")
public final long doDoubleSArray(final SArray receiver) {
  return receiver.getDoubleStorage(storageType).length;
}
 
开发者ID:smarr,项目名称:TruffleSOM,代码行数:5,代码来源:LengthPrim.java


注:本文中的som.vmobjects.SArray.getDoubleStorage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。