mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-02 21:07:21 +01:00
* init wpo collectors before parsing the interface of units
* also register classes assigned to classref typed constants as potentially
instantiated
git-svn-id: trunk@13218 -
This commit is contained in:
parent
d2dabe9a33
commit
380e957a79
@ -1034,6 +1034,9 @@ implementation
|
||||
needs to be added implicitly }
|
||||
current_module.updatemaps;
|
||||
|
||||
{ create whole program optimisation information }
|
||||
current_module.wpoinfo:=tunitwpoinfo.create;
|
||||
|
||||
{ ... parse the declarations }
|
||||
Message1(parser_u_parsing_interface,current_module.realmodulename^);
|
||||
symtablestack.push(current_module.globalsymtable);
|
||||
@ -1112,9 +1115,6 @@ implementation
|
||||
symtablestack.push(current_module.globalsymtable);
|
||||
symtablestack.push(current_module.localsymtable);
|
||||
|
||||
{ create whole program optimisation information }
|
||||
current_module.wpoinfo:=tunitwpoinfo.create;
|
||||
|
||||
if not current_module.interface_only then
|
||||
begin
|
||||
Message1(parser_u_parsing_implementation,current_module.modulename^);
|
||||
|
||||
@ -44,7 +44,8 @@ implementation
|
||||
{ parser specific stuff }
|
||||
pbase,pexpr,pdecvar,
|
||||
{ codegen }
|
||||
cpuinfo,cgbase,dbgbase
|
||||
cpuinfo,cgbase,dbgbase,
|
||||
wpobase
|
||||
;
|
||||
|
||||
{$maxfpuregisters 0}
|
||||
@ -329,6 +330,11 @@ implementation
|
||||
if not Tobjectdef(tclassrefdef(n.resultdef).pointeddef).is_related(tobjectdef(def.pointeddef)) then
|
||||
IncompatibleTypes(n.resultdef, def);
|
||||
list.concat(Tai_const.Create_sym(current_asmdata.RefAsmSymbol(Tobjectdef(tclassrefdef(n.resultdef).pointeddef).vmt_mangledname)));
|
||||
{ update wpo info }
|
||||
if not assigned(current_procinfo) or
|
||||
(po_inline in current_procinfo.procdef.procoptions) or
|
||||
wpoinfomanager.symbol_live(current_procinfo.procdef.mangledname) then
|
||||
tobjectdef(tclassrefdef(n.resultdef).pointeddef).register_maybe_created_object_type;
|
||||
end;
|
||||
niln:
|
||||
list.concat(Tai_const.Create_sym(nil));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user