Skip to content

Commit

Permalink
[truffle] Actually do the executeGeneric -> execute rename
Browse files Browse the repository at this point in the history
  • Loading branch information
pmurias committed Jun 26, 2018
1 parent 9538d9b commit b9774f7
Show file tree
Hide file tree
Showing 15 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion src/vm/jvm/runtime/org/perl6/nqp/truffle/NQPRootNode.java
Expand Up @@ -63,6 +63,6 @@ public NQPRootNode(NQPLanguage language, NQPNode bodyNode) {
}

public Object execute(VirtualFrame frame) {
return bodyNode.executeGeneric(frame);
return bodyNode.execute(frame);
}
}
4 changes: 2 additions & 2 deletions src/vm/jvm/runtime/org/perl6/nqp/truffle/NQPStmts.java
Expand Up @@ -61,7 +61,7 @@ public NQPStmts(NQPNode[] bodyNodes) {

@Override
@ExplodeLoop
public Object executeGeneric(VirtualFrame frame) {
public Object execute(VirtualFrame frame) {
/*
* This assertion illustrates that the array length is really a constant during compilation.
*/
Expand All @@ -71,7 +71,7 @@ public Object executeGeneric(VirtualFrame frame) {
CompilerAsserts.compilationConstant(bodyNodes.length);

for (NQPNode statement : bodyNodes) {
ret = statement.executeGeneric(frame);
ret = statement.execute(frame);
}

return ret;
Expand Down
Expand Up @@ -71,13 +71,13 @@ public FrameSlot lookupVar(String name) {

@Override
@ExplodeLoop
public Object executeGeneric(VirtualFrame frame) {
public Object execute(VirtualFrame frame) {
Object ret = null;

CompilerAsserts.compilationConstant(bodyNodes.length);

for (NQPNode statement : bodyNodes) {
ret = statement.executeGeneric(frame);
ret = statement.execute(frame);
}

return ret;
Expand Down
Expand Up @@ -47,7 +47,7 @@

@TypeSystemReference(NQPTypes.class)
public abstract class NQPNode extends NQPBaseNode {
public Object executeGeneric(VirtualFrame frame) {
public Object execute(VirtualFrame frame) {
throw new MalformedAstException("Expected an AST node that produces an object");
}
public String executeString(VirtualFrame frame) {
Expand Down
Expand Up @@ -12,7 +12,7 @@ public NQPNotClosureNode(NQPCodeRef codeRef) {
}

@Override
public Object executeGeneric(VirtualFrame frame) {
public Object execute(VirtualFrame frame) {
return codeRef;
}
}
Expand Up @@ -57,7 +57,7 @@ public NQPIntArgNode(NQPNode valueNode) {
}

@Override
public Object executeGeneric(VirtualFrame frame) {
public Object execute(VirtualFrame frame) {
return valueNode.executeInteger(frame);
}
}
Expand Up @@ -66,8 +66,8 @@ public NQPInvokeNode(NQPNode functionNode, NQPNode[] argumentNodes) {

@ExplodeLoop
@Override
public Object executeGeneric(VirtualFrame frame) {
Object function = functionNode.executeGeneric(frame);
public Object execute(VirtualFrame frame) {
Object function = functionNode.execute(frame);

/*
* The number of arguments is constant for one invoke node. During compilation, the loop is
Expand All @@ -79,7 +79,7 @@ public Object executeGeneric(VirtualFrame frame) {

Object[] argumentValues = new Object[argumentNodes.length];
for (int i = 0; i < argumentNodes.length; i++) {
argumentValues[i] = argumentNodes[i].executeGeneric(frame);
argumentValues[i] = argumentNodes[i].execute(frame);
}
return dispatchNode.executeDispatch(function, argumentValues);
}
Expand Down
Expand Up @@ -57,7 +57,7 @@ public NQPNumArgNode(NQPNode valueNode) {
}

@Override
public Object executeGeneric(VirtualFrame frame) {
public Object execute(VirtualFrame frame) {
return valueNode.executeNumber(frame);
}
}
Expand Up @@ -57,7 +57,7 @@ public NQPStrArgNode(NQPNode valueNode) {
}

@Override
public Object executeGeneric(VirtualFrame frame) {
public Object execute(VirtualFrame frame) {
return valueNode.executeString(frame);
}
}
Expand Up @@ -58,7 +58,7 @@ public NQPSmartStringifyNode(NQPNode valueNode) {

@Override
public String executeString(VirtualFrame frame) {
Object value = valueNode.executeGeneric(frame);
Object value = valueNode.execute(frame);
if (value instanceof String) {
return (String) value;
} else if (value instanceof Long) {
Expand Down
Expand Up @@ -14,7 +14,7 @@ public NQPPrintNode(NQPNode arg) {
}

@Override
public Object executeGeneric(VirtualFrame frame) {
public Object execute(VirtualFrame frame) {
String value = this.arg.executeString(frame);
System.out.print(value);
return value;
Expand Down
Expand Up @@ -14,7 +14,7 @@ public NQPSayNode(NQPNode arg) {
}

@Override
public Object executeGeneric(VirtualFrame frame) {
public Object execute(VirtualFrame frame) {
String value = this.arg.executeString(frame);
System.out.println(value);
return value;
Expand Down
Expand Up @@ -60,8 +60,8 @@ public NQPBindLocalVariableNode(FrameSlot slot, NQPNode valueNode) {
}

@Override
public Object executeGeneric(VirtualFrame frame) {
Object value = valueNode.executeGeneric(frame);
public Object execute(VirtualFrame frame) {
Object value = valueNode.execute(frame);
frame.setObject(slot, value);
return value;
}
Expand Down
Expand Up @@ -58,7 +58,7 @@ public NQPGetPositionalNode(FrameSlot slot, int index) {
this.index = index;
}

public Object executeGeneric(VirtualFrame frame) {
public Object execute(VirtualFrame frame) {
Object[] args = frame.getArguments();
Object value = args[index];
frame.setObject(slot, value);
Expand Down
Expand Up @@ -59,7 +59,7 @@ public NQPReadLocalVariableNode(FrameSlot slot) {
this.slot = slot;
}

public Object executeGeneric(VirtualFrame frame) {
public Object execute(VirtualFrame frame) {
return FrameUtil.getObjectSafe(frame, slot);
}
}

0 comments on commit b9774f7

Please sign in to comment.