Package zz.jinterp.JPrimitive

Examples of zz.jinterp.JPrimitive.JDouble


        push(new JFloat(i.v));
      } break;
       
      case I2D: {
        JInt i = (JInt) pop();
        push(new JDouble(i.v));
      } break;
       
      case L2I: {
        JLong i = (JLong) pop();
        push(new JInt((int) i.v));
      } break;
       
      case L2F: {
        JLong i = (JLong) pop();
        push(new JFloat(i.v));
      } break;
       
      case L2D: {
        JLong i = (JLong) pop();
        push(new JDouble(i.v));
      } break;
       
      case F2I: {
        JFloat i = (JFloat) pop();
        push(new JInt((int) i.v));
      } break;
       
      case F2L: {
        JFloat i = (JFloat) pop();
        push(new JLong((long) i.v));
      } break;
       
      case F2D: {
        JFloat i = (JFloat) pop();
        push(new JDouble(i.v));
      } break;
       
      case D2I: {
        JDouble i = (JDouble) pop();
        push(new JInt((int) i.v));
      } break;
       
      case D2L: {
        JDouble i = (JDouble) pop();
        push(new JLong((long) i.v));
      } break;
       
      case D2F: {
        JDouble i = (JDouble) pop();
        push(new JFloat((float) i.v));
      } break;
       
      case I2B: {
        JInt i = (JInt) pop();
        push(new JByte((byte) i.v));
      } break;
       
      case I2C: {
        JInt i = (JInt) pop();
        push(new JChar((char) i.v));
      } break;
       
      case I2S: {
        JInt i = (JInt) pop();
        push(new JShort((short) i.v));
      } break;
       
      case LCMP: {
        JLong l2 = (JLong) pop();
        JLong l1 = (JLong) pop();
        if (l1.v > l2.v) push(JInt._1);
        else if (l1.v == l2.v) push(JInt._0);
        else push(JInt._M1);
      } break;
       
      case FCMPL: {
        JFloat f2 = (JFloat) pop();
        JFloat f1 = (JFloat) pop();
        if (Float.isNaN(f1.v) || Float.isNaN(f2.v)) push(JInt._M1);
        else if (f1.v > f2.v) push(JInt._1);
        else if (f1.v == f2.v) push(JInt._0);
        else push(JInt._M1);
      } break;
       
      case FCMPG: {
        JFloat f2 = (JFloat) pop();
        JFloat f1 = (JFloat) pop();
        if (Float.isNaN(f1.v) || Float.isNaN(f2.v)) push(JInt._1);
        else if (f1.v > f2.v) push(JInt._1);
        else if (f1.v == f2.v) push(JInt._0);
        else push(JInt._M1);
      } break;
       
      case DCMPL: {
        JDouble d2 = (JDouble) pop();
        JDouble d1 = (JDouble) pop();
        if (Double.isNaN(d1.v) || Double.isNaN(d2.v)) push(JInt._M1);
        else if (d1.v > d2.v) push(JInt._1);
        else if (d1.v == d2.v) push(JInt._0);
        else push(JInt._M1);
      } break;
       
      case DCMPG: {
        JDouble d2 = (JDouble) pop();
        JDouble d1 = (JDouble) pop();
        if (Double.isNaN(d1.v) || Double.isNaN(d2.v)) push(JInt._1);
        else if (d1.v > d2.v) push(JInt._1);
        else if (d1.v == d2.v) push(JInt._0);
        else push(JInt._M1);
      } break;
View Full Code Here


  }
 
    public static long __doubleToRawLongBits(double value) { return 0; }
  public JObject _doubleToRawLongBits(JFrame aParentFrame, JInstance aTarget, JObject[] aArgs)
  {
    JDouble value = (JDouble) aArgs[0];
    return new JLong(Double.doubleToRawLongBits(value.v));
  }
View Full Code Here

  }

  public static long __doubleToLongBits(double value) { return 0; }
  public JObject _doubleToLongBits(JFrame aParentFrame, JInstance aTarget, JObject[] aArgs)
  {
    JDouble value = (JDouble) aArgs[0];
    return new JLong(Double.doubleToLongBits(value.v));
  }
View Full Code Here

  public static double __longBitsToDouble(long bits) { return 0; }
  public JObject _longBitsToDouble(JFrame aParentFrame, JInstance aTarget, JObject[] aArgs)
  {
    JLong bits = (JLong) aArgs[0];
    return new JDouble(Double.longBitsToDouble(bits.v));
  }
View Full Code Here

    {
      return new JLong((Long) aObject);
    }
    else if (aObject instanceof Double)
    {
      return new JDouble((Double) aObject);
    }
    else if (aObject instanceof Float)
    {
      return new JFloat((Float) aObject);
    }
View Full Code Here

TOP

Related Classes of zz.jinterp.JPrimitive.JDouble

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.