|
@@ -172,11 +172,15 @@ implementation
|
|
{ ignore: }
|
|
{ ignore: }
|
|
unitsym,
|
|
unitsym,
|
|
syssym,
|
|
syssym,
|
|
- constsym,
|
|
|
|
namespacesym,
|
|
namespacesym,
|
|
propertysym,
|
|
propertysym,
|
|
enumsym:
|
|
enumsym:
|
|
;
|
|
;
|
|
|
|
+ constsym:
|
|
|
|
+ begin
|
|
|
|
+ if tconstsym(sym).consttyp=constresourcestring then
|
|
|
|
+ varexport(make_mangledname('RESSTR',tsym(sym).owner,tsym(sym).name));
|
|
|
|
+ end;
|
|
typesym:
|
|
typesym:
|
|
begin
|
|
begin
|
|
case ttypesym(sym).typedef.typ of
|
|
case ttypesym(sym).typedef.typ of
|
|
@@ -657,6 +661,13 @@ implementation
|
|
staticvarsym:
|
|
staticvarsym:
|
|
if tstaticvarsym(psym).mangledname=symname then
|
|
if tstaticvarsym(psym).mangledname=symname then
|
|
found:=true;
|
|
found:=true;
|
|
|
|
+ constsym:
|
|
|
|
+ begin
|
|
|
|
+ if tconstsym(psym).consttyp<>constresourcestring then
|
|
|
|
+ internalerror(2016072202);
|
|
|
|
+ if make_mangledname('RESSTR',psym.owner,psym.name)=symname then
|
|
|
|
+ found:=true;
|
|
|
|
+ end;
|
|
else
|
|
else
|
|
internalerror(2014101003);
|
|
internalerror(2014101003);
|
|
end;
|
|
end;
|
|
@@ -720,7 +731,11 @@ implementation
|
|
for i:=0 to syms.count-1 do
|
|
for i:=0 to syms.count-1 do
|
|
begin
|
|
begin
|
|
sym:=tsymentry(syms[i]);
|
|
sym:=tsymentry(syms[i]);
|
|
- if not (sym.typ in [staticvarsym,procsym]) then
|
|
|
|
|
|
+ if not (sym.typ in [staticvarsym,procsym,constsym]) or
|
|
|
|
+ (
|
|
|
|
+ (sym.typ=constsym) and
|
|
|
|
+ (tconstsym(sym).consttyp<>constresourcestring)
|
|
|
|
+ ) then
|
|
continue;
|
|
continue;
|
|
if alreadyloaded.indexof(sym)>=0 then
|
|
if alreadyloaded.indexof(sym)>=0 then
|
|
continue;
|
|
continue;
|
|
@@ -750,6 +765,13 @@ implementation
|
|
if unitentry^.module=module then
|
|
if unitentry^.module=module then
|
|
begin
|
|
begin
|
|
case sym.typ of
|
|
case sym.typ of
|
|
|
|
+ constsym:
|
|
|
|
+ begin
|
|
|
|
+ if tconstsym(sym).consttyp<>constresourcestring then
|
|
|
|
+ internalerror(2016072201);
|
|
|
|
+ name:=make_mangledname('RESSTR',sym.owner,sym.name);
|
|
|
|
+ current_module.addexternalimport(pkgentry^.package.pplfilename,name,name+suffix_indirect,0,true,false);
|
|
|
|
+ end;
|
|
staticvarsym:
|
|
staticvarsym:
|
|
begin
|
|
begin
|
|
name:=tstaticvarsym(sym).mangledname;
|
|
name:=tstaticvarsym(sym).mangledname;
|