Forum > Other OS

JVM Backend Questions

<< < (3/3)

peter.dell:
I've changed "-g" to "-gl" here and performed a make clean/make for the compiler and the RTL.

make CROSSOPT="-O2 -gl" CPU_TARGET=jvm OS_TARGET=java INSTALL_PREFIX=C:\jac\system\Windows\Programming\Repositories\fpc\out all crossinstall

Unfortunately, the output is still as before, with no source or line numbers :-(

Is there something else I have to do, maybe? The RTL is built like this

export FPC_FOLDER="$PATH:/cygdrive/c/jac/system/Windows/Programming/Repositories/fpc"
export PATH="$PATH:$FPC_FOLDER/compiler:$FPC_FOLDER/build"
export CPU_TARGET=jvm
pushd rtl/java
make
popd


peter.dell:
I found I can avoid the dump by using an explicit "set of byte" in the following form.

  UnsignedOrdinalTypes: set of byte = [BYTETOK, WORDTOK, CARDINALTOK];
  SignedOrdinalTypes: set of byte = [SHORTINTTOK, SMALLINTTOK, INTEGERTOK];
  RealTypes: set of byte   = [SHORTREALTOK, REALTOK, SINGLETOK, HALFSINGLETOK];

  IntegerTypes: set of byte      = UnsignedOrdinalTypes + SignedOrdinalTypes;
  OrdinalTypes: set of byte      = IntegerTypes + [CHARTOK, BOOLEANTOK, ENUMTOK];

I get further but now it fails in the lines using "+" as union operator with

Common.pas(218,73) Error: Illegal expression
Common.pas(219,77) Error: Illegal expression
Common.pas(223,63) Error: Illegal expression
Common.pas(639,1) Fatal: There were 3 errors compiling module, stopping

Leledumbo:

--- Quote from: peter.dell on September 16, 2023, 11:42:35 pm ---Unfortunately, the output is still as before, with no source or line numbers :-(

--- End quote ---
pass it on OPT, not CROSSOPT. OPT is used for building the cross compiler, CROSSOPT is used by the cross compiler for the stuffs it builds. Notice the difference?

peter.dell:
Thanks, that's point to the right thing now!

Common.pas(193,57) Error: Compilation raised exception internally
Fatal: Compilation aborted

An unhandled exception occurred at $00456C06:
EAccessViolation: Access violation
  $00456C06  TDEFAWARESYMTABLESTACK__PUSH,  line 1914 of symdef.pas
  $00531C2B  CONSTS_DEC,  line 273 of pdecl.pas
  $00531A87  CONST_DEC,  line 217 of pdecl.pas
  $0043ADE4  COMPILE,  line 403 of parser.pas
  $004F9D2E  TPPUMODULE__LOADPPU,  line 2291 of fppu.pas
  $0057F443  LOADUNITS,  line 568 of pmodules.pas
  $005825C1  PROC_PROGRAM,  line 2214 of pmodules.pas
  $0043AE31  COMPILE,  line 411 of parser.pas
  $004173F3  COMPILE,  line 291 of compiler.pas


pdecl.pas:

{$ifdef jvm}
                       { for the JVM target, some constants need to be
                         initialized at run time (enums, sets) -> create fake
                         typed const to do so (at least if they are visible
                         outside this routine, since we won't directly access
                         these symbols in the generated code) }
                       if (symtablestack.top.symtablelevel<normal_function_level) and
                          assigned(tconstsym(sym).constdef) and
                          (tconstsym(sym).constdef.typ in [enumdef,setdef]) then
273:                        jvm_add_typed_const_initializer(tconstsym(sym)); 
{$endif}

Leledumbo:
you should highlight this instead:

--- Quote from: peter.dell on September 17, 2023, 11:16:53 am ---  $00456C06  TDEFAWARESYMTABLESTACK__PUSH,  line 1914 of symdef.pas

--- End quote ---
probably the TDefAwareSymTableStack instance is nil.

Navigation

[0] Message Index

[*] Previous page

Go to full version