mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 04:26:13 +02:00
- fix rtti generation for properties containing sl_vec
- fix crash when overloaded operator is not available - fix record alignment for C style variant records
This commit is contained in:
parent
7a08fcd395
commit
1e3875ad36
@ -60,6 +60,7 @@
|
|||||||
{$define cpu64bit}
|
{$define cpu64bit}
|
||||||
{$define cpuextended}
|
{$define cpuextended}
|
||||||
{$define cpufloat128}
|
{$define cpufloat128}
|
||||||
|
{$define noopt}
|
||||||
{$endif x86_64}
|
{$endif x86_64}
|
||||||
|
|
||||||
{$ifdef alpha}
|
{$ifdef alpha}
|
||||||
@ -94,7 +95,12 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.32 2004-02-09 22:48:45 florian
|
Revision 1.33 2004-02-17 15:57:49 peter
|
||||||
|
- fix rtti generation for properties containing sl_vec
|
||||||
|
- fix crash when overloaded operator is not available
|
||||||
|
- fix record alignment for C style variant records
|
||||||
|
|
||||||
|
Revision 1.32 2004/02/09 22:48:45 florian
|
||||||
* several fixes to parameter handling on arm
|
* several fixes to parameter handling on arm
|
||||||
|
|
||||||
Revision 1.31 2004/01/28 16:47:45 peter
|
Revision 1.31 2004/01/28 16:47:45 peter
|
||||||
|
@ -1115,7 +1115,10 @@ implementation
|
|||||||
UnionSym:=tvarsym.create('$case',vs_value,uniontype);
|
UnionSym:=tvarsym.create('$case',vs_value,uniontype);
|
||||||
symtablestack:=symtablestack.next;
|
symtablestack:=symtablestack.next;
|
||||||
{ Align the offset where the union symtable is added }
|
{ Align the offset where the union symtable is added }
|
||||||
usedalign:=used_align(maxalignment,aktalignment.recordalignmin,aktalignment.maxCrecordalign);
|
if (trecordsymtable(symtablestack).usefieldalignment=-1) then
|
||||||
|
usedalign:=used_align(maxalignment,aktalignment.recordalignmin,aktalignment.maxCrecordalign)
|
||||||
|
else
|
||||||
|
usedalign:=used_align(maxalignment,aktalignment.recordalignmin,aktalignment.recordalignmax);
|
||||||
offset:=align(trecordsymtable(symtablestack).datasize,usedalign);
|
offset:=align(trecordsymtable(symtablestack).datasize,usedalign);
|
||||||
trecordsymtable(symtablestack).datasize:=offset+unionsymtable.datasize;
|
trecordsymtable(symtablestack).datasize:=offset+unionsymtable.datasize;
|
||||||
if maxalignment>trecordsymtable(symtablestack).fieldalignment then
|
if maxalignment>trecordsymtable(symtablestack).fieldalignment then
|
||||||
@ -1135,7 +1138,12 @@ implementation
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.65 2004-02-12 15:54:03 peter
|
Revision 1.66 2004-02-17 15:57:49 peter
|
||||||
|
- fix rtti generation for properties containing sl_vec
|
||||||
|
- fix crash when overloaded operator is not available
|
||||||
|
- fix record alignment for C style variant records
|
||||||
|
|
||||||
|
Revision 1.65 2004/02/12 15:54:03 peter
|
||||||
* make extcycle is working again
|
* make extcycle is working again
|
||||||
|
|
||||||
Revision 1.64 2004/02/03 22:32:54 peter
|
Revision 1.64 2004/02/03 22:32:54 peter
|
||||||
|
@ -213,7 +213,7 @@ implementation
|
|||||||
end;
|
end;
|
||||||
vecn :
|
vecn :
|
||||||
begin
|
begin
|
||||||
addnode(tsubscriptnode(p).left);
|
addnode(tvecnode(p).left);
|
||||||
if tvecnode(p).right.nodetype=ordconstn then
|
if tvecnode(p).right.nodetype=ordconstn then
|
||||||
sl.addconst(sl_vec,tordconstnode(tvecnode(p).right).value)
|
sl.addconst(sl_vec,tordconstnode(tvecnode(p).right).value)
|
||||||
else
|
else
|
||||||
@ -2525,7 +2525,12 @@ implementation
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.146 2004-02-03 22:32:54 peter
|
Revision 1.147 2004-02-17 15:57:49 peter
|
||||||
|
- fix rtti generation for properties containing sl_vec
|
||||||
|
- fix crash when overloaded operator is not available
|
||||||
|
- fix record alignment for C style variant records
|
||||||
|
|
||||||
|
Revision 1.146 2004/02/03 22:32:54 peter
|
||||||
* renamed xNNbittype to xNNinttype
|
* renamed xNNbittype to xNNinttype
|
||||||
* renamed registers32 to registersint
|
* renamed registers32 to registersint
|
||||||
* replace some s32bit,u32bit with torddef([su]inttype).def.typ
|
* replace some s32bit,u32bit with torddef([su]inttype).def.typ
|
||||||
|
@ -1043,8 +1043,8 @@ implementation
|
|||||||
|
|
||||||
function tstoreddef.alignment : longint;
|
function tstoreddef.alignment : longint;
|
||||||
begin
|
begin
|
||||||
{ normal alignment by default }
|
{ natural alignment by default }
|
||||||
alignment:=0;
|
alignment:=size_2_align(savesize);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -5299,7 +5299,7 @@ implementation
|
|||||||
typvalue : byte;
|
typvalue : byte;
|
||||||
hp : psymlistitem;
|
hp : psymlistitem;
|
||||||
address : longint;
|
address : longint;
|
||||||
|
def : tdef;
|
||||||
begin
|
begin
|
||||||
if not(assigned(proc) and assigned(proc.firstsym)) then
|
if not(assigned(proc) and assigned(proc.firstsym)) then
|
||||||
begin
|
begin
|
||||||
@ -5310,9 +5310,30 @@ implementation
|
|||||||
begin
|
begin
|
||||||
address:=0;
|
address:=0;
|
||||||
hp:=proc.firstsym;
|
hp:=proc.firstsym;
|
||||||
|
def:=nil;
|
||||||
while assigned(hp) do
|
while assigned(hp) do
|
||||||
begin
|
begin
|
||||||
inc(address,tvarsym(hp^.sym).fieldoffset);
|
case hp^.sltype of
|
||||||
|
sl_load :
|
||||||
|
begin
|
||||||
|
def:=tvarsym(hp^.sym).vartype.def;
|
||||||
|
inc(address,tvarsym(hp^.sym).fieldoffset);
|
||||||
|
end;
|
||||||
|
sl_subscript :
|
||||||
|
begin
|
||||||
|
if not(assigned(def) and (def.deftype=recorddef)) then
|
||||||
|
internalerror(200402171);
|
||||||
|
inc(address,tvarsym(hp^.sym).fieldoffset);
|
||||||
|
def:=tvarsym(hp^.sym).vartype.def;
|
||||||
|
end;
|
||||||
|
sl_vec :
|
||||||
|
begin
|
||||||
|
if not(assigned(def) and (def.deftype=arraydef)) then
|
||||||
|
internalerror(200402172);
|
||||||
|
def:=tarraydef(def).elementtype.def;
|
||||||
|
inc(address,def.size*hp^.value);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
hp:=hp^.next;
|
hp:=hp^.next;
|
||||||
end;
|
end;
|
||||||
rttiList.concat(Tai_const.Create_32bit(address));
|
rttiList.concat(Tai_const.Create_32bit(address));
|
||||||
@ -6096,7 +6117,12 @@ implementation
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.218 2004-02-12 15:54:03 peter
|
Revision 1.219 2004-02-17 15:57:49 peter
|
||||||
|
- fix rtti generation for properties containing sl_vec
|
||||||
|
- fix crash when overloaded operator is not available
|
||||||
|
- fix record alignment for C style variant records
|
||||||
|
|
||||||
|
Revision 1.218 2004/02/12 15:54:03 peter
|
||||||
* make extcycle is working again
|
* make extcycle is working again
|
||||||
|
|
||||||
Revision 1.217 2004/02/08 18:08:59 jonas
|
Revision 1.217 2004/02/08 18:08:59 jonas
|
||||||
|
@ -1088,7 +1088,10 @@ implementation
|
|||||||
tvarsym(sym).fieldoffset:=align(datasize,varalignfield);
|
tvarsym(sym).fieldoffset:=align(datasize,varalignfield);
|
||||||
datasize:=tvarsym(sym).fieldoffset+l;
|
datasize:=tvarsym(sym).fieldoffset+l;
|
||||||
{ Calc alignment needed for this record }
|
{ Calc alignment needed for this record }
|
||||||
varalignrecord:=used_align(varalign,aktalignment.recordalignmin,aktalignment.recordalignmax);
|
if (usefieldalignment=-1) then
|
||||||
|
varalignrecord:=used_align(varalign,aktalignment.recordalignmin,aktalignment.maxCrecordalign)
|
||||||
|
else
|
||||||
|
varalignrecord:=used_align(varalign,aktalignment.recordalignmin,aktalignment.recordalignmax);
|
||||||
recordalignment:=max(recordalignment,varalignrecord);
|
recordalignment:=max(recordalignment,varalignrecord);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -2082,6 +2085,7 @@ implementation
|
|||||||
sv:cardinal;
|
sv:cardinal;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
result:=nil;
|
||||||
st:=symtablestack;
|
st:=symtablestack;
|
||||||
sv:=getspeedvalue(overloaded_names[op]);
|
sv:=getspeedvalue(overloaded_names[op]);
|
||||||
while st<>nil do
|
while st<>nil do
|
||||||
@ -2091,9 +2095,9 @@ implementation
|
|||||||
begin
|
begin
|
||||||
if sym.typ<>procsym then
|
if sym.typ<>procsym then
|
||||||
internalerror(200402031);
|
internalerror(200402031);
|
||||||
search_unary_operator:=sym.search_procdef_unary_operator(def);
|
result:=sym.search_procdef_unary_operator(def);
|
||||||
if search_unary_operator<>nil then
|
if result<>nil then
|
||||||
break;
|
exit;
|
||||||
end;
|
end;
|
||||||
st:=st.next;
|
st:=st.next;
|
||||||
end;
|
end;
|
||||||
@ -2107,6 +2111,7 @@ implementation
|
|||||||
sv:cardinal;
|
sv:cardinal;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
result:=nil;
|
||||||
st:=symtablestack;
|
st:=symtablestack;
|
||||||
sv:=getspeedvalue(overloaded_names[op]);
|
sv:=getspeedvalue(overloaded_names[op]);
|
||||||
while st<>nil do
|
while st<>nil do
|
||||||
@ -2116,9 +2121,9 @@ implementation
|
|||||||
begin
|
begin
|
||||||
if sym.typ<>procsym then
|
if sym.typ<>procsym then
|
||||||
internalerror(200402031);
|
internalerror(200402031);
|
||||||
search_binary_operator:=sym.search_procdef_binary_operator(def1,def2);
|
result:=sym.search_procdef_binary_operator(def1,def2);
|
||||||
if search_binary_operator<>nil then
|
if result<>nil then
|
||||||
break;
|
exit;
|
||||||
end;
|
end;
|
||||||
st:=st.next;
|
st:=st.next;
|
||||||
end;
|
end;
|
||||||
@ -2422,7 +2427,12 @@ implementation
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.137 2004-02-13 15:40:58 peter
|
Revision 1.138 2004-02-17 15:57:49 peter
|
||||||
|
- fix rtti generation for properties containing sl_vec
|
||||||
|
- fix crash when overloaded operator is not available
|
||||||
|
- fix record alignment for C style variant records
|
||||||
|
|
||||||
|
Revision 1.137 2004/02/13 15:40:58 peter
|
||||||
* fixed protected checking in withsymtable
|
* fixed protected checking in withsymtable
|
||||||
|
|
||||||
Revision 1.136 2004/02/11 19:59:06 peter
|
Revision 1.136 2004/02/11 19:59:06 peter
|
||||||
|
Loading…
Reference in New Issue
Block a user