fmodule.pas 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789
  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. if assigned(globalsymtable) then
  409. globalsymtable.free;
  410. if assigned(localsymtable) then
  411. localsymtable.free;
  412. {$ifdef MEMDEBUG}
  413. d.free;
  414. {$endif}
  415. {$ifdef MEMDEBUG}
  416. d:=tmemdebug.create(modulename^+' - librarydata');
  417. {$endif}
  418. librarydata.free;
  419. {$ifdef MEMDEBUG}
  420. d.free;
  421. {$endif}
  422. stringdispose(modulename);
  423. inherited Destroy;
  424. end;
  425. procedure tmodule.reset;
  426. var
  427. hpi : tprocinfo;
  428. begin
  429. if assigned(scanner) then
  430. begin
  431. { also update current_scanner if it was pointing
  432. to this module }
  433. if current_scanner=tscannerfile(scanner) then
  434. current_scanner:=nil;
  435. tscannerfile(scanner).free;
  436. scanner:=nil;
  437. end;
  438. if assigned(procinfo) then
  439. begin
  440. if current_procinfo=tprocinfo(procinfo) then
  441. current_procinfo:=nil;
  442. { release procinfo tree }
  443. while assigned(procinfo) do
  444. begin
  445. hpi:=tprocinfo(procinfo).parent;
  446. tprocinfo(procinfo).free;
  447. procinfo:=hpi;
  448. end;
  449. end;
  450. if assigned(globalsymtable) then
  451. begin
  452. globalsymtable.free;
  453. globalsymtable:=nil;
  454. end;
  455. if assigned(localsymtable) then
  456. begin
  457. localsymtable.free;
  458. localsymtable:=nil;
  459. end;
  460. derefdata.free;
  461. derefdata:=TDynamicArray.Create(1024);
  462. if assigned(map) then
  463. begin
  464. freemem(map);
  465. map:=nil;
  466. end;
  467. derefdataintflen:=0;
  468. mapsize:=0;
  469. sourcefiles.free;
  470. sourcefiles:=tinputfilemanager.create;
  471. librarydata.free;
  472. librarydata:=tasmlibrarydata.create(realmodulename^);
  473. imports.free;
  474. imports:=tlinkedlist.create;
  475. _exports.free;
  476. _exports:=tlinkedlist.create;
  477. externals.free;
  478. externals:=tlinkedlist.create;
  479. used_units.free;
  480. used_units:=TLinkedList.Create;
  481. dependent_units.free;
  482. dependent_units:=TLinkedList.Create;
  483. resourcefiles.Free;
  484. resourcefiles:=TStringList.Create;
  485. linkunitofiles.Free;
  486. linkunitofiles:=TLinkContainer.Create;
  487. linkunitstaticlibs.Free;
  488. linkunitstaticlibs:=TLinkContainer.Create;
  489. linkunitsharedlibs.Free;
  490. linkunitsharedlibs:=TLinkContainer.Create;
  491. linkotherofiles.Free;
  492. linkotherofiles:=TLinkContainer.Create;
  493. linkotherstaticlibs.Free;
  494. linkotherstaticlibs:=TLinkContainer.Create;
  495. linkothersharedlibs.Free;
  496. linkothersharedlibs:=TLinkContainer.Create;
  497. uses_imports:=false;
  498. do_compile:=false;
  499. interface_compiled:=false;
  500. in_interface:=true;
  501. in_global:=true;
  502. crc:=0;
  503. interface_crc:=0;
  504. flags:=0;
  505. recompile_reason:=rr_unknown;
  506. {
  507. The following fields should not
  508. be reset:
  509. mainsource
  510. loaded_from
  511. state
  512. sources_avail
  513. }
  514. end;
  515. procedure tmodule.adddependency(callermodule:tmodule);
  516. begin
  517. { This is not needed for programs }
  518. if not callermodule.is_unit then
  519. exit;
  520. Message2(unit_u_add_depend_to,callermodule.modulename^,modulename^);
  521. dependent_units.concat(tdependent_unit.create(callermodule));
  522. end;
  523. procedure tmodule.flagdependent(callermodule:tmodule);
  524. var
  525. pm : tdependent_unit;
  526. begin
  527. { flag all units that depend on this unit for reloading }
  528. pm:=tdependent_unit(current_module.dependent_units.first);
  529. while assigned(pm) do
  530. begin
  531. { We do not have to reload the unit that wants to load
  532. this unit, unless this unit is already compiled during
  533. the loading }
  534. if (pm.u=callermodule) and
  535. (pm.u.state<>ms_compiled) then
  536. Message1(unit_u_no_reload_is_caller,pm.u.modulename^)
  537. else
  538. if pm.u.state=ms_second_compile then
  539. Message1(unit_u_no_reload_in_second_compile,pm.u.modulename^)
  540. else
  541. begin
  542. pm.u.do_reload:=true;
  543. Message1(unit_u_flag_for_reload,pm.u.modulename^);
  544. end;
  545. pm:=tdependent_unit(pm.next);
  546. end;
  547. end;
  548. function tmodule.addusedunit(hp:tmodule;inuses:boolean;usym:tunitsym):tused_unit;
  549. var
  550. pu : tused_unit;
  551. begin
  552. pu:=tused_unit.create(hp,in_interface,inuses,usym);
  553. used_units.concat(pu);
  554. addusedunit:=pu;
  555. end;
  556. procedure tmodule.numberunits;
  557. var
  558. pu : tused_unit;
  559. hp : tmodule;
  560. i : integer;
  561. begin
  562. { Reset all numbers to -1 }
  563. hp:=tmodule(loaded_units.first);
  564. while assigned(hp) do
  565. begin
  566. if assigned(hp.globalsymtable) then
  567. hp.globalsymtable.unitid:=$ffff;
  568. hp:=tmodule(hp.next);
  569. end;
  570. { Allocate map }
  571. mapsize:=used_units.count+1;
  572. reallocmem(map,mapsize*sizeof(tunitmaprec));
  573. { Our own symtable gets unitid 0, for a program there is
  574. no globalsymtable }
  575. if assigned(globalsymtable) then
  576. globalsymtable.unitid:=0;
  577. map[0].u:=self;
  578. map[0].unitsym:=nil;
  579. { number units and map }
  580. i:=1;
  581. pu:=tused_unit(used_units.first);
  582. while assigned(pu) do
  583. begin
  584. if assigned(pu.u.globalsymtable) then
  585. begin
  586. tsymtable(pu.u.globalsymtable).unitid:=i;
  587. map[i].u:=pu.u;
  588. map[i].unitsym:=pu.unitsym;
  589. inc(i);
  590. end;
  591. pu:=tused_unit(pu.next);
  592. end;
  593. end;
  594. procedure tmodule.allunitsused;
  595. var
  596. i : longint;
  597. begin
  598. for i:=0 to mapsize-1 do
  599. begin
  600. if assigned(map[i].unitsym) and
  601. (map[i].unitsym.refs=0) then
  602. MessagePos2(map[i].unitsym.fileinfo,sym_n_unit_not_used,map[i].u.modulename^,modulename^);
  603. end;
  604. end;
  605. procedure tmodule.setmodulename(const s:string);
  606. begin
  607. stringdispose(modulename);
  608. stringdispose(realmodulename);
  609. modulename:=stringdup(upper(s));
  610. realmodulename:=stringdup(s);
  611. { also update asmlibrary names }
  612. librarydata.name:=modulename^;
  613. librarydata.realname:=realmodulename^;
  614. end;
  615. end.
  616. {
  617. $Log$
  618. Revision 1.41 2003-10-23 14:44:07 peter
  619. * splitted buildderef and buildderefimpl to fix interface crc
  620. calculation
  621. Revision 1.40 2003/10/22 20:40:00 peter
  622. * write derefdata in a separate ppu entry
  623. Revision 1.39 2003/10/22 15:22:33 peter
  624. * fixed unitsym-globalsymtable relation so the uses of a unit
  625. is counted correctly
  626. Revision 1.38 2003/10/01 20:34:48 peter
  627. * procinfo unit contains tprocinfo
  628. * cginfo renamed to cgbase
  629. * moved cgmessage to verbose
  630. * fixed ppc and sparc compiles
  631. Revision 1.37 2003/08/23 22:31:42 peter
  632. * reload also caller module when it is already compiled
  633. Revision 1.36 2003/06/07 20:26:32 peter
  634. * re-resolving added instead of reloading from ppu
  635. * tderef object added to store deref info for resolving
  636. Revision 1.35 2003/05/25 10:27:12 peter
  637. * moved Comment calls to messge file
  638. Revision 1.34 2003/05/23 14:27:35 peter
  639. * remove some unit dependencies
  640. * current_procinfo changes to store more info
  641. Revision 1.33 2003/04/27 11:21:32 peter
  642. * aktprocdef renamed to current_procdef
  643. * procinfo renamed to current_procinfo
  644. * procinfo will now be stored in current_module so it can be
  645. cleaned up properly
  646. * gen_main_procsym changed to create_main_proc and release_main_proc
  647. to also generate a tprocinfo structure
  648. * fixed unit implicit initfinal
  649. Revision 1.32 2002/12/29 14:57:50 peter
  650. * unit loading changed to first register units and load them
  651. afterwards. This is needed to support uses xxx in yyy correctly
  652. * unit dependency check fixed
  653. Revision 1.31 2002/12/07 14:27:07 carl
  654. * 3% memory optimization
  655. * changed some types
  656. + added type checking with different size for call node and for
  657. parameters
  658. Revision 1.30 2002/11/24 18:19:56 carl
  659. + tos also has short filenames
  660. Revision 1.29 2002/11/20 12:36:23 mazen
  661. * $UNITPATH directive is now working
  662. Revision 1.28 2002/09/05 19:29:42 peter
  663. * memdebug enhancements
  664. Revision 1.27 2002/08/16 15:31:08 peter
  665. * fixed possible crashes with current_scanner
  666. Revision 1.26 2002/08/12 16:46:04 peter
  667. * tscannerfile is now destroyed in tmodule.reset and current_scanner
  668. is updated accordingly. This removes all the loading and saving of
  669. the old scanner and the invalid flag marking
  670. Revision 1.25 2002/08/11 14:28:19 peter
  671. * TScannerFile.SetInvalid added that will also reset inputfile
  672. Revision 1.24 2002/08/11 13:24:11 peter
  673. * saving of asmsymbols in ppu supported
  674. * asmsymbollist global is removed and moved into a new class
  675. tasmlibrarydata that will hold the info of a .a file which
  676. corresponds with a single module. Added librarydata to tmodule
  677. to keep the library info stored for the module. In the future the
  678. objectfiles will also be stored to the tasmlibrarydata class
  679. * all getlabel/newasmsymbol and friends are moved to the new class
  680. Revision 1.23 2002/05/16 19:46:36 carl
  681. + defines.inc -> fpcdefs.inc to avoid conflicts if compiling by hand
  682. + try to fix temp allocation (still in ifdef)
  683. + generic constructor calls
  684. + start of tassembler / tmodulebase class cleanup
  685. Revision 1.22 2002/05/14 19:34:41 peter
  686. * removed old logs and updated copyright year
  687. Revision 1.21 2002/04/04 19:05:55 peter
  688. * removed unused units
  689. * use tlocation.size in cg.a_*loc*() routines
  690. Revision 1.20 2002/03/28 20:46:59 carl
  691. - remove go32v1 support
  692. }