symppu.inc 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900
  1. {
  2. $Id$
  3. Copyright (c) 1993-98 by Florian Klaempfl, Pierre Muller
  4. Implementation of the reading of PPU Files for the symtable
  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. const
  19. {$ifdef FPC}
  20. ppubufsize=32768;
  21. {$ELSE}
  22. {$IFDEF USEOVERLAY}
  23. ppubufsize=512;
  24. {$ELSE}
  25. ppubufsize=4096;
  26. {$ENDIF}
  27. {$ENDIF}
  28. {*****************************************************************************
  29. PPU Writing
  30. *****************************************************************************}
  31. procedure writebyte(b:byte);
  32. begin
  33. current_ppu^.putbyte(b);
  34. end;
  35. procedure writeword(w:word);
  36. begin
  37. current_ppu^.putword(w);
  38. end;
  39. procedure writelong(l:longint);
  40. begin
  41. current_ppu^.putlongint(l);
  42. end;
  43. procedure writereal(d:bestreal);
  44. begin
  45. current_ppu^.putreal(d);
  46. end;
  47. procedure writestring(const s:string);
  48. begin
  49. current_ppu^.putstring(s);
  50. end;
  51. procedure writenormalset(var s); {You cannot pass an array[0..31] of byte!}
  52. begin
  53. current_ppu^.putdata(s,sizeof(tnormalset));
  54. end;
  55. procedure writesmallset(var s);
  56. begin
  57. current_ppu^.putdata(s,4);
  58. end;
  59. { posinfo is not relevant for changes in PPU }
  60. procedure writeposinfo(const p:tfileposinfo);
  61. var
  62. oldcrc : boolean;
  63. begin
  64. oldcrc:=current_ppu^.do_crc;
  65. current_ppu^.do_crc:=false;
  66. current_ppu^.putword(p.fileindex);
  67. current_ppu^.putlongint(p.line);
  68. current_ppu^.putword(p.column);
  69. current_ppu^.do_crc:=oldcrc;
  70. end;
  71. procedure writederef(p : psymtableentry);
  72. begin
  73. if p=nil then
  74. current_ppu^.putbyte(ord(derefnil))
  75. else
  76. begin
  77. { Static symtable ? }
  78. if p^.owner^.symtabletype=staticsymtable then
  79. begin
  80. current_ppu^.putbyte(ord(derefaktstaticindex));
  81. current_ppu^.putword(p^.indexnr);
  82. end
  83. { Local record/object symtable ? }
  84. else if (p^.owner=aktrecordsymtable) then
  85. begin
  86. current_ppu^.putbyte(ord(derefaktrecordindex));
  87. current_ppu^.putword(p^.indexnr);
  88. end
  89. else
  90. begin
  91. current_ppu^.putbyte(ord(derefindex));
  92. current_ppu^.putword(p^.indexnr);
  93. { Current unit symtable ? }
  94. repeat
  95. if not assigned(p) then
  96. internalerror(556655);
  97. case p^.owner^.symtabletype of
  98. { when writing the pseudo PPU file
  99. to get CRC values the globalsymtable is not yet
  100. a unitsymtable PM }
  101. {$ifndef Dont_use_double_checksum}
  102. globalsymtable,
  103. {$endif Dont_use_double_checksum}
  104. unitsymtable :
  105. begin
  106. current_ppu^.putbyte(ord(derefunit));
  107. current_ppu^.putword(p^.owner^.unitid);
  108. break;
  109. end;
  110. staticsymtable :
  111. begin
  112. current_ppu^.putbyte(ord(derefaktstaticindex));
  113. current_ppu^.putword(p^.indexnr);
  114. break;
  115. end;
  116. localsymtable :
  117. begin
  118. p:=p^.owner^.defowner;
  119. current_ppu^.putbyte(ord(dereflocal));
  120. current_ppu^.putword(p^.indexnr);
  121. end;
  122. parasymtable :
  123. begin
  124. p:=p^.owner^.defowner;
  125. current_ppu^.putbyte(ord(derefpara));
  126. current_ppu^.putword(p^.indexnr);
  127. end;
  128. objectsymtable,
  129. recordsymtable :
  130. begin
  131. p:=p^.owner^.defowner;
  132. current_ppu^.putbyte(ord(derefrecord));
  133. current_ppu^.putword(p^.indexnr);
  134. end;
  135. else
  136. internalerror(556656);
  137. end;
  138. until false;
  139. end;
  140. end;
  141. end;
  142. procedure writedefref(p : pdef);
  143. begin
  144. writederef(p);
  145. end;
  146. procedure writesymref(p : psym);
  147. begin
  148. writederef(p);
  149. end;
  150. procedure writesourcefiles;
  151. var
  152. hp : pinputfile;
  153. begin
  154. { second write the used source files }
  155. current_ppu^.do_crc:=false;
  156. hp:=current_module^.sourcefiles^.files;
  157. while assigned(hp) do
  158. begin
  159. { only name and extension }
  160. current_ppu^.putstring(hp^.name^);
  161. hp:=hp^.ref_next;
  162. end;
  163. current_ppu^.writeentry(ibsourcefiles);
  164. current_ppu^.do_crc:=true;
  165. end;
  166. procedure writeusedmacros;
  167. var
  168. hp : pmacrosym;
  169. i : longint;
  170. begin
  171. { second write the used source files }
  172. current_ppu^.do_crc:=false;
  173. for i:=1 to macros^.symindex^.count do
  174. begin
  175. hp:=pmacrosym(macros^.symindex^.search(i));
  176. { only used or init defined macros are stored }
  177. if hp^.is_used or hp^.defined_at_startup then
  178. begin
  179. current_ppu^.putstring(hp^._name^);
  180. current_ppu^.putbyte(byte(hp^.defined_at_startup));
  181. current_ppu^.putbyte(byte(hp^.is_used));
  182. end;
  183. end;
  184. current_ppu^.writeentry(ibusedmacros);
  185. current_ppu^.do_crc:=true;
  186. end;
  187. procedure writeusedunit;
  188. var
  189. hp : pused_unit;
  190. begin
  191. numberunits;
  192. hp:=pused_unit(current_module^.used_units.first);
  193. while assigned(hp) do
  194. begin
  195. { implementation units should not change
  196. the CRC PM }
  197. current_ppu^.do_crc:=hp^.in_interface;
  198. current_ppu^.putstring(hp^.name^);
  199. { the checksum should not affect the crc of this unit ! (PFV) }
  200. current_ppu^.do_crc:=false;
  201. current_ppu^.putlongint(hp^.checksum);
  202. current_ppu^.putlongint(hp^.interface_checksum);
  203. current_ppu^.putbyte(byte(hp^.in_interface));
  204. current_ppu^.do_crc:=true;
  205. hp:=pused_unit(hp^.next);
  206. end;
  207. current_ppu^.do_interface_crc:=true;
  208. current_ppu^.writeentry(ibloadunit);
  209. end;
  210. procedure writelinkcontainer(var p:tlinkcontainer;id:byte;strippath:boolean);
  211. var
  212. hcontainer : tlinkcontainer;
  213. s : string;
  214. mask : longint;
  215. begin
  216. hcontainer.init;
  217. while not p.empty do
  218. begin
  219. s:=p.get(mask);
  220. if strippath then
  221. current_ppu^.putstring(SplitFileName(s))
  222. else
  223. current_ppu^.putstring(s);
  224. current_ppu^.putlongint(mask);
  225. hcontainer.insert(s,mask);
  226. end;
  227. current_ppu^.writeentry(id);
  228. p:=hcontainer;
  229. end;
  230. procedure writeunitas(const s : string;unittable : punitsymtable;only_crc : boolean);
  231. begin
  232. Message1(unit_u_ppu_write,s);
  233. { create unit flags }
  234. with Current_Module^ do
  235. begin
  236. {$ifdef GDB}
  237. if cs_gdb_dbx in aktglobalswitches then
  238. flags:=flags or uf_has_dbx;
  239. {$endif GDB}
  240. if target_os.endian=endian_big then
  241. flags:=flags or uf_big_endian;
  242. if cs_browser in aktmoduleswitches then
  243. flags:=flags or uf_has_browser;
  244. if cs_local_browser in aktmoduleswitches then
  245. flags:=flags or uf_local_browser;
  246. end;
  247. {$ifdef Test_Double_checksum_write}
  248. If only_crc then
  249. Assign(CRCFile,s+'.INT')
  250. else
  251. Assign(CRCFile,s+'.IMP');
  252. Rewrite(CRCFile);
  253. {$endif def Test_Double_checksum_write}
  254. { open ppufile }
  255. current_ppu:=new(pppufile,init(s));
  256. current_ppu^.crc_only:=only_crc;
  257. if not current_ppu^.create then
  258. Message(unit_f_ppu_cannot_write);
  259. {$ifdef Test_Double_checksum}
  260. if only_crc then
  261. begin
  262. new(current_ppu^.crc_test);
  263. new(current_ppu^.crc_test2);
  264. end
  265. else
  266. begin
  267. current_ppu^.crc_test:=Current_Module^.crc_array;
  268. current_ppu^.crc_index:=Current_Module^.crc_size;
  269. current_ppu^.crc_test2:=Current_Module^.crc_array2;
  270. current_ppu^.crc_index2:=Current_Module^.crc_size2;
  271. end;
  272. {$endif def Test_Double_checksum}
  273. current_ppu^.change_endian:=source_os.endian<>target_os.endian;
  274. { write symbols and definitions }
  275. unittable^.writeasunit;
  276. { flush to be sure }
  277. current_ppu^.flush;
  278. { create and write header }
  279. current_ppu^.header.size:=current_ppu^.size;
  280. current_ppu^.header.checksum:=current_ppu^.crc;
  281. current_ppu^.header.interface_checksum:=current_ppu^.interface_crc;
  282. current_ppu^.header.compiler:=wordversion;
  283. current_ppu^.header.cpu:=word(target_cpu);
  284. current_ppu^.header.target:=word(target_info.target);
  285. current_ppu^.header.flags:=current_module^.flags;
  286. If not only_crc then
  287. current_ppu^.writeheader;
  288. { save crc in current_module also }
  289. current_module^.crc:=current_ppu^.crc;
  290. current_module^.interface_crc:=current_ppu^.interface_crc;
  291. if only_crc then
  292. begin
  293. {$ifdef Test_Double_checksum}
  294. Current_Module^.crc_array:=current_ppu^.crc_test;
  295. current_ppu^.crc_test:=nil;
  296. Current_Module^.crc_size:=current_ppu^.crc_index2;
  297. Current_Module^.crc_array2:=current_ppu^.crc_test2;
  298. current_ppu^.crc_test2:=nil;
  299. Current_Module^.crc_size2:=current_ppu^.crc_index2;
  300. {$endif def Test_Double_checksum}
  301. closecurrentppu;
  302. end;
  303. {$ifdef Test_Double_checksum_write}
  304. close(CRCFile);
  305. {$endif Test_Double_checksum_write}
  306. end;
  307. procedure closecurrentppu;
  308. begin
  309. {$ifdef Test_Double_checksum}
  310. if assigned(current_ppu^.crc_test) then
  311. dispose(current_ppu^.crc_test);
  312. if assigned(current_ppu^.crc_test2) then
  313. dispose(current_ppu^.crc_test2);
  314. {$endif Test_Double_checksum}
  315. { close }
  316. current_ppu^.close;
  317. dispose(current_ppu,done);
  318. current_ppu:=nil;
  319. end;
  320. {*****************************************************************************
  321. PPU Reading
  322. *****************************************************************************}
  323. function readbyte:byte;
  324. begin
  325. readbyte:=current_ppu^.getbyte;
  326. if current_ppu^.error then
  327. Message(unit_f_ppu_read_error);
  328. end;
  329. function readword:word;
  330. begin
  331. readword:=current_ppu^.getword;
  332. if current_ppu^.error then
  333. Message(unit_f_ppu_read_error);
  334. end;
  335. function readlong:longint;
  336. begin
  337. readlong:=current_ppu^.getlongint;
  338. if current_ppu^.error then
  339. Message(unit_f_ppu_read_error);
  340. end;
  341. function readreal : bestreal;
  342. begin
  343. readreal:=current_ppu^.getreal;
  344. if current_ppu^.error then
  345. Message(unit_f_ppu_read_error);
  346. end;
  347. function readstring : string;
  348. begin
  349. readstring:=current_ppu^.getstring;
  350. if current_ppu^.error then
  351. Message(unit_f_ppu_read_error);
  352. end;
  353. procedure readnormalset(var s); {You cannot pass an array [0..31] of byte.}
  354. begin
  355. current_ppu^.getdata(s,sizeof(tnormalset));
  356. if current_ppu^.error then
  357. Message(unit_f_ppu_read_error);
  358. end;
  359. procedure readsmallset(var s);
  360. begin
  361. current_ppu^.getdata(s,4);
  362. if current_ppu^.error then
  363. Message(unit_f_ppu_read_error);
  364. end;
  365. procedure readposinfo(var p:tfileposinfo);
  366. begin
  367. p.fileindex:=current_ppu^.getword;
  368. p.line:=current_ppu^.getlongint;
  369. p.column:=current_ppu^.getword;
  370. end;
  371. {$ifndef OLDDEREF}
  372. function readderef : pderef;
  373. var
  374. hp,p : pderef;
  375. b : tdereftype;
  376. begin
  377. p:=nil;
  378. repeat
  379. hp:=p;
  380. b:=tdereftype(current_ppu^.getbyte);
  381. case b of
  382. derefnil :
  383. break;
  384. derefunit,
  385. derefaktrecordindex,
  386. derefaktstaticindex :
  387. begin
  388. new(p,init(b,current_ppu^.getword));
  389. p^.next:=hp;
  390. break;
  391. end;
  392. derefindex,
  393. derefrecord :
  394. begin
  395. new(p,init(b,current_ppu^.getword));
  396. p^.next:=hp;
  397. end;
  398. end;
  399. until false;
  400. readderef:=p;
  401. end;
  402. function readdefref : pdef;
  403. begin
  404. readdefref:=pdef(readderef);
  405. end;
  406. function readsymref : psym;
  407. begin
  408. readsymref:=psym(readderef);
  409. end;
  410. {$else}
  411. function readdefref : pdef;
  412. var
  413. hd : pdef;
  414. begin
  415. longint(hd):=current_ppu^.getword;
  416. longint(hd):=longint(hd) or (longint(current_ppu^.getword) shl 16);
  417. readdefref:=hd;
  418. end;
  419. function readsymref : psym;
  420. var
  421. hd : psym;
  422. begin
  423. longint(hd):=current_ppu^.getword;
  424. longint(hd):=longint(hd) or (longint(current_ppu^.getword) shl 16);
  425. readsymref:=hd;
  426. end;
  427. {$endif}
  428. procedure readusedmacros;
  429. var
  430. hs : string;
  431. mac : pmacrosym;
  432. was_defined_at_startup,
  433. was_used : boolean;
  434. begin
  435. while not current_ppu^.endofentry do
  436. begin
  437. hs:=current_ppu^.getstring;
  438. was_defined_at_startup:=boolean(current_ppu^.getbyte);
  439. was_used:=boolean(current_ppu^.getbyte);
  440. mac:=pmacrosym(macros^.search(hs));
  441. if assigned(mac)
  442. {$ifndef EXTDEBUG}
  443. { if we don't have the sources why tell }
  444. and current_module^.sources_avail
  445. {$endif ndef EXTDEBUG}
  446. then
  447. begin
  448. if not was_defined_at_startup and was_used and
  449. mac^.defined_at_startup then
  450. Comment(V_Hint,'Conditional '+hs+' was not set at startup '+
  451. 'in last compilation of '+current_module^.mainsource^);
  452. end
  453. else { not assigned }
  454. if was_defined_at_startup and was_used then
  455. Comment(V_Hint,'Conditional '+hs+' was set at startup '+
  456. 'in last compilation of '+current_module^.mainsource^);
  457. end;
  458. end;
  459. procedure readsourcefiles;
  460. var
  461. temp,hs : string;
  462. incfile_found,
  463. main_found,
  464. is_main : boolean;
  465. ppufiletime,
  466. source_time : longint;
  467. hp : pinputfile;
  468. begin
  469. ppufiletime:=getnamedfiletime(current_module^.ppufilename^);
  470. current_module^.sources_avail:=true;
  471. while not current_ppu^.endofentry do
  472. begin
  473. hs:=current_ppu^.getstring;
  474. is_main:=current_ppu^.endofentry;
  475. temp:='';
  476. if (current_module^.flags and uf_in_library)<>0 then
  477. begin
  478. current_module^.sources_avail:=false;
  479. temp:=' library';
  480. end
  481. else if pos('Macro ',hs)=1 then
  482. begin
  483. { we don't want to find this file }
  484. { but there is a problem with file indexing !! }
  485. temp:='';
  486. end
  487. else
  488. begin
  489. { check the date of the source files }
  490. Source_Time:=GetNamedFileTime(current_module^.path^+hs);
  491. incfile_found:=false;
  492. if (Source_Time=-1) then
  493. begin
  494. if is_main then
  495. temp:=search(hs,unitsearchpath,main_found)
  496. else
  497. temp:=search(hs,includesearchpath,incfile_found);
  498. if incfile_found or main_found then
  499. begin
  500. hs:=temp+hs;
  501. Source_Time:=GetNamedFileTime(hs);
  502. end
  503. end
  504. else
  505. hs:=current_module^.path^+hs;
  506. if Source_Time=-1 then
  507. begin
  508. current_module^.sources_avail:=false;
  509. temp:=' not found';
  510. end
  511. else
  512. begin
  513. { time newer? But only allow if the file is not searched
  514. in the include path (PFV), else you've problems with
  515. units which use the same includefile names }
  516. if incfile_found then
  517. temp:=' found'
  518. else
  519. begin
  520. temp:=' time '+filetimestring(source_time);
  521. if (source_time>ppufiletime) then
  522. begin
  523. current_module^.do_compile:=true;
  524. current_module^.recompile_reason:=rr_sourcenewer;
  525. temp:=temp+' *'
  526. end;
  527. end;
  528. end;
  529. new(hp,init(hs));
  530. { the indexing is wrong here PM }
  531. current_module^.sourcefiles^.register_file(hp);
  532. end;
  533. Message1(unit_u_ppu_source,hs+temp);
  534. end;
  535. { main source is always the last }
  536. stringdispose(current_module^.mainsource);
  537. current_module^.mainsource:=stringdup(hs);
  538. { the indexing is corrected here PM }
  539. current_module^.sourcefiles^.inverse_register_indexes;
  540. { check if we want to rebuild every unit, only if the sources are
  541. available }
  542. if do_build and current_module^.sources_avail then
  543. begin
  544. current_module^.do_compile:=true;
  545. current_module^.recompile_reason:=rr_build;
  546. end;
  547. end;
  548. procedure readloadunit;
  549. var
  550. hs : string;
  551. intfchecksum,
  552. checksum : longint;
  553. in_interface : boolean;
  554. begin
  555. while not current_ppu^.endofentry do
  556. begin
  557. hs:=current_ppu^.getstring;
  558. checksum:=current_ppu^.getlongint;
  559. intfchecksum:=current_ppu^.getlongint;
  560. in_interface:=(current_ppu^.getbyte<>0);
  561. current_module^.used_units.concat(new(pused_unit,init_to_load(hs,checksum,intfchecksum,in_interface)));
  562. end;
  563. end;
  564. procedure readlinkcontainer(var p:tlinkcontainer);
  565. var
  566. s : string;
  567. m : longint;
  568. begin
  569. while not current_ppu^.endofentry do
  570. begin
  571. s:=current_ppu^.getstring;
  572. m:=current_ppu^.getlongint;
  573. p.insert(s,m);
  574. end;
  575. end;
  576. procedure load_interface;
  577. var
  578. b : byte;
  579. begin
  580. { read interface part }
  581. repeat
  582. b:=current_ppu^.readentry;
  583. case b of
  584. ibmodulename :
  585. begin
  586. stringdispose(current_module^.modulename);
  587. current_module^.modulename:=stringdup(current_ppu^.getstring);
  588. end;
  589. ibsourcefiles :
  590. readsourcefiles;
  591. ibusedmacros :
  592. readusedmacros;
  593. ibloadunit :
  594. readloadunit;
  595. iblinkunitofiles :
  596. readlinkcontainer(current_module^.LinkUnitOFiles);
  597. iblinkunitstaticlibs :
  598. readlinkcontainer(current_module^.LinkUnitStaticLibs);
  599. iblinkunitsharedlibs :
  600. readlinkcontainer(current_module^.LinkUnitSharedLibs);
  601. iblinkotherofiles :
  602. readlinkcontainer(current_module^.LinkotherOFiles);
  603. iblinkotherstaticlibs :
  604. readlinkcontainer(current_module^.LinkotherStaticLibs);
  605. iblinkothersharedlibs :
  606. readlinkcontainer(current_module^.LinkotherSharedLibs);
  607. ibendinterface :
  608. break;
  609. else
  610. Message1(unit_f_ppu_invalid_entry,tostr(b));
  611. end;
  612. until false;
  613. end;
  614. {
  615. $Log$
  616. Revision 1.49 1999-09-03 10:54:22 pierre
  617. * message about conditionals changed to Hint
  618. Revision 1.48 1999/08/31 15:47:56 pierre
  619. + startup conditionals stored in PPU file for debug info
  620. Revision 1.47 1999/08/27 10:54:45 pierre
  621. * some code adapted to CRC_only computation
  622. + main file is search in unitspathlist
  623. and triggers do_compile flag
  624. * some changes to get identical CRC vaules after
  625. interface and after implementation
  626. Revision 1.46 1999/08/13 21:33:12 peter
  627. * support for array constructors extended and more error checking
  628. Revision 1.45 1999/08/03 22:03:17 peter
  629. * moved bitmask constants to sets
  630. * some other type/const renamings
  631. Revision 1.44 1999/07/14 21:19:12 florian
  632. + implemented a better error message if a PPU file isn't found as suggested
  633. by Lee John
  634. Revision 1.43 1999/07/03 00:30:00 peter
  635. * new link writing to the ppu, one .ppu is needed for all link types,
  636. static (.o) is now always created also when smartlinking is used
  637. Revision 1.42 1999/06/22 16:24:47 pierre
  638. * local browser stuff corrected
  639. Revision 1.41 1999/05/14 17:52:28 peter
  640. * new deref code
  641. Revision 1.40 1999/05/13 21:59:44 peter
  642. * removed oldppu code
  643. * warning if objpas is loaded from uses
  644. * first things for new deref writing
  645. Revision 1.39 1999/05/04 21:45:06 florian
  646. * changes to compile it with Delphi 4.0
  647. Revision 1.38 1999/04/26 13:31:51 peter
  648. * release storenumber,double_checksum
  649. Revision 1.37 1999/04/21 09:43:53 peter
  650. * storenumber works
  651. * fixed some typos in double_checksum
  652. + incompatible types type1 and type2 message (with storenumber)
  653. Revision 1.36 1999/04/14 09:15:01 peter
  654. * first things to store the symbol/def number in the ppu
  655. Revision 1.35 1999/04/07 15:39:35 pierre
  656. + double_checksum code added
  657. Revision 1.34 1999/03/02 13:49:19 peter
  658. * renamed loadunit_int -> loadunit
  659. Revision 1.33 1999/02/23 18:29:25 pierre
  660. * win32 compilation error fix
  661. + some work for local browser (not cl=omplete yet)
  662. Revision 1.32 1999/02/22 13:07:08 pierre
  663. + -b and -bl options work !
  664. + cs_local_browser ($L+) is disabled if cs_browser ($Y+)
  665. is not enabled when quitting global section
  666. * local vars and procedures are not yet stored into PPU
  667. Revision 1.31 1999/02/16 00:48:25 peter
  668. * save in the ppu if linked with obj file instead of using the
  669. library flag, so the .inc files are also checked
  670. Revision 1.30 1999/02/05 08:54:30 pierre
  671. + linkofiles splitted inot linkofiles and linkunitfiles
  672. because linkofiles must be stored with directory
  673. to enabled linking of different objects with same name
  674. in a different directory
  675. Revision 1.29 1999/01/20 10:16:46 peter
  676. * don't update crc when writing objs,libs and sources
  677. Revision 1.28 1999/01/12 14:25:35 peter
  678. + BrowserLog for browser.log generation
  679. + BrowserCol for browser info in TCollections
  680. * released all other UseBrowser
  681. Revision 1.27 1998/12/08 10:18:14 peter
  682. + -gh for heaptrc unit
  683. Revision 1.26 1998/11/26 14:36:02 peter
  684. * set also library flag if smartlinking and outputname is different
  685. Revision 1.25 1998/10/26 09:35:47 peter
  686. * don't count includefiles which are found in the includepath for a
  687. recompile.
  688. Revision 1.24 1998/10/20 08:06:59 pierre
  689. * several memory corruptions due to double freemem solved
  690. => never use p^.loc.location:=p^.left^.loc.location;
  691. + finally I added now by default
  692. that ra386dir translates global and unit symbols
  693. + added a first field in tsymtable and
  694. a nextsym field in tsym
  695. (this allows to obtain ordered type info for
  696. records and objects in gdb !)
  697. Revision 1.23 1998/10/16 13:37:24 florian
  698. + switch -FD added to specify the path for utilities
  699. Revision 1.22 1998/10/14 13:38:24 peter
  700. * fixed path with staticlib/objects in ppufiles
  701. Revision 1.21 1998/10/14 10:45:10 pierre
  702. * ppu problems for m68k fixed (at least in cross compiling)
  703. * one last memory leak for sysamiga fixed
  704. * the amiga RTL compiles now completely !!
  705. Revision 1.20 1998/10/13 13:10:30 peter
  706. * new style for m68k/i386 infos and enums
  707. Revision 1.19 1998/10/08 23:29:07 peter
  708. * -vu shows unit info, -vt shows tried/used files
  709. Revision 1.18 1998/09/28 16:57:27 pierre
  710. * changed all length(p^.value_str^) into str_length(p)
  711. to get it work with and without ansistrings
  712. * changed sourcefiles field of tmodule to a pointer
  713. Revision 1.17 1998/09/22 17:13:53 pierre
  714. + browsing updated and developed
  715. records and objects fields are also stored
  716. Revision 1.16 1998/09/22 15:40:56 peter
  717. * some extra ifdef GDB
  718. Revision 1.15 1998/09/21 08:45:23 pierre
  719. + added vmt_offset in tobjectdef.write for fututre use
  720. (first steps to have objects without vmt if no virtual !!)
  721. + added fpu_used field for tabstractprocdef :
  722. sets this level to 2 if the functions return with value in FPU
  723. (is then set to correct value at parsing of implementation)
  724. THIS MIGHT refuse some code with FPU expression too complex
  725. that were accepted before and even in some cases
  726. that don't overflow in fact
  727. ( like if f : float; is a forward that finally in implementation
  728. only uses one fpu register !!)
  729. Nevertheless I think that it will improve security on
  730. FPU operations !!
  731. * most other changes only for UseBrowser code
  732. (added symtable references for record and objects)
  733. local switch for refs to args and local of each function
  734. (static symtable still missing)
  735. UseBrowser still not stable and probably broken by
  736. the definition hash array !!
  737. Revision 1.14 1998/09/01 07:54:24 pierre
  738. * UseBrowser a little updated (might still be buggy !!)
  739. * bug in psub.pas in function specifier removed
  740. * stdcall allowed in interface and in implementation
  741. (FPC will not yet complain if it is missing in either part
  742. because stdcall is only a dummy !!)
  743. Revision 1.13 1998/08/17 10:10:11 peter
  744. - removed OLDPPU
  745. Revision 1.12 1998/08/17 09:17:53 peter
  746. * static/shared linking updates
  747. Revision 1.11 1998/08/16 20:32:49 peter
  748. * crcs of used units are not important for the current crc, reduces the
  749. amount of recompiles
  750. Revision 1.10 1998/08/13 10:57:30 peter
  751. * constant sets are now written correctly to the ppufile
  752. Revision 1.9 1998/08/11 15:31:41 peter
  753. * write extended to ppu file
  754. * new version 0.99.7
  755. Revision 1.8 1998/08/10 14:50:29 peter
  756. + localswitches, moduleswitches, globalswitches splitting
  757. Revision 1.7 1998/07/14 14:47:07 peter
  758. * released NEWINPUT
  759. Revision 1.6 1998/07/07 11:20:14 peter
  760. + NEWINPUT for a better inputfile and scanner object
  761. Revision 1.5 1998/06/24 14:48:39 peter
  762. * ifdef newppu -> ifndef oldppu
  763. Revision 1.4 1998/06/16 08:56:32 peter
  764. + targetcpu
  765. * cleaner pmodules for newppu
  766. Revision 1.3 1998/06/13 00:10:17 peter
  767. * working browser and newppu
  768. * some small fixes against crashes which occured in bp7 (but not in
  769. fpc?!)
  770. Revision 1.2 1998/05/28 14:40:28 peter
  771. * fixes for newppu, remake3 works now with it
  772. Revision 1.1 1998/05/27 19:45:09 peter
  773. * symtable.pas splitted into includefiles
  774. * symtable adapted for $ifdef NEWPPU
  775. }