parser.pas 23 KB

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