Hello,
I've tried to get the Java Bytecode target working for quite some time, but it looks like that's far from reality. So I now had the idea of using pas2js and then running the Javascript inside die Java VM (e.g. via Nashorn).
The first attempts look promising. I had to change some parts in the code where pas2js appears to be stricter than FPC (e.g. {I+) => {IOCHECK+}; string[32] => array[0..31] of string, ...).
But I think now I've come to the point where pas2js needs an extension. Is there a standard way of requesting an extension, like here, support for variant records?
- Kind regards Peter/JAC!
C:\Users\JAC\Downloads\pas2js-win64-x86_64-3.0.1>bin\pas2js.exe -Mdelphi src\mp.pas
Pas2JS Compiler version 3.0.1 [2024/01/25] for Win32 i386
Copyright (c) 2023 Free Pascal team.
packages\rtl\src\js.pas(1012,15) Warning: Symbol "Int64" is not implemented
packages\rtl\src\js.pas(1014,15) Warning: Symbol "Int64" is not implemented
packages\rtl\src\js.pas(1047,14) Hint: method hides identifier at "packages\rtl\src\js.pas(87,21)". Use reintroduce
packages\rtl\src\js.pas(1050,36) Warning: Symbol "Int64" is not implemented
packages\rtl\src\js.pas(1052,36) Warning: Symbol "Int64" is not implemented
src\Common.pas(407,5) Warning: Symbol "Int64" is not implemented
src\Common.pas(424,23) Error: Not supported: variant record
TToken = record
UnitIndex, Column: Smallint;
Line: Integer;
case Kind: Byte of
IDENTTOK:
(Name: ^TString);
INTNUMBERTOK:
(Value: Int64);
FRACNUMBERTOK:
(FracValue: Single);
STRINGLITERALTOK:
(StrAddress: Word;
StrLength: Word);
end;
Fatal: Compilation aborted