parser.pas 24 KB

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