Skip to content

Commit

Permalink
dead code?
Browse files Browse the repository at this point in the history
  • Loading branch information
enebo committed Dec 5, 2014
1 parent 3231adc commit 2124c69
Showing 1 changed file with 0 additions and 28 deletions.
28 changes: 0 additions & 28 deletions core/src/main/java/org/jruby/ir/IRBuilder.java
Expand Up @@ -1715,23 +1715,6 @@ public Operand buildDefs(DefsNode node, IRScope s) { // Class method
return new Symbol(method.getName());
}

protected int receiveOptArgs(final ArgsNode argsNode, IRScope s, int opt, int argIndex) {
ListNode optArgs = argsNode.getOptArgs();
for (int j = 0; j < opt; j++, argIndex++) {
// Jump to 'l' if this arg is not null. If null, fall through and build the default value!
Label l = s.getNewLabel();
LocalAsgnNode n = (LocalAsgnNode)optArgs.get(j);
String argName = n.getName();
Variable av = s.getLocalVariable(argName, 0);
if (s instanceof IRMethod) ((IRMethod)s).addArgDesc(IRMethodArgs.ArgType.opt, argName);
addInstr(s, new ReceiveOptArgInstr(av, argIndex-j, argIndex-j, j));
addInstr(s, BNEInstr.create(av, UndefinedValue.UNDEFINED, l)); // if 'av' is not undefined, go to default
build(n, s);
addInstr(s, new LabelInstr(l));
}
return argIndex;
}

protected LocalVariable getArgVariable(IRScope s, String name, int depth) {
// For non-loops, this name will override any name that exists in outer scopes
return s instanceof IRFor ? s.getLocalVariable(name, depth) : s.getNewLocalVariable(name, 0);
Expand Down Expand Up @@ -2041,17 +2024,6 @@ public void receiveBlockArgs(final IterNode node, IRScope s) {
}
}

public String buildType(Node typeNode) {
switch (typeNode.getNodeType()) {
case CONSTNODE:
return ((ConstNode)typeNode).getName();
case SYMBOLNODE:
return ((SymbolNode)typeNode).getName();
default:
return "unknown_type";
}
}

public Operand buildDot(final DotNode dotNode, IRScope s) {
Variable res = s.createTemporaryVariable();
addInstr(s, new BuildRangeInstr(res, build(dotNode.getBeginNode(), s), build(dotNode.getEndNode(), s), dotNode.isExclusive()));
Expand Down

0 comments on commit 2124c69

Please sign in to comment.