[fpc-devel] (patch) An attempt to improve assignments/function result reuse
sergei_gorelkin at mail.ru
Sat Dec 8 18:30:39 CET 2007
Florian Klaempfl wrote:
> Are you sure with the strings?
Yes. Any function that returns a string is supplied with one more
argument than it was declared. After calling the function, register eax
(which is used to contain the non-parameter result) is not used.
Here is a simple example:
function TDOMCharacterData.GetNodeValue: DOMString;
Result := FNodeValue;
mov esi, edx <- address of result
mov ebx, eax <- Self
mov eax, esi
mov edx, [ebx+14] <- FNodeValue
More information about the fpc-devel