ppu.pas 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901
  1. {
  2. $Id$
  3. Copyright (c) 1993-98 by Florian Klaempfl
  4. Routines to read/write ppu files
  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. {$ifdef TP}
  19. {$N+,E+}
  20. {$endif}
  21. unit ppu;
  22. interface
  23. const
  24. { buffer sizes }
  25. maxentrysize = 1024;
  26. {$ifdef TP}
  27. ppubufsize = 1024;
  28. {$else}
  29. ppubufsize = 16384;
  30. {$endif}
  31. {ppu entries}
  32. mainentryid = 1;
  33. subentryid = 2;
  34. {special}
  35. iberror = 0;
  36. ibstartdefs = 248;
  37. ibenddefs = 249;
  38. ibstartsyms = 250;
  39. ibendsyms = 251;
  40. ibendinterface = 252;
  41. ibendimplementation = 253;
  42. ibendbrowser = 254;
  43. ibend = 255;
  44. {general}
  45. ibmodulename = 1;
  46. ibsourcefiles = 2;
  47. ibloadunit_int = 3;
  48. ibloadunit_imp = 4;
  49. ibinitunit = 5;
  50. iblinkofiles = 6;
  51. iblinksharedlibs = 7;
  52. iblinkstaticlibs = 8;
  53. ibdbxcount = 9;
  54. ibsymref = 10;
  55. ibdefref = 11;
  56. ibendsymtablebrowser = 12;
  57. ibbeginsymtablebrowser = 13;
  58. {syms}
  59. ibtypesym = 20;
  60. ibprocsym = 21;
  61. ibvarsym = 22;
  62. ibconstsym = 23;
  63. ibenumsym = 24;
  64. ibtypedconstsym = 25;
  65. ibabsolutesym = 26;
  66. ibpropertysym = 27;
  67. ibvarsym_C = 28;
  68. ibunitsym = 29; { needed for browser }
  69. iblabelsym = 30;
  70. {definitions}
  71. iborddef = 40;
  72. ibpointerdef = 41;
  73. ibarraydef = 42;
  74. ibprocdef = 43;
  75. ibstringdef = 44;
  76. ibrecorddef = 45;
  77. ibfiledef = 46;
  78. ibformaldef = 47;
  79. ibobjectdef = 48;
  80. ibenumdef = 49;
  81. ibsetdef = 50;
  82. ibprocvardef = 51;
  83. ibfloatdef = 52;
  84. ibclassrefdef = 53;
  85. iblongstringdef = 54;
  86. ibansistringdef = 55;
  87. ibwidestringdef = 56;
  88. ibfarpointerdef = 57;
  89. { unit flags }
  90. uf_init = $1;
  91. uf_finalize = $2;
  92. uf_big_endian = $4;
  93. uf_has_dbx = $8;
  94. uf_has_browser = $10;
  95. uf_smartlink = $20;
  96. uf_in_library = $40; { is the file in another file than <ppufile>.* ? }
  97. uf_static_linked = $80;
  98. uf_shared_linked = $100;
  99. uf_local_browser = $200;
  100. type
  101. {$ifdef m68k}
  102. ppureal=single;
  103. {$else}
  104. ppureal=extended;
  105. {$endif}
  106. tppuerror=(ppuentrytoobig,ppuentryerror);
  107. tppuheader=packed record
  108. id : array[1..3] of char; { = 'PPU' }
  109. ver : array[1..3] of char;
  110. compiler : word;
  111. cpu : word;
  112. target : word;
  113. flags : longint;
  114. size : longint; { size of the ppufile without header }
  115. checksum : longint; { checksum for this ppufile }
  116. end;
  117. tppuentry=packed record
  118. id : byte;
  119. nr : byte;
  120. size : longint;
  121. end;
  122. pppufile=^tppufile;
  123. tppufile=object
  124. f : file;
  125. mode : byte; {0 - Closed, 1 - Reading, 2 - Writing}
  126. error : boolean;
  127. fname : string;
  128. fsize : longint;
  129. header : tppuheader;
  130. size,crc : longint;
  131. do_crc,
  132. change_endian : boolean;
  133. buf : pchar;
  134. bufstart,
  135. bufsize,
  136. bufidx : longint;
  137. entrybufstart,
  138. entrystart,
  139. entryidx : longint;
  140. entry : tppuentry;
  141. entrytyp : byte;
  142. constructor init(fn:string);
  143. destructor done;
  144. procedure flush;
  145. procedure close;
  146. function CheckPPUId:boolean;
  147. function GetPPUVersion:longint;
  148. procedure NewHeader;
  149. procedure NewEntry;
  150. {read}
  151. function open:boolean;
  152. procedure reloadbuf;
  153. procedure readdata(var b;len:longint);
  154. procedure skipdata(len:longint);
  155. function readentry:byte;
  156. function EndOfEntry:boolean;
  157. procedure getdatabuf(var b;len:longint;var result:longint);
  158. procedure getdata(var b;len:longint);
  159. function getbyte:byte;
  160. function getword:word;
  161. function getlongint:longint;
  162. function getreal:ppureal;
  163. function getstring:string;
  164. function skipuntilentry(untilb:byte):boolean;
  165. {write}
  166. function create:boolean;
  167. procedure writeheader;
  168. procedure writebuf;
  169. procedure writedata(var b;len:longint);
  170. procedure writeentry(ibnr:byte);
  171. procedure putdata(var b;len:longint);
  172. procedure putbyte(b:byte);
  173. procedure putword(w:word);
  174. procedure putlongint(l:longint);
  175. procedure putreal(d:ppureal);
  176. procedure putstring(s:string);
  177. end;
  178. implementation
  179. {*****************************************************************************
  180. Crc 32
  181. *****************************************************************************}
  182. var
  183. Crc32Tbl : array[0..255] of longint;
  184. procedure MakeCRC32Tbl;
  185. var
  186. crc : longint;
  187. i,n : byte;
  188. begin
  189. for i:=0 to 255 do
  190. begin
  191. crc:=i;
  192. for n:=1 to 8 do
  193. if odd(crc) then
  194. crc:=(crc shr 1) xor $edb88320
  195. else
  196. crc:=crc shr 1;
  197. Crc32Tbl[i]:=crc;
  198. end;
  199. end;
  200. {$ifopt R+}
  201. {$define Range_check_on}
  202. {$endif opt R+}
  203. {$R- needed here }
  204. {CRC 32}
  205. Function Crc32(Const HStr:String):longint;
  206. var
  207. i,InitCrc : longint;
  208. begin
  209. if Crc32Tbl[1]=0 then
  210. MakeCrc32Tbl;
  211. InitCrc:=$ffffffff;
  212. for i:=1to Length(Hstr) do
  213. InitCrc:=Crc32Tbl[byte(InitCrc) xor ord(Hstr[i])] xor (InitCrc shr 8);
  214. Crc32:=InitCrc;
  215. end;
  216. Function UpdateCrc32(InitCrc:longint;var InBuf;InLen:Longint):longint;
  217. var
  218. i : word;
  219. p : pchar;
  220. begin
  221. if Crc32Tbl[1]=0 then
  222. MakeCrc32Tbl;
  223. p:=@InBuf;
  224. for i:=1to InLen do
  225. begin
  226. InitCrc:=Crc32Tbl[byte(InitCrc) xor byte(p^)] xor (InitCrc shr 8);
  227. inc(longint(p));
  228. end;
  229. UpdateCrc32:=InitCrc;
  230. end;
  231. Function UpdCrc32(InitCrc:longint;b:byte):longint;
  232. begin
  233. if Crc32Tbl[1]=0 then
  234. MakeCrc32Tbl;
  235. UpdCrc32:=Crc32Tbl[byte(InitCrc) xor b] xor (InitCrc shr 8);
  236. end;
  237. {$ifdef Range_check_on}
  238. {$R+}
  239. {$undef Range_check_on}
  240. {$endif Range_check_on}
  241. {*****************************************************************************
  242. TPPUFile
  243. *****************************************************************************}
  244. constructor tppufile.init(fn:string);
  245. begin
  246. fname:=fn;
  247. change_endian:=false;
  248. Mode:=0;
  249. NewHeader;
  250. Error:=false;
  251. getmem(buf,ppubufsize);
  252. end;
  253. destructor tppufile.done;
  254. begin
  255. close;
  256. freemem(buf,ppubufsize);
  257. end;
  258. procedure tppufile.flush;
  259. begin
  260. if Mode=2 then
  261. writebuf;
  262. end;
  263. procedure tppufile.close;
  264. var
  265. i : word;
  266. begin
  267. if Mode<>0 then
  268. begin
  269. Flush;
  270. {$I-}
  271. system.close(f);
  272. {$I+}
  273. i:=ioresult;
  274. Mode:=0;
  275. end;
  276. end;
  277. function tppufile.CheckPPUId:boolean;
  278. begin
  279. CheckPPUId:=((Header.Id[1]='P') and (Header.Id[2]='P') and (Header.Id[3]='U'));
  280. end;
  281. function tppufile.GetPPUVersion:longint;
  282. var
  283. l : longint;
  284. code : word;
  285. begin
  286. Val(header.ver[1]+header.ver[2]+header.ver[3],l,code);
  287. if code=0 then
  288. GetPPUVersion:=l
  289. else
  290. GetPPUVersion:=0;
  291. end;
  292. procedure tppufile.NewHeader;
  293. begin
  294. fillchar(header,sizeof(tppuheader),0);
  295. with header do
  296. begin
  297. Id[1]:='P';
  298. Id[2]:='P';
  299. Id[3]:='U';
  300. Ver[1]:='0';
  301. Ver[2]:='1';
  302. Ver[3]:='5';
  303. end;
  304. end;
  305. {*****************************************************************************
  306. TPPUFile Reading
  307. *****************************************************************************}
  308. function tppufile.open:boolean;
  309. var
  310. ofmode : byte;
  311. i : word;
  312. begin
  313. open:=false;
  314. assign(f,fname);
  315. ofmode:=filemode;
  316. filemode:=$0;
  317. {$I-}
  318. reset(f,1);
  319. {$I+}
  320. filemode:=ofmode;
  321. if ioresult<>0 then
  322. exit;
  323. {read ppuheader}
  324. fsize:=filesize(f);
  325. if fsize<sizeof(tppuheader) then
  326. exit;
  327. blockread(f,header,sizeof(tppuheader),i);
  328. {reset buffer}
  329. bufstart:=i;
  330. bufsize:=0;
  331. bufidx:=0;
  332. Mode:=1;
  333. FillChar(entry,sizeof(tppuentry),0);
  334. entryidx:=0;
  335. entrystart:=0;
  336. entrybufstart:=0;
  337. Error:=false;
  338. open:=true;
  339. end;
  340. procedure tppufile.reloadbuf;
  341. {$ifdef TP}
  342. var
  343. i : word;
  344. {$endif}
  345. begin
  346. inc(bufstart,bufsize);
  347. {$ifdef TP}
  348. blockread(f,buf^,ppubufsize,i);
  349. bufsize:=i;
  350. {$else}
  351. blockread(f,buf^,ppubufsize,bufsize);
  352. {$endif}
  353. bufidx:=0;
  354. end;
  355. procedure tppufile.readdata(var b;len:longint);
  356. var
  357. p : pchar;
  358. left,
  359. idx : longint;
  360. begin
  361. p:=pchar(@b);
  362. idx:=0;
  363. while len>0 do
  364. begin
  365. left:=bufsize-bufidx;
  366. if len>left then
  367. begin
  368. move(buf[bufidx],p[idx],left);
  369. dec(len,left);
  370. inc(idx,left);
  371. reloadbuf;
  372. if bufsize=0 then
  373. exit;
  374. end
  375. else
  376. begin
  377. move(buf[bufidx],p[idx],len);
  378. inc(bufidx,len);
  379. exit;
  380. end;
  381. end;
  382. end;
  383. procedure tppufile.skipdata(len:longint);
  384. var
  385. left : longint;
  386. begin
  387. while len>0 do
  388. begin
  389. left:=bufsize-bufidx;
  390. if len>left then
  391. begin
  392. dec(len,left);
  393. reloadbuf;
  394. if bufsize=0 then
  395. exit;
  396. end
  397. else
  398. begin
  399. inc(bufidx,len);
  400. exit;
  401. end;
  402. end;
  403. end;
  404. function tppufile.readentry:byte;
  405. begin
  406. if entryidx<entry.size then
  407. skipdata(entry.size-entryidx);
  408. readdata(entry,sizeof(tppuentry));
  409. entrystart:=bufstart+bufidx;
  410. entryidx:=0;
  411. if not(entry.id in [mainentryid,subentryid]) then
  412. begin
  413. readentry:=iberror;
  414. error:=true;
  415. exit;
  416. end;
  417. readentry:=entry.nr;
  418. end;
  419. function tppufile.endofentry:boolean;
  420. begin
  421. endofentry:=(entryidx>=entry.size);
  422. end;
  423. procedure tppufile.getdatabuf(var b;len:longint;var result:longint);
  424. begin
  425. if entryidx+len>entry.size then
  426. result:=entry.size-entryidx
  427. else
  428. result:=len;
  429. readdata(b,result);
  430. inc(entryidx,result);
  431. end;
  432. procedure tppufile.getdata(var b;len:longint);
  433. begin
  434. if entryidx+len>entry.size then
  435. begin
  436. error:=true;
  437. exit;
  438. end;
  439. readdata(b,len);
  440. inc(entryidx,len);
  441. end;
  442. function tppufile.getbyte:byte;
  443. var
  444. b : byte;
  445. begin
  446. if entryidx+1>entry.size then
  447. begin
  448. error:=true;
  449. getbyte:=0;
  450. exit;
  451. end;
  452. readdata(b,1);
  453. getbyte:=b;
  454. inc(entryidx);
  455. end;
  456. function tppufile.getword:word;
  457. type
  458. pword = ^word;
  459. var
  460. w : word;
  461. begin
  462. if entryidx+2>entry.size then
  463. begin
  464. error:=true;
  465. getword:=0;
  466. exit;
  467. end;
  468. readdata(w,2);
  469. if change_endian then
  470. getword:=swap(w)
  471. else
  472. getword:=w;
  473. inc(entryidx,2);
  474. end;
  475. function tppufile.getlongint:longint;
  476. type
  477. plongint = ^longint;
  478. var
  479. l : longint;
  480. begin
  481. if entryidx+4>entry.size then
  482. begin
  483. error:=true;
  484. getlongint:=0;
  485. exit;
  486. end;
  487. readdata(l,4);
  488. if change_endian then
  489. { someone added swap(l : longint) in system unit
  490. this broke the following code !! }
  491. getlongint:=swap(word(l shr 16)) or (longint(swap(word(l and $ffff))) shl 16)
  492. else
  493. getlongint:=l;
  494. inc(entryidx,4);
  495. end;
  496. function tppufile.getreal:ppureal;
  497. type
  498. pppureal = ^ppureal;
  499. var
  500. d : ppureal;
  501. begin
  502. if entryidx+sizeof(ppureal)>entry.size then
  503. begin
  504. error:=true;
  505. getreal:=0;
  506. exit;
  507. end;
  508. readdata(d,sizeof(ppureal));
  509. getreal:=d;
  510. inc(entryidx,sizeof(ppureal));
  511. end;
  512. function tppufile.getstring:string;
  513. var
  514. s : string;
  515. begin
  516. {$ifndef TP}
  517. {$ifopt H+}
  518. setlength(s,getbyte);
  519. {$else}
  520. s[0]:=chr(getbyte);
  521. {$endif}
  522. {$else}
  523. s[0]:=chr(getbyte);
  524. {$endif}
  525. if entryidx+length(s)>entry.size then
  526. begin
  527. error:=true;
  528. exit;
  529. end;
  530. ReadData(s[1],length(s));
  531. getstring:=s;
  532. inc(entryidx,length(s));
  533. end;
  534. function tppufile.skipuntilentry(untilb:byte):boolean;
  535. var
  536. b : byte;
  537. begin
  538. repeat
  539. b:=readentry;
  540. until (b in [ibend,iberror]) or ((b=untilb) and (entry.id=mainentryid));
  541. skipuntilentry:=(b=untilb);
  542. end;
  543. {*****************************************************************************
  544. TPPUFile Writing
  545. *****************************************************************************}
  546. function tppufile.create:boolean;
  547. begin
  548. create:=false;
  549. assign(f,fname);
  550. {$I-}
  551. rewrite(f,1);
  552. {$I+}
  553. if ioresult<>0 then
  554. exit;
  555. Mode:=2;
  556. {write header for sure}
  557. blockwrite(f,header,sizeof(tppuheader));
  558. bufsize:=ppubufsize;
  559. bufstart:=sizeof(tppuheader);
  560. bufidx:=0;
  561. {reset}
  562. crc:=$ffffffff;
  563. Error:=false;
  564. do_crc:=true;
  565. size:=0;
  566. entrytyp:=mainentryid;
  567. {start}
  568. NewEntry;
  569. create:=true;
  570. end;
  571. procedure tppufile.writeheader;
  572. var
  573. opos : longint;
  574. begin
  575. { flush buffer }
  576. writebuf;
  577. { update size (w/o header!) in the header }
  578. header.size:=bufstart-sizeof(tppuheader);
  579. { write header and restore filepos after it }
  580. opos:=filepos(f);
  581. seek(f,0);
  582. blockwrite(f,header,sizeof(tppuheader));
  583. seek(f,opos);
  584. end;
  585. procedure tppufile.writebuf;
  586. begin
  587. blockwrite(f,buf^,bufidx);
  588. inc(bufstart,bufidx);
  589. bufidx:=0;
  590. end;
  591. procedure tppufile.writedata(var b;len:longint);
  592. var
  593. p : pchar;
  594. left,
  595. idx : longint;
  596. begin
  597. p:=pchar(@b);
  598. idx:=0;
  599. while len>0 do
  600. begin
  601. left:=bufsize-bufidx;
  602. if len>left then
  603. begin
  604. move(p[idx],buf[bufidx],left);
  605. dec(len,left);
  606. inc(idx,left);
  607. inc(bufidx,left);
  608. writebuf;
  609. end
  610. else
  611. begin
  612. move(p[idx],buf[bufidx],len);
  613. inc(bufidx,len);
  614. exit;
  615. end;
  616. end;
  617. end;
  618. procedure tppufile.NewEntry;
  619. begin
  620. with entry do
  621. begin
  622. id:=entrytyp;
  623. nr:=ibend;
  624. size:=0;
  625. end;
  626. {Reset Entry State}
  627. entryidx:=0;
  628. entrybufstart:=bufstart;
  629. entrystart:=bufstart+bufidx;
  630. {Alloc in buffer}
  631. writedata(entry,sizeof(tppuentry));
  632. end;
  633. procedure tppufile.writeentry(ibnr:byte);
  634. var
  635. opos : longint;
  636. begin
  637. {create entry}
  638. entry.id:=entrytyp;
  639. entry.nr:=ibnr;
  640. entry.size:=entryidx;
  641. {it's already been sent to disk ?}
  642. if entrybufstart<>bufstart then
  643. begin
  644. {flush to be sure}
  645. WriteBuf;
  646. {write entry}
  647. opos:=filepos(f);
  648. seek(f,entrystart);
  649. blockwrite(f,entry,sizeof(tppuentry));
  650. seek(f,opos);
  651. entrybufstart:=bufstart;
  652. end
  653. else
  654. move(entry,buf[entrystart-bufstart],sizeof(entry));
  655. {Add New Entry, which is ibend by default}
  656. entrystart:=bufstart+bufidx; {next entry position}
  657. NewEntry;
  658. end;
  659. procedure tppufile.putdata(var b;len:longint);
  660. begin
  661. if do_crc then
  662. crc:=UpdateCrc32(crc,b,len);
  663. writedata(b,len);
  664. inc(entryidx,len);
  665. end;
  666. procedure tppufile.putbyte(b:byte);
  667. begin
  668. writedata(b,1);
  669. inc(entryidx);
  670. end;
  671. procedure tppufile.putword(w:word);
  672. begin
  673. if change_endian then
  674. w:=swap(w);
  675. putdata(w,2);
  676. end;
  677. procedure tppufile.putlongint(l:longint);
  678. begin
  679. if change_endian then
  680. { someone added swap(l : longint) in system unit
  681. this broke the following code !! }
  682. l:=swap(word(l shr 16)) or (longint(swap(word(l and $ffff))) shl 16);
  683. putdata(l,4);
  684. end;
  685. procedure tppufile.putreal(d:ppureal);
  686. begin
  687. putdata(d,sizeof(ppureal));
  688. end;
  689. procedure tppufile.putstring(s:string);
  690. begin
  691. putdata(s,length(s)+1);
  692. end;
  693. end.
  694. {
  695. $Log$
  696. Revision 1.21 1998-12-30 22:15:50 peter
  697. + farpointer type
  698. * absolutesym now also stores if its far
  699. Revision 1.20 1998/11/30 16:34:45 pierre
  700. * corrected problems with rangecheck
  701. + added needed code for no rangecheck in CRC32 functions in ppu unit
  702. * enumdef lso need its rangenr reset to zero
  703. when calling reset_global_defs
  704. Revision 1.19 1998/11/16 15:41:42 peter
  705. * tp7 didn't like my ifopt H+ :(
  706. Revision 1.18 1998/11/16 12:18:03 peter
  707. * H+ fixes
  708. Revision 1.17 1998/10/14 10:45:08 pierre
  709. * ppu problems for m68k fixed (at least in cross compiling)
  710. * one last memory leak for sysamiga fixed
  711. * the amiga RTL compiles now completely !!
  712. Revision 1.16 1998/09/24 23:49:14 peter
  713. + aktmodeswitches
  714. Revision 1.15 1998/09/23 15:39:10 pierre
  715. * browser bugfixes
  716. was adding a reference when looking for the symbol
  717. if -bSYM_NAME was used
  718. Revision 1.14 1998/09/21 10:00:07 peter
  719. * store number of defs in ppu file
  720. Revision 1.13 1998/09/21 08:45:18 pierre
  721. + added vmt_offset in tobjectdef.write for fututre use
  722. (first steps to have objects without vmt if no virtual !!)
  723. + added fpu_used field for tabstractprocdef :
  724. sets this level to 2 if the functions return with value in FPU
  725. (is then set to correct value at parsing of implementation)
  726. THIS MIGHT refuse some code with FPU expression too complex
  727. that were accepted before and even in some cases
  728. that don't overflow in fact
  729. ( like if f : float; is a forward that finally in implementation
  730. only uses one fpu register !!)
  731. Nevertheless I think that it will improve security on
  732. FPU operations !!
  733. * most other changes only for UseBrowser code
  734. (added symtable references for record and objects)
  735. local switch for refs to args and local of each function
  736. (static symtable still missing)
  737. UseBrowser still not stable and probably broken by
  738. the definition hash array !!
  739. Revision 1.12 1998/09/18 08:01:37 pierre
  740. + improvement on the usebrowser part
  741. (does not work correctly for now)
  742. Revision 1.11 1998/09/11 15:16:47 peter
  743. * merge fixes
  744. Revision 1.10.2.1 1998/09/11 15:15:04 peter
  745. * fixed not in [] bug
  746. Revision 1.10 1998/08/31 12:26:30 peter
  747. * m68k and palmos updates from surebugfixes
  748. Revision 1.9 1998/08/17 09:17:51 peter
  749. * static/shared linking updates
  750. Revision 1.8 1998/08/11 15:31:40 peter
  751. * write extended to ppu file
  752. * new version 0.99.7
  753. Revision 1.7 1998/06/25 10:51:01 pierre
  754. * removed a remaining ifndef NEWPPU
  755. replaced by ifdef OLDPPU
  756. * added uf_finalize to ppu unit
  757. Revision 1.6 1998/06/16 08:56:26 peter
  758. + targetcpu
  759. * cleaner pmodules for newppu
  760. Revision 1.5 1998/06/13 00:10:12 peter
  761. * working browser and newppu
  762. * some small fixes against crashes which occured in bp7 (but not in
  763. fpc?!)
  764. Revision 1.4 1998/06/09 16:01:48 pierre
  765. + added procedure directive parsing for procvars
  766. (accepted are popstack cdecl and pascal)
  767. + added C vars with the following syntax
  768. var C calias 'true_c_name';(can be followed by external)
  769. reason is that you must add the Cprefix
  770. which is target dependent
  771. Revision 1.3 1998/05/28 14:40:26 peter
  772. * fixes for newppu, remake3 works now with it
  773. Revision 1.2 1998/05/27 19:45:08 peter
  774. * symtable.pas splitted into includefiles
  775. * symtable adapted for $ifdef NEWPPU
  776. Revision 1.1 1998/05/12 10:56:07 peter
  777. + the ppufile object unit
  778. }