[fpc-devel] XML node dump feature
denisgolovan
denisgolovan at yandex.ru
Tue Jun 25 21:23:40 CEST 2019
> Complex types are built from primitive types. And if FPC can verify the
> "pure" attribute is valid, then LLVM can probably also come up with it.
> In fact, if FPC can verify it is valid, it can also come up with it
> itself and add it as an annotation in the LLVM bitcode.
AFAIU, "pure" attribute is planned to be user's responsibility and that's probably ok.
e.g. what about returning dynamic arrays? Like:
type TIntArray = array of Integer;
function ArrInit(): TIntArray;
begin
SetLength(Result, 1);
Result[0]:=1;
end;
... I am afraid from LLVM perspective it wouldn't be "pure" function (memory allocation, initialization, etc.).
>From Pascal user's perspective, I would consider it pure.
Second, LLVM is just one backend, right?
--
Regards,
Denis Golovan
More information about the fpc-devel
mailing list