fmodule.pas 24 KB

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