Skip to content

Commit

Permalink
Remove lightweight flag from nodes since we no longer use that inform…
Browse files Browse the repository at this point in the history
…ation
  • Loading branch information
enebo committed Dec 30, 2014
1 parent 1e3d305 commit 44d7c49
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 28 deletions.
8 changes: 0 additions & 8 deletions core/src/main/java/org/jruby/ast/ArrayNode.java
Expand Up @@ -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;
}
}
3 changes: 0 additions & 3 deletions core/src/main/java/org/jruby/ast/OpElementAsgnNode.java
Expand Up @@ -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;
}
Expand Down
4 changes: 0 additions & 4 deletions core/src/main/java/org/jruby/ast/RescueBodyNode.java
Expand Up @@ -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;
}
Expand Down
3 changes: 0 additions & 3 deletions core/src/main/java/org/jruby/ast/SuperNode.java
Expand Up @@ -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() {
Expand Down
9 changes: 3 additions & 6 deletions core/src/main/java/org/jruby/ast/WhenNode.java
Expand Up @@ -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() {
Expand Down
4 changes: 0 additions & 4 deletions core/src/main/java/org/jruby/ast/YieldNode.java
Expand Up @@ -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;
}

Expand Down

0 comments on commit 44d7c49

Please sign in to comment.