mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-05 01:18:13 +02:00
Compare commits
3 Commits
8a171c8fdd
...
849ab7526c
Author | SHA1 | Date | |
---|---|---|---|
![]() |
849ab7526c | ||
![]() |
6c4d218b8d | ||
![]() |
70a28ccc26 |
@ -326,8 +326,12 @@ implementation
|
||||
else
|
||||
reference_reset_symbol(tvref,current_asmdata.WeakRefAsmSymbol(gvs.mangledname,AT_DATA),0,sizeof(pint),[]);
|
||||
{ Enable size optimization with -Os or PIC code is generated and PIC uses GOT }
|
||||
size_opt:=(cs_opt_size in current_settings.optimizerswitches)
|
||||
or ((cs_create_pic in current_settings.moduleswitches) and (tf_pic_uses_got in target_info.flags));
|
||||
size_opt:={$if defined(RISCV)}
|
||||
true
|
||||
{$else defined(RISCV)}
|
||||
(cs_opt_size in current_settings.optimizerswitches)
|
||||
or ((cs_create_pic in current_settings.moduleswitches) and (tf_pic_uses_got in target_info.flags))
|
||||
{$endif defined(RISCV)};
|
||||
hreg_tv_rec:=NR_INVALID;
|
||||
if size_opt then
|
||||
begin
|
||||
|
@ -19043,6 +19043,7 @@ var
|
||||
ObjLit: TJSObjectLiteral;
|
||||
Call: TJSCallExpression;
|
||||
HasRTTIMembers: Boolean;
|
||||
RecordInfo: TJSObjectLiteralElement;
|
||||
begin
|
||||
// module.$rtti.$Record("typename",{});
|
||||
Call:=CreateRTTINewType(El,GetBIName(pbifnRTTINewRecord),false,FuncContext,ObjLit);
|
||||
@ -19054,7 +19055,13 @@ begin
|
||||
end;
|
||||
|
||||
HasRTTIMembers:=CreateRTTIMembers(El,Src,FuncContext,MembersSrc,MembersFuncContext,Call,false);
|
||||
if not HasRTTIMembers then
|
||||
if HasRTTIMembers then
|
||||
begin
|
||||
RecordInfo := ObjLit.Elements.AddElement;
|
||||
RecordInfo.Name := GetBIName(pbivnPtrRecord);
|
||||
RecordInfo.Expr := CreatePrimitiveDotExpr('this', El);
|
||||
end
|
||||
else
|
||||
begin
|
||||
// no published members, add "module.$rtti.$Record..."
|
||||
if Src=MembersSrc then
|
||||
|
Loading…
Reference in New Issue
Block a user