mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-13 16:59:11 +02:00
* turned resolveref from a local procedure into a virtual method
git-svn-id: trunk@34856 -
This commit is contained in:
parent
af297e849c
commit
e730da9c1a
@ -26,6 +26,8 @@ unit ncgbas;
|
||||
interface
|
||||
|
||||
uses
|
||||
globtype,
|
||||
aasmtai,aasmdata,
|
||||
cpubase,cgutils,
|
||||
node,nbas;
|
||||
|
||||
@ -35,6 +37,9 @@ interface
|
||||
end;
|
||||
|
||||
tcgasmnode = class(tasmnode)
|
||||
protected
|
||||
procedure ResolveRef(const filepos: tfileposinfo; var op:toper); virtual;
|
||||
public
|
||||
procedure pass_generate_code;override;
|
||||
end;
|
||||
|
||||
@ -66,9 +71,9 @@ interface
|
||||
implementation
|
||||
|
||||
uses
|
||||
globtype,globals,systems,
|
||||
globals,systems,
|
||||
cutils,verbose,
|
||||
aasmbase,aasmtai,aasmdata,aasmcpu,
|
||||
aasmbase,aasmcpu,
|
||||
symsym,symconst,symdef,defutil,
|
||||
nflw,pass_2,ncgutil,
|
||||
cgbase,cgobj,hlcgobj,
|
||||
@ -117,22 +122,8 @@ interface
|
||||
TASMNODE
|
||||
*****************************************************************************}
|
||||
|
||||
procedure tcgasmnode.pass_generate_code;
|
||||
|
||||
procedure ReLabel(var p:tasmsymbol);
|
||||
begin
|
||||
{ Only relabel local tasmlabels }
|
||||
if (p.bind = AB_LOCAL) and
|
||||
(p is tasmlabel) then
|
||||
begin
|
||||
if not assigned(p.altsymbol) then
|
||||
current_asmdata.GenerateAltSymbol(p);
|
||||
p:=p.altsymbol;
|
||||
p.increfs;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure ResolveRef(const filepos: tfileposinfo; var op:toper);
|
||||
procedure tcgasmnode.ResolveRef(const filepos: tfileposinfo; var op:toper);
|
||||
var
|
||||
sym : tabstractnormalvarsym;
|
||||
{$ifdef x86}
|
||||
@ -241,6 +232,22 @@ interface
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
procedure tcgasmnode.pass_generate_code;
|
||||
|
||||
procedure ReLabel(var p:tasmsymbol);
|
||||
begin
|
||||
{ Only relabel local tasmlabels }
|
||||
if (p.bind = AB_LOCAL) and
|
||||
(p is tasmlabel) then
|
||||
begin
|
||||
if not assigned(p.altsymbol) then
|
||||
current_asmdata.GenerateAltSymbol(p);
|
||||
p:=p.altsymbol;
|
||||
p.increfs;
|
||||
end;
|
||||
end;
|
||||
|
||||
var
|
||||
hp,hp2 : tai;
|
||||
i : longint;
|
||||
|
Loading…
Reference in New Issue
Block a user