本文整理汇总了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;
}
示例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());
}
}
示例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());
}
}
示例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());
}
}
示例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());
}
}
示例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);
}
示例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();
}
}
示例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();
}
}
示例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());
}
}