Forum > Other OS

New idea for FPC JVM

<< < (2/2)

jiaxing2:

--- Quote from: zeljkoc on May 26, 2020, 09:34:26 am ---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

--- End quote ---

Thanks. It could be because I missed the bootclasspath option.
BTW, this wiki need re-organize and re-write.
https://wiki.freepascal.org/FPC_JVM/Building

jiaxing2:

--- Quote from: marcov on May 26, 2020, 11:24:13 am ---The JVM backend exists as a way to recycle the frontend.

--- End quote ---

This cleared any of the ambiguity.
= Don't expect much. This is just a poor man's hack to bring Lazarus/Free Pascal to Android development. As it targets Android - a Java based platform, why don't recycle it for the standard JVM, too? And if it worked, everything is fine. If it didn't work, don't expect anything further. The End.

jiaxing2:

--- Quote from: Jonas Maebe on May 26, 2020, 08:27:24 pm ---
What issues have you encountered with jasmin that switching to asm would solve?

It's supporting all the low level Pascal code that is hard.

--- End quote ---

ASM supports newer Java version. e.g: Java 11. We currently stuck with Java 5. The most important is, ASM is active developed, Jasmin is not.

Not hard. The oberonc guy hacked to make pointers work on the JVM! And he didn't use anything (external assembler like Jasmin, ASM...) other than his own code. Let's be ashamed!

PascalDragon:

--- Quote from: jiaxing2 on May 30, 2020, 12:41:50 pm ---
--- Quote from: marcov on May 26, 2020, 11:24:13 am ---The JVM backend exists as a way to recycle the frontend.

--- End quote ---

This cleared any of the ambiguity.
= Don't expect much. This is just a poor man's hack to bring Lazarus/Free Pascal to Android development. As it targets Android - a Java based platform, why don't recycle it for the standard JVM, too? And if it worked, everything is fine. If it didn't work, don't expect anything further. The End.

--- End quote ---

The JVM target started out with JVM support. Android support was added later on.


--- Quote from: jiaxing2 on May 30, 2020, 12:46:02 pm ---
--- Quote from: Jonas Maebe on May 26, 2020, 08:27:24 pm ---
What issues have you encountered with jasmin that switching to asm would solve?

It's supporting all the low level Pascal code that is hard.

--- End quote ---

ASM supports newer Java version. e.g: Java 11. We currently stuck with Java 5. The most important is, ASM is active developed, Jasmin is not.
--- End quote ---

So what? FPC does not use newer functionality. So even if we'd use asm, that wouldn't change anything as FPC wouldn't be able to make use of any new functionality.


--- Quote from: jiaxing2 on May 30, 2020, 12:46:02 pm ---Not hard. The oberonc guy hacked to make pointers work on the JVM! And he didn't use anything (external assembler like Jasmin, ASM...) other than his own code. Let's be ashamed!

--- End quote ---

First of it's questionable whether it is a good idea to make Pointers work on a platform that's not supposed to use pointers. Just because it works does not mean it's good.

Second the Oberon guy might have had more time that he could dedicate to his project not to mention that his project only supports the JVM. FPC is a much bigger project and supports multiple different CPU targets with the JVM just being a single one and that alone meant huge restructuring of the compiler (especially the introduction of the High Level Code Generator which now benefits the LLVM and WebAssembly backends as well). Using an existing tool to generate binary files is totally legitimate and nothing to be ashamed of. It's how FPC is structured. The Windows target at first used GNU as and ld as well. The internal assembler and linker were only developed later on.

So if it bugs you so much that FPC relies on Jasmin, then provide an internal assembler backend for class files, please.

Navigation

[0] Message Index

[*] Previous page

Go to full version