Forum > Other OS

New idea for FPC JVM

(1/2) > >>

jiaxing2:
It currently compiles to jasmin asembly and utilize jasmin + apache bcel + javapp to done the job.

My research soonly showed that jasmin is no longer developed since 2015. Apache bcel is still maintained but the version used by FPC JVM is very old. Javapp is a broken software for me, I have never able to make it to work.

I don't know if the same stack is used on Android development but I saw the Android efforts are pretty much active.

My proposal is abandon jasmin and switch to asm instead: https://asm.ow2.io/

asm is currently active developed and being used for many projects, the most notable is Groovy.

Also have a look at oberonc: https://github.com/lboasso/oberonc

The guy done everything entirely himself, without relying on any third party library like asm. I know oberon is different in nature with object pascal which is more complicated but it worths to have a look at his work.

Another interesting project is gpcp - the component pascal compiler for .net and java: https://github.com/k-john-gough/gpcp

Unfortunately, the software is currently in maintainence mode. But it's the best Pascal family language compiler targets JVM. It relies on asm to done the job. But the most notable thing we could learn from it is the j2cps utility - creating binding for Java library to use with component pascal. You could download the JVM distribution and go to symfiles, check the html documents here, you could start with index.html and you could see they provides complete Java runtime library binding. New binding for other java library could be created easily with j2cps.

I have never able to make our javapp to work. May be we could learn something from this project. As we already admitted on the Wiki, javapp's source code is ugly. So I think a complete rewrite might be feasible, isn't it?

Our current FPC JVM runtime library is too bare metal and having many problems interfacing with Java code. I suggest to break compatibily with the object pascal dialect used by other other frontend (objfpc) completely and create a separate dialect to deal with the JVM and Java interop exclusively.

Final words: it's all depends on the people who actually done the job and all of my proposals are just... proposals. But I'm realy interested on the FPC JVM backend and I hope you - the developer, would have a look at this thread. Thanks.

PascalDragon:

--- Quote from: jiaxing2 on May 26, 2020, 07:15:06 am ---Final words: it's all depends on the people who actually done the job and all of my proposals are just... proposals. But I'm realy interested on the FPC JVM backend and I hope you - the developer, would have a look at this thread. Thanks.

--- End quote ---

Feel free to contribute alternative assembler backends.

zeljkoc:
Take a look at  project
https://github.com/zeljkoc/PandroidPackage
or
https://github.com/zeljkoc/pandroid

 demo
https://github.com/zeljkoc/PandroidPackage/tree/master/Demos/DemoFirebirdClient
uses javapp.jar
example compile.sh (linux)
https://github.com/zeljkoc/PandroidPackage/blob/master/Demos/DemoFirebirdClient/pascalsrc/compile.sh

marcov:

--- Quote from: jiaxing2 on May 26, 2020, 07:15:06 am ---Our current FPC JVM runtime library is too bare metal and having many problems interfacing with Java code. I suggest to break compatibily with the object pascal dialect used by other other frontend (objfpc) completely and create a separate dialect to deal with the JVM and Java interop exclusively.

--- End quote ---

If you use a non standard backend (jvm) and you want a different frontend (not even discussing how feasible that would be), but what would be the advantage of doing this inside the FPC project at all?

The JVM backend exists as a way to recycle the frontend.
 

Jonas Maebe:
My research soonly showed that jasmin is no longer developed since 2015. Apache bcel is still maintained but the version used by FPC JVM is very old. Javapp is a broken software for me, I have never able to make it to work.

I don't know if the same stack is used on Android development but I saw the Android efforts are pretty much active.


--- Quote from: jiaxing2 on May 26, 2020, 07:15:06 am ---My proposal is abandon jasmin and switch to asm instead: https://asm.ow2.io/

--- End quote ---
What issues have you encountered with jasmin that switching to asm would solve?


--- Quote ---Our current FPC JVM runtime library is too bare metal and having many problems interfacing with Java code.

--- End quote ---
The FPC JVM RTL is indeed bare metal, but what problems are there with interfacing with Java code? That is mostly the easy part. It's supporting all the low level Pascal code that is hard.

Navigation

[0] Message Index

[#] Next page

Go to full version