mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-24 01:29:44 +02:00
* moved jvm-specific exprasm field from tprocdef to jvm-specific descendant
git-svn-id: trunk@27394 -
This commit is contained in:
parent
0a9f738167
commit
f4c0daddb4
@ -100,7 +100,7 @@ implementation
|
||||
SysUtils,
|
||||
cutils,cfileutl,systems,script,
|
||||
fmodule,finput,verbose,
|
||||
symtype,symtable,jvmdef,
|
||||
symtype,symcpu,symtable,jvmdef,
|
||||
itcpujas,cpubase,cpuinfo,cgutils,
|
||||
widestr
|
||||
;
|
||||
@ -913,7 +913,7 @@ implementation
|
||||
|
||||
procedure TJasminAssembler.WriteProcDef(pd: tprocdef);
|
||||
begin
|
||||
if not assigned(pd.exprasmlist) and
|
||||
if not assigned(tcpuprocdef(pd).exprasmlist) and
|
||||
not(po_abstractmethod in pd.procoptions) and
|
||||
(not is_javainterface(pd.struct) or
|
||||
(pd.proctypeoption in [potype_unitinit,potype_unitfinalize])) then
|
||||
@ -926,7 +926,7 @@ implementation
|
||||
AsmWrite(pd.jvmmangledbasename(true));
|
||||
AsmWriteln('"');
|
||||
end;
|
||||
WriteTree(pd.exprasmlist);
|
||||
WriteTree(tcpuprocdef(pd).exprasmlist);
|
||||
AsmWriteln('.end method');
|
||||
AsmLn;
|
||||
end;
|
||||
|
@ -58,7 +58,7 @@ implementation
|
||||
version,globals,verbose,systems,
|
||||
cpubase,cpuinfo,cgbase,paramgr,
|
||||
fmodule,
|
||||
defutil,symtable,jvmdef,ppu
|
||||
defutil,symtable,symcpu,jvmdef,ppu
|
||||
;
|
||||
|
||||
{****************************************************************************
|
||||
@ -76,7 +76,7 @@ implementation
|
||||
exit;
|
||||
proc:=tprocdef(sym.owner.defowner);
|
||||
jvar:=tai_jvar.create(sym.localloc.reference.offset,jvmmangledbasename(sym,true),fcurrprocstart,fcurrprocend);
|
||||
proc.exprasmlist.InsertAfter(jvar,proc.procstarttai);
|
||||
tcpuprocdef(proc).exprasmlist.InsertAfter(jvar,proc.procstarttai);
|
||||
end;
|
||||
|
||||
|
||||
@ -109,8 +109,8 @@ implementation
|
||||
|
||||
current_asmdata.getlabel(procstartlabel,alt_dbgtype);
|
||||
current_asmdata.getlabel(procendlabel,alt_dbgtype);
|
||||
def.exprasmlist.insertafter(tai_label.create(procstartlabel),def.procstarttai);
|
||||
def.exprasmlist.insertbefore(tai_label.create(procendlabel),def.procendtai);
|
||||
tcpuprocdef(def).exprasmlist.insertafter(tai_label.create(procstartlabel),def.procstarttai);
|
||||
tcpuprocdef(def).exprasmlist.insertbefore(tai_label.create(procendlabel),def.procendtai);
|
||||
|
||||
fcurrprocstart:=procstartlabel;
|
||||
fcurrprocend:=procendlabel;
|
||||
|
@ -1627,8 +1627,8 @@ implementation
|
||||
if not code.empty and
|
||||
current_asmdata.asmlists[al_procedures].empty then
|
||||
current_asmdata.asmlists[al_procedures].concat(tai_align.Create(4));
|
||||
pd.exprasmlist:=TAsmList.create;
|
||||
pd.exprasmlist.concatlist(code);
|
||||
tcpuprocdef(pd).exprasmlist:=TAsmList.create;
|
||||
tcpuprocdef(pd).exprasmlist.concatlist(code);
|
||||
if assigned(data) and
|
||||
not data.empty then
|
||||
internalerror(2010122801);
|
||||
|
@ -61,7 +61,7 @@ implementation
|
||||
uses
|
||||
verbose,cutils,globtype,globals,constexp,fmodule,
|
||||
aasmdata,aasmtai,cpubase,aasmcpu,
|
||||
symbase,symtable,defutil,jvmdef,
|
||||
symbase,symcpu,symtable,defutil,jvmdef,
|
||||
ncnv,ncon,ninl,ncal,nld,nmem,
|
||||
ppu,
|
||||
pass_1;
|
||||
@ -413,7 +413,7 @@ implementation
|
||||
mainpd:=tprocsym(mainpsym).find_procdef_bytype(potype_proginit);
|
||||
if not assigned(mainpd) then
|
||||
internalerror(2011041902);
|
||||
mainpd.exprasmlist.insertList(unitinits);
|
||||
tcpuprocdef(mainpd).exprasmlist.insertList(unitinits);
|
||||
unitinits.free;
|
||||
end;
|
||||
|
||||
|
@ -27,6 +27,7 @@ interface
|
||||
|
||||
uses
|
||||
globtype,
|
||||
aasmdata,
|
||||
symtype,
|
||||
symdef,symsym;
|
||||
|
||||
@ -88,6 +89,10 @@ type
|
||||
end;
|
||||
|
||||
tcpuprocdef = class(tprocdef)
|
||||
{ generated assembler code; used by JVM backend so it can afterwards
|
||||
easily write out all methods grouped per class }
|
||||
exprasmlist : TAsmList;
|
||||
destructor destroy; override;
|
||||
end;
|
||||
|
||||
tcpustringdef = class(tstringdef)
|
||||
@ -154,6 +159,16 @@ implementation
|
||||
symconst,
|
||||
jvmdef;
|
||||
|
||||
{****************************************************************************
|
||||
tcpuprocdef
|
||||
****************************************************************************}
|
||||
|
||||
destructor tcpuprocdef.destroy;
|
||||
begin
|
||||
exprasmlist.free;
|
||||
inherited destroy;
|
||||
end;
|
||||
|
||||
{****************************************************************************
|
||||
tcpuprocvardef
|
||||
****************************************************************************}
|
||||
|
@ -37,9 +37,6 @@ interface
|
||||
node,
|
||||
{ aasm }
|
||||
aasmbase,aasmtai,
|
||||
{$ifdef jvm}
|
||||
aasmdata,
|
||||
{$endif}
|
||||
cpubase,cpuinfo,
|
||||
cgbase,
|
||||
parabase
|
||||
@ -718,11 +715,6 @@ interface
|
||||
{ info for inlining the subroutine, if this pointer is nil,
|
||||
the procedure can't be inlined }
|
||||
inlininginfo : pinlininginfo;
|
||||
{$ifdef jvm}
|
||||
{ generated assembler code; used by JVM backend so it can afterwards
|
||||
easily write out all methods grouped per class }
|
||||
exprasmlist : TAsmList;
|
||||
{$endif jvm}
|
||||
{$ifdef oldregvars}
|
||||
regvarinfo: pregvarinfo;
|
||||
{$endif oldregvars}
|
||||
@ -5011,9 +5003,6 @@ implementation
|
||||
dispose(inlininginfo);
|
||||
inlininginfo:=nil;
|
||||
end;
|
||||
{$ifdef jvm}
|
||||
exprasmlist.free;
|
||||
{$endif}
|
||||
if assigned(implprocdefinfo) then
|
||||
begin
|
||||
stringdispose(implprocdefinfo^.resultname);
|
||||
|
Loading…
Reference in New Issue
Block a user