Skip to content
Snippets Groups Projects
Commit e3475f5e authored by Lukas Stadler's avatar Lukas Stadler
Browse files

[GR-2738] Update Truffle dependency.

parents 22893703 91b486d6
No related branches found
No related tags found
No related merge requests found
/*
* Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -40,6 +40,7 @@ import com.oracle.truffle.r.nodes.function.PromiseHelperNode.PromiseCheckHelperN
import com.oracle.truffle.r.runtime.Arguments;
import com.oracle.truffle.r.runtime.ArgumentsSignature;
import com.oracle.truffle.r.runtime.RError;
import com.oracle.truffle.r.runtime.RInternalError;
import com.oracle.truffle.r.runtime.Utils;
import com.oracle.truffle.r.runtime.data.RArgsValuesAndNames;
import com.oracle.truffle.r.runtime.data.RMissing;
......@@ -233,7 +234,11 @@ public final class CallArgumentsNode extends RBaseNode implements UnmatchedArgum
index = flattenVarArgsObject(frame, varArgs, values, index);
vargsSymbolsIndex++;
} else {
values[index] = arguments[i] == null ? RMissing.instance : arguments[i].execute(frame);
Object result = arguments[i] == null ? RMissing.instance : arguments[i].execute(frame);
if (CompilerDirectives.inInterpreter() && result == null) {
throw RInternalError.shouldNotReachHere("invalid null in arguments");
}
values[index] = result;
index++;
}
}
......
......@@ -162,6 +162,7 @@ public abstract class ClassHierarchyNode extends UnaryNode {
@Fallback
protected RStringVector getClassHr(Object obj) {
CompilerDirectives.transferToInterpreter();
throw RInternalError.shouldNotReachHere("type: " + (obj == null ? "null" : obj.getClass().getSimpleName()));
}
}
......
......@@ -253,6 +253,9 @@ public final class FunctionDefinitionNode extends RRootNode implements RSyntaxNo
saveArguments.execute(frame);
Object result = body.visibleExecute(frame);
normalExit.enter();
if (CompilerDirectives.inInterpreter() && result == null) {
throw RInternalError.shouldNotReachHere("invalid null in result of " + this);
}
return result;
} catch (ReturnException ex) {
if (returnTopLevelProfile.profile(ex.getTarget() == RArguments.getCall(frame))) {
......
......@@ -22,10 +22,12 @@
*/
package com.oracle.truffle.r.runtime.nodes;
import com.oracle.truffle.api.CompilerDirectives;
import com.oracle.truffle.api.dsl.TypeSystemReference;
import com.oracle.truffle.api.frame.VirtualFrame;
import com.oracle.truffle.api.instrumentation.Instrumentable;
import com.oracle.truffle.api.nodes.UnexpectedResultException;
import com.oracle.truffle.r.runtime.RInternalError;
import com.oracle.truffle.r.runtime.data.RTypes;
import com.oracle.truffle.r.runtime.data.RTypesGen;
import com.oracle.truffle.r.runtime.nodes.instrumentation.RNodeWrapperFactory;
......@@ -53,7 +55,11 @@ public abstract class RNode extends RBaseNode implements RInstrumentableNode {
* does not start with "execute" so that the DSL does not treat it like an execute function.
*/
public Object visibleExecute(VirtualFrame frame) {
return execute(frame);
Object result = execute(frame);
if (CompilerDirectives.inInterpreter() && result == null) {
throw RInternalError.shouldNotReachHere("null result in " + this.getClass().getSimpleName());
}
return result;
}
/*
......
......@@ -28,7 +28,7 @@ suite = {
"suites" : [
{
"name" : "truffle",
"version" : "0a9e88293bf90fe485999b26b0969e71509a64aa",
"version" : "c02973969fb144b533ae0e53187674cb04c2aacc",
"urls" : [
{"url" : "https://github.com/graalvm/truffle", "kind" : "git"},
{"url" : "https://curio.ssw.jku.at/nexus/content/repositories/snapshots", "kind" : "binary"},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment