parser.pas 24 KB

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