* use pooled constant references for the parameter names of VMT methods in the RTTI

git-svn-id: trunk@39684 -
This commit is contained in:
svenbarth 2018-08-29 19:20:24 +00:00
parent 8bf3661f7f
commit 228d3252cc
2 changed files with 11 additions and 4 deletions

View File

@ -245,7 +245,8 @@ implementation
else
write_rtti_reference(tcb,para.vardef,fullrtti);
write_param_flag(tcb,para);
tcb.emit_shortstring_const(para.realname);
tcb.emit_pooled_shortstring_const_ref(para.realname);
write_paralocs(tcb,@para.paraloc[callerside]);
@ -1905,7 +1906,6 @@ implementation
current_module.add_extern_asmsym(s,AB_EXTERNAL,AT_DATA);
end;
procedure TRTTIWriter.write_rtti(def:tdef;rt:trttitype);
var
tcb: ttai_typedconstbuilder;

View File

@ -331,11 +331,13 @@ unit TypInfo;
function GetParaLocs: PParameterLocations; inline;
function GetTail: Pointer; inline;
function GetNext: PVmtMethodParam; inline;
function GetName: ShortString; inline;
public
ParamType: PPTypeInfo;
Flags: TParamFlags;
Name: ShortString;
NamePtr: PShortString;
{ ParaLocs: TParameterLocations; }
property Name: ShortString read GetName;
property ParaLocs: PParameterLocations read GetParaLocs;
property Tail: Pointer read GetTail;
property Next: PVmtMethodParam read GetNext;
@ -2962,7 +2964,7 @@ end;
function TVmtMethodParam.GetParaLocs: PParameterLocations;
begin
Result := PParameterLocations(aligntoptr(PByte(@Name[0]) + Length(Name) + Sizeof(Name[0])));
Result := PParameterLocations(aligntoptr(PByte(@NamePtr) + SizeOf(NamePtr)));
end;
function TVmtMethodParam.GetTail: Pointer;
@ -2975,6 +2977,11 @@ begin
Result := PVmtMethodParam(aligntoptr(Tail));
end;
function TVmtMethodParam.GetName: ShortString;
begin
Result := NamePtr^;
end;
{ TIntfMethodEntry }
function TIntfMethodEntry.GetParam(Index: Word): PVmtMethodParam;