Skip to content
Snippets Groups Projects
Commit 8d090af6 authored by Florian Angerer's avatar Florian Angerer
Browse files

Fix: iterating over size of calls instead of statements.

parent 5bf9d839
No related branches found
No related tags found
No related merge requests found
......@@ -371,10 +371,10 @@ final class REngine implements Engine, Engine.Timings {
RContext.setThreadLocalInstance(newContext);
try {
Object lastValue = RNull.instance;
for (int i = 0; i < statements.size(); i++) {
RSyntaxNode node = statements.get(i);
for (int i = 0; i < calls.length; i++) {
if (calls[i] == null) {
CompilerDirectives.transferToInterpreterAndInvalidate();
RSyntaxNode node = statements.get(i);
calls[i] = insert(Truffle.getRuntime().createDirectCallNode(doMakeCallTarget(node.asRNode(), RSource.Internal.REPL_WRAPPER.string, printResult, true)));
}
lastValue = calls[i].call(new Object[]{executionFrame != null ? executionFrame : newContext.stateREnvironment.getGlobalFrame()});
......
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