6.2.2 Mangled names for code blocks

The rules for mangled names for routines are as follows:

The following constructs

unit testman;

interface
type
  myobject = object
   constructor init;
   procedure mymethod;
  end;

implementation

constructor myobject.init;
begin
end;

procedure myobject.mymethod;
begin
end;

function myfunc: pointer;
begin
end;

procedure myprocedure(var x: integer; y: longint; z : pchar);
begin
end;

end.

will result in the following assembler file for the Intel 80x86 target:

.file "testman.pas"

.text
.balign 16
.globl_TESTMAN$$_$$_MYOBJECT_$$_INIT
_TESTMAN$$_$$_MYOBJECT_$$_INIT:
pushl%ebp
movl%esp,%ebp
subl$4,%esp
movl$0,%edi
callFPC_HELP_CONSTRUCTOR
jz.L5
jmp.L7
.L5:
movl12(%ebp),%esi
movl$0,%edi
callFPC_HELP_FAIL
.L7:
movl%esi,%eax
testl%esi,%esi
leave
ret$8
.balign 16
.globl_TESTMAN$$_$$_MYOBJECT_$$_MYMETHOD
_TESTMAN$$_$$_MYOBJECT_$$_MYMETHOD:
pushl%ebp
movl%esp,%ebp
leave
ret$4
.balign 16
_TESTMAN$$_MYFUNC:
pushl%ebp
movl%esp,%ebp
subl$4,%esp
movl-4(%ebp),%eax
leave
ret
.balign 16
_TESTMAN$$_MYPROCEDURE$INTEGER$LONGINT$PCHAR:
pushl%ebp
movl%esp,%ebp
leave
ret$12