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


Java UnexpectedResultException.getResult方法代码示例

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


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

示例1: evalForRemaining

import com.oracle.truffle.api.nodes.UnexpectedResultException; //导入方法依赖的package包/类
@ExplodeLoop
public static Object evalForRemaining(final VirtualFrame frame,
    final ExpressionNode[] exprs, final long[] storage, final int next) {
  for (int i = next; i < exprs.length; i++) {
    try {
      storage[i] = exprs[i].executeLong(frame);
    } catch (UnexpectedResultException e) {
      Object[] newStorage = new Object[exprs.length];
      for (int j = 0; j < i; j += 1) {
        newStorage[j] = storage[j];
      }
      newStorage[i] = e.getResult();
      return evalForRemaining(frame, exprs, newStorage, i + 1);
    }
  }
  return storage;
}
 
开发者ID:smarr,项目名称:SOMns,代码行数:18,代码来源:ArraySetAllStrategy.java

示例2: evaluateCondition

import com.oracle.truffle.api.nodes.UnexpectedResultException; //导入方法依赖的package包/类
private boolean evaluateCondition(final VirtualFrame frame) {
  try {
    return conditionNode.executeBoolean(frame);
  } catch (UnexpectedResultException e) {
    // TODO: should rewrite to a node that does a proper message send...
    throw new UnsupportedSpecializationException(this,
        new Node[] {conditionNode}, e.getResult());
  }
}
 
开发者ID:smarr,项目名称:SOMns,代码行数:10,代码来源:WhileInlinedLiteralsNode.java

示例3: evaluateReceiver

import com.oracle.truffle.api.nodes.UnexpectedResultException; //导入方法依赖的package包/类
protected final boolean evaluateReceiver(final VirtualFrame frame) {
  try {
    return profile.profile(receiverNode.executeBoolean(frame));
  } catch (UnexpectedResultException e) {
    // TODO: should rewrite to a node that does a proper message send...
    throw new UnsupportedSpecializationException(this,
        new Node[] {receiverNode}, e.getResult());
  }
}
 
开发者ID:smarr,项目名称:SOMns,代码行数:10,代码来源:BooleanInlinedLiteralNode.java

示例4: evaluateArgument

import com.oracle.truffle.api.nodes.UnexpectedResultException; //导入方法依赖的package包/类
protected final boolean evaluateArgument(final VirtualFrame frame) {
  try {
    return argumentNode.executeBoolean(frame);
  } catch (UnexpectedResultException e) {
    // TODO: should rewrite to a node that does a proper message send...
    throw new UnsupportedSpecializationException(this,
        new Node[] {argumentNode}, e.getResult());
  }
}
 
开发者ID:smarr,项目名称:SOMns,代码行数:10,代码来源:BooleanInlinedLiteralNode.java

示例5: evaluateCondition

import com.oracle.truffle.api.nodes.UnexpectedResultException; //导入方法依赖的package包/类
private boolean evaluateCondition(final VirtualFrame frame) {
  try {
    return condProf.profile(conditionNode.executeBoolean(frame));
  } catch (UnexpectedResultException e) {
    // TODO: should rewrite to a node that does a proper message send...
    throw new UnsupportedSpecializationException(this,
        new Node[] {conditionNode}, e.getResult());
  }
}
 
开发者ID:smarr,项目名称:SOMns,代码行数:10,代码来源:IfTrueIfFalseInlinedLiteralsNode.java

示例6: evalObject

import com.oracle.truffle.api.nodes.UnexpectedResultException; //导入方法依赖的package包/类
@Override
Object evalObject(VirtualFrame frame) {
  Object leftValue = leftNode.evalObject(frame);
  Object rightValue = rightNode.evalObject(frame);
  if (leftValue instanceof Integer && rightValue instanceof Integer) {
    int left = (Integer)leftValue;
    int right = (Integer)rightValue;
    try {
      return doSmallOp(left, right);
    } catch (UnexpectedResultException e) {
      return e.getResult();
    }
  }
  return slowPath(leftValue, rightValue);
}
 
开发者ID:forax,项目名称:ninal,代码行数:16,代码来源:Interpreter.java

示例7: read

import com.oracle.truffle.api.nodes.UnexpectedResultException; //导入方法依赖的package包/类
@Override
public Object read(final SObject obj) {
  try {
    return readDouble(obj);
  } catch (UnexpectedResultException e) {
    return e.getResult();
  }
}
 
开发者ID:smarr,项目名称:TruffleSOM,代码行数:9,代码来源:StorageLocation.java

示例8: read

import com.oracle.truffle.api.nodes.UnexpectedResultException; //导入方法依赖的package包/类
@Override
public Object read(final SObject obj) {
  try {
    return readLong(obj);
  } catch (UnexpectedResultException e) {
    return e.getResult();
  }
}
 
开发者ID:smarr,项目名称:TruffleSOM,代码行数:9,代码来源:FieldAccessorNode.java

示例9: evaluateReceiver

import com.oracle.truffle.api.nodes.UnexpectedResultException; //导入方法依赖的package包/类
protected final boolean evaluateReceiver(final VirtualFrame frame) {
  try {
    return receiverNode.executeBoolean(frame);
  } catch (UnexpectedResultException e) {
    // TODO: should rewrite to a node that does a proper message send...
    throw new UnsupportedSpecializationException(this,
        new Node[] {receiverNode}, e.getResult());
  }
}
 
开发者ID:smarr,项目名称:TruffleSOM,代码行数:10,代码来源:BooleanInlinedLiteralNode.java


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