parser.pas 27 KB

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