mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-11 18:08:15 +02:00
Merged revision(s) 44072-44074 from trunk:
* have the module keep track whether it was loaded from a PPU with a different endianess than the current host system ........ * for deciding whether to swap a generic's buffer use the module's flag instead of the def's ........ - remove generic_buf_needs_swapping again as that is now handled with tmodule.change_endian of the generic's module ........ git-svn-id: branches/fixes_3_2@44080 -
This commit is contained in:
parent
8d73e8cfaa
commit
cbe9654b04
@ -131,6 +131,7 @@ interface
|
||||
flags : cardinal; { the PPU flags }
|
||||
islibrary : boolean; { if it is a library (win32 dll) }
|
||||
IsPackage : boolean;
|
||||
change_endian : boolean; { if the unit is loaded on a system with a different endianess than it was compiled on }
|
||||
moduleid : longint;
|
||||
unitmap : punitmap; { mapping of all used units }
|
||||
unitmapsize : longint; { number of units in the map }
|
||||
@ -618,6 +619,7 @@ implementation
|
||||
is_unit:=_is_unit;
|
||||
islibrary:=false;
|
||||
ispackage:=false;
|
||||
change_endian:=false;
|
||||
is_dbginfo_written:=false;
|
||||
mode_switch_allowed:= true;
|
||||
moduleoptions:=[];
|
||||
|
@ -339,6 +339,7 @@ var
|
||||
crc:=ppufile.header.checksum;
|
||||
interface_crc:=ppufile.header.interface_checksum;
|
||||
indirect_crc:=ppufile.header.indirect_checksum;
|
||||
change_endian:=ppufile.change_endian;
|
||||
{ Show Debug info }
|
||||
if ppufiletime<>-1 then
|
||||
Message1(unit_u_ppu_time,filetimestring(ppufiletime))
|
||||
|
@ -1059,7 +1059,7 @@ uses
|
||||
replaydepth:=current_scanner.replay_stack_depth;
|
||||
if genericdef.typ=procdef then
|
||||
begin
|
||||
current_scanner.startreplaytokens(tprocdef(genericdef).genericdecltokenbuf,tprocdef(genericdef).generic_buf_needs_swapping);
|
||||
current_scanner.startreplaytokens(tprocdef(genericdef).genericdecltokenbuf,hmodule.change_endian);
|
||||
parse_proc_head(tprocdef(genericdef).struct,tprocdef(genericdef).proctypeoption,false,genericdef,generictypelist,pd);
|
||||
if assigned(pd) then
|
||||
begin
|
||||
@ -1073,7 +1073,7 @@ uses
|
||||
end
|
||||
else
|
||||
begin
|
||||
current_scanner.startreplaytokens(genericdef.generictokenbuf,genericdef.generic_buf_needs_swapping);
|
||||
current_scanner.startreplaytokens(genericdef.generictokenbuf,hmodule.change_endian);
|
||||
hadtypetoken:=false;
|
||||
read_named_type(result,srsym,genericdef,generictypelist,false,hadtypetoken);
|
||||
ttypesym(srsym).typedef:=result;
|
||||
@ -1721,7 +1721,7 @@ uses
|
||||
{ use the index the module got from the current compilation process }
|
||||
current_filepos.moduleindex:=hmodule.unit_index;
|
||||
current_tokenpos:=current_filepos;
|
||||
current_scanner.startreplaytokens(tprocdef(def.genericdef).generictokenbuf,tprocdef(def.genericdef).generic_buf_needs_swapping);
|
||||
current_scanner.startreplaytokens(tprocdef(def.genericdef).generictokenbuf,hmodule.change_endian);
|
||||
read_proc_body(def);
|
||||
current_filepos:=oldcurrent_filepos;
|
||||
end
|
||||
|
@ -88,7 +88,6 @@ interface
|
||||
genericdef : tstoreddef;
|
||||
genericdefderef : tderef;
|
||||
generictokenbuf : tdynamicarray;
|
||||
generic_buf_needs_swapping : boolean;
|
||||
{ this list contains references to the symbols that make up the
|
||||
generic parameters; the symbols are not owned by this list
|
||||
Note: this list is allocated on demand! }
|
||||
@ -1812,7 +1811,6 @@ implementation
|
||||
fileinfo := current_filepos;
|
||||
{$endif}
|
||||
generictokenbuf:=nil;
|
||||
generic_buf_needs_swapping:=false;
|
||||
genericdef:=nil;
|
||||
typesymderef.reset;
|
||||
genericdefderef.reset;
|
||||
@ -1906,7 +1904,6 @@ implementation
|
||||
begin
|
||||
sizeleft:=ppufile.getlongint;
|
||||
initgeneric;
|
||||
generic_buf_needs_swapping:=ppufile.change_endian;
|
||||
while sizeleft>0 do
|
||||
begin
|
||||
if sizeleft>sizeof(buf) then
|
||||
|
Loading…
Reference in New Issue
Block a user