parser.pas 25 KB

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