parser.pas 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742
  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,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,
  48. cresstr,cpuinfo,procinfo;
  49. procedure initparser;
  50. begin
  51. { ^M means a string or a char, because we don't parse a }
  52. { type declaration }
  53. ignore_equal:=false;
  54. { we didn't parse a object or class declaration }
  55. { and no function header }
  56. testcurobject:=0;
  57. { Current compiled module/proc }
  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. { target specific stuff }
  96. case target_info.system of
  97. system_powerpc_morphos:
  98. include(supported_calling_conventions,pocall_syscall);
  99. system_m68k_amiga:
  100. include(supported_calling_conventions,pocall_syscall);
  101. end;
  102. end;
  103. procedure doneparser;
  104. begin
  105. { Reset current compiling info, so destroy routines can't
  106. reference the data that might already be destroyed }
  107. objectlibrary:=nil;
  108. current_module:=nil;
  109. compiled_module:=nil;
  110. current_procinfo:=nil;
  111. { unload units }
  112. loaded_units.free;
  113. usedunits.free;
  114. { if there was an error in the scanner, the scanner is
  115. still assinged }
  116. if assigned(current_scanner) then
  117. begin
  118. current_scanner.free;
  119. current_scanner:=nil;
  120. end;
  121. { close scanner }
  122. DoneScanner;
  123. { close ppas,deffile }
  124. asmres.free;
  125. deffile.free;
  126. { free list of .o files }
  127. SmartLinkOFiles.Free;
  128. end;
  129. procedure default_macros;
  130. var
  131. hp : tstringlistitem;
  132. begin
  133. { commandline }
  134. hp:=tstringlistitem(initdefines.first);
  135. while assigned(hp) do
  136. begin
  137. current_scanner.def_macro(hp.str);
  138. hp:=tstringlistitem(hp.next);
  139. end;
  140. { set macros for version checking }
  141. current_scanner.set_macro('FPC_VERSION',version_nr);
  142. current_scanner.set_macro('FPC_RELEASE',release_nr);
  143. current_scanner.set_macro('FPC_PATCH',patch_nr);
  144. end;
  145. {$ifdef PREPROCWRITE}
  146. procedure preprocess(const filename:string);
  147. var
  148. i : longint;
  149. begin
  150. new(preprocfile,init('pre'));
  151. { default macros }
  152. current_scanner^.macros:=new(pdictionary,init);
  153. default_macros;
  154. { initialize a module }
  155. current_module:=new(pmodule,init(filename,false));
  156. main_module:=current_module;
  157. { startup scanner, and save in current_module }
  158. current_scanner:=new(pscannerfile,Init(filename));
  159. current_module.scanner:=current_scanner;
  160. { loop until EOF is found }
  161. repeat
  162. current_scanner^.readtoken;
  163. preprocfile^.AddSpace;
  164. case token of
  165. _ID :
  166. begin
  167. preprocfile^.Add(orgpattern);
  168. end;
  169. _REALNUMBER,
  170. _INTCONST :
  171. preprocfile^.Add(pattern);
  172. _CSTRING :
  173. begin
  174. i:=0;
  175. while (i<length(pattern)) do
  176. begin
  177. inc(i);
  178. if pattern[i]='''' then
  179. begin
  180. insert('''',pattern,i);
  181. inc(i);
  182. end;
  183. end;
  184. preprocfile^.Add(''''+pattern+'''');
  185. end;
  186. _CCHAR :
  187. begin
  188. case pattern[1] of
  189. #39 :
  190. pattern:='''''''';
  191. #0..#31,
  192. #128..#255 :
  193. begin
  194. str(ord(pattern[1]),pattern);
  195. pattern:='#'+pattern;
  196. end;
  197. else
  198. pattern:=''''+pattern[1]+'''';
  199. end;
  200. preprocfile^.Add(pattern);
  201. end;
  202. _EOF :
  203. break;
  204. else
  205. preprocfile^.Add(tokeninfo^[token].str)
  206. end;
  207. until false;
  208. { free scanner }
  209. dispose(current_scanner,done);
  210. current_scanner:=nil;
  211. { close }
  212. dispose(preprocfile,done);
  213. end;
  214. {$endif PREPROCWRITE}
  215. {*****************************************************************************
  216. Create information for a new module
  217. *****************************************************************************}
  218. procedure init_module;
  219. begin
  220. { Create assembler output lists for CG }
  221. exprasmlist:=taasmoutput.create;
  222. datasegment:=taasmoutput.create;
  223. codesegment:=taasmoutput.create;
  224. bsssegment:=taasmoutput.create;
  225. debuglist:=taasmoutput.create;
  226. withdebuglist:=taasmoutput.create;
  227. consts:=taasmoutput.create;
  228. rttilist:=taasmoutput.create;
  229. picdata:=taasmoutput.create;
  230. if target_info.system=system_powerpc_darwin then
  231. picdata.concat(tai_simple.create(ait_non_lazy_symbol_pointer));
  232. ResourceStringList:=Nil;
  233. importssection:=nil;
  234. exportssection:=nil;
  235. resourcesection:=nil;
  236. { Resource strings }
  237. ResourceStrings:=TResourceStrings.Create;
  238. { use the librarydata from current_module }
  239. objectlibrary:=current_module.librarydata;
  240. end;
  241. procedure done_module;
  242. {$ifdef MEMDEBUG}
  243. var
  244. d : tmemdebug;
  245. {$endif}
  246. begin
  247. {$ifdef MEMDEBUG}
  248. d:=tmemdebug.create(current_module.modulename^+' - asmlists');
  249. {$endif}
  250. exprasmlist.free;
  251. codesegment.free;
  252. bsssegment.free;
  253. datasegment.free;
  254. debuglist.free;
  255. withdebuglist.free;
  256. consts.free;
  257. rttilist.free;
  258. picdata.free;
  259. if assigned(ResourceStringList) then
  260. ResourceStringList.free;
  261. if assigned(importssection) then
  262. importssection.free;
  263. if assigned(exportssection) then
  264. exportssection.free;
  265. if assigned(resourcesection) then
  266. resourcesection.free;
  267. {$ifdef MEMDEBUG}
  268. d.free;
  269. {$endif}
  270. { resource strings }
  271. ResourceStrings.free;
  272. objectlibrary:=nil;
  273. end;
  274. {*****************************************************************************
  275. Compile a source file
  276. *****************************************************************************}
  277. procedure compile(const filename:string);
  278. type
  279. polddata=^tolddata;
  280. tolddata=record
  281. { scanner }
  282. oldidtoken,
  283. oldtoken : ttoken;
  284. oldtokenpos : tfileposinfo;
  285. oldc : char;
  286. oldpattern,
  287. oldorgpattern : string;
  288. old_block_type : tblock_type;
  289. { symtable }
  290. oldrefsymtable,
  291. olddefaultsymtablestack,
  292. oldsymtablestack : tsymtable;
  293. oldaktprocsym : tprocsym;
  294. { cg }
  295. oldparse_only : boolean;
  296. { asmlists }
  297. oldimports,
  298. oldexports,
  299. oldresource,
  300. oldrttilist,
  301. oldpicdata,
  302. oldresourcestringlist,
  303. oldbsssegment,
  304. olddatasegment,
  305. oldcodesegment,
  306. oldexprasmlist,
  307. olddebuglist,
  308. oldwithdebuglist,
  309. oldconsts : taasmoutput;
  310. oldobjectlibrary : tasmlibrarydata;
  311. { resourcestrings }
  312. OldResourceStrings : tResourceStrings;
  313. { akt.. things }
  314. oldaktlocalswitches : tlocalswitches;
  315. oldaktmoduleswitches : tmoduleswitches;
  316. oldaktfilepos : tfileposinfo;
  317. oldaktpackrecords,
  318. oldaktpackenum,oldaktmaxfpuregisters : longint;
  319. oldaktalignment : talignmentinfo;
  320. oldaktoutputformat : tasm;
  321. oldaktspecificoptprocessor,
  322. oldaktoptprocessor : tprocessors;
  323. oldaktfputype : tfputype;
  324. oldaktasmmode : tasmmode;
  325. oldaktinterfacetype: tinterfacetypes;
  326. oldaktmodeswitches : tmodeswitches;
  327. old_compiled_module : tmodule;
  328. oldcurrent_procinfo : tprocinfo;
  329. oldaktdefproccall : tproccalloption;
  330. oldsourcecodepage : tcodepagestring;
  331. {$ifdef GDB}
  332. store_dbx : plongint;
  333. {$endif GDB}
  334. end;
  335. var
  336. olddata : polddata;
  337. {$ifdef USEEXCEPT}
  338. recoverpos : jmp_buf;
  339. oldrecoverpos : pjmp_buf;
  340. {$endif useexcept}
  341. begin
  342. inc(compile_level);
  343. parser_current_file:=filename;
  344. { Uses heap memory instead of placing everything on the
  345. stack. This is needed because compile() can be called
  346. recursively }
  347. new(olddata);
  348. with olddata^ do
  349. begin
  350. old_compiled_module:=compiled_module;
  351. { save symtable state }
  352. oldsymtablestack:=symtablestack;
  353. olddefaultsymtablestack:=defaultsymtablestack;
  354. oldrefsymtable:=refsymtable;
  355. oldcurrent_procinfo:=current_procinfo;
  356. oldaktdefproccall:=aktdefproccall;
  357. { save scanner state }
  358. oldc:=c;
  359. oldpattern:=pattern;
  360. oldorgpattern:=orgpattern;
  361. oldtoken:=token;
  362. oldidtoken:=idtoken;
  363. old_block_type:=block_type;
  364. oldtokenpos:=akttokenpos;
  365. oldsourcecodepage:=aktsourcecodepage;
  366. { save cg }
  367. oldparse_only:=parse_only;
  368. { save assembler lists }
  369. olddatasegment:=datasegment;
  370. oldbsssegment:=bsssegment;
  371. oldcodesegment:=codesegment;
  372. olddebuglist:=debuglist;
  373. oldwithdebuglist:=withdebuglist;
  374. oldconsts:=consts;
  375. oldrttilist:=rttilist;
  376. oldpicdata:=picdata;
  377. oldexprasmlist:=exprasmlist;
  378. oldimports:=importssection;
  379. oldexports:=exportssection;
  380. oldresource:=resourcesection;
  381. oldresourcestringlist:=resourcestringlist;
  382. oldobjectlibrary:=objectlibrary;
  383. OldResourceStrings:=ResourceStrings;
  384. { save akt... state }
  385. { handle the postponed case first }
  386. if localswitcheschanged then
  387. begin
  388. aktlocalswitches:=nextaktlocalswitches;
  389. localswitcheschanged:=false;
  390. end;
  391. oldaktlocalswitches:=aktlocalswitches;
  392. oldaktmoduleswitches:=aktmoduleswitches;
  393. oldaktalignment:=aktalignment;
  394. oldaktpackenum:=aktpackenum;
  395. oldaktpackrecords:=aktpackrecords;
  396. oldaktfputype:=aktfputype;
  397. oldaktmaxfpuregisters:=aktmaxfpuregisters;
  398. oldaktoutputformat:=aktoutputformat;
  399. oldaktoptprocessor:=aktoptprocessor;
  400. oldaktspecificoptprocessor:=aktspecificoptprocessor;
  401. oldaktasmmode:=aktasmmode;
  402. oldaktinterfacetype:=aktinterfacetype;
  403. oldaktfilepos:=aktfilepos;
  404. oldaktmodeswitches:=aktmodeswitches;
  405. {$ifdef GDB}
  406. store_dbx:=dbx_counter;
  407. dbx_counter:=nil;
  408. {$endif GDB}
  409. end;
  410. { show info }
  411. Message1(parser_i_compiling,filename);
  412. { reset symtable }
  413. symtablestack:=nil;
  414. defaultsymtablestack:=nil;
  415. systemunit:=nil;
  416. refsymtable:=nil;
  417. aktdefproccall:=initdefproccall;
  418. registerdef:=true;
  419. aktexceptblock:=0;
  420. exceptblockcounter:=0;
  421. aktmaxfpuregisters:=-1;
  422. { reset the unit or create a new program }
  423. if not assigned(current_module) then
  424. begin
  425. current_module:=tppumodule.create(nil,filename,'',false);
  426. main_module:=current_module;
  427. current_module.state:=ms_compile;
  428. end;
  429. if not(current_module.state in [ms_compile,ms_second_compile]) then
  430. internalerror(200212281);
  431. { a unit compiled at command line must be inside the loaded_unit list }
  432. if (compile_level=1) then
  433. loaded_units.insert(current_module);
  434. { Set the module to use for verbose }
  435. compiled_module:=current_module;
  436. SetCompileModule(current_module);
  437. Fillchar(aktfilepos,0,sizeof(aktfilepos));
  438. { Load current state from the init values }
  439. aktlocalswitches:=initlocalswitches;
  440. aktmoduleswitches:=initmoduleswitches;
  441. aktmodeswitches:=initmodeswitches;
  442. {$IFDEF Testvarsets}
  443. aktsetalloc:=initsetalloc;
  444. {$ENDIF}
  445. aktalignment:=initalignment;
  446. aktfputype:=initfputype;
  447. aktpackenum:=initpackenum;
  448. aktpackrecords:=0;
  449. aktoutputformat:=initoutputformat;
  450. set_target_asm(aktoutputformat);
  451. aktoptprocessor:=initoptprocessor;
  452. aktspecificoptprocessor:=initspecificoptprocessor;
  453. aktasmmode:=initasmmode;
  454. aktinterfacetype:=initinterfacetype;
  455. { startup scanner and load the first file }
  456. current_scanner:=tscannerfile.Create(filename);
  457. current_scanner.firstfile;
  458. current_module.scanner:=current_scanner;
  459. { macros }
  460. default_macros;
  461. { read the first token }
  462. current_scanner.readtoken;
  463. { init code generator for a new module }
  464. init_module;
  465. { If the compile level > 1 we get a nice "unit expected" error
  466. message if we are trying to use a program as unit.}
  467. {$ifdef USEEXCEPT}
  468. if setjmp(recoverpos)=0 then
  469. begin
  470. oldrecoverpos:=recoverpospointer;
  471. recoverpospointer:=@recoverpos;
  472. {$endif USEEXCEPT}
  473. if (token=_UNIT) or (compile_level>1) then
  474. begin
  475. current_module.is_unit:=true;
  476. proc_unit;
  477. end
  478. else
  479. proc_program(token=_LIBRARY);
  480. {$ifdef USEEXCEPT}
  481. recoverpospointer:=oldrecoverpos;
  482. end
  483. else
  484. begin
  485. recoverpospointer:=oldrecoverpos;
  486. longjump_used:=true;
  487. end;
  488. {$endif USEEXCEPT}
  489. { clear memory }
  490. {$ifdef Splitheap}
  491. if testsplit then
  492. begin
  493. { temp heap should be empty after that !!!}
  494. codegen_donemodule;
  495. Releasetempheap;
  496. end;
  497. {$endif Splitheap}
  498. { restore old state, close trees, > 0.99.5 has heapblocks, so
  499. it's the default to release the trees }
  500. done_module;
  501. if assigned(current_module) then
  502. begin
  503. { module is now compiled }
  504. tppumodule(current_module).state:=ms_compiled;
  505. { free ppu }
  506. if assigned(tppumodule(current_module).ppufile) then
  507. begin
  508. tppumodule(current_module).ppufile.free;
  509. tppumodule(current_module).ppufile:=nil;
  510. end;
  511. { free scanner }
  512. if assigned(current_module.scanner) then
  513. begin
  514. if current_scanner=tscannerfile(current_module.scanner) then
  515. current_scanner:=nil;
  516. tscannerfile(current_module.scanner).free;
  517. current_module.scanner:=nil;
  518. end;
  519. end;
  520. if (compile_level>1) then
  521. begin
  522. with olddata^ do
  523. begin
  524. { restore scanner }
  525. c:=oldc;
  526. pattern:=oldpattern;
  527. orgpattern:=oldorgpattern;
  528. token:=oldtoken;
  529. idtoken:=oldidtoken;
  530. akttokenpos:=oldtokenpos;
  531. block_type:=old_block_type;
  532. { restore cg }
  533. parse_only:=oldparse_only;
  534. { restore asmlists }
  535. exprasmlist:=oldexprasmlist;
  536. datasegment:=olddatasegment;
  537. bsssegment:=oldbsssegment;
  538. codesegment:=oldcodesegment;
  539. consts:=oldconsts;
  540. debuglist:=olddebuglist;
  541. withdebuglist:=oldwithdebuglist;
  542. importssection:=oldimports;
  543. exportssection:=oldexports;
  544. resourcesection:=oldresource;
  545. rttilist:=oldrttilist;
  546. picdata:=oldpicdata;
  547. resourcestringlist:=oldresourcestringlist;
  548. { object data }
  549. ResourceStrings:=OldResourceStrings;
  550. objectlibrary:=oldobjectlibrary;
  551. { restore previous scanner }
  552. if assigned(old_compiled_module) then
  553. current_scanner:=tscannerfile(old_compiled_module.scanner)
  554. else
  555. current_scanner:=nil;
  556. if assigned(current_scanner) then
  557. parser_current_file:=current_scanner.inputfile.name^;
  558. { restore symtable state }
  559. refsymtable:=oldrefsymtable;
  560. symtablestack:=oldsymtablestack;
  561. defaultsymtablestack:=olddefaultsymtablestack;
  562. aktdefproccall:=oldaktdefproccall;
  563. current_procinfo:=oldcurrent_procinfo;
  564. aktsourcecodepage:=oldsourcecodepage;
  565. aktlocalswitches:=oldaktlocalswitches;
  566. aktmoduleswitches:=oldaktmoduleswitches;
  567. aktalignment:=oldaktalignment;
  568. aktpackenum:=oldaktpackenum;
  569. aktpackrecords:=oldaktpackrecords;
  570. aktmaxfpuregisters:=oldaktmaxfpuregisters;
  571. aktoutputformat:=oldaktoutputformat;
  572. set_target_asm(aktoutputformat);
  573. aktoptprocessor:=oldaktoptprocessor;
  574. aktspecificoptprocessor:=oldaktspecificoptprocessor;
  575. aktfputype:=oldaktfputype;
  576. aktasmmode:=oldaktasmmode;
  577. aktinterfacetype:=oldaktinterfacetype;
  578. aktfilepos:=oldaktfilepos;
  579. aktmodeswitches:=oldaktmodeswitches;
  580. aktexceptblock:=0;
  581. exceptblockcounter:=0;
  582. {$ifdef GDB}
  583. dbx_counter:=store_dbx;
  584. {$endif GDB}
  585. end;
  586. end
  587. else
  588. begin
  589. parser_current_file:='';
  590. { Shut down things when the last file is compiled }
  591. if (compile_level=1) then
  592. begin
  593. { Close script }
  594. if (not AsmRes.Empty) then
  595. begin
  596. Message1(exec_i_closing_script,AsmRes.Fn);
  597. AsmRes.WriteToDisk;
  598. end;
  599. {$ifdef USEEXCEPT}
  600. if not longjump_used then
  601. {$endif USEEXCEPT}
  602. begin
  603. { do not create browsers on errors !! }
  604. if status.errorcount=0 then
  605. begin
  606. {$ifdef BrowserLog}
  607. { Write Browser Log }
  608. if (cs_browser_log in aktglobalswitches) and
  609. (cs_browser in aktmoduleswitches) then
  610. begin
  611. if browserlog.elements_to_list.empty then
  612. begin
  613. Message1(parser_i_writing_browser_log,browserlog.Fname);
  614. WriteBrowserLog;
  615. end
  616. else
  617. browserlog.list_elements;
  618. end;
  619. {$endif BrowserLog}
  620. { Write Browser Collections }
  621. do_extractsymbolinfo{$ifdef FPC}(){$endif};
  622. end;
  623. end;
  624. {$ifdef dummy}
  625. if current_module.in_second_compile then
  626. begin
  627. current_module.in_second_compile:=false;
  628. current_module.in_compile:=true;
  629. end
  630. else
  631. current_module.in_compile:=false;
  632. {$endif dummy}
  633. end;
  634. end;
  635. dec(compile_level);
  636. compiled_module:=olddata^.old_compiled_module;
  637. dispose(olddata);
  638. {$ifdef USEEXCEPT}
  639. if longjump_used then
  640. longjmp(recoverpospointer^,1);
  641. {$endif USEEXCEPT}
  642. end;
  643. end.
  644. {
  645. $Log$
  646. Revision 1.67 2004-10-15 09:14:17 mazen
  647. - remove $IFDEF DELPHI and related code
  648. - remove $IFDEF FPCPROCVAR and related code
  649. Revision 1.66 2004/06/20 08:55:30 florian
  650. * logs truncated
  651. Revision 1.65 2004/05/12 13:21:09 karoly
  652. * few small changes to add syscall support to M68k/Amiga target
  653. Revision 1.64 2004/04/28 15:19:03 florian
  654. + syscall directive support for MorphOS added
  655. Revision 1.63 2004/03/16 16:20:49 peter
  656. * reset current_module,current_procinfo so the destroy routines
  657. can't access their info anymore, because that can be already
  658. destroyed
  659. Revision 1.62 2004/03/14 20:08:37 peter
  660. * packrecords fixed for settings from $PACKRECORDS
  661. * default packrecords now uses value 0 and uses info from aligment
  662. structure only, initpackrecords removed
  663. Revision 1.61 2004/03/02 17:32:12 florian
  664. * make cycle fixed
  665. + pic support for darwin
  666. + support of importing vars from shared libs on darwin implemented
  667. }