Skip to content
Permalink
Browse files
Remove lightweight flag from nodes since we no longer use that inform…
…ation
  • Loading branch information
enebo committed Dec 30, 2014
1 parent 1e3d305 commit 44d7c490aea9ada73270410ddce6b1912a50a8d4
@@ -66,12 +66,4 @@ public NodeType getNodeType() {
public <T> T accept(NodeVisitor<T> iVisitor) {
return iVisitor.visitArrayNode(this);
}

public void setLightweight(boolean lightweight) {
this.lightweight = lightweight;
}

public boolean isLightweight() {
return lightweight;
}
}
@@ -59,9 +59,6 @@ public OpElementAsgnNode(ISourcePosition position, Node receiverNode, String ope

this.receiverNode = receiverNode;
this.argsNode = argsNode;
if (argsNode instanceof ArrayNode) {
((ArrayNode)argsNode).setLightweight(true);
}
this.valueNode = valueNode;
this.operatorName = operatorName;
}
@@ -50,10 +50,6 @@ public RescueBodyNode(ISourcePosition position, Node exceptionNodes, Node bodyNo
assert bodyNode != null : "bodyNode is not null";

this.exceptionNodes = exceptionNodes;
if (exceptionNodes instanceof ArrayNode) {
// array created for rescue args doesn't need to be in ObjectSpace.
((ArrayNode)exceptionNodes).setLightweight(true);
}
this.bodyNode = bodyNode;
this.optRescueNode = optRescueNode;
}
@@ -50,9 +50,6 @@ public SuperNode(ISourcePosition position, Node argsNode, Node iterNode) {
super(position);
this.argsNode = argsNode;
this.iterNode = iterNode;
if (argsNode instanceof ArrayNode) {
((ArrayNode)argsNode).setLightweight(true);
}
}

public NodeType getNodeType() {
@@ -45,15 +45,12 @@ public class WhenNode extends Node {

public WhenNode(ISourcePosition position, Node expressionNodes, Node bodyNode, Node nextCase) {
super(position);
this.expressionNodes = expressionNodes;
if (expressionNodes instanceof ArrayNode) {
((ArrayNode)expressionNodes).setLightweight(true);
}

assert bodyNode != null : "bodyNode is not null";

this.expressionNodes = expressionNodes;
this.bodyNode = bodyNode;
this.nextCase = nextCase;

assert bodyNode != null : "bodyNode is not null";
}

public NodeType getNodeType() {
@@ -58,10 +58,6 @@ public YieldNode(ISourcePosition position, Node argsNode, boolean expandedArgume
//assert argsNode != null : "argsNode is not null";

this.argsNode = argsNode;
// If we have more than one argument, then make sure the array is not ObjectSpaced.
if (argsNode instanceof ArrayNode) {
((ArrayNode)argsNode).setLightweight(true);
}
this.expandedArguments = expandedArguments;
}

0 comments on commit 44d7c49

Please sign in to comment.