parser.pas 26 KB

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