Skip to content

Commit

Permalink
Minimal fixes to IR to get JRuby compiling again.
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisseaton committed Oct 12, 2014
1 parent c02df12 commit 440ee53
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
3 changes: 2 additions & 1 deletion core/src/main/java/org/jruby/ir/instructions/BreakInstr.java
Expand Up @@ -94,7 +94,8 @@ public Instr clone(CloneInfo info) {
return new BreakInstr(returnValue.cloneForInlining(ii), scopeName);
}

return super.clone(ii);
throw new UnsupportedOperationException();
//return super.clone(ii);
}

@Override
Expand Down
Expand Up @@ -49,7 +49,8 @@ public Instr clone(CloneInfo info) {
return new NonlocalReturnInstr(returnValue.cloneForInlining(ii), methodName, maybeLambda);
}

return super.clone(ii);
throw new UnsupportedOperationException();
//return super.clone(ii);
}

@Override
Expand Down
Expand Up @@ -3,6 +3,7 @@
import org.jruby.ir.Operation;
import org.jruby.ir.operands.Operand;
import org.jruby.ir.operands.Variable;
import org.jruby.ir.transformations.inlining.CloneInfo;

public class ReceiveExceptionBase extends Instr implements ResultInstr, FixedArityInstr {
protected Variable result;
Expand Down Expand Up @@ -33,4 +34,10 @@ public String toString() {
public void updateResult(Variable v) {
this.result = v;
}

@Override
public Instr clone(CloneInfo info) {
throw new UnsupportedOperationException();
}

}
Expand Up @@ -5,6 +5,7 @@
import org.jruby.ir.instructions.ResultInstr;
import org.jruby.ir.operands.Operand;
import org.jruby.ir.operands.Variable;
import org.jruby.ir.transformations.inlining.CloneInfo;

import java.util.Map;

Expand Down Expand Up @@ -44,4 +45,10 @@ public void simplifyOperands(Map<Operand, Operand> valueMap, boolean force) {
public String toString() {
return getResult() + " = " + getOperation() + "(" + val + ")";
}

@Override
public Instr clone(CloneInfo info) {
throw new UnsupportedOperationException();
}

}

2 comments on commit 440ee53

@chrisseaton
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@subbuss I think your previous commit didn't compile https://travis-ci.org/jruby/jruby/builds/37691500. I've done these minimal changes that at least get JRuby compiling again - but they're probably non-sensical for what you actually want to do in the IR.

@subbuss
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Chris. Will take a look and fix up later today.

Please sign in to comment.