parser.pas 25 KB

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