Package com.oracle.truffle.api.nodes

Examples of com.oracle.truffle.api.nodes.UnexpectedResultException


                final long value = super.executeLongFixnum(frame);

                if (canLower(value)) {
                    return lower(value);
                } else {
                    throw new UnexpectedResultException(value);
                }
            } else {
                return super.executeIntegerFixnum(frame);
            }
        } catch (UnexpectedResultException e) {
            if (e.getResult() instanceof Long && canLower((long) e.getResult())) {
                hasNeededToLowerLongFixnum = true;
                return lower((long) e.getResult());
            } else if (e.getResult() instanceof RubyRange.LongFixnumRange && canLower((RubyRange.LongFixnumRange) e.getResult())) {
                hasNeededToLowerLongFixnumRange = true;
                throw new UnexpectedResultException(lower((RubyRange.LongFixnumRange) e.getResult()));
            } else {
                throw e;
            }
        }
    }
View Full Code Here


                final RubyRange.LongFixnumRange range = super.executeLongFixnumRange(frame);

                if (canLower(range)) {
                    return lower(range);
                } else {
                    throw new UnexpectedResultException(range);
                }
            } else {
                return super.executeIntegerFixnumRange(frame);
            }
        } catch (UnexpectedResultException e) {
            if (e.getResult() instanceof Long && canLower((long) e.getResult())) {
                hasNeededToLowerLongFixnum = true;
                throw new UnexpectedResultException(lower((long) e.getResult()));
            } else if (e.getResult() instanceof RubyRange.LongFixnumRange && canLower((RubyRange.LongFixnumRange) e.getResult())) {
                hasNeededToLowerLongFixnumRange = true;
                return lower((RubyRange.LongFixnumRange) e.getResult());
            } else {
                throw e;
View Full Code Here

        try {
            return super.executeUndefinedPlaceholder(frame);
        } catch (UnexpectedResultException e) {
            if (e.getResult() instanceof Long && canLower((long) e.getResult())) {
                hasNeededToLowerLongFixnum = true;
                throw new UnexpectedResultException(lower((long) e.getResult()));
            } else if (e.getResult() instanceof RubyRange.LongFixnumRange && canLower((RubyRange.LongFixnumRange) e.getResult())) {
                hasNeededToLowerLongFixnumRange = true;
                throw new UnexpectedResultException(e.getResult());
            } else {
                throw e;
            }
        }
    }
View Full Code Here

        Object result = execute(object);

        if (result instanceof Integer) {
            return (int) result;
        } else {
            throw new UnexpectedResultException(result);
        }
    }
View Full Code Here

        Object result = execute(object);

        if (result instanceof Long) {
            return (long) result;
        } else {
            throw new UnexpectedResultException(result);
        }
    }
View Full Code Here

        Object result = execute(object);

        if (result instanceof Double) {
            return (double) result;
        } else {
            throw new UnexpectedResultException(result);
        }
    }
View Full Code Here

    public long readLong(ObjectStorage object, boolean condition) throws UnexpectedResultException {
        if (isSet(object)) {
            // TODO(CS): unsafeGetInt has a problem under compilation - pass condition as false and location as null for now
            return CompilerDirectives.unsafeGetInt(object, offset, false /*condition*/, null /*this*/);
        } else {
            throw new UnexpectedResultException(null);
        }
    }
View Full Code Here

TOP

Related Classes of com.oracle.truffle.api.nodes.UnexpectedResultException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.