fmodule.pas 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793
  1. {
  2. $Id$
  3. Copyright (c) 1998-2002 by Florian Klaempfl
  4. This unit implements the first loading and searching of the modules
  5. This program is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 2 of the License, or
  8. (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program; if not, write to the Free Software
  15. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  16. ****************************************************************************
  17. }
  18. unit fmodule;
  19. {$i fpcdefs.inc}
  20. {$ifdef go32v2}
  21. {$define shortasmprefix}
  22. {$endif}
  23. {$ifdef tos}
  24. {$define shortasmprefix}
  25. {$endif}
  26. {$ifdef OS2}
  27. { Allthough OS/2 supports long filenames I play it safe and
  28. use 8.3 filenames, because this allows the compiler to run
  29. on a FAT partition. (DM) }
  30. {$define shortasmprefix}
  31. {$endif}
  32. interface
  33. uses
  34. cutils,cclasses,
  35. globals,finput,
  36. symbase,symsym,aasmbase;
  37. type
  38. trecompile_reason = (rr_unknown,
  39. rr_noppu,rr_sourcenewer,rr_build,rr_crcchanged
  40. );
  41. TExternalsItem=class(TLinkedListItem)
  42. public
  43. found : longbool;
  44. data : pstring;
  45. constructor Create(const s:string);
  46. Destructor Destroy;override;
  47. end;
  48. tlinkcontaineritem=class(tlinkedlistitem)
  49. public
  50. data : pstring;
  51. needlink : cardinal;
  52. constructor Create(const s:string;m:cardinal);
  53. destructor Destroy;override;
  54. end;
  55. tlinkcontainer=class(tlinkedlist)
  56. procedure add(const s : string;m:cardinal);
  57. function get(var m:cardinal) : string;
  58. function getusemask(mask:cardinal) : string;
  59. function find(const s:string):boolean;
  60. end;
  61. tmodule = class;
  62. tused_unit = class;
  63. tunitmaprec = record
  64. u : tmodule;
  65. unitsym : tunitsym;
  66. end;
  67. punitmap = ^tunitmaprec;
  68. tmodule = class(tmodulebase)
  69. do_reload, { force reloading of the unit }
  70. do_compile, { need to compile the sources }
  71. sources_avail, { if all sources are reachable }
  72. interface_compiled, { if the interface section has been parsed/compiled/loaded }
  73. is_unit,
  74. in_interface, { processing the implementation part? }
  75. in_global : boolean; { allow global settings }
  76. recompile_reason : trecompile_reason; { the reason why the unit should be recompiled }
  77. crc,
  78. interface_crc : cardinal;
  79. flags : cardinal; { the PPU flags }
  80. islibrary : boolean; { if it is a library (win32 dll) }
  81. map : punitmap; { mapping of all used units }
  82. mapsize : longint; { number of units in the map }
  83. derefdataintflen : longint;
  84. derefdata : tdynamicarray;
  85. globalsymtable, { pointer to the global symtable of this unit }
  86. localsymtable : tsymtable;{ pointer to the local symtable of this unit }
  87. scanner : pointer; { scanner object used }
  88. procinfo : pointer; { current procedure being compiled }
  89. loaded_from : tmodule;
  90. uses_imports : boolean; { Set if the module imports from DLL's.}
  91. imports : tlinkedlist;
  92. _exports : tlinkedlist;
  93. externals : tlinkedlist; {Only for DLL scanners by using Unix-style $LINKLIB }
  94. resourcefiles : tstringlist;
  95. linkunitofiles,
  96. linkunitstaticlibs,
  97. linkunitsharedlibs,
  98. linkotherofiles, { objects,libs loaded from the source }
  99. linkothersharedlibs, { using $L or $LINKLIB or import lib (for linux) }
  100. linkotherstaticlibs : tlinkcontainer;
  101. used_units : tlinkedlist;
  102. dependent_units : tlinkedlist;
  103. localunitsearchpath, { local searchpaths }
  104. localobjectsearchpath,
  105. localincludesearchpath,
  106. locallibrarysearchpath : TSearchPathList;
  107. asmprefix : pstring; { prefix for the smartlink asmfiles }
  108. librarydata : tasmlibrarydata; { librarydata for this module }
  109. {create creates a new module which name is stored in 's'. LoadedFrom
  110. points to the module calling it. It is nil for the first compiled
  111. module. This allow inheritence of all path lists. MUST pay attention
  112. to that when creating link.res!!!!(mazen)}
  113. constructor create(LoadedFrom:TModule;const s:string;_is_unit:boolean);
  114. destructor destroy;override;
  115. procedure reset;virtual;
  116. procedure adddependency(callermodule:tmodule);
  117. procedure flagdependent(callermodule:tmodule);
  118. function addusedunit(hp:tmodule;inuses:boolean;usym:tunitsym):tused_unit;
  119. procedure numberunits;
  120. procedure allunitsused;
  121. procedure setmodulename(const s:string);
  122. end;
  123. tused_unit = class(tlinkedlistitem)
  124. unitid : longint;
  125. checksum,
  126. interface_checksum : cardinal;
  127. in_uses,
  128. in_interface,
  129. is_stab_written : boolean;
  130. u : tmodule;
  131. unitsym : tunitsym;
  132. constructor create(_u : tmodule;intface,inuses:boolean;usym:tunitsym);
  133. end;
  134. tdependent_unit = class(tlinkedlistitem)
  135. u : tmodule;
  136. constructor create(_u : tmodule);
  137. end;
  138. var
  139. main_module : tmodule; { Main module of the program }
  140. current_module : tmodule; { Current module which is compiled or loaded }
  141. compiled_module : tmodule; { Current module which is compiled }
  142. usedunits : tlinkedlist; { Used units for this program }
  143. loaded_units : tlinkedlist; { All loaded units }
  144. SmartLinkOFiles : TStringList; { List of .o files which are generated,
  145. used to delete them after linking }
  146. function get_source_file(moduleindex,fileindex : longint) : tinputfile;
  147. implementation
  148. uses
  149. {$ifdef delphi}
  150. dmisc,
  151. {$else}
  152. dos,
  153. {$endif}
  154. verbose,systems,
  155. scanner,
  156. procinfo;
  157. {*****************************************************************************
  158. Global Functions
  159. *****************************************************************************}
  160. function get_source_file(moduleindex,fileindex : longint) : tinputfile;
  161. var
  162. hp : tmodule;
  163. begin
  164. hp:=tmodule(loaded_units.first);
  165. while assigned(hp) and (hp.unit_index<>moduleindex) do
  166. hp:=tmodule(hp.next);
  167. if assigned(hp) then
  168. get_source_file:=hp.sourcefiles.get_file(fileindex)
  169. else
  170. get_source_file:=nil;
  171. end;
  172. {****************************************************************************
  173. TLinkContainerItem
  174. ****************************************************************************}
  175. constructor TLinkContainerItem.Create(const s:string;m:cardinal);
  176. begin
  177. inherited Create;
  178. data:=stringdup(s);
  179. needlink:=m;
  180. end;
  181. destructor TLinkContainerItem.Destroy;
  182. begin
  183. stringdispose(data);
  184. end;
  185. {****************************************************************************
  186. TLinkContainer
  187. ****************************************************************************}
  188. procedure TLinkContainer.add(const s : string;m:cardinal);
  189. begin
  190. inherited concat(TLinkContainerItem.Create(s,m));
  191. end;
  192. function TLinkContainer.get(var m:cardinal) : string;
  193. var
  194. p : tlinkcontaineritem;
  195. begin
  196. p:=tlinkcontaineritem(inherited getfirst);
  197. if p=nil then
  198. begin
  199. get:='';
  200. m:=0;
  201. end
  202. else
  203. begin
  204. get:=p.data^;
  205. m:=p.needlink;
  206. p.free;
  207. end;
  208. end;
  209. function TLinkContainer.getusemask(mask:cardinal) : string;
  210. var
  211. p : tlinkcontaineritem;
  212. found : boolean;
  213. begin
  214. found:=false;
  215. repeat
  216. p:=tlinkcontaineritem(inherited getfirst);
  217. if p=nil then
  218. begin
  219. getusemask:='';
  220. exit;
  221. end;
  222. getusemask:=p.data^;
  223. found:=(p.needlink and mask)<>0;
  224. p.free;
  225. until found;
  226. end;
  227. function TLinkContainer.find(const s:string):boolean;
  228. var
  229. newnode : tlinkcontaineritem;
  230. begin
  231. find:=false;
  232. newnode:=tlinkcontaineritem(First);
  233. while assigned(newnode) do
  234. begin
  235. if newnode.data^=s then
  236. begin
  237. find:=true;
  238. exit;
  239. end;
  240. newnode:=tlinkcontaineritem(newnode.next);
  241. end;
  242. end;
  243. {****************************************************************************
  244. TExternalsItem
  245. ****************************************************************************}
  246. constructor tExternalsItem.Create(const s:string);
  247. begin
  248. inherited Create;
  249. found:=false;
  250. data:=stringdup(s);
  251. end;
  252. destructor tExternalsItem.Destroy;
  253. begin
  254. stringdispose(data);
  255. inherited;
  256. end;
  257. {****************************************************************************
  258. TUSED_UNIT
  259. ****************************************************************************}
  260. constructor tused_unit.create(_u : tmodule;intface,inuses:boolean;usym:tunitsym);
  261. begin
  262. u:=_u;
  263. in_interface:=intface;
  264. in_uses:=inuses;
  265. is_stab_written:=false;
  266. unitid:=0;
  267. unitsym:=usym;
  268. if _u.state=ms_compiled then
  269. begin
  270. checksum:=u.crc;
  271. interface_checksum:=u.interface_crc;
  272. end
  273. else
  274. begin
  275. checksum:=0;
  276. interface_checksum:=0;
  277. end;
  278. end;
  279. {****************************************************************************
  280. TDENPENDENT_UNIT
  281. ****************************************************************************}
  282. constructor tdependent_unit.create(_u : tmodule);
  283. begin
  284. u:=_u;
  285. end;
  286. {****************************************************************************
  287. TMODULE
  288. ****************************************************************************}
  289. constructor tmodule.create(LoadedFrom:TModule;const s:string;_is_unit:boolean);
  290. var
  291. p : dirstr;
  292. n : namestr;
  293. e : extstr;
  294. begin
  295. FSplit(s,p,n,e);
  296. { Programs have the name 'Program' to don't conflict with dup id's }
  297. if _is_unit then
  298. inherited create(n)
  299. else
  300. inherited create('Program');
  301. mainsource:=stringdup(s);
  302. { Dos has the famous 8.3 limit :( }
  303. {$ifdef shortasmprefix}
  304. asmprefix:=stringdup(FixFileName('as'));
  305. {$else}
  306. asmprefix:=stringdup(FixFileName(n));
  307. {$endif}
  308. setfilename(p+n,true);
  309. localunitsearchpath:=TSearchPathList.Create;
  310. localobjectsearchpath:=TSearchPathList.Create;
  311. localincludesearchpath:=TSearchPathList.Create;
  312. locallibrarysearchpath:=TSearchPathList.Create;
  313. used_units:=TLinkedList.Create;
  314. dependent_units:=TLinkedList.Create;
  315. resourcefiles:=TStringList.Create;
  316. linkunitofiles:=TLinkContainer.Create;
  317. linkunitstaticlibs:=TLinkContainer.Create;
  318. linkunitsharedlibs:=TLinkContainer.Create;
  319. linkotherofiles:=TLinkContainer.Create;
  320. linkotherstaticlibs:=TLinkContainer.Create;
  321. linkothersharedlibs:=TLinkContainer.Create;
  322. crc:=0;
  323. interface_crc:=0;
  324. flags:=0;
  325. scanner:=nil;
  326. map:=nil;
  327. mapsize:=0;
  328. derefdata:=TDynamicArray.Create(1024);
  329. derefdataintflen:=0;
  330. globalsymtable:=nil;
  331. localsymtable:=nil;
  332. loaded_from:=LoadedFrom;
  333. do_reload:=false;
  334. do_compile:=false;
  335. sources_avail:=true;
  336. recompile_reason:=rr_unknown;
  337. in_interface:=true;
  338. in_global:=true;
  339. is_unit:=_is_unit;
  340. islibrary:=false;
  341. uses_imports:=false;
  342. imports:=TLinkedList.Create;
  343. _exports:=TLinkedList.Create;
  344. externals:=TLinkedList.Create;
  345. librarydata:=tasmlibrarydata.create(realmodulename^);
  346. end;
  347. destructor tmodule.Destroy;
  348. var
  349. {$ifdef MEMDEBUG}
  350. d : tmemdebug;
  351. {$endif}
  352. hpi : tprocinfo;
  353. begin
  354. dispose(map);
  355. if assigned(imports) then
  356. imports.free;
  357. if assigned(_exports) then
  358. _exports.free;
  359. if assigned(externals) then
  360. externals.free;
  361. if assigned(scanner) then
  362. begin
  363. { also update current_scanner if it was pointing
  364. to this module }
  365. if current_scanner=tscannerfile(scanner) then
  366. current_scanner:=nil;
  367. tscannerfile(scanner).free;
  368. end;
  369. if assigned(procinfo) then
  370. begin
  371. if current_procinfo=tprocinfo(procinfo) then
  372. current_procinfo:=nil;
  373. { release procinfo tree }
  374. while assigned(procinfo) do
  375. begin
  376. hpi:=tprocinfo(procinfo).parent;
  377. tprocinfo(procinfo).free;
  378. procinfo:=hpi;
  379. end;
  380. end;
  381. used_units.free;
  382. dependent_units.free;
  383. resourcefiles.Free;
  384. linkunitofiles.Free;
  385. linkunitstaticlibs.Free;
  386. linkunitsharedlibs.Free;
  387. linkotherofiles.Free;
  388. linkotherstaticlibs.Free;
  389. linkothersharedlibs.Free;
  390. stringdispose(objfilename);
  391. stringdispose(newfilename);
  392. stringdispose(ppufilename);
  393. stringdispose(staticlibfilename);
  394. stringdispose(sharedlibfilename);
  395. stringdispose(exefilename);
  396. stringdispose(outputpath);
  397. stringdispose(path);
  398. stringdispose(realmodulename);
  399. stringdispose(mainsource);
  400. stringdispose(asmprefix);
  401. localunitsearchpath.Free;
  402. localobjectsearchpath.free;
  403. localincludesearchpath.free;
  404. locallibrarysearchpath.free;
  405. {$ifdef MEMDEBUG}
  406. d:=tmemdebug.create(modulename^+' - symtable');
  407. {$endif}
  408. derefdata.free;
  409. if assigned(globalsymtable) then
  410. globalsymtable.free;
  411. if assigned(localsymtable) then
  412. localsymtable.free;
  413. {$ifdef MEMDEBUG}
  414. d.free;
  415. {$endif}
  416. {$ifdef MEMDEBUG}
  417. d:=tmemdebug.create(modulename^+' - librarydata');
  418. {$endif}
  419. librarydata.free;
  420. {$ifdef MEMDEBUG}
  421. d.free;
  422. {$endif}
  423. stringdispose(modulename);
  424. inherited Destroy;
  425. end;
  426. procedure tmodule.reset;
  427. var
  428. hpi : tprocinfo;
  429. begin
  430. if assigned(scanner) then
  431. begin
  432. { also update current_scanner if it was pointing
  433. to this module }
  434. if current_scanner=tscannerfile(scanner) then
  435. current_scanner:=nil;
  436. tscannerfile(scanner).free;
  437. scanner:=nil;
  438. end;
  439. if assigned(procinfo) then
  440. begin
  441. if current_procinfo=tprocinfo(procinfo) then
  442. current_procinfo:=nil;
  443. { release procinfo tree }
  444. while assigned(procinfo) do
  445. begin
  446. hpi:=tprocinfo(procinfo).parent;
  447. tprocinfo(procinfo).free;
  448. procinfo:=hpi;
  449. end;
  450. end;
  451. if assigned(globalsymtable) then
  452. begin
  453. globalsymtable.free;
  454. globalsymtable:=nil;
  455. end;
  456. if assigned(localsymtable) then
  457. begin
  458. localsymtable.free;
  459. localsymtable:=nil;
  460. end;
  461. derefdata.free;
  462. derefdata:=TDynamicArray.Create(1024);
  463. if assigned(map) then
  464. begin
  465. freemem(map);
  466. map:=nil;
  467. end;
  468. derefdataintflen:=0;
  469. mapsize:=0;
  470. sourcefiles.free;
  471. sourcefiles:=tinputfilemanager.create;
  472. librarydata.free;
  473. librarydata:=tasmlibrarydata.create(realmodulename^);
  474. imports.free;
  475. imports:=tlinkedlist.create;
  476. _exports.free;
  477. _exports:=tlinkedlist.create;
  478. externals.free;
  479. externals:=tlinkedlist.create;
  480. used_units.free;
  481. used_units:=TLinkedList.Create;
  482. dependent_units.free;
  483. dependent_units:=TLinkedList.Create;
  484. resourcefiles.Free;
  485. resourcefiles:=TStringList.Create;
  486. linkunitofiles.Free;
  487. linkunitofiles:=TLinkContainer.Create;
  488. linkunitstaticlibs.Free;
  489. linkunitstaticlibs:=TLinkContainer.Create;
  490. linkunitsharedlibs.Free;
  491. linkunitsharedlibs:=TLinkContainer.Create;
  492. linkotherofiles.Free;
  493. linkotherofiles:=TLinkContainer.Create;
  494. linkotherstaticlibs.Free;
  495. linkotherstaticlibs:=TLinkContainer.Create;
  496. linkothersharedlibs.Free;
  497. linkothersharedlibs:=TLinkContainer.Create;
  498. uses_imports:=false;
  499. do_compile:=false;
  500. interface_compiled:=false;
  501. in_interface:=true;
  502. in_global:=true;
  503. crc:=0;
  504. interface_crc:=0;
  505. flags:=0;
  506. recompile_reason:=rr_unknown;
  507. {
  508. The following fields should not
  509. be reset:
  510. mainsource
  511. loaded_from
  512. state
  513. sources_avail
  514. }
  515. end;
  516. procedure tmodule.adddependency(callermodule:tmodule);
  517. begin
  518. { This is not needed for programs }
  519. if not callermodule.is_unit then
  520. exit;
  521. Message2(unit_u_add_depend_to,callermodule.modulename^,modulename^);
  522. dependent_units.concat(tdependent_unit.create(callermodule));
  523. end;
  524. procedure tmodule.flagdependent(callermodule:tmodule);
  525. var
  526. pm : tdependent_unit;
  527. begin
  528. { flag all units that depend on this unit for reloading }
  529. pm:=tdependent_unit(current_module.dependent_units.first);
  530. while assigned(pm) do
  531. begin
  532. { We do not have to reload the unit that wants to load
  533. this unit, unless this unit is already compiled during
  534. the loading }
  535. if (pm.u=callermodule) and
  536. (pm.u.state<>ms_compiled) then
  537. Message1(unit_u_no_reload_is_caller,pm.u.modulename^)
  538. else
  539. if pm.u.state=ms_second_compile then
  540. Message1(unit_u_no_reload_in_second_compile,pm.u.modulename^)
  541. else
  542. begin
  543. pm.u.do_reload:=true;
  544. Message1(unit_u_flag_for_reload,pm.u.modulename^);
  545. end;
  546. pm:=tdependent_unit(pm.next);
  547. end;
  548. end;
  549. function tmodule.addusedunit(hp:tmodule;inuses:boolean;usym:tunitsym):tused_unit;
  550. var
  551. pu : tused_unit;
  552. begin
  553. pu:=tused_unit.create(hp,in_interface,inuses,usym);
  554. used_units.concat(pu);
  555. addusedunit:=pu;
  556. end;
  557. procedure tmodule.numberunits;
  558. var
  559. pu : tused_unit;
  560. hp : tmodule;
  561. i : integer;
  562. begin
  563. { Reset all numbers to -1 }
  564. hp:=tmodule(loaded_units.first);
  565. while assigned(hp) do
  566. begin
  567. if assigned(hp.globalsymtable) then
  568. hp.globalsymtable.unitid:=$ffff;
  569. hp:=tmodule(hp.next);
  570. end;
  571. { Allocate map }
  572. mapsize:=used_units.count+1;
  573. reallocmem(map,mapsize*sizeof(tunitmaprec));
  574. { Our own symtable gets unitid 0, for a program there is
  575. no globalsymtable }
  576. if assigned(globalsymtable) then
  577. globalsymtable.unitid:=0;
  578. map[0].u:=self;
  579. map[0].unitsym:=nil;
  580. { number units and map }
  581. i:=1;
  582. pu:=tused_unit(used_units.first);
  583. while assigned(pu) do
  584. begin
  585. if assigned(pu.u.globalsymtable) then
  586. begin
  587. tsymtable(pu.u.globalsymtable).unitid:=i;
  588. map[i].u:=pu.u;
  589. map[i].unitsym:=pu.unitsym;
  590. inc(i);
  591. end;
  592. pu:=tused_unit(pu.next);
  593. end;
  594. end;
  595. procedure tmodule.allunitsused;
  596. var
  597. i : longint;
  598. begin
  599. for i:=0 to mapsize-1 do
  600. begin
  601. if assigned(map[i].unitsym) and
  602. (map[i].unitsym.refs=0) then
  603. MessagePos2(map[i].unitsym.fileinfo,sym_n_unit_not_used,map[i].u.modulename^,modulename^);
  604. end;
  605. end;
  606. procedure tmodule.setmodulename(const s:string);
  607. begin
  608. stringdispose(modulename);
  609. stringdispose(realmodulename);
  610. modulename:=stringdup(upper(s));
  611. realmodulename:=stringdup(s);
  612. { also update asmlibrary names }
  613. librarydata.name:=modulename^;
  614. librarydata.realname:=realmodulename^;
  615. end;
  616. end.
  617. {
  618. $Log$
  619. Revision 1.42 2003-11-23 17:23:49 peter
  620. * fixed memleak with derefdata
  621. Revision 1.41 2003/10/23 14:44:07 peter
  622. * splitted buildderef and buildderefimpl to fix interface crc
  623. calculation
  624. Revision 1.40 2003/10/22 20:40:00 peter
  625. * write derefdata in a separate ppu entry
  626. Revision 1.39 2003/10/22 15:22:33 peter
  627. * fixed unitsym-globalsymtable relation so the uses of a unit
  628. is counted correctly
  629. Revision 1.38 2003/10/01 20:34:48 peter
  630. * procinfo unit contains tprocinfo
  631. * cginfo renamed to cgbase
  632. * moved cgmessage to verbose
  633. * fixed ppc and sparc compiles
  634. Revision 1.37 2003/08/23 22:31:42 peter
  635. * reload also caller module when it is already compiled
  636. Revision 1.36 2003/06/07 20:26:32 peter
  637. * re-resolving added instead of reloading from ppu
  638. * tderef object added to store deref info for resolving
  639. Revision 1.35 2003/05/25 10:27:12 peter
  640. * moved Comment calls to messge file
  641. Revision 1.34 2003/05/23 14:27:35 peter
  642. * remove some unit dependencies
  643. * current_procinfo changes to store more info
  644. Revision 1.33 2003/04/27 11:21:32 peter
  645. * aktprocdef renamed to current_procdef
  646. * procinfo renamed to current_procinfo
  647. * procinfo will now be stored in current_module so it can be
  648. cleaned up properly
  649. * gen_main_procsym changed to create_main_proc and release_main_proc
  650. to also generate a tprocinfo structure
  651. * fixed unit implicit initfinal
  652. Revision 1.32 2002/12/29 14:57:50 peter
  653. * unit loading changed to first register units and load them
  654. afterwards. This is needed to support uses xxx in yyy correctly
  655. * unit dependency check fixed
  656. Revision 1.31 2002/12/07 14:27:07 carl
  657. * 3% memory optimization
  658. * changed some types
  659. + added type checking with different size for call node and for
  660. parameters
  661. Revision 1.30 2002/11/24 18:19:56 carl
  662. + tos also has short filenames
  663. Revision 1.29 2002/11/20 12:36:23 mazen
  664. * $UNITPATH directive is now working
  665. Revision 1.28 2002/09/05 19:29:42 peter
  666. * memdebug enhancements
  667. Revision 1.27 2002/08/16 15:31:08 peter
  668. * fixed possible crashes with current_scanner
  669. Revision 1.26 2002/08/12 16:46:04 peter
  670. * tscannerfile is now destroyed in tmodule.reset and current_scanner
  671. is updated accordingly. This removes all the loading and saving of
  672. the old scanner and the invalid flag marking
  673. Revision 1.25 2002/08/11 14:28:19 peter
  674. * TScannerFile.SetInvalid added that will also reset inputfile
  675. Revision 1.24 2002/08/11 13:24:11 peter
  676. * saving of asmsymbols in ppu supported
  677. * asmsymbollist global is removed and moved into a new class
  678. tasmlibrarydata that will hold the info of a .a file which
  679. corresponds with a single module. Added librarydata to tmodule
  680. to keep the library info stored for the module. In the future the
  681. objectfiles will also be stored to the tasmlibrarydata class
  682. * all getlabel/newasmsymbol and friends are moved to the new class
  683. Revision 1.23 2002/05/16 19:46:36 carl
  684. + defines.inc -> fpcdefs.inc to avoid conflicts if compiling by hand
  685. + try to fix temp allocation (still in ifdef)
  686. + generic constructor calls
  687. + start of tassembler / tmodulebase class cleanup
  688. Revision 1.22 2002/05/14 19:34:41 peter
  689. * removed old logs and updated copyright year
  690. Revision 1.21 2002/04/04 19:05:55 peter
  691. * removed unused units
  692. * use tlocation.size in cg.a_*loc*() routines
  693. Revision 1.20 2002/03/28 20:46:59 carl
  694. - remove go32v1 support
  695. }