parser.pas 25 KB

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