Package wyrl.io

Examples of wyrl.io.JavaIdentifierOutputStream


    }
  }

  protected void translate(Constant.Type e, int freeSlot,
      ArrayList<Bytecode> bytecodes) {
    JavaIdentifierOutputStream jout = new JavaIdentifierOutputStream();
    BinaryOutputStream bout = new BinaryOutputStream(jout);
    Type.BinaryWriter writer = new Type.BinaryWriter(bout);
    try {
      writer.write(e.type);
      writer.close();
    } catch(IOException ex) {
      throw new RuntimeException(ex.getMessage(),ex);
    }

    bytecodes.add(new Bytecode.LoadConst(jout.toString()));
    JvmType.Function ftype = new JvmType.Function(WHILEYTYPE,
        JAVA_LANG_STRING);
    bytecodes.add(new Bytecode.Invoke(WHILEYTYPE, "valueOf", ftype,
        Bytecode.InvokeMode.STATIC));
  }
View Full Code Here


      throw new RuntimeException(e);
    }
  }

  private static String typeMangle(Type.FunctionOrMethod ft) throws IOException {
    JavaIdentifierOutputStream jout = new JavaIdentifierOutputStream();
    BinaryOutputStream binout = new BinaryOutputStream(jout);
    Type.BinaryWriter tm = new Type.BinaryWriter(binout);
    tm.write(ft);
    binout.close(); // force flush
    return jout.toString();
  }
View Full Code Here

TOP

Related Classes of wyrl.io.JavaIdentifierOutputStream

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.