Skip to content

Commit ced1273

Browse files
author
Pavel Marek
committed
Remove deepCopy overrides.
1 parent 1250b7d commit ced1273

File tree

2 files changed

+4
-30
lines changed

2 files changed

+4
-30
lines changed

com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/control/ReplacementNode.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -65,11 +65,6 @@ abstract class ReplacementNode extends OperatorNode {
6565
this.lhs = lhs;
6666
}
6767

68-
@Override
69-
public final Node deepCopy() {
70-
return RContext.getASTBuilder().process(this).asRNode();
71-
}
72-
7368
public static ReplacementNode create(SourceSection source, RSyntaxLookup operator, RSyntaxLookup variable, RSyntaxElement lhs, RNode rhs, List<RSyntaxCall> calls,
7469
boolean isSuper, int tempNamesStartIndex, boolean isVoid) {
7570
CompilerAsserts.neverPartOfCompilation();

com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/RCallSpecialNode.java

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -22,14 +22,12 @@
2222
*/
2323
package com.oracle.truffle.r.nodes.function;
2424

25-
import com.oracle.truffle.api.CompilerAsserts;
2625
import com.oracle.truffle.api.CompilerDirectives;
2726
import com.oracle.truffle.api.CompilerDirectives.CompilationFinal;
2827
import com.oracle.truffle.api.dsl.Cached;
2928
import com.oracle.truffle.api.dsl.NodeChild;
3029
import com.oracle.truffle.api.dsl.Specialization;
3130
import com.oracle.truffle.api.frame.VirtualFrame;
32-
import com.oracle.truffle.api.nodes.Node;
3331
import com.oracle.truffle.api.nodes.NodeCost;
3432
import com.oracle.truffle.api.nodes.NodeInfo;
3533
import com.oracle.truffle.api.source.SourceSection;
@@ -176,20 +174,14 @@ public RBaseNode getErrorContext() {
176174
*/
177175
private RCallSpecialNode callSpecialParent;
178176

179-
private final boolean inReplace;
180-
private final int[] ignoredArguments;
181-
182-
private RCallSpecialNode(SourceSection sourceSection, RNode functionNode, RBuiltinDescriptor expectedFunction, RSyntaxNode[] arguments, ArgumentsSignature signature, RNode special,
183-
boolean inReplace, int[] ignoredArguments) {
177+
private RCallSpecialNode(SourceSection sourceSection, RNode functionNode, RBuiltinDescriptor expectedFunction, RSyntaxNode[] arguments, ArgumentsSignature signature, RNode special) {
184178
this.sourceSection = sourceSection;
185179
this.expectedFunction = expectedFunction;
186180
this.special = special;
187181
this.functionNode = functionNode;
188182
this.arguments = arguments;
189183
this.signature = signature;
190184
this.visible = expectedFunction.getVisibility();
191-
this.inReplace = inReplace;
192-
this.ignoredArguments = ignoredArguments;
193185
}
194186

195187
/**
@@ -296,7 +288,7 @@ private static RCallSpecialNode tryCreate(SourceSection sourceSection, RNode fun
296288
RBuiltinDescriptor expectedFunction = RContext.lookupBuiltinDescriptor(name);
297289
RInternalError.guarantee(expectedFunction != null);
298290

299-
RCallSpecialNode callSpecial = new RCallSpecialNode(sourceSection, functionNode, expectedFunction, arguments, signature, special, inReplace, ignoredArguments);
291+
RCallSpecialNode callSpecial = new RCallSpecialNode(sourceSection, functionNode, expectedFunction, arguments, signature, special);
300292
for (int i = 0; i < arguments.length; i++) {
301293
if (!inReplace || !contains(ignoredArguments, i)) {
302294
if (arguments[i] instanceof RCallSpecialNode) {
@@ -348,19 +340,6 @@ public Object execute(VirtualFrame frame, Object function) {
348340
}
349341
}
350342

351-
@Override
352-
public Node deepCopy() {
353-
assert !inReplace && callSpecialParent == null && ignoredArguments.length == 0;
354-
CompilerAsserts.neverPartOfCompilation();
355-
RCallSpecialNode node = (RCallSpecialNode) RContext.getASTBuilder().process(this).asRNode();
356-
node.functionNode = node.insert(node.functionNode);
357-
node.special = node.insert(node.special);
358-
if (node.visibility != null) {
359-
node.visibility = insert(node.visibility);
360-
}
361-
return node;
362-
}
363-
364343
private RCallNode getRCallNode(RSyntaxNode[] newArguments) {
365344
return RCallNode.createCall(sourceSection, functionNode, signature, newArguments);
366345
}

0 commit comments

Comments
 (0)