You are not logged in.
Pages: 1
Hello,
Though was able to compile the brand-new mORMot2
with Lazarus, still miss the speed of Delphi.
Am stuck with D2009, and since mORMot2 works
with D2007, was wondering if there is any way to
make mORMot2 work with D2009.
Know that RTTI was introduced only in D2010,
but even when I set {$define NEWRTTINOTUSED},
I still get an error with unknown identifier.
in file mormot.core.rtti.delphi.inc:
procedure TGetRttiInterface.AddMethodsFromTypeInfo(aInterface: PTypeInfo);
Var cc: TCallConv; // line 622 ERROR: unknown identifier
Much obliged for your comments,
Sami
Offline
NEWRTTINOTUSED doesn't affect how the RTTI compiler is supported - only which RTTI is emitted.
My problem is that I don't have any Delphi 2009 IDE nor compiler binary at hand.
To be honest, I fail to find the "speed of Delphi" in respect to FPC 3.2.
Only the compilation is faster, not the executable code.
Please try https://github.com/synopse/mORMot2/comm … 10e892c9ef
Offline
Many thanks for this version, it got past the previous TCallConv problem, but is now stopping at line 451
in the same unit, and complains about incompatible types between TRttiKind and TTypeKind.
function TRttiInfo.IsQWord: boolean;
begin
if @self = TypeInfo(QWord) then
result := true
else
{$ifdef UNICODE}
if Kind = tkInt64 then //error here: E2010 Incompatible types: TRttiKind and TTypeKind.
if you find the time to come up with a solution for this too, would be grateful and happy to test it.
Yes, exactly, Lazarus's slowness is in the compilation/linking process not the executable itself.
Offline
Yes, exactly, Lazarus's slowness is in the compilation/linking process not the executable itself.
Is this difference visible? For my project for full rebuild (on Linux) I got
343140 lines compiled, 11.4 sec
in case of incremental build result is < 1 second.
Or fpc compiler is slow on Windows?
Offline
Thanks a lot, again moved one step further, now the error is in File mormot.core.rtti.pas in line 5590:
{$ifndef HASNOSTATICRTTI}
if (not FirstSearchByName) and
(Info = TypeInfo(TGuid)) then // ERROR here, line 5590: E2134 Type 'TGUID' has no type info
Agree that Lazarus' s incremental compiling is neat!
Work with an external drive, which currently is no longer an SSD, should probably get one, although writing
to an SSD is still slow compared to its blazing read speed...
Offline
jonsafi wrote:Yes, exactly, Lazarus's slowness is in the compilation/linking process not the executable itself.
Is this difference visible? For my project for full rebuild (on Linux) I got
343140 lines compiled, 11.4 sec
in case of incremental build result is < 1 second.
Or fpc compiler is slow on Windows?
That is quite fast would say, seems a bit slower on a Windows 7 (8 GBRAM), bit over 15sec.
But yes, incremental compiling does help considerably :-)
Offline
Hi,
am probably missing something, but under 'core', found an update for file mormot.core.variants.pas
but unfortunately could not find one for file mormot.core.rtti.pas where the error appeared,
so am still getting the same error..
Offline
I think we got Delphi 2009 compatibility now, thanks to your help.
The regression tests do compile and pass:
https://gist.github.com/synopse/f2106df … 21a78b552e
Offline
Thank you very much for taking the time to make it D2009 compatible!
It's wonderful to be able to make again use of the latest version of this great package!
Offline
Pages: 1