parser.pas 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871
  1. {
  2. $Id$
  3. Copyright (c) 1993-99 by Florian Klaempfl
  4. This unit does the parsing process
  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. {$E+,N+,D+,F+}
  20. {$endif}
  21. unit parser;
  22. { Use exception catching so the compiler goes futher after a Stop }
  23. {$ifdef i386}
  24. {$define USEEXCEPT}
  25. {$endif}
  26. {$ifdef TP}
  27. {$ifdef DPMI}
  28. {$undef USEEXCEPT}
  29. {$endif}
  30. {$endif}
  31. interface
  32. procedure compile(const filename:string;compile_system:boolean);
  33. procedure initparser;
  34. procedure doneparser;
  35. implementation
  36. uses
  37. globtype,version,tokens,systems,
  38. cobjects,globals,verbose,
  39. symtable,files,aasm,
  40. {$ifndef newcg}
  41. hcodegen,
  42. {$endif newcg}
  43. assemble,link,script,gendef,
  44. {$ifdef BrowserLog}
  45. browlog,
  46. {$endif BrowserLog}
  47. {$ifdef BrowserCol}
  48. browcol,
  49. {$endif BrowserCol}
  50. {$ifdef UseExcept}
  51. tpexcept,compiler,
  52. {$endif UseExcept}
  53. {$ifdef newcg}
  54. cgobj,
  55. cgcpu,
  56. { cgbase must be after hcodegen to use the correct procinfo !!! }
  57. cgbase,
  58. {$endif newcg}
  59. comphook,tree,scanner,pbase,ptype,psystem,pmodules,cresstr;
  60. procedure initparser;
  61. begin
  62. { ^M means a string or a char, because we don't parse a }
  63. { type declaration }
  64. ignore_equal:=false;
  65. { we didn't parse a object or class declaration }
  66. { and no function header }
  67. testcurobject:=0;
  68. { a long time, this was forgotten }
  69. aktprocsym:=nil;
  70. current_module:=nil;
  71. compiled_module:=nil;
  72. loaded_units.init;
  73. usedunits.init;
  74. { global switches }
  75. aktglobalswitches:=initglobalswitches;
  76. { scanner }
  77. c:=#0;
  78. pattern:='';
  79. orgpattern:='';
  80. current_scanner:=nil;
  81. { memory sizes }
  82. if heapsize=0 then
  83. heapsize:=target_info.heapsize;
  84. if maxheapsize=0 then
  85. maxheapsize:=target_info.maxheapsize;
  86. if stacksize=0 then
  87. stacksize:=target_info.stacksize;
  88. { open assembler response }
  89. AsmRes.Init(outputexedir+'ppas');
  90. { open deffile }
  91. DefFile.Init(outputexedir+inputfile+target_os.defext);
  92. end;
  93. procedure doneparser;
  94. begin
  95. { unload units }
  96. loaded_units.done;
  97. usedunits.done;
  98. { close ppas and deffile }
  99. asmres.done;
  100. deffile.done;
  101. end;
  102. procedure default_macros;
  103. var
  104. hp : pstring_item;
  105. begin
  106. { commandline }
  107. hp:=pstring_item(initdefines.first);
  108. while assigned(hp) do
  109. begin
  110. def_macro(hp^.str^);
  111. hp:=pstring_item(hp^.next);
  112. end;
  113. { set macros for version checking }
  114. set_macro('FPC_VERSION',version_nr);
  115. set_macro('FPC_RELEASE',release_nr);
  116. set_macro('FPC_PATCH',patch_nr);
  117. end;
  118. procedure compile(const filename:string;compile_system:boolean);
  119. var
  120. { scanner }
  121. oldidtoken,
  122. oldtoken : ttoken;
  123. oldtokenpos : tfileposinfo;
  124. oldc : char;
  125. oldpattern,
  126. oldorgpattern : string;
  127. old_block_type : tblock_type;
  128. oldcurrent_scanner,prev_scanner,
  129. scanner : pscannerfile;
  130. { symtable }
  131. oldmacros,
  132. oldrefsymtable,
  133. oldsymtablestack : psymtable;
  134. oldprocprefix : string;
  135. oldaktprocsym : pprocsym;
  136. { cg }
  137. oldnextlabelnr : longint;
  138. oldparse_only : boolean;
  139. { asmlists }
  140. oldimports,
  141. oldexports,
  142. oldresource,
  143. oldrttilist,
  144. oldresourcestringlist,
  145. oldbsssegment,
  146. olddatasegment,
  147. oldcodesegment,
  148. oldexprasmlist,
  149. olddebuglist,
  150. oldconsts : paasmoutput;
  151. oldasmsymbollist : pasmsymbollist;
  152. { akt.. things }
  153. oldaktlocalswitches : tlocalswitches;
  154. oldaktmoduleswitches : tmoduleswitches;
  155. oldaktfilepos : tfileposinfo;
  156. oldaktpackrecords : tpackrecords;
  157. oldaktoutputformat : tasm;
  158. oldaktoptprocessor : tprocessors;
  159. oldaktasmmode : tasmmode;
  160. oldaktmodeswitches : tmodeswitches;
  161. old_compiled_module : pmodule;
  162. prev_name : pstring;
  163. {$ifdef USEEXCEPT}
  164. recoverpos : jmp_buf;
  165. oldrecoverpos : pjmp_buf;
  166. {$endif useexcept}
  167. {$ifdef newcg}
  168. oldcg : pcg;
  169. {$endif newcg}
  170. begin
  171. inc(compile_level);
  172. prev_name:=stringdup(parser_current_file);
  173. parser_current_file:=filename;
  174. old_compiled_module:=compiled_module;
  175. { save symtable state }
  176. oldsymtablestack:=symtablestack;
  177. oldrefsymtable:=refsymtable;
  178. oldmacros:=macros;
  179. oldprocprefix:=procprefix;
  180. oldaktprocsym:=aktprocsym;
  181. { save scanner state }
  182. oldc:=c;
  183. oldpattern:=pattern;
  184. oldorgpattern:=orgpattern;
  185. oldtoken:=token;
  186. oldidtoken:=idtoken;
  187. old_block_type:=block_type;
  188. oldtokenpos:=tokenpos;
  189. oldcurrent_scanner:=current_scanner;
  190. { save cg }
  191. oldnextlabelnr:=nextlabelnr;
  192. oldparse_only:=parse_only;
  193. { save assembler lists }
  194. olddatasegment:=datasegment;
  195. oldbsssegment:=bsssegment;
  196. oldcodesegment:=codesegment;
  197. olddebuglist:=debuglist;
  198. oldconsts:=consts;
  199. oldrttilist:=rttilist;
  200. oldexprasmlist:=exprasmlist;
  201. oldimports:=importssection;
  202. oldexports:=exportssection;
  203. oldresource:=resourcesection;
  204. oldresourcestringlist:=resourcestringlist;
  205. oldasmsymbollist:=asmsymbollist;
  206. { save akt... state }
  207. oldaktlocalswitches:=aktlocalswitches;
  208. oldaktmoduleswitches:=aktmoduleswitches;
  209. oldaktpackrecords:=aktpackrecords;
  210. oldaktoutputformat:=aktoutputformat;
  211. oldaktoptprocessor:=aktoptprocessor;
  212. oldaktasmmode:=aktasmmode;
  213. oldaktfilepos:=aktfilepos;
  214. oldaktmodeswitches:=aktmodeswitches;
  215. {$ifdef newcg}
  216. oldcg:=cg;
  217. {$endif newcg}
  218. { show info }
  219. Message1(parser_i_compiling,filename);
  220. { reset symtable }
  221. symtablestack:=nil;
  222. defaultsymtablestack:=nil;
  223. systemunit:=nil;
  224. refsymtable:=nil;
  225. aktprocsym:=nil;
  226. procprefix:='';
  227. registerdef:=true;
  228. { macros }
  229. macros:=new(psymtable,init(macrosymtable));
  230. macros^.name:=stringdup('Conditionals for '+filename);
  231. default_macros;
  232. { reset the unit or create a new program }
  233. if assigned(current_module) then
  234. begin
  235. {current_module^.reset this is wrong !! }
  236. scanner:=current_module^.scanner;
  237. current_module^.reset;
  238. current_module^.scanner:=scanner;
  239. end
  240. else
  241. begin
  242. current_module:=new(pmodule,init(filename,false));
  243. main_module:=current_module;
  244. end;
  245. compiled_module:=current_module;
  246. current_module^.in_compile:=true;
  247. { Load current state from the init values }
  248. aktlocalswitches:=initlocalswitches;
  249. aktmoduleswitches:=initmoduleswitches;
  250. aktmodeswitches:=initmodeswitches;
  251. aktpackrecords:=initpackrecords;
  252. aktpackenum:=initpackenum;
  253. aktoutputformat:=initoutputformat;
  254. aktoptprocessor:=initoptprocessor;
  255. aktasmmode:=initasmmode;
  256. { we need this to make the system unit }
  257. if compile_system then
  258. aktmoduleswitches:=aktmoduleswitches+[cs_compilesystem];
  259. { startup scanner, and save in current_module }
  260. current_scanner:=new(pscannerfile,Init(filename));
  261. current_scanner^.readtoken;
  262. prev_scanner:=current_module^.scanner;
  263. current_module^.scanner:=current_scanner;
  264. { init code generator for a new module }
  265. codegen_newmodule;
  266. {$ifdef newcg}
  267. {$ifdef i386}
  268. cg:=new(pcg386,init);
  269. {$endif i386}
  270. {$ifdef alpha}
  271. cg:=new(pcgalpha,init);
  272. {$endif alpha}
  273. {$ifdef powerpc}
  274. cg:=new(pcgppc,init);
  275. {$endif powerpc}
  276. {$endif newcg}
  277. { If the compile level > 1 we get a nice "unit expected" error
  278. message if we are trying to use a program as unit.}
  279. {$ifdef USEEXCEPT}
  280. if setjmp(recoverpos)=0 then
  281. begin
  282. oldrecoverpos:=recoverpospointer;
  283. recoverpospointer:=@recoverpos;
  284. {$endif USEEXCEPT}
  285. if (token=_UNIT) or (compile_level>1) then
  286. begin
  287. current_module^.is_unit:=true;
  288. proc_unit;
  289. end
  290. else
  291. proc_program(token=_LIBRARY);
  292. {$ifdef USEEXCEPT}
  293. recoverpospointer:=oldrecoverpos;
  294. end
  295. else
  296. begin
  297. recoverpospointer:=oldrecoverpos;
  298. longjump_used:=true;
  299. end;
  300. {$endif USEEXCEPT}
  301. { clear memory }
  302. {$ifdef Splitheap}
  303. if testsplit then
  304. begin
  305. { temp heap should be empty after that !!!}
  306. codegen_donemodule;
  307. Releasetempheap;
  308. end;
  309. {$endif Splitheap}
  310. { restore old state, close trees, > 0.99.5 has heapblocks, so
  311. it's the default to release the trees }
  312. codegen_donemodule;
  313. {$ifdef newcg}
  314. dispose(cg,done);
  315. {$endif newcg}
  316. { free ppu }
  317. if assigned(current_module^.ppufile) then
  318. begin
  319. dispose(current_module^.ppufile,done);
  320. current_module^.ppufile:=nil;
  321. end;
  322. { free scanner }
  323. dispose(current_scanner,done);
  324. { restore previous scanner !! }
  325. current_module^.scanner:=prev_scanner;
  326. if assigned(prev_scanner) then
  327. prev_scanner^.invalid:=true;
  328. { free macros }
  329. {!!! No check for unused macros yet !!! }
  330. dispose(macros,done);
  331. if (compile_level>1) then
  332. begin
  333. {$ifdef newcg}
  334. cg:=oldcg;
  335. {$endif newcg}
  336. { restore scanner }
  337. c:=oldc;
  338. pattern:=oldpattern;
  339. orgpattern:=oldorgpattern;
  340. token:=oldtoken;
  341. idtoken:=oldidtoken;
  342. tokenpos:=oldtokenpos;
  343. block_type:=old_block_type;
  344. current_scanner:=oldcurrent_scanner;
  345. { restore cg }
  346. nextlabelnr:=oldnextlabelnr;
  347. parse_only:=oldparse_only;
  348. { restore asmlists }
  349. exprasmlist:=oldexprasmlist;
  350. datasegment:=olddatasegment;
  351. bsssegment:=oldbsssegment;
  352. codesegment:=oldcodesegment;
  353. consts:=oldconsts;
  354. debuglist:=olddebuglist;
  355. importssection:=oldimports;
  356. exportssection:=oldexports;
  357. resourcesection:=oldresource;
  358. rttilist:=oldrttilist;
  359. resourcestringlist:=oldresourcestringlist;
  360. asmsymbollist:=oldasmsymbollist;
  361. { restore symtable state }
  362. refsymtable:=oldrefsymtable;
  363. symtablestack:=oldsymtablestack;
  364. macros:=oldmacros;
  365. aktprocsym:=oldaktprocsym;
  366. procprefix:=oldprocprefix;
  367. aktlocalswitches:=oldaktlocalswitches;
  368. aktmoduleswitches:=oldaktmoduleswitches;
  369. aktpackrecords:=oldaktpackrecords;
  370. aktoutputformat:=oldaktoutputformat;
  371. aktoptprocessor:=oldaktoptprocessor;
  372. aktasmmode:=oldaktasmmode;
  373. aktfilepos:=oldaktfilepos;
  374. aktmodeswitches:=oldaktmodeswitches;
  375. end;
  376. { Shut down things when the last file is compiled }
  377. if (compile_level=1) then
  378. begin
  379. { Close script }
  380. if (not AsmRes.Empty) then
  381. begin
  382. Message1(exec_i_closing_script,AsmRes.Fn);
  383. AsmRes.WriteToDisk;
  384. end;
  385. {$ifdef USEEXCEPT}
  386. if not longjump_used then
  387. {$endif USEEXCEPT}
  388. { do not create browsers on errors !! }
  389. if status.errorcount=0 then
  390. begin
  391. {$ifdef BrowserLog}
  392. { Write Browser Log }
  393. if (cs_browser_log in aktglobalswitches) and
  394. (cs_browser in aktmoduleswitches) then
  395. begin
  396. if browserlog.elements_to_list^.empty then
  397. begin
  398. Message1(parser_i_writing_browser_log,browserlog.Fname);
  399. WriteBrowserLog;
  400. end
  401. else
  402. browserlog.list_elements;
  403. end;
  404. {$endif BrowserLog}
  405. {$ifdef BrowserCol}
  406. { Write Browser Collections }
  407. CreateBrowserCol;
  408. {$endif}
  409. end;
  410. if current_module^.in_second_compile then
  411. begin
  412. current_module^.in_second_compile:=false;
  413. current_module^.in_compile:=true;
  414. end
  415. else
  416. current_module^.in_compile:=false;
  417. (* Obsolete code aktprocsym
  418. is disposed by the localsymtable disposal (PM)
  419. { Free last aktprocsym }
  420. if assigned(aktprocsym) and (aktprocsym^.owner=nil) then
  421. begin
  422. { init parts are not needed in units !! }
  423. if current_module^.is_unit then
  424. aktprocsym^.definition^.forwarddef:=false;
  425. dispose(aktprocsym,done);
  426. end; *)
  427. end;
  428. dec(compile_level);
  429. parser_current_file:=prev_name^;
  430. stringdispose(prev_name);
  431. compiled_module:=old_compiled_module;
  432. {$ifdef USEEXCEPT}
  433. if longjump_used then
  434. longjmp(recoverpospointer^,1);
  435. {$endif USEEXCEPT}
  436. end;
  437. end.
  438. {
  439. $Log$
  440. Revision 1.89 1999-10-22 10:39:34 peter
  441. * split type reading from pdecl to ptype unit
  442. * parameter_dec routine is now used for procedure and procvars
  443. Revision 1.88 1999/10/12 21:20:45 florian
  444. * new codegenerator compiles again
  445. Revision 1.87 1999/10/03 19:44:41 peter
  446. * removed objpasunit reference, tvarrec is now searched in systemunit
  447. where it already was located
  448. Revision 1.86 1999/10/01 08:02:45 peter
  449. * forward type declaration rewritten
  450. Revision 1.85 1999/09/16 08:02:39 pierre
  451. + old_compiled_module to avoid wrong file info when load PPU files
  452. Revision 1.84 1999/09/15 22:09:23 florian
  453. + rtti is now automatically generated for published classes, i.e.
  454. they are handled like an implicit property
  455. Revision 1.83 1999/08/31 15:51:11 pierre
  456. * in_second_compile cleaned up, in_compile and in_second_load added
  457. Revision 1.82 1999/08/26 20:24:41 michael
  458. + Hopefuly last fixes for resourcestrings
  459. Revision 1.81 1999/08/04 13:02:48 jonas
  460. * all tokens now start with an underscore
  461. * PowerPC compiles!!
  462. Revision 1.80 1999/08/03 17:09:37 florian
  463. * the alpha compiler can be compiled now
  464. Revision 1.79 1999/08/01 23:36:40 florian
  465. * some changes to compile the new code generator
  466. Revision 1.78 1999/07/24 16:22:18 michael
  467. + Improved resourcestring handling
  468. Revision 1.77 1999/07/23 16:05:22 peter
  469. * alignment is now saved in the symtable
  470. * C alignment added for records
  471. * PPU version increased to solve .12 <-> .13 probs
  472. Revision 1.76 1999/07/22 09:37:49 florian
  473. + resourcestring implemented
  474. + start of longstring support
  475. Revision 1.75 1999/06/15 13:23:48 pierre
  476. * don't generate browser if errors during compilation
  477. Revision 1.74 1999/05/27 19:44:41 peter
  478. * removed oldasm
  479. * plabel -> pasmlabel
  480. * -a switches to source writing automaticly
  481. * assembler readers OOPed
  482. * asmsymbol automaticly external
  483. * jumptables and other label fixes for asm readers
  484. Revision 1.73 1999/05/18 22:35:52 pierre
  485. * double dispose of aktprocsym removed
  486. Revision 1.72 1999/04/26 13:31:36 peter
  487. * release storenumber,double_checksum
  488. Revision 1.71 1999/03/26 00:05:33 peter
  489. * released valintern
  490. + deffile is now removed when compiling is finished
  491. * ^( compiles now correct
  492. + static directive
  493. * shrd fixed
  494. Revision 1.70 1999/03/24 23:17:10 peter
  495. * fixed bugs 212,222,225,227,229,231,233
  496. Revision 1.69 1999/02/25 21:02:40 peter
  497. * ag386bin updates
  498. + coff writer
  499. Revision 1.68 1999/02/02 16:39:41 peter
  500. * reset c,pattern,orgpattern also at startup
  501. Revision 1.67 1999/01/27 13:05:44 pierre
  502. * give include file name on error
  503. Revision 1.66 1999/01/23 23:29:35 florian
  504. * first running version of the new code generator
  505. * when compiling exceptions under Linux fixed
  506. Revision 1.65 1999/01/22 12:19:31 pierre
  507. + currently compiled file name added on errors
  508. Revision 1.64 1999/01/12 14:25:29 peter
  509. + BrowserLog for browser.log generation
  510. + BrowserCol for browser info in TCollections
  511. * released all other UseBrowser
  512. Revision 1.63 1998/12/11 00:03:26 peter
  513. + globtype,tokens,version unit splitted from globals
  514. Revision 1.62 1998/12/01 12:51:21 peter
  515. * fixed placing of ppas.sh and link.res when using -FE
  516. Revision 1.61 1998/11/10 10:09:11 peter
  517. * va_list -> array of const
  518. Revision 1.60 1998/10/28 18:26:14 pierre
  519. * removed some erros after other errors (introduced by useexcept)
  520. * stabs works again correctly (for how long !)
  521. Revision 1.59 1998/10/26 17:15:18 pierre
  522. + added two level of longjump to
  523. allow clean freeing of used memory on errors
  524. Revision 1.58 1998/10/16 08:50:02 peter
  525. * reset_gdb_info -> reset_global_def becuase it also resets rangenr !
  526. Revision 1.57 1998/10/08 17:17:23 pierre
  527. * current_module old scanner tagged as invalid if unit is recompiled
  528. + added ppheap for better info on tracegetmem of heaptrc
  529. (adds line column and file index)
  530. * several memory leaks removed ith help of heaptrc !!
  531. Revision 1.56 1998/10/08 13:48:45 peter
  532. * fixed memory leaks for do nothing source
  533. * fixed unit interdependency
  534. Revision 1.55 1998/10/06 17:16:53 pierre
  535. * some memory leaks fixed (thanks to Peter for heaptrc !)
  536. Revision 1.54 1998/10/05 21:33:23 peter
  537. * fixed 161,165,166,167,168
  538. Revision 1.53 1998/09/30 16:43:36 peter
  539. * fixed unit interdependency with circular uses
  540. Revision 1.52 1998/09/28 16:57:22 pierre
  541. * changed all length(p^.value_str^) into str_length(p)
  542. to get it work with and without ansistrings
  543. * changed sourcefiles field of tmodule to a pointer
  544. Revision 1.51 1998/09/26 17:45:30 peter
  545. + idtoken and only one token table
  546. Revision 1.50 1998/09/24 23:49:08 peter
  547. + aktmodeswitches
  548. Revision 1.49 1998/09/23 15:39:07 pierre
  549. * browser bugfixes
  550. was adding a reference when looking for the symbol
  551. if -bSYM_NAME was used
  552. Revision 1.48 1998/09/22 17:13:48 pierre
  553. + browsing updated and developed
  554. records and objects fields are also stored
  555. Revision 1.47 1998/09/21 09:00:18 peter
  556. * reset_gdb_info only when debuginfo is set
  557. Revision 1.46 1998/09/21 08:45:12 pierre
  558. + added vmt_offset in tobjectdef.write for fututre use
  559. (first steps to have objects without vmt if no virtual !!)
  560. + added fpu_used field for tabstractprocdef :
  561. sets this level to 2 if the functions return with value in FPU
  562. (is then set to correct value at parsing of implementation)
  563. THIS MIGHT refuse some code with FPU expression too complex
  564. that were accepted before and even in some cases
  565. that don't overflow in fact
  566. ( like if f : float; is a forward that finally in implementation
  567. only uses one fpu register !!)
  568. Nevertheless I think that it will improve security on
  569. FPU operations !!
  570. * most other changes only for UseBrowser code
  571. (added symtable references for record and objects)
  572. local switch for refs to args and local of each function
  573. (static symtable still missing)
  574. UseBrowser still not stable and probably broken by
  575. the definition hash array !!
  576. Revision 1.45 1998/09/18 08:01:35 pierre
  577. + improvement on the usebrowser part
  578. (does not work correctly for now)
  579. Revision 1.44 1998/09/10 15:25:34 daniel
  580. + Added maxheapsize.
  581. * Corrected semi-bug in calling the assembler and the linker
  582. Revision 1.43 1998/09/09 15:33:06 peter
  583. * fixed in_global to allow directives also after interface token
  584. Revision 1.42 1998/09/04 08:41:59 peter
  585. * updated some error messages
  586. Revision 1.41 1998/09/01 12:53:24 peter
  587. + aktpackenum
  588. Revision 1.40 1998/09/01 07:54:19 pierre
  589. * UseBrowser a little updated (might still be buggy !!)
  590. * bug in psub.pas in function specifier removed
  591. * stdcall allowed in interface and in implementation
  592. (FPC will not yet complain if it is missing in either part
  593. because stdcall is only a dummy !!)
  594. Revision 1.39 1998/08/26 10:07:09 peter
  595. * dispose trees is now default for all > 0.99.5 compiles
  596. Revision 1.38 1998/08/18 20:52:20 peter
  597. * renamed in_main to in_global which is more logical
  598. Revision 1.37 1998/08/17 09:17:49 peter
  599. * static/shared linking updates
  600. Revision 1.36 1998/08/14 21:56:36 peter
  601. * setting the outputfile using -o works now to create static libs
  602. Revision 1.35 1998/08/12 19:22:09 peter
  603. * reset also the link* lists when recompiling an existing unit
  604. Revision 1.34 1998/08/10 23:58:56 peter
  605. * fixed asmlist dispose for 0.99.5
  606. Revision 1.33 1998/08/10 14:50:07 peter
  607. + localswitches, moduleswitches, globalswitches splitting
  608. Revision 1.32 1998/08/10 10:18:28 peter
  609. + Compiler,Comphook unit which are the new interface units to the
  610. compiler
  611. Revision 1.31 1998/07/14 21:46:46 peter
  612. * updated messages file
  613. Revision 1.30 1998/07/14 14:46:49 peter
  614. * released NEWINPUT
  615. Revision 1.29 1998/07/07 11:19:59 peter
  616. + NEWINPUT for a better inputfile and scanner object
  617. Revision 1.28 1998/06/25 11:15:33 pierre
  618. * ppu files where not closed in newppu !!
  619. second compilation was impossible due to too many opened files
  620. (not visible in 'make cycle' as we remove all the ppu files)
  621. Revision 1.27 1998/06/17 14:10:15 peter
  622. * small os2 fixes
  623. * fixed interdependent units with newppu (remake3 under linux works now)
  624. Revision 1.26 1998/06/16 08:56:23 peter
  625. + targetcpu
  626. * cleaner pmodules for newppu
  627. Revision 1.25 1998/06/15 15:38:07 pierre
  628. * small bug in systems.pas corrected
  629. + operators in different units better hanlded
  630. Revision 1.24 1998/06/13 00:10:08 peter
  631. * working browser and newppu
  632. * some small fixes against crashes which occured in bp7 (but not in
  633. fpc?!)
  634. Revision 1.23 1998/06/08 22:59:48 peter
  635. * smartlinking works for win32
  636. * some defines to exclude some compiler parts
  637. Revision 1.22 1998/06/05 17:47:28 peter
  638. * some better uses clauses
  639. Revision 1.21 1998/06/04 23:51:49 peter
  640. * m68k compiles
  641. + .def file creation moved to gendef.pas so it could also be used
  642. for win32
  643. Revision 1.20 1998/06/03 22:48:55 peter
  644. + wordbool,longbool
  645. * rename bis,von -> high,low
  646. * moved some systemunit loading/creating to psystem.pas
  647. Revision 1.19 1998/05/27 19:45:04 peter
  648. * symtable.pas splitted into includefiles
  649. * symtable adapted for $ifdef NEWPPU
  650. Revision 1.18 1998/05/23 01:21:15 peter
  651. + aktasmmode, aktoptprocessor, aktoutputformat
  652. + smartlink per module $SMARTLINK-/+ (like MMX) and moved to aktswitches
  653. + $LIBNAME to set the library name where the unit will be put in
  654. * splitted cgi386 a bit (codeseg to large for bp7)
  655. * nasm, tasm works again. nasm moved to ag386nsm.pas
  656. Revision 1.17 1998/05/20 09:42:34 pierre
  657. + UseTokenInfo now default
  658. * unit in interface uses and implementation uses gives error now
  659. * only one error for unknown symbol (uses lastsymknown boolean)
  660. the problem came from the label code !
  661. + first inlined procedures and function work
  662. (warning there might be allowed cases were the result is still wrong !!)
  663. * UseBrower updated gives a global list of all position of all used symbols
  664. with switch -gb
  665. Revision 1.16 1998/05/12 10:47:00 peter
  666. * moved printstatus to verb_def
  667. + V_Normal which is between V_Error and V_Warning and doesn't have a
  668. prefix like error: warning: and is included in V_Default
  669. * fixed some messages
  670. * first time parameter scan is only for -v and -T
  671. - removed old style messages
  672. Revision 1.15 1998/05/11 13:07:54 peter
  673. + $ifdef NEWPPU for the new ppuformat
  674. + $define GDB not longer required
  675. * removed all warnings and stripped some log comments
  676. * no findfirst/findnext anymore to remove smartlink *.o files
  677. Revision 1.14 1998/05/06 18:36:53 peter
  678. * tai_section extended with code,data,bss sections and enumerated type
  679. * ident 'compiled by FPC' moved to pmodules
  680. * small fix for smartlink
  681. Revision 1.13 1998/05/06 08:38:42 pierre
  682. * better position info with UseTokenInfo
  683. UseTokenInfo greatly simplified
  684. + added check for changed tree after first time firstpass
  685. (if we could remove all the cases were it happen
  686. we could skip all firstpass if firstpasscount > 1)
  687. Only with ExtDebug
  688. Revision 1.12 1998/05/04 17:54:28 peter
  689. + smartlinking works (only case jumptable left todo)
  690. * redesign of systems.pas to support assemblers and linkers
  691. + Unitname is now also in the PPU-file, increased version to 14
  692. Revision 1.11 1998/05/01 16:38:45 florian
  693. * handling of private and protected fixed
  694. + change_keywords_to_tp implemented to remove
  695. keywords which aren't supported by tp
  696. * break and continue are now symbols of the system unit
  697. + widestring, longstring and ansistring type released
  698. Revision 1.10 1998/05/01 07:43:56 florian
  699. + basics for rtti implemented
  700. + switch $m (generate rtti for published sections)
  701. Revision 1.9 1998/04/30 15:59:40 pierre
  702. * GDB works again better :
  703. correct type info in one pass
  704. + UseTokenInfo for better source position
  705. * fixed one remaining bug in scanner for line counts
  706. * several little fixes
  707. Revision 1.8 1998/04/29 10:33:55 pierre
  708. + added some code for ansistring (not complete nor working yet)
  709. * corrected operator overloading
  710. * corrected nasm output
  711. + started inline procedures
  712. + added starstarn : use ** for exponentiation (^ gave problems)
  713. + started UseTokenInfo cond to get accurate positions
  714. Revision 1.7 1998/04/27 23:10:28 peter
  715. + new scanner
  716. * $makelib -> if smartlink
  717. * small filename fixes pmodule.setfilename
  718. * moved import from files.pas -> import.pas
  719. Revision 1.6 1998/04/21 10:16:48 peter
  720. * patches from strasbourg
  721. * objects is not used anymore in the fpc compiled version
  722. Revision 1.5 1998/04/10 14:41:43 peter
  723. * removed some Hints
  724. * small speed optimization for AsmLn
  725. Revision 1.4 1998/04/08 16:58:03 pierre
  726. * several bugfixes
  727. ADD ADC and AND are also sign extended
  728. nasm output OK (program still crashes at end
  729. and creates wrong assembler files !!)
  730. procsym types sym in tdef removed !!
  731. Revision 1.3 1998/04/07 22:45:04 florian
  732. * bug0092, bug0115 and bug0121 fixed
  733. + packed object/class/array
  734. }