Skip to content

Commit

Permalink
Unboxing tweak to get it back to old unboxing levels
Browse files Browse the repository at this point in the history
* 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 fcbe0cf
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit fcbe0cf

Please sign in to comment.