mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-26 05:29:32 +02:00
* the vartype field of tvarsym is now a property, because is_XXXregable
must be updated when the vartype is changed
This commit is contained in:
parent
f433c21ead
commit
6c7f3ad02e
@ -177,7 +177,6 @@ interface
|
|||||||
localvarsym : tvarsym;
|
localvarsym : tvarsym;
|
||||||
highvarsym : tvarsym;
|
highvarsym : tvarsym;
|
||||||
defaultconstsym : tsym;
|
defaultconstsym : tsym;
|
||||||
vartype : ttype;
|
|
||||||
varoptions : tvaroptions;
|
varoptions : tvaroptions;
|
||||||
reg : tregister; { if reg<>R_NO, then the variable is an register variable }
|
reg : tregister; { if reg<>R_NO, then the variable is an register variable }
|
||||||
varspez : tvarspez; { sets the type of access }
|
varspez : tvarspez; { sets the type of access }
|
||||||
@ -204,6 +203,11 @@ interface
|
|||||||
function stabstring : pchar;override;
|
function stabstring : pchar;override;
|
||||||
procedure concatstabto(asmlist : taasmoutput);override;
|
procedure concatstabto(asmlist : taasmoutput);override;
|
||||||
{$endif GDB}
|
{$endif GDB}
|
||||||
|
private
|
||||||
|
procedure setvartype(const newtype: ttype);
|
||||||
|
_vartype : ttype;
|
||||||
|
public
|
||||||
|
property vartype: ttype read _vartype write setvartype;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
tpropertysym = class(tstoredsym)
|
tpropertysym = class(tstoredsym)
|
||||||
@ -1593,17 +1597,6 @@ implementation
|
|||||||
refs:=0;
|
refs:=0;
|
||||||
varstate:=vs_used;
|
varstate:=vs_used;
|
||||||
varoptions:=[];
|
varoptions:=[];
|
||||||
{ can we load the value into a register ? }
|
|
||||||
if tstoreddef(tt.def).is_intregable then
|
|
||||||
include(varoptions,vo_regable)
|
|
||||||
else
|
|
||||||
exclude(varoptions,vo_regable);
|
|
||||||
|
|
||||||
if tstoreddef(tt.def).is_fpuregable then
|
|
||||||
include(varoptions,vo_fpuregable)
|
|
||||||
else
|
|
||||||
exclude(varoptions,vo_fpuregable);
|
|
||||||
reg.enum:=R_NO;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -1634,7 +1627,7 @@ implementation
|
|||||||
localvarsym:=nil;
|
localvarsym:=nil;
|
||||||
highvarsym:=nil;
|
highvarsym:=nil;
|
||||||
defaultconstsym:=nil;
|
defaultconstsym:=nil;
|
||||||
ppufile.gettype(vartype);
|
ppufile.gettype(_vartype);
|
||||||
ppufile.getsmallset(varoptions);
|
ppufile.getsmallset(varoptions);
|
||||||
if (vo_is_C_var in varoptions) then
|
if (vo_is_C_var in varoptions) then
|
||||||
_mangledname:=stringdup(ppufile.getstring);
|
_mangledname:=stringdup(ppufile.getstring);
|
||||||
@ -1883,6 +1876,22 @@ implementation
|
|||||||
end;
|
end;
|
||||||
{$endif GDB}
|
{$endif GDB}
|
||||||
|
|
||||||
|
procedure tvarsym.setvartype(const newtype: ttype);
|
||||||
|
begin
|
||||||
|
_vartype := newtype;
|
||||||
|
{ can we load the value into a register ? }
|
||||||
|
if tstoreddef(vartype.def).is_intregable then
|
||||||
|
include(varoptions,vo_regable)
|
||||||
|
else
|
||||||
|
exclude(varoptions,vo_regable);
|
||||||
|
|
||||||
|
if tstoreddef(vartype.def).is_fpuregable then
|
||||||
|
include(varoptions,vo_fpuregable)
|
||||||
|
else
|
||||||
|
exclude(varoptions,vo_fpuregable);
|
||||||
|
reg.enum:=R_NO;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
{****************************************************************************
|
{****************************************************************************
|
||||||
TTYPEDCONSTSYM
|
TTYPEDCONSTSYM
|
||||||
@ -2588,7 +2597,11 @@ implementation
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.104 2003-05-15 18:58:53 peter
|
Revision 1.105 2003-05-30 13:35:10 jonas
|
||||||
|
* the vartype field of tvarsym is now a property, because is_XXXregable
|
||||||
|
must be updated when the vartype is changed
|
||||||
|
|
||||||
|
Revision 1.104 2003/05/15 18:58:53 peter
|
||||||
* removed selfpointer_offset, vmtpointer_offset
|
* removed selfpointer_offset, vmtpointer_offset
|
||||||
* tvarsym.adjusted_address
|
* tvarsym.adjusted_address
|
||||||
* address in localsymtable is now in the real direction
|
* address in localsymtable is now in the real direction
|
||||||
|
Loading…
Reference in New Issue
Block a user