Skip to content
Permalink
Browse files
Unboxing tweak to get it back to old unboxing levels
* Still doesn't run because boolean unboxing now leaks them
  outside the core interpreter class into retrieve methods.

* So, this will need the old hackery to not unbox booleans but
  use the boolean literals as if they are unboxed.

  Or, we need to use specialized branch instructions.
  • Loading branch information
subbuss committed Jan 15, 2015
1 parent 6de3512 commit fcbe0cf76a7a4ebc3ced86f1107e2acd203c7e15
Showing with 4 additions and 4 deletions.
  1. +4 −4 core/src/main/java/org/jruby/ir/dataflow/analyses/UnboxableOpsAnalysisNode.java
@@ -325,8 +325,8 @@ public void applyTransferFunction(Instr i) {
Class receiverType = getOperandType(tmpState, r);
Class argType = getOperandType(tmpState, a);
// Optimistically assume that call is an ALU op
if ((receiverType == Float.class || receiverType == Fixnum.class) &&
(argType == Float.class || argType == Fixnum.class))
if (receiverType == Float.class ||
(receiverType == Fixnum.class && (argType == Float.class || argType == Fixnum.class)))
{
Class unboxedType = (receiverType == Float.class || argType == Float.class) ? Float.class : Fixnum.class;
unboxedAndDirty = true;
@@ -695,8 +695,8 @@ public void unbox(Map<Variable, TemporaryLocalVariable> unboxMap) {
// Optimistically assume that call is an ALU op
Operation unboxedOp = null;
Class unboxedType = null;
if ((receiverType == Float.class || receiverType == Fixnum.class) &&
(argType == Float.class || argType == Fixnum.class))
if (receiverType == Float.class ||
(receiverType == Fixnum.class && (argType == Float.class || argType == Fixnum.class)))
{
unboxedType = (receiverType == Float.class || argType == Float.class) ? Float.class : Fixnum.class;
unboxedOp = getUnboxedOp(unboxedType, m);

0 comments on commit fcbe0cf

Please sign in to comment.