parser.pas 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754
  1. {
  2. $Id$
  3. Copyright (c) 1998-2002 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. unit parser;
  19. {$i fpcdefs.inc}
  20. interface
  21. {$ifdef PREPROCWRITE}
  22. procedure preprocess(const filename:string);
  23. {$endif PREPROCWRITE}
  24. procedure compile(const filename:string);
  25. procedure initparser;
  26. procedure doneparser;
  27. implementation
  28. uses
  29. cutils,cclasses,
  30. globtype,version,tokens,systems,globals,verbose,
  31. symbase,symtable,symdef,symsym,
  32. finput,fmodule,fppu,
  33. aasmbase,aasmtai,
  34. cpubase,cgbase,
  35. script,gendef,
  36. {$ifdef BrowserLog}
  37. browlog,
  38. {$endif BrowserLog}
  39. {$ifdef UseExcept}
  40. tpexcept,
  41. {$endif UseExcept}
  42. {$ifdef GDB}
  43. gdb,
  44. {$endif GDB}
  45. comphook,
  46. scanner,scandir,
  47. pbase,ptype,psystem,pmodules,psub,cresstr,cpuinfo;
  48. procedure initparser;
  49. begin
  50. { ^M means a string or a char, because we don't parse a }
  51. { type declaration }
  52. ignore_equal:=false;
  53. { we didn't parse a object or class declaration }
  54. { and no function header }
  55. testcurobject:=0;
  56. { Symtable }
  57. current_procdef:=nil;
  58. objectlibrary:=nil;
  59. current_module:=nil;
  60. compiled_module:=nil;
  61. current_procinfo:=nil;
  62. loaded_units:=TLinkedList.Create;
  63. usedunits:=TLinkedList.Create;
  64. { global switches }
  65. aktglobalswitches:=initglobalswitches;
  66. aktsourcecodepage:=initsourcecodepage;
  67. { initialize scanner }
  68. InitScanner;
  69. InitScannerDirectives;
  70. { scanner }
  71. c:=#0;
  72. pattern:='';
  73. orgpattern:='';
  74. current_scanner:=nil;
  75. { register all nodes and tais }
  76. registernodes;
  77. registertais;
  78. { memory sizes }
  79. if heapsize=0 then
  80. heapsize:=target_info.heapsize;
  81. if stacksize=0 then
  82. stacksize:=target_info.stacksize;
  83. { open assembler response }
  84. if cs_link_on_target in aktglobalswitches then
  85. GenerateAsmRes(outputexedir+inputfile+'_ppas')
  86. else
  87. GenerateAsmRes(outputexedir+'ppas');
  88. { open deffile }
  89. DefFile:=TDefFile.Create(outputexedir+inputfile+target_info.defext);
  90. { list of generated .o files, so the linker can remove them }
  91. SmartLinkOFiles:=TStringList.Create;
  92. { codegen }
  93. if paraprintnodetree<>0 then
  94. printnode_reset;
  95. end;
  96. procedure doneparser;
  97. begin
  98. { unload units }
  99. loaded_units.free;
  100. usedunits.free;
  101. { if there was an error in the scanner, the scanner is
  102. still assinged }
  103. if assigned(current_scanner) then
  104. begin
  105. current_scanner.free;
  106. current_scanner:=nil;
  107. end;
  108. { close scanner }
  109. DoneScanner;
  110. { close ppas,deffile }
  111. asmres.free;
  112. deffile.free;
  113. { free list of .o files }
  114. SmartLinkOFiles.Free;
  115. end;
  116. procedure default_macros;
  117. var
  118. hp : tstringlistitem;
  119. begin
  120. { commandline }
  121. hp:=tstringlistitem(initdefines.first);
  122. while assigned(hp) do
  123. begin
  124. current_scanner.def_macro(hp.str);
  125. hp:=tstringlistitem(hp.next);
  126. end;
  127. { set macros for version checking }
  128. current_scanner.set_macro('FPC_VERSION',version_nr);
  129. current_scanner.set_macro('FPC_RELEASE',release_nr);
  130. current_scanner.set_macro('FPC_PATCH',patch_nr);
  131. end;
  132. {$ifdef PREPROCWRITE}
  133. procedure preprocess(const filename:string);
  134. var
  135. i : longint;
  136. begin
  137. new(preprocfile,init('pre'));
  138. { default macros }
  139. current_scanner^.macros:=new(pdictionary,init);
  140. default_macros;
  141. { initialize a module }
  142. current_module:=new(pmodule,init(filename,false));
  143. main_module:=current_module;
  144. { startup scanner, and save in current_module }
  145. current_scanner:=new(pscannerfile,Init(filename));
  146. current_module.scanner:=current_scanner;
  147. { loop until EOF is found }
  148. repeat
  149. current_scanner^.readtoken;
  150. preprocfile^.AddSpace;
  151. case token of
  152. _ID :
  153. begin
  154. preprocfile^.Add(orgpattern);
  155. end;
  156. _REALNUMBER,
  157. _INTCONST :
  158. preprocfile^.Add(pattern);
  159. _CSTRING :
  160. begin
  161. i:=0;
  162. while (i<length(pattern)) do
  163. begin
  164. inc(i);
  165. if pattern[i]='''' then
  166. begin
  167. insert('''',pattern,i);
  168. inc(i);
  169. end;
  170. end;
  171. preprocfile^.Add(''''+pattern+'''');
  172. end;
  173. _CCHAR :
  174. begin
  175. case pattern[1] of
  176. #39 :
  177. pattern:='''''''';
  178. #0..#31,
  179. #128..#255 :
  180. begin
  181. str(ord(pattern[1]),pattern);
  182. pattern:='#'+pattern;
  183. end;
  184. else
  185. pattern:=''''+pattern[1]+'''';
  186. end;
  187. preprocfile^.Add(pattern);
  188. end;
  189. _EOF :
  190. break;
  191. else
  192. preprocfile^.Add(tokeninfo^[token].str)
  193. end;
  194. until false;
  195. { free scanner }
  196. dispose(current_scanner,done);
  197. current_scanner:=nil;
  198. { close }
  199. dispose(preprocfile,done);
  200. end;
  201. {$endif PREPROCWRITE}
  202. procedure compile(const filename:string);
  203. type
  204. polddata=^tolddata;
  205. tolddata=record
  206. { scanner }
  207. oldidtoken,
  208. oldtoken : ttoken;
  209. oldtokenpos : tfileposinfo;
  210. oldc : char;
  211. oldpattern,
  212. oldorgpattern : string;
  213. old_block_type : tblock_type;
  214. { symtable }
  215. oldrefsymtable,
  216. olddefaultsymtablestack,
  217. oldsymtablestack : tsymtable;
  218. oldaktprocsym : tprocsym;
  219. oldcurrent_procdef : tprocdef;
  220. oldoverloaded_operators : toverloaded_operators;
  221. { cg }
  222. oldparse_only : boolean;
  223. { asmlists }
  224. oldimports,
  225. oldexports,
  226. oldresource,
  227. oldrttilist,
  228. oldresourcestringlist,
  229. oldbsssegment,
  230. olddatasegment,
  231. oldcodesegment,
  232. oldexprasmlist,
  233. olddebuglist,
  234. oldwithdebuglist,
  235. oldconsts : taasmoutput;
  236. oldobjectlibrary : tasmlibrarydata;
  237. { resourcestrings }
  238. OldResourceStrings : tResourceStrings;
  239. { akt.. things }
  240. oldaktlocalswitches : tlocalswitches;
  241. oldaktmoduleswitches : tmoduleswitches;
  242. oldaktfilepos : tfileposinfo;
  243. oldaktpackenum,oldaktmaxfpuregisters : longint;
  244. oldaktalignment : talignmentinfo;
  245. oldaktoutputformat : tasm;
  246. oldaktspecificoptprocessor,
  247. oldaktoptprocessor : tprocessors;
  248. oldaktasmmode : tasmmode;
  249. oldaktinterfacetype: tinterfacetypes;
  250. oldaktmodeswitches : tmodeswitches;
  251. old_compiled_module : tmodule;
  252. oldaktdefproccall : tproccalloption;
  253. oldsourcecodepage : tcodepagestring;
  254. {$ifdef GDB}
  255. store_dbx : plongint;
  256. {$endif GDB}
  257. end;
  258. var
  259. olddata : polddata;
  260. {$ifdef USEEXCEPT}
  261. {$ifndef Delphi}
  262. recoverpos : jmp_buf;
  263. oldrecoverpos : pjmp_buf;
  264. {$endif Delphi}
  265. {$endif useexcept}
  266. begin
  267. inc(compile_level);
  268. parser_current_file:=filename;
  269. { Uses heap memory instead of placing everything on the
  270. stack. This is needed because compile() can be called
  271. recursively }
  272. new(olddata);
  273. with olddata^ do
  274. begin
  275. old_compiled_module:=compiled_module;
  276. { save symtable state }
  277. oldsymtablestack:=symtablestack;
  278. olddefaultsymtablestack:=defaultsymtablestack;
  279. oldrefsymtable:=refsymtable;
  280. oldcurrent_procdef:=current_procdef;
  281. oldaktdefproccall:=aktdefproccall;
  282. move(overloaded_operators,oldoverloaded_operators,sizeof(toverloaded_operators));
  283. { save scanner state }
  284. oldc:=c;
  285. oldpattern:=pattern;
  286. oldorgpattern:=orgpattern;
  287. oldtoken:=token;
  288. oldidtoken:=idtoken;
  289. old_block_type:=block_type;
  290. oldtokenpos:=akttokenpos;
  291. oldsourcecodepage:=aktsourcecodepage;
  292. { save cg }
  293. oldparse_only:=parse_only;
  294. { save assembler lists }
  295. olddatasegment:=datasegment;
  296. oldbsssegment:=bsssegment;
  297. oldcodesegment:=codesegment;
  298. olddebuglist:=debuglist;
  299. oldwithdebuglist:=withdebuglist;
  300. oldconsts:=consts;
  301. oldrttilist:=rttilist;
  302. oldexprasmlist:=exprasmlist;
  303. oldimports:=importssection;
  304. oldexports:=exportssection;
  305. oldresource:=resourcesection;
  306. oldresourcestringlist:=resourcestringlist;
  307. oldobjectlibrary:=objectlibrary;
  308. OldResourceStrings:=ResourceStrings;
  309. { save akt... state }
  310. { handle the postponed case first }
  311. if localswitcheschanged then
  312. begin
  313. aktlocalswitches:=nextaktlocalswitches;
  314. localswitcheschanged:=false;
  315. end;
  316. oldaktlocalswitches:=aktlocalswitches;
  317. oldaktmoduleswitches:=aktmoduleswitches;
  318. oldaktalignment:=aktalignment;
  319. oldaktpackenum:=aktpackenum;
  320. oldaktmaxfpuregisters:=aktmaxfpuregisters;
  321. oldaktoutputformat:=aktoutputformat;
  322. oldaktoptprocessor:=aktoptprocessor;
  323. oldaktspecificoptprocessor:=aktspecificoptprocessor;
  324. oldaktasmmode:=aktasmmode;
  325. oldaktinterfacetype:=aktinterfacetype;
  326. oldaktfilepos:=aktfilepos;
  327. oldaktmodeswitches:=aktmodeswitches;
  328. {$ifdef GDB}
  329. store_dbx:=dbx_counter;
  330. dbx_counter:=nil;
  331. {$endif GDB}
  332. end;
  333. { show info }
  334. Message1(parser_i_compiling,filename);
  335. { reset symtable }
  336. symtablestack:=nil;
  337. defaultsymtablestack:=nil;
  338. systemunit:=nil;
  339. refsymtable:=nil;
  340. aktdefproccall:=initdefproccall;
  341. registerdef:=true;
  342. aktexceptblock:=0;
  343. exceptblockcounter:=0;
  344. aktmaxfpuregisters:=-1;
  345. fillchar(overloaded_operators,sizeof(toverloaded_operators),0);
  346. { reset the unit or create a new program }
  347. if not assigned(current_module) then
  348. begin
  349. current_module:=tppumodule.create(nil,filename,'',false);
  350. main_module:=current_module;
  351. current_module.state:=ms_compile;
  352. end;
  353. if not(current_module.state in [ms_compile,ms_second_compile]) then
  354. internalerror(200212281);
  355. { a unit compiled at command line must be inside the loaded_unit list }
  356. if (compile_level=1) then
  357. loaded_units.insert(current_module);
  358. { Set the module to use for verbose }
  359. compiled_module:=current_module;
  360. SetCompileModule(current_module);
  361. Fillchar(aktfilepos,0,sizeof(aktfilepos));
  362. { Load current state from the init values }
  363. aktlocalswitches:=initlocalswitches;
  364. aktmoduleswitches:=initmoduleswitches;
  365. aktmodeswitches:=initmodeswitches;
  366. {$IFDEF Testvarsets}
  367. aktsetalloc:=initsetalloc;
  368. {$ENDIF}
  369. aktalignment:=initalignment;
  370. aktpackenum:=initpackenum;
  371. aktoutputformat:=initoutputformat;
  372. set_target_asm(aktoutputformat);
  373. aktoptprocessor:=initoptprocessor;
  374. aktspecificoptprocessor:=initspecificoptprocessor;
  375. aktasmmode:=initasmmode;
  376. aktinterfacetype:=initinterfacetype;
  377. { startup scanner and load the first file }
  378. current_scanner:=tscannerfile.Create(filename);
  379. current_scanner.firstfile;
  380. current_module.scanner:=current_scanner;
  381. { macros }
  382. default_macros;
  383. { read the first token }
  384. current_scanner.readtoken;
  385. { init code generator for a new module }
  386. codegen_newmodule;
  387. { If the compile level > 1 we get a nice "unit expected" error
  388. message if we are trying to use a program as unit.}
  389. {$ifdef USEEXCEPT}
  390. if setjmp(recoverpos)=0 then
  391. begin
  392. oldrecoverpos:=recoverpospointer;
  393. recoverpospointer:=@recoverpos;
  394. {$endif USEEXCEPT}
  395. if (token=_UNIT) or (compile_level>1) then
  396. begin
  397. current_module.is_unit:=true;
  398. proc_unit;
  399. end
  400. else
  401. proc_program(token=_LIBRARY);
  402. {$ifdef USEEXCEPT}
  403. recoverpospointer:=oldrecoverpos;
  404. end
  405. else
  406. begin
  407. recoverpospointer:=oldrecoverpos;
  408. longjump_used:=true;
  409. end;
  410. {$endif USEEXCEPT}
  411. { clear memory }
  412. {$ifdef Splitheap}
  413. if testsplit then
  414. begin
  415. { temp heap should be empty after that !!!}
  416. codegen_donemodule;
  417. Releasetempheap;
  418. end;
  419. {$endif Splitheap}
  420. { restore old state, close trees, > 0.99.5 has heapblocks, so
  421. it's the default to release the trees }
  422. codegen_donemodule;
  423. if assigned(current_module) then
  424. begin
  425. { free ppu }
  426. if assigned(tppumodule(current_module).ppufile) then
  427. begin
  428. tppumodule(current_module).ppufile.free;
  429. tppumodule(current_module).ppufile:=nil;
  430. end;
  431. { free scanner }
  432. if assigned(current_module.scanner) then
  433. begin
  434. if current_scanner=tscannerfile(current_module.scanner) then
  435. current_scanner:=nil;
  436. tscannerfile(current_module.scanner).free;
  437. current_module.scanner:=nil;
  438. end;
  439. end;
  440. if (compile_level>1) then
  441. begin
  442. with olddata^ do
  443. begin
  444. { restore scanner }
  445. c:=oldc;
  446. pattern:=oldpattern;
  447. orgpattern:=oldorgpattern;
  448. token:=oldtoken;
  449. idtoken:=oldidtoken;
  450. akttokenpos:=oldtokenpos;
  451. block_type:=old_block_type;
  452. { restore cg }
  453. parse_only:=oldparse_only;
  454. { restore asmlists }
  455. exprasmlist:=oldexprasmlist;
  456. datasegment:=olddatasegment;
  457. bsssegment:=oldbsssegment;
  458. codesegment:=oldcodesegment;
  459. consts:=oldconsts;
  460. debuglist:=olddebuglist;
  461. withdebuglist:=oldwithdebuglist;
  462. importssection:=oldimports;
  463. exportssection:=oldexports;
  464. resourcesection:=oldresource;
  465. rttilist:=oldrttilist;
  466. resourcestringlist:=oldresourcestringlist;
  467. { object data }
  468. ResourceStrings:=OldResourceStrings;
  469. objectlibrary:=oldobjectlibrary;
  470. { restore previous scanner }
  471. if assigned(old_compiled_module) then
  472. current_scanner:=tscannerfile(old_compiled_module.scanner)
  473. else
  474. current_scanner:=nil;
  475. if assigned(current_scanner) then
  476. parser_current_file:=current_scanner.inputfile.name^;
  477. { restore symtable state }
  478. refsymtable:=oldrefsymtable;
  479. symtablestack:=oldsymtablestack;
  480. defaultsymtablestack:=olddefaultsymtablestack;
  481. aktdefproccall:=oldaktdefproccall;
  482. current_procdef:=oldcurrent_procdef;
  483. move(oldoverloaded_operators,overloaded_operators,sizeof(toverloaded_operators));
  484. aktsourcecodepage:=oldsourcecodepage;
  485. aktlocalswitches:=oldaktlocalswitches;
  486. aktmoduleswitches:=oldaktmoduleswitches;
  487. aktalignment:=oldaktalignment;
  488. aktpackenum:=oldaktpackenum;
  489. aktmaxfpuregisters:=oldaktmaxfpuregisters;
  490. aktoutputformat:=oldaktoutputformat;
  491. set_target_asm(aktoutputformat);
  492. aktoptprocessor:=oldaktoptprocessor;
  493. aktspecificoptprocessor:=oldaktspecificoptprocessor;
  494. aktasmmode:=oldaktasmmode;
  495. aktinterfacetype:=oldaktinterfacetype;
  496. aktfilepos:=oldaktfilepos;
  497. aktmodeswitches:=oldaktmodeswitches;
  498. aktexceptblock:=0;
  499. exceptblockcounter:=0;
  500. {$ifdef GDB}
  501. dbx_counter:=store_dbx;
  502. {$endif GDB}
  503. end;
  504. end
  505. else
  506. begin
  507. parser_current_file:='';
  508. { Shut down things when the last file is compiled }
  509. if (compile_level=1) then
  510. begin
  511. { Close script }
  512. if (not AsmRes.Empty) then
  513. begin
  514. Message1(exec_i_closing_script,AsmRes.Fn);
  515. AsmRes.WriteToDisk;
  516. end;
  517. {$ifdef USEEXCEPT}
  518. if not longjump_used then
  519. {$endif USEEXCEPT}
  520. begin
  521. { do not create browsers on errors !! }
  522. if status.errorcount=0 then
  523. begin
  524. {$ifdef BrowserLog}
  525. { Write Browser Log }
  526. if (cs_browser_log in aktglobalswitches) and
  527. (cs_browser in aktmoduleswitches) then
  528. begin
  529. if browserlog.elements_to_list.empty then
  530. begin
  531. Message1(parser_i_writing_browser_log,browserlog.Fname);
  532. WriteBrowserLog;
  533. end
  534. else
  535. browserlog.list_elements;
  536. end;
  537. {$endif BrowserLog}
  538. { Write Browser Collections }
  539. do_extractsymbolinfo{$ifdef FPC}(){$endif};
  540. end;
  541. end;
  542. {$ifdef dummy}
  543. if current_module.in_second_compile then
  544. begin
  545. current_module.in_second_compile:=false;
  546. current_module.in_compile:=true;
  547. end
  548. else
  549. current_module.in_compile:=false;
  550. {$endif dummy}
  551. end;
  552. end;
  553. dec(compile_level);
  554. compiled_module:=olddata^.old_compiled_module;
  555. dispose(olddata);
  556. {$ifdef USEEXCEPT}
  557. if longjump_used then
  558. longjmp(recoverpospointer^,1);
  559. {$endif USEEXCEPT}
  560. end;
  561. end.
  562. {
  563. $Log$
  564. Revision 1.54 2003-06-12 16:41:51 peter
  565. * add inputfile prefix to ppas/link.res
  566. Revision 1.53 2003/05/15 18:58:53 peter
  567. * removed selfpointer_offset, vmtpointer_offset
  568. * tvarsym.adjusted_address
  569. * address in localsymtable is now in the real direction
  570. * removed some obsolete globals
  571. Revision 1.52 2003/04/27 11:21:33 peter
  572. * aktprocdef renamed to current_procdef
  573. * procinfo renamed to current_procinfo
  574. * procinfo will now be stored in current_module so it can be
  575. cleaned up properly
  576. * gen_main_procsym changed to create_main_proc and release_main_proc
  577. to also generate a tprocinfo structure
  578. * fixed unit implicit initfinal
  579. Revision 1.51 2003/04/27 07:29:50 peter
  580. * current_procdef cleanup, current_procdef is now always nil when parsing
  581. a new procdef declaration
  582. * aktprocsym removed
  583. * lexlevel removed, use symtable.symtablelevel instead
  584. * implicit init/final code uses the normal genentry/genexit
  585. * funcret state checking updated for new funcret handling
  586. Revision 1.50 2003/04/26 00:30:52 peter
  587. * reset aktfilepos when setting new module for compile
  588. Revision 1.49 2003/04/25 20:59:33 peter
  589. * removed funcretn,funcretsym, function result is now in varsym
  590. and aliases for result and function name are added using absolutesym
  591. * vs_hidden parameter for funcret passed in parameter
  592. * vs_hidden fixes
  593. * writenode changed to printnode and released from extdebug
  594. * -vp option added to generate a tree.log with the nodetree
  595. * nicer printnode for statements, callnode
  596. Revision 1.48 2002/12/29 14:57:50 peter
  597. * unit loading changed to first register units and load them
  598. afterwards. This is needed to support uses xxx in yyy correctly
  599. * unit dependency check fixed
  600. Revision 1.47 2002/12/24 23:32:19 peter
  601. * fixed crash when old_compiled_module was nil
  602. Revision 1.46 2002/11/20 12:36:24 mazen
  603. * $UNITPATH directive is now working
  604. Revision 1.45 2002/10/07 19:29:52 peter
  605. * Place old data in compile() in the heap to save stack
  606. Revision 1.44 2002/09/05 19:27:06 peter
  607. * fixed crash when current_module becomes nil
  608. Revision 1.43 2002/08/18 19:58:28 peter
  609. * more current_scanner fixes
  610. Revision 1.42 2002/08/16 15:31:08 peter
  611. * fixed possible crashes with current_scanner
  612. Revision 1.41 2002/08/15 19:10:35 peter
  613. * first things tai,tnode storing in ppu
  614. Revision 1.40 2002/08/12 16:46:04 peter
  615. * tscannerfile is now destroyed in tmodule.reset and current_scanner
  616. is updated accordingly. This removes all the loading and saving of
  617. the old scanner and the invalid flag marking
  618. Revision 1.39 2002/08/12 15:08:40 carl
  619. + stab register indexes for powerpc (moved from gdb to cpubase)
  620. + tprocessor enumeration moved to cpuinfo
  621. + linker in target_info is now a class
  622. * many many updates for m68k (will soon start to compile)
  623. - removed some ifdef or correct them for correct cpu
  624. Revision 1.38 2002/08/11 14:28:19 peter
  625. * TScannerFile.SetInvalid added that will also reset inputfile
  626. Revision 1.37 2002/08/11 13:24:12 peter
  627. * saving of asmsymbols in ppu supported
  628. * asmsymbollist global is removed and moved into a new class
  629. tasmlibrarydata that will hold the info of a .a file which
  630. corresponds with a single module. Added librarydata to tmodule
  631. to keep the library info stored for the module. In the future the
  632. objectfiles will also be stored to the tasmlibrarydata class
  633. * all getlabel/newasmsymbol and friends are moved to the new class
  634. Revision 1.36 2002/08/09 19:15:41 carl
  635. - removed newcg define
  636. Revision 1.35 2002/07/20 17:16:03 florian
  637. + source code page support
  638. Revision 1.34 2002/07/01 18:46:24 peter
  639. * internal linker
  640. * reorganized aasm layer
  641. Revision 1.33 2002/05/18 13:34:11 peter
  642. * readded missing revisions
  643. Revision 1.32 2002/05/16 19:46:42 carl
  644. + defines.inc -> fpcdefs.inc to avoid conflicts if compiling by hand
  645. + try to fix temp allocation (still in ifdef)
  646. + generic constructor calls
  647. + start of tassembler / tmodulebase class cleanup
  648. Revision 1.30 2002/04/21 18:57:23 peter
  649. * fixed memleaks when file can't be opened
  650. Revision 1.29 2002/04/20 21:32:24 carl
  651. + generic FPC_CHECKPOINTER
  652. + first parameter offset in stack now portable
  653. * rename some constants
  654. + move some cpu stuff to other units
  655. - remove unused constents
  656. * fix stacksize for some targets
  657. * fix generic size problems which depend now on EXTEND_SIZE constant
  658. Revision 1.28 2002/04/19 15:46:02 peter
  659. * mangledname rewrite, tprocdef.mangledname is now created dynamicly
  660. in most cases and not written to the ppu
  661. * add mangeledname_prefix() routine to generate the prefix of
  662. manglednames depending on the current procedure, object and module
  663. * removed static procprefix since the mangledname is now build only
  664. on demand from tprocdef.mangledname
  665. Revision 1.27 2002/01/29 19:43:11 peter
  666. * update target_asm according to outputformat
  667. }