mirkosertic / Bytecoder

Framework to interpret and transpile JVM bytecode to JavaScript, OpenCL or WebAssembly.

Home Page:https://www.mirkosertic.de/blog/2017/06/compiling-bytecode-to-javascript/

Repository from Github https://github.commirkosertic/BytecoderRepository from Github https://github.commirkosertic/Bytecoder

String.replace not supported

nbrugger-tgm opened this issue · comments

String.replace (as well as all overloads) are widely used and should be supported

Caused by: java.lang.IllegalStateException: No such method : java/lang/String.replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;

I assume that a "native" transpilation is missing?

If you point me to how to do such "stubs" please point me to it and i will open a PR

Edit: I have seen that the stubs/translations are in runtime.js and the java natives in "classlib". Would it be correct to:

  1. Copy the signatures from java.lang.String into TString and mark them native
  2. Create an implementation is runtime.js

Is there any other stuff needed?