parser.pas 24 KB

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