pstatmnt.pas 50 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404
  1. {
  2. $Id$
  3. Copyright (c) 1998-2000 by Florian Klaempfl
  4. Does the parsing of the statements
  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 pstatmnt;
  19. {$i defines.inc}
  20. interface
  21. uses tree;
  22. { reads a block }
  23. function block(islibrary : boolean) : ptree;
  24. { reads an assembler block }
  25. function assembler_block : ptree;
  26. implementation
  27. uses
  28. globtype,systems,tokens,
  29. cutils,cobjects,globals,fmodule,verbose,cpuinfo,
  30. symconst,symtable,aasm,pass_1,types,scanner,
  31. htypechk,
  32. {$ifdef newcg}
  33. cgbase,
  34. {$else}
  35. hcodegen,
  36. {$endif}
  37. ppu
  38. ,pbase,pexpr,pdecl,cpubase,cpuasm
  39. {$ifdef i386}
  40. ,tgeni386
  41. {$ifndef NoRa386Int}
  42. ,ra386int
  43. {$endif NoRa386Int}
  44. {$ifndef NoRa386Att}
  45. ,ra386att
  46. {$endif NoRa386Att}
  47. {$ifndef NoRa386Dir}
  48. ,ra386dir
  49. {$endif NoRa386Dir}
  50. {$endif i386}
  51. {$ifdef m68k}
  52. ,tgen68k
  53. {$ifndef NoRa68kMot}
  54. ,ra68kmot
  55. {$endif NoRa68kMot}
  56. {$endif m68k}
  57. {$ifdef alpha}
  58. ,tgeni386 { this is a dummy!! }
  59. {$endif alpha}
  60. {$ifdef powerpc}
  61. ,tgeni386 { this is a dummy!! }
  62. {$endif powerpc}
  63. ;
  64. const
  65. statement_level : longint = 0;
  66. function statement : ptree;forward;
  67. function if_statement : ptree;
  68. var
  69. ex,if_a,else_a : ptree;
  70. begin
  71. consume(_IF);
  72. ex:=comp_expr(true);
  73. consume(_THEN);
  74. if token<>_ELSE then
  75. if_a:=statement
  76. else
  77. if_a:=nil;
  78. if try_to_consume(_ELSE) then
  79. else_a:=statement
  80. else
  81. else_a:=nil;
  82. if_statement:=genloopnode(ifn,ex,if_a,else_a,false);
  83. end;
  84. { creates a block (list) of statements, til the next END token }
  85. function statements_til_end : ptree;
  86. var
  87. first,last : ptree;
  88. begin
  89. first:=nil;
  90. while token<>_END do
  91. begin
  92. if first=nil then
  93. begin
  94. last:=gennode(statementn,nil,statement);
  95. first:=last;
  96. end
  97. else
  98. begin
  99. last^.left:=gennode(statementn,nil,statement);
  100. last:=last^.left;
  101. end;
  102. if not try_to_consume(_SEMICOLON) then
  103. break;
  104. emptystats;
  105. end;
  106. consume(_END);
  107. statements_til_end:=gensinglenode(blockn,first);
  108. end;
  109. function case_statement : ptree;
  110. var
  111. { contains the label number of currently parsed case block }
  112. aktcaselabel : pasmlabel;
  113. firstlabel : boolean;
  114. root : pcaserecord;
  115. { the typ of the case expression }
  116. casedef : pdef;
  117. procedure newcaselabel(l,h : longint;first:boolean);
  118. var
  119. hcaselabel : pcaserecord;
  120. procedure insertlabel(var p : pcaserecord);
  121. begin
  122. if p=nil then p:=hcaselabel
  123. else
  124. if (p^._low>hcaselabel^._low) and
  125. (p^._low>hcaselabel^._high) then
  126. if (hcaselabel^.statement = p^.statement) and
  127. (p^._low = hcaselabel^._high + 1) then
  128. begin
  129. p^._low := hcaselabel^._low;
  130. dispose(hcaselabel);
  131. end
  132. else
  133. insertlabel(p^.less)
  134. else
  135. if (p^._high<hcaselabel^._low) and
  136. (p^._high<hcaselabel^._high) then
  137. if (hcaselabel^.statement = p^.statement) and
  138. (p^._high+1 = hcaselabel^._low) then
  139. begin
  140. p^._high := hcaselabel^._high;
  141. dispose(hcaselabel);
  142. end
  143. else
  144. insertlabel(p^.greater)
  145. else Message(parser_e_double_caselabel);
  146. end;
  147. begin
  148. new(hcaselabel);
  149. hcaselabel^.less:=nil;
  150. hcaselabel^.greater:=nil;
  151. hcaselabel^.statement:=aktcaselabel;
  152. hcaselabel^.firstlabel:=first;
  153. getlabel(hcaselabel^._at);
  154. hcaselabel^._low:=l;
  155. hcaselabel^._high:=h;
  156. insertlabel(root);
  157. end;
  158. var
  159. code,caseexpr,p,instruc,elseblock : ptree;
  160. hl1,hl2 : TConstExprInt;
  161. casedeferror : boolean;
  162. begin
  163. consume(_CASE);
  164. caseexpr:=comp_expr(true);
  165. { determines result type }
  166. cleartempgen;
  167. do_firstpass(caseexpr);
  168. casedeferror:=false;
  169. casedef:=caseexpr^.resulttype;
  170. if (not assigned(casedef)) or
  171. not(is_ordinal(casedef)) then
  172. begin
  173. CGMessage(type_e_ordinal_expr_expected);
  174. { create a correct tree }
  175. disposetree(caseexpr);
  176. caseexpr:=genordinalconstnode(0,u32bitdef);
  177. { set error flag so no rangechecks are done }
  178. casedeferror:=true;
  179. end;
  180. consume(_OF);
  181. inc(statement_level);
  182. root:=nil;
  183. instruc:=nil;
  184. repeat
  185. getlabel(aktcaselabel);
  186. firstlabel:=true;
  187. { may be an instruction has more case labels }
  188. repeat
  189. p:=expr;
  190. cleartempgen;
  191. do_firstpass(p);
  192. hl1:=0;
  193. hl2:=0;
  194. if (p^.treetype=rangen) then
  195. begin
  196. { type checking for case statements }
  197. if is_subequal(casedef, p^.left^.resulttype) and
  198. is_subequal(casedef, p^.right^.resulttype) then
  199. begin
  200. hl1:=get_ordinal_value(p^.left);
  201. hl2:=get_ordinal_value(p^.right);
  202. if hl1>hl2 then
  203. CGMessage(parser_e_case_lower_less_than_upper_bound);
  204. if not casedeferror then
  205. begin
  206. testrange(casedef,hl1);
  207. testrange(casedef,hl2);
  208. end;
  209. end
  210. else
  211. CGMessage(parser_e_case_mismatch);
  212. newcaselabel(hl1,hl2,firstlabel);
  213. end
  214. else
  215. begin
  216. { type checking for case statements }
  217. if not is_subequal(casedef, p^.resulttype) then
  218. CGMessage(parser_e_case_mismatch);
  219. hl1:=get_ordinal_value(p);
  220. if not casedeferror then
  221. testrange(casedef,hl1);
  222. newcaselabel(hl1,hl1,firstlabel);
  223. end;
  224. disposetree(p);
  225. if token=_COMMA then
  226. consume(_COMMA)
  227. else
  228. break;
  229. firstlabel:=false;
  230. until false;
  231. consume(_COLON);
  232. { handles instruction block }
  233. p:=gensinglenode(labeln,statement);
  234. p^.labelnr:=aktcaselabel;
  235. { concats instruction }
  236. instruc:=gennode(statementn,instruc,p);
  237. if not((token=_ELSE) or (token=_OTHERWISE) or (token=_END)) then
  238. consume(_SEMICOLON);
  239. until (token=_ELSE) or (token=_OTHERWISE) or (token=_END);
  240. if (token=_ELSE) or (token=_OTHERWISE) then
  241. begin
  242. if not try_to_consume(_ELSE) then
  243. consume(_OTHERWISE);
  244. elseblock:=statements_til_end;
  245. end
  246. else
  247. begin
  248. elseblock:=nil;
  249. consume(_END);
  250. end;
  251. dec(statement_level);
  252. code:=gencasenode(caseexpr,instruc,root);
  253. code^.elseblock:=elseblock;
  254. case_statement:=code;
  255. end;
  256. function repeat_statement : ptree;
  257. var
  258. first,last,p_e : ptree;
  259. begin
  260. consume(_REPEAT);
  261. first:=nil;
  262. inc(statement_level);
  263. while token<>_UNTIL do
  264. begin
  265. if first=nil then
  266. begin
  267. last:=gennode(statementn,nil,statement);
  268. first:=last;
  269. end
  270. else
  271. begin
  272. last^.left:=gennode(statementn,nil,statement);
  273. last:=last^.left;
  274. end;
  275. if not try_to_consume(_SEMICOLON) then
  276. break;
  277. emptystats;
  278. end;
  279. consume(_UNTIL);
  280. dec(statement_level);
  281. first:=gensinglenode(blockn,first);
  282. p_e:=comp_expr(true);
  283. repeat_statement:=genloopnode(repeatn,p_e,first,nil,false);
  284. end;
  285. function while_statement : ptree;
  286. var
  287. p_e,p_a : ptree;
  288. begin
  289. consume(_WHILE);
  290. p_e:=comp_expr(true);
  291. consume(_DO);
  292. p_a:=statement;
  293. while_statement:=genloopnode(whilen,p_e,p_a,nil,false);
  294. end;
  295. function for_statement : ptree;
  296. var
  297. p_e,tovalue,p_a : ptree;
  298. backward : boolean;
  299. begin
  300. { parse loop header }
  301. consume(_FOR);
  302. p_e:=expr;
  303. if token=_DOWNTO then
  304. begin
  305. consume(_DOWNTO);
  306. backward:=true;
  307. end
  308. else
  309. begin
  310. consume(_TO);
  311. backward:=false;
  312. end;
  313. tovalue:=comp_expr(true);
  314. consume(_DO);
  315. { ... now the instruction }
  316. p_a:=statement;
  317. for_statement:=genloopnode(forn,p_e,tovalue,p_a,backward);
  318. end;
  319. function _with_statement : ptree;
  320. var
  321. right,p : ptree;
  322. i,levelcount : longint;
  323. withsymtable,symtab : psymtable;
  324. obj : pobjectdef;
  325. hp : ptree;
  326. begin
  327. p:=comp_expr(true);
  328. do_firstpass(p);
  329. set_varstate(p,false);
  330. right:=nil;
  331. if (not codegenerror) and
  332. (p^.resulttype^.deftype in [objectdef,recorddef]) then
  333. begin
  334. case p^.resulttype^.deftype of
  335. objectdef : begin
  336. obj:=pobjectdef(p^.resulttype);
  337. withsymtable:=new(pwithsymtable,init);
  338. withsymtable^.symsearch:=obj^.symtable^.symsearch;
  339. withsymtable^.defowner:=obj;
  340. symtab:=withsymtable;
  341. if (p^.treetype=loadn) and
  342. (p^.symtable=aktprocsym^.definition^.localst) then
  343. pwithsymtable(symtab)^.direct_with:=true;
  344. {symtab^.withnode:=p; not yet allocated !! }
  345. pwithsymtable(symtab)^.withrefnode:=p;
  346. levelcount:=1;
  347. obj:=obj^.childof;
  348. while assigned(obj) do
  349. begin
  350. symtab^.next:=new(pwithsymtable,init);
  351. symtab:=symtab^.next;
  352. symtab^.symsearch:=obj^.symtable^.symsearch;
  353. if (p^.treetype=loadn) and
  354. (p^.symtable=aktprocsym^.definition^.localst) then
  355. pwithsymtable(symtab)^.direct_with:=true;
  356. {symtab^.withnode:=p; not yet allocated !! }
  357. pwithsymtable(symtab)^.withrefnode:=p;
  358. symtab^.defowner:=obj;
  359. obj:=obj^.childof;
  360. inc(levelcount);
  361. end;
  362. symtab^.next:=symtablestack;
  363. symtablestack:=withsymtable;
  364. end;
  365. recorddef : begin
  366. symtab:=precorddef(p^.resulttype)^.symtable;
  367. levelcount:=1;
  368. withsymtable:=new(pwithsymtable,init);
  369. withsymtable^.symsearch:=symtab^.symsearch;
  370. withsymtable^.next:=symtablestack;
  371. if (p^.treetype=loadn) and
  372. (p^.symtable=aktprocsym^.definition^.localst) then
  373. pwithsymtable(withsymtable)^.direct_with:=true;
  374. {symtab^.withnode:=p; not yet allocated !! }
  375. pwithsymtable(withsymtable)^.withrefnode:=p;
  376. withsymtable^.defowner:=precorddef(p^.resulttype);
  377. symtablestack:=withsymtable;
  378. end;
  379. end;
  380. if token=_COMMA then
  381. begin
  382. consume(_COMMA);
  383. right:=_with_statement{$ifdef FPCPROCVAR}(){$endif};
  384. end
  385. else
  386. begin
  387. consume(_DO);
  388. if token<>_SEMICOLON then
  389. right:=statement
  390. else
  391. right:=nil;
  392. end;
  393. for i:=1 to levelcount do
  394. symtablestack:=symtablestack^.next;
  395. _with_statement:=genwithnode(pwithsymtable(withsymtable),p,right,levelcount);
  396. end
  397. else
  398. begin
  399. Message(parser_e_false_with_expr);
  400. { try to recover from error }
  401. if token=_COMMA then
  402. begin
  403. consume(_COMMA);
  404. hp:=_with_statement{$ifdef FPCPROCVAR}(){$endif};
  405. if (hp=nil) then; { remove warning about unused }
  406. end
  407. else
  408. begin
  409. consume(_DO);
  410. { ignore all }
  411. if token<>_SEMICOLON then
  412. statement;
  413. end;
  414. _with_statement:=nil;
  415. end;
  416. end;
  417. function with_statement : ptree;
  418. begin
  419. consume(_WITH);
  420. with_statement:=_with_statement;
  421. end;
  422. function raise_statement : ptree;
  423. var
  424. p,pobj,paddr,pframe : ptree;
  425. begin
  426. pobj:=nil;
  427. paddr:=nil;
  428. pframe:=nil;
  429. consume(_RAISE);
  430. if not(token in [_SEMICOLON,_END]) then
  431. begin
  432. { object }
  433. pobj:=comp_expr(true);
  434. if try_to_consume(_AT) then
  435. begin
  436. paddr:=comp_expr(true);
  437. if try_to_consume(_COMMA) then
  438. pframe:=comp_expr(true);
  439. end;
  440. end
  441. else
  442. begin
  443. if (block_type<>bt_except) then
  444. Message(parser_e_no_reraise_possible);
  445. end;
  446. p:=gennode(raisen,pobj,paddr);
  447. p^.frametree:=pframe;
  448. raise_statement:=p;
  449. end;
  450. function try_statement : ptree;
  451. var
  452. p_try_block,p_finally_block,first,last,
  453. p_default,p_specific,hp : ptree;
  454. ot : pobjectdef;
  455. sym : pvarsym;
  456. old_block_type : tblock_type;
  457. exceptsymtable : psymtable;
  458. objname : stringid;
  459. begin
  460. procinfo^.flags:=procinfo^.flags or
  461. pi_uses_exceptions;
  462. p_default:=nil;
  463. p_specific:=nil;
  464. { read statements to try }
  465. consume(_TRY);
  466. first:=nil;
  467. inc(statement_level);
  468. while (token<>_FINALLY) and (token<>_EXCEPT) do
  469. begin
  470. if first=nil then
  471. begin
  472. last:=gennode(statementn,nil,statement);
  473. first:=last;
  474. end
  475. else
  476. begin
  477. last^.left:=gennode(statementn,nil,statement);
  478. last:=last^.left;
  479. end;
  480. if not try_to_consume(_SEMICOLON) then
  481. break;
  482. emptystats;
  483. end;
  484. p_try_block:=gensinglenode(blockn,first);
  485. if try_to_consume(_FINALLY) then
  486. begin
  487. p_finally_block:=statements_til_end;
  488. try_statement:=gennode(tryfinallyn,p_try_block,p_finally_block);
  489. dec(statement_level);
  490. end
  491. else
  492. begin
  493. consume(_EXCEPT);
  494. old_block_type:=block_type;
  495. block_type:=bt_except;
  496. p_specific:=nil;
  497. if token=_ON then
  498. { catch specific exceptions }
  499. begin
  500. repeat
  501. consume(_ON);
  502. if token=_ID then
  503. begin
  504. objname:=pattern;
  505. getsym(objname,false);
  506. consume(_ID);
  507. { is a explicit name for the exception given ? }
  508. if try_to_consume(_COLON) then
  509. begin
  510. getsym(pattern,true);
  511. consume(_ID);
  512. if srsym^.typ=unitsym then
  513. begin
  514. consume(_POINT);
  515. getsymonlyin(punitsym(srsym)^.unitsymtable,pattern);
  516. consume(_ID);
  517. end;
  518. if (srsym^.typ=typesym) and
  519. (ptypesym(srsym)^.restype.def^.deftype=objectdef) and
  520. pobjectdef(ptypesym(srsym)^.restype.def)^.is_class then
  521. begin
  522. ot:=pobjectdef(ptypesym(srsym)^.restype.def);
  523. sym:=new(pvarsym,initdef(objname,ot));
  524. end
  525. else
  526. begin
  527. sym:=new(pvarsym,initdef(objname,new(perrordef,init)));
  528. if (srsym^.typ=typesym) then
  529. Message1(type_e_class_type_expected,ptypesym(srsym)^.restype.def^.typename)
  530. else
  531. Message1(type_e_class_type_expected,ot^.typename);
  532. end;
  533. exceptsymtable:=new(psymtable,init(stt_exceptsymtable));
  534. exceptsymtable^.insert(sym);
  535. { insert the exception symtable stack }
  536. exceptsymtable^.next:=symtablestack;
  537. symtablestack:=exceptsymtable;
  538. end
  539. else
  540. begin
  541. { check if type is valid, must be done here because
  542. with "e: Exception" the e is not necessary }
  543. if srsym=nil then
  544. begin
  545. Message1(sym_e_id_not_found,objname);
  546. srsym:=generrorsym;
  547. end;
  548. { only exception type }
  549. if srsym^.typ=unitsym then
  550. begin
  551. consume(_POINT);
  552. getsymonlyin(punitsym(srsym)^.unitsymtable,pattern);
  553. consume(_ID);
  554. end;
  555. if (srsym^.typ=typesym) and
  556. (ptypesym(srsym)^.restype.def^.deftype=objectdef) and
  557. pobjectdef(ptypesym(srsym)^.restype.def)^.is_class then
  558. ot:=pobjectdef(ptypesym(srsym)^.restype.def)
  559. else
  560. begin
  561. ot:=pobjectdef(generrordef);
  562. if (srsym^.typ=typesym) then
  563. Message1(type_e_class_type_expected,ptypesym(srsym)^.restype.def^.typename)
  564. else
  565. Message1(type_e_class_type_expected,ot^.typename);
  566. end;
  567. exceptsymtable:=nil;
  568. end;
  569. end
  570. else
  571. consume(_ID);
  572. consume(_DO);
  573. hp:=gennode(onn,nil,statement);
  574. if ot^.deftype=errordef then
  575. begin
  576. disposetree(hp);
  577. hp:=genzeronode(errorn);
  578. end;
  579. if p_specific=nil then
  580. begin
  581. last:=hp;
  582. p_specific:=last;
  583. end
  584. else
  585. begin
  586. last^.left:=hp;
  587. last:=last^.left;
  588. end;
  589. { set the informations }
  590. last^.excepttype:=ot;
  591. last^.exceptsymtable:=exceptsymtable;
  592. last^.disposetyp:=dt_onn;
  593. { remove exception symtable }
  594. if assigned(exceptsymtable) then
  595. dellexlevel;
  596. if not try_to_consume(_SEMICOLON) then
  597. break;
  598. emptystats;
  599. until (token=_END) or(token=_ELSE);
  600. if token=_ELSE then
  601. { catch the other exceptions }
  602. begin
  603. consume(_ELSE);
  604. p_default:=statements_til_end;
  605. end
  606. else
  607. consume(_END);
  608. end
  609. else
  610. { catch all exceptions }
  611. begin
  612. p_default:=statements_til_end;
  613. end;
  614. dec(statement_level);
  615. block_type:=old_block_type;
  616. try_statement:=genloopnode(tryexceptn,p_try_block,p_specific,p_default,false);
  617. end;
  618. end;
  619. function exit_statement : ptree;
  620. var
  621. p : ptree;
  622. begin
  623. consume(_EXIT);
  624. if try_to_consume(_LKLAMMER) then
  625. begin
  626. p:=comp_expr(true);
  627. consume(_RKLAMMER);
  628. if (block_type=bt_except) then
  629. Message(parser_e_exit_with_argument_not__possible);
  630. if procinfo^.returntype.def=pdef(voiddef) then
  631. Message(parser_e_void_function);
  632. end
  633. else
  634. p:=nil;
  635. p:=gensinglenode(exitn,p);
  636. // p^.resulttype:=procinfo^.returntype.def;
  637. p^.resulttype:=voiddef;
  638. exit_statement:=p;
  639. end;
  640. function _asm_statement : ptree;
  641. var
  642. asmstat : ptree;
  643. Marker : Pai;
  644. begin
  645. Inside_asm_statement:=true;
  646. case aktasmmode of
  647. asmmode_none : ; { just be there to allow to a compile without
  648. any assembler readers }
  649. {$ifdef i386}
  650. {$ifndef NoRA386Att}
  651. asmmode_i386_att:
  652. asmstat:=ra386att.assemble;
  653. {$endif NoRA386Att}
  654. {$ifndef NoRA386Int}
  655. asmmode_i386_intel:
  656. asmstat:=ra386int.assemble;
  657. {$endif NoRA386Int}
  658. {$ifndef NoRA386Dir}
  659. asmmode_i386_direct:
  660. begin
  661. if not target_asm.allowdirect then
  662. Message(parser_f_direct_assembler_not_allowed);
  663. if (pocall_inline in aktprocsym^.definition^.proccalloptions) then
  664. Begin
  665. Message1(parser_w_not_supported_for_inline,'direct asm');
  666. Message(parser_w_inlining_disabled);
  667. exclude(aktprocsym^.definition^.proccalloptions,pocall_inline);
  668. End;
  669. asmstat:=ra386dir.assemble;
  670. end;
  671. {$endif NoRA386Dir}
  672. {$endif}
  673. {$ifdef m68k}
  674. {$ifndef NoRA68kMot}
  675. asmmode_m68k_mot:
  676. asmstat:=ra68kmot.assemble;
  677. {$endif NoRA68kMot}
  678. {$endif}
  679. else
  680. Message(parser_f_assembler_reader_not_supported);
  681. end;
  682. { Read first the _ASM statement }
  683. consume(_ASM);
  684. {$ifndef newcg}
  685. { END is read }
  686. if try_to_consume(_LECKKLAMMER) then
  687. begin
  688. { it's possible to specify the modified registers }
  689. asmstat^.object_preserved:=true;
  690. if token<>_RECKKLAMMER then
  691. repeat
  692. { uppercase, because it's a CSTRING }
  693. uppervar(pattern);
  694. {$ifdef i386}
  695. if pattern='EAX' then
  696. usedinproc:=usedinproc or ($80 shr byte(R_EAX))
  697. else if pattern='EBX' then
  698. usedinproc:=usedinproc or ($80 shr byte(R_EBX))
  699. else if pattern='ECX' then
  700. usedinproc:=usedinproc or ($80 shr byte(R_ECX))
  701. else if pattern='EDX' then
  702. usedinproc:=usedinproc or ($80 shr byte(R_EDX))
  703. else if pattern='ESI' then
  704. begin
  705. usedinproc:=usedinproc or ($80 shr byte(R_ESI));
  706. asmstat^.object_preserved:=false;
  707. end
  708. else if pattern='EDI' then
  709. usedinproc:=usedinproc or ($80 shr byte(R_EDI))
  710. {$endif i386}
  711. {$ifdef m68k}
  712. if pattern='D0' then
  713. usedinproc:=usedinproc or ($800 shr word(R_D0))
  714. else if pattern='D1' then
  715. usedinproc:=usedinproc or ($800 shr word(R_D1))
  716. else if pattern='D6' then
  717. usedinproc:=usedinproc or ($800 shr word(R_D6))
  718. else if pattern='A0' then
  719. usedinproc:=usedinproc or ($800 shr word(R_A0))
  720. else if pattern='A1' then
  721. usedinproc:=usedinproc or ($800 shr word(R_A1))
  722. {$endif m68k}
  723. else consume(_RECKKLAMMER);
  724. consume(_CSTRING);
  725. if not try_to_consume(_COMMA) then
  726. break;
  727. until false;
  728. consume(_RECKKLAMMER);
  729. end
  730. else usedinproc:=$ff;
  731. {$endif newcg}
  732. { mark the start and the end of the assembler block for the optimizer }
  733. If Assigned(AsmStat^.p_asm) Then
  734. Begin
  735. Marker := New(Pai_Marker, Init(AsmBlockStart));
  736. AsmStat^.p_asm^.Insert(Marker);
  737. Marker := New(Pai_Marker, Init(AsmBlockEnd));
  738. AsmStat^.p_asm^.Concat(Marker);
  739. End;
  740. Inside_asm_statement:=false;
  741. _asm_statement:=asmstat;
  742. end;
  743. function new_dispose_statement : ptree;
  744. var
  745. p,p2 : ptree;
  746. ht : ttoken;
  747. again : boolean; { dummy for do_proc_call }
  748. destructorname : stringid;
  749. sym : psym;
  750. classh : pobjectdef;
  751. pd,pd2 : pdef;
  752. destructorpos,storepos : tfileposinfo;
  753. tt : ttreetyp;
  754. begin
  755. ht:=token;
  756. if try_to_consume(_NEW) then
  757. tt:=hnewn
  758. else
  759. begin
  760. consume(_DISPOSE);
  761. tt:=hdisposen;
  762. end;
  763. consume(_LKLAMMER);
  764. p:=comp_expr(true);
  765. { calc return type }
  766. cleartempgen;
  767. do_firstpass(p);
  768. set_varstate(p,tt=hdisposen);
  769. {var o:Pobject;
  770. begin
  771. new(o,init); (*Also a valid new statement*)
  772. end;}
  773. if try_to_consume(_COMMA) then
  774. begin
  775. { extended syntax of new and dispose }
  776. { function styled new is handled in factor }
  777. { destructors have no parameters }
  778. destructorname:=pattern;
  779. destructorpos:=tokenpos;
  780. consume(_ID);
  781. pd:=p^.resulttype;
  782. if pd=nil then
  783. pd:=generrordef;
  784. pd2:=pd;
  785. if (pd^.deftype<>pointerdef) then
  786. begin
  787. Message1(type_e_pointer_type_expected,pd^.typename);
  788. p:=factor(false);
  789. consume(_RKLAMMER);
  790. new_dispose_statement:=genzeronode(errorn);
  791. exit;
  792. end;
  793. { first parameter must be an object or class }
  794. if ppointerdef(pd)^.pointertype.def^.deftype<>objectdef then
  795. begin
  796. Message(parser_e_pointer_to_class_expected);
  797. new_dispose_statement:=factor(false);
  798. consume_all_until(_RKLAMMER);
  799. consume(_RKLAMMER);
  800. exit;
  801. end;
  802. { check, if the first parameter is a pointer to a _class_ }
  803. classh:=pobjectdef(ppointerdef(pd)^.pointertype.def);
  804. if classh^.is_class then
  805. begin
  806. Message(parser_e_no_new_or_dispose_for_classes);
  807. new_dispose_statement:=factor(false);
  808. consume_all_until(_RKLAMMER);
  809. consume(_RKLAMMER);
  810. exit;
  811. end;
  812. { search cons-/destructor, also in parent classes }
  813. storepos:=tokenpos;
  814. tokenpos:=destructorpos;
  815. sym:=search_class_member(classh,destructorname);
  816. tokenpos:=storepos;
  817. { the second parameter of new/dispose must be a call }
  818. { to a cons-/destructor }
  819. if (not assigned(sym)) or (sym^.typ<>procsym) then
  820. begin
  821. if tt=hnewn then
  822. Message(parser_e_expr_have_to_be_constructor_call)
  823. else
  824. Message(parser_e_expr_have_to_be_destructor_call);
  825. new_dispose_statement:=genzeronode(errorn);
  826. end
  827. else
  828. begin
  829. p2:=gensinglenode(tt,p);
  830. if ht=_NEW then
  831. begin
  832. { Constructors can take parameters.}
  833. p2^.resulttype:=ppointerdef(pd)^.pointertype.def;
  834. do_member_read(false,sym,p2,pd,again);
  835. end
  836. else
  837. begin
  838. if (m_tp in aktmodeswitches) then
  839. begin
  840. { Constructors can take parameters.}
  841. p2^.resulttype:=ppointerdef(pd)^.pointertype.def;
  842. do_member_read(false,sym,p2,pd,again);
  843. end
  844. else
  845. begin
  846. p2:=genmethodcallnode(pprocsym(sym),srsymtable,p2);
  847. { support dispose(p,done()); }
  848. if try_to_consume(_LKLAMMER) then
  849. begin
  850. if not try_to_consume(_RKLAMMER) then
  851. begin
  852. Message(parser_e_no_paras_for_destructor);
  853. consume_all_until(_RKLAMMER);
  854. consume(_RKLAMMER);
  855. end;
  856. end;
  857. end;
  858. end;
  859. { we need the real called method }
  860. cleartempgen;
  861. do_firstpass(p2);
  862. if not codegenerror then
  863. begin
  864. if (ht=_NEW) and (p2^.procdefinition^.proctypeoption<>potype_constructor) then
  865. Message(parser_e_expr_have_to_be_constructor_call);
  866. if (ht=_DISPOSE) and (p2^.procdefinition^.proctypeoption<>potype_destructor) then
  867. Message(parser_e_expr_have_to_be_destructor_call);
  868. if ht=_NEW then
  869. begin
  870. p2:=gennode(assignn,getcopy(p),gensinglenode(newn,p2));
  871. p2^.right^.resulttype:=pd2;
  872. end;
  873. end;
  874. new_dispose_statement:=p2;
  875. end;
  876. end
  877. else
  878. begin
  879. if p^.resulttype=nil then
  880. p^.resulttype:=generrordef;
  881. if (p^.resulttype^.deftype<>pointerdef) then
  882. Begin
  883. Message1(type_e_pointer_type_expected,p^.resulttype^.typename);
  884. new_dispose_statement:=genzeronode(errorn);
  885. end
  886. else
  887. begin
  888. if (ppointerdef(p^.resulttype)^.pointertype.def^.deftype=objectdef) and
  889. (oo_has_vmt in pobjectdef(ppointerdef(p^.resulttype)^.pointertype.def)^.objectoptions) then
  890. Message(parser_w_use_extended_syntax_for_objects);
  891. if (ppointerdef(p^.resulttype)^.pointertype.def^.deftype=orddef) and
  892. (porddef(ppointerdef(p^.resulttype)^.pointertype.def)^.typ=uvoid) then
  893. if (m_tp in aktmodeswitches) or
  894. (m_delphi in aktmodeswitches) then
  895. Message(parser_w_no_new_dispose_on_void_pointers)
  896. else
  897. Message(parser_e_no_new_dispose_on_void_pointers);
  898. case ht of
  899. _NEW : new_dispose_statement:=gensinglenode(simplenewn,p);
  900. _DISPOSE : new_dispose_statement:=gensinglenode(simpledisposen,p);
  901. end;
  902. end;
  903. end;
  904. consume(_RKLAMMER);
  905. end;
  906. function statement_block(starttoken : ttoken) : ptree;
  907. var
  908. first,last : ptree;
  909. filepos : tfileposinfo;
  910. begin
  911. first:=nil;
  912. filepos:=tokenpos;
  913. consume(starttoken);
  914. inc(statement_level);
  915. while not(token in [_END,_FINALIZATION]) do
  916. begin
  917. if first=nil then
  918. begin
  919. last:=gennode(statementn,nil,statement);
  920. first:=last;
  921. end
  922. else
  923. begin
  924. last^.left:=gennode(statementn,nil,statement);
  925. last:=last^.left;
  926. end;
  927. if (token in [_END,_FINALIZATION]) then
  928. break
  929. else
  930. begin
  931. { if no semicolon, then error and go on }
  932. if token<>_SEMICOLON then
  933. begin
  934. consume(_SEMICOLON);
  935. consume_all_until(_SEMICOLON);
  936. end;
  937. consume(_SEMICOLON);
  938. end;
  939. emptystats;
  940. end;
  941. { don't consume the finalization token, it is consumed when
  942. reading the finalization block, but allow it only after
  943. an initalization ! }
  944. if (starttoken<>_INITIALIZATION) or (token<>_FINALIZATION) then
  945. consume(_END);
  946. dec(statement_level);
  947. last:=gensinglenode(blockn,first);
  948. set_tree_filepos(last,filepos);
  949. statement_block:=last;
  950. end;
  951. function statement : ptree;
  952. var
  953. p : ptree;
  954. code : ptree;
  955. labelnr : pasmlabel;
  956. filepos : tfileposinfo;
  957. sr : plabelsym;
  958. label
  959. ready;
  960. begin
  961. filepos:=tokenpos;
  962. case token of
  963. _GOTO : begin
  964. if not(cs_support_goto in aktmoduleswitches)then
  965. Message(sym_e_goto_and_label_not_supported);
  966. consume(_GOTO);
  967. if (token<>_INTCONST) and (token<>_ID) then
  968. begin
  969. Message(sym_e_label_not_found);
  970. code:=genzeronode(errorn);
  971. end
  972. else
  973. begin
  974. getsym(pattern,true);
  975. consume(token);
  976. if srsym^.typ<>labelsym then
  977. begin
  978. Message(sym_e_id_is_no_label_id);
  979. code:=genzeronode(errorn);
  980. end
  981. else
  982. begin
  983. code:=genlabelnode(goton,plabelsym(srsym)^.lab);
  984. code^.labsym:=plabelsym(srsym);
  985. { set flag that this label is used }
  986. plabelsym(srsym)^.used:=true;
  987. end;
  988. end;
  989. end;
  990. _BEGIN : code:=statement_block(_BEGIN);
  991. _IF : code:=if_statement;
  992. _CASE : code:=case_statement;
  993. _REPEAT : code:=repeat_statement;
  994. _WHILE : code:=while_statement;
  995. _FOR : code:=for_statement;
  996. _NEW,_DISPOSE : code:=new_dispose_statement;
  997. _WITH : code:=with_statement;
  998. _TRY : code:=try_statement;
  999. _RAISE : code:=raise_statement;
  1000. { semicolons,else until and end are ignored }
  1001. _SEMICOLON,
  1002. _ELSE,
  1003. _UNTIL,
  1004. _END:
  1005. code:=genzeronode(niln);
  1006. _FAIL : begin
  1007. { internalerror(100); }
  1008. if (aktprocsym^.definition^.proctypeoption<>potype_constructor) then
  1009. Message(parser_e_fail_only_in_constructor);
  1010. consume(_FAIL);
  1011. code:=genzeronode(failn);
  1012. end;
  1013. _EXIT : code:=exit_statement;
  1014. _ASM : begin
  1015. code:=_asm_statement;
  1016. end;
  1017. _EOF : begin
  1018. Message(scan_f_end_of_file);
  1019. end;
  1020. else
  1021. begin
  1022. if (token in [_INTCONST,_ID]) then
  1023. begin
  1024. getsym(pattern,true);
  1025. lastsymknown:=true;
  1026. lastsrsym:=srsym;
  1027. { it is NOT necessarily the owner
  1028. it can be a withsymtable !!! }
  1029. lastsrsymtable:=srsymtable;
  1030. if assigned(srsym) and (srsym^.typ=labelsym) then
  1031. begin
  1032. consume(token);
  1033. consume(_COLON);
  1034. { we must preserve srsym to set code later }
  1035. sr:=plabelsym(srsym);
  1036. if sr^.defined then
  1037. Message(sym_e_label_already_defined);
  1038. sr^.defined:=true;
  1039. { statement modifies srsym }
  1040. labelnr:=sr^.lab;
  1041. lastsymknown:=false;
  1042. { the pointer to the following instruction }
  1043. { isn't a very clean way }
  1044. code:=gensinglenode(labeln,statement{$ifdef FPCPROCVAR}(){$endif});
  1045. code^.labelnr:=labelnr;
  1046. sr^.code:=code;
  1047. { sorry, but there is a jump the easiest way }
  1048. goto ready;
  1049. end;
  1050. end;
  1051. p:=expr;
  1052. if not(p^.treetype in [calln,assignn,breakn,inlinen,
  1053. continuen]) then
  1054. Message(cg_e_illegal_expression);
  1055. { specify that we don't use the value returned by the call }
  1056. { Question : can this be also improtant
  1057. for inlinen ??
  1058. it is used for :
  1059. - dispose of temp stack space
  1060. - dispose on FPU stack }
  1061. if p^.treetype=calln then
  1062. p^.return_value_used:=false;
  1063. code:=p;
  1064. end;
  1065. end;
  1066. ready:
  1067. if assigned(code) then
  1068. set_tree_filepos(code,filepos);
  1069. statement:=code;
  1070. end;
  1071. function block(islibrary : boolean) : ptree;
  1072. var
  1073. funcretsym : pfuncretsym;
  1074. storepos : tfileposinfo;
  1075. begin
  1076. { do we have an assembler block without the po_assembler?
  1077. we should allow this for Delphi compatibility (PFV) }
  1078. if (token=_ASM) and (m_delphi in aktmodeswitches) then
  1079. begin
  1080. include(aktprocsym^.definition^.procoptions,po_assembler);
  1081. block:=assembler_block;
  1082. exit;
  1083. end;
  1084. if procinfo^.returntype.def<>pdef(voiddef) then
  1085. begin
  1086. { if the current is a function aktprocsym is non nil }
  1087. { and there is a local symtable set }
  1088. storepos:=tokenpos;
  1089. tokenpos:=aktprocsym^.fileinfo;
  1090. funcretsym:=new(pfuncretsym,init(aktprocsym^.name,procinfo));
  1091. { insert in local symtable }
  1092. symtablestack^.insert(funcretsym);
  1093. tokenpos:=storepos;
  1094. if ret_in_acc(procinfo^.returntype.def) or (procinfo^.returntype.def^.deftype=floatdef) then
  1095. procinfo^.return_offset:=-funcretsym^.address;
  1096. procinfo^.funcretsym:=funcretsym;
  1097. { insert result also if support is on }
  1098. if (m_result in aktmodeswitches) then
  1099. begin
  1100. procinfo^.resultfuncretsym:=new(pfuncretsym,init('RESULT',procinfo));
  1101. symtablestack^.insert(procinfo^.resultfuncretsym);
  1102. end;
  1103. end;
  1104. read_declarations(islibrary);
  1105. { temporary space is set, while the BEGIN of the procedure }
  1106. if (symtablestack^.symtabletype=localsymtable) then
  1107. procinfo^.firsttemp_offset := -symtablestack^.datasize
  1108. else
  1109. procinfo^.firsttemp_offset := 0;
  1110. { space for the return value }
  1111. { !!!!! this means that we can not set the return value
  1112. in a subfunction !!!!! }
  1113. { because we don't know yet where the address is }
  1114. if procinfo^.returntype.def<>pdef(voiddef) then
  1115. begin
  1116. if ret_in_acc(procinfo^.returntype.def) or (procinfo^.returntype.def^.deftype=floatdef) then
  1117. { if (procinfo^.retdef^.deftype=orddef) or
  1118. (procinfo^.retdef^.deftype=pointerdef) or
  1119. (procinfo^.retdef^.deftype=enumdef) or
  1120. (procinfo^.retdef^.deftype=procvardef) or
  1121. (procinfo^.retdef^.deftype=floatdef) or
  1122. (
  1123. (procinfo^.retdef^.deftype=setdef) and
  1124. (psetdef(procinfo^.retdef)^.settype=smallset)
  1125. ) then }
  1126. begin
  1127. { the space has been set in the local symtable }
  1128. procinfo^.return_offset:=-funcretsym^.address;
  1129. if ((procinfo^.flags and pi_operator)<>0) and
  1130. assigned(opsym) then
  1131. {opsym^.address:=procinfo^.para_offset; is wrong PM }
  1132. opsym^.address:=-procinfo^.return_offset;
  1133. { eax is modified by a function }
  1134. {$ifndef newcg}
  1135. {$ifdef i386}
  1136. usedinproc:=usedinproc or ($80 shr byte(R_EAX));
  1137. if is_64bitint(procinfo^.returntype.def) then
  1138. usedinproc:=usedinproc or ($80 shr byte(R_EDX))
  1139. {$endif}
  1140. {$ifdef m68k}
  1141. usedinproc:=usedinproc or ($800 shr word(R_D0));
  1142. if is_64bitint(procinfo^.retdef) then
  1143. usedinproc:=usedinproc or ($800 shr byte(R_D1))
  1144. {$endif}
  1145. {$endif newcg}
  1146. end;
  1147. end;
  1148. {Unit initialization?.}
  1149. if (lexlevel=unit_init_level) and (current_module^.is_unit)
  1150. or islibrary then
  1151. begin
  1152. if (token=_END) then
  1153. begin
  1154. consume(_END);
  1155. { We need at least a node, else the entry/exit code is not
  1156. generated and thus no PASCALMAIN symbol which we need (PFV) }
  1157. if islibrary then
  1158. block:=genzeronode(nothingn)
  1159. else
  1160. block:=nil;
  1161. end
  1162. else
  1163. begin
  1164. if token=_INITIALIZATION then
  1165. begin
  1166. current_module^.flags:=current_module^.flags or uf_init;
  1167. block:=statement_block(_INITIALIZATION);
  1168. end
  1169. else if (token=_FINALIZATION) then
  1170. begin
  1171. if (current_module^.flags and uf_finalize)<>0 then
  1172. block:=statement_block(_FINALIZATION)
  1173. else
  1174. begin
  1175. { can we allow no INITIALIZATION for DLL ??
  1176. I think it should work PM }
  1177. block:=nil;
  1178. exit;
  1179. end;
  1180. end
  1181. else
  1182. begin
  1183. current_module^.flags:=current_module^.flags or uf_init;
  1184. block:=statement_block(_BEGIN);
  1185. end;
  1186. end;
  1187. end
  1188. else
  1189. block:=statement_block(_BEGIN);
  1190. end;
  1191. function assembler_block : ptree;
  1192. begin
  1193. read_declarations(false);
  1194. { temporary space is set, while the BEGIN of the procedure }
  1195. if symtablestack^.symtabletype=localsymtable then
  1196. procinfo^.firsttemp_offset := -symtablestack^.datasize
  1197. else
  1198. procinfo^.firsttemp_offset := 0;
  1199. { assembler code does not allocate }
  1200. { space for the return value }
  1201. if procinfo^.returntype.def<>pdef(voiddef) then
  1202. begin
  1203. if ret_in_acc(procinfo^.returntype.def) then
  1204. begin
  1205. { in assembler code the result should be directly in %eax
  1206. procinfo^.retoffset:=procinfo^.firsttemp-procinfo^.retdef^.size;
  1207. procinfo^.firsttemp:=procinfo^.retoffset; }
  1208. {$ifndef newcg}
  1209. {$ifdef i386}
  1210. usedinproc:=usedinproc or ($80 shr byte(R_EAX))
  1211. {$endif}
  1212. {$ifdef m68k}
  1213. usedinproc:=usedinproc or ($800 shr word(R_D0))
  1214. {$endif}
  1215. {$endif newcg}
  1216. end
  1217. {
  1218. else if not is_fpu(procinfo^.retdef) then
  1219. should we allow assembler functions of big elements ?
  1220. YES (FK)!!
  1221. Message(parser_e_asm_incomp_with_function_return);
  1222. }
  1223. end;
  1224. { set the framepointer to esp for assembler functions }
  1225. { but only if the are no local variables }
  1226. { added no parameter also (PM) }
  1227. { disable for methods, because self pointer is expected }
  1228. { at -8(%ebp) (JM) }
  1229. { why if se use %esp then self is still at the correct address PM }
  1230. if {not(assigned(procinfo^._class)) and}
  1231. (po_assembler in aktprocsym^.definition^.procoptions) and
  1232. (aktprocsym^.definition^.localst^.datasize=0) and
  1233. (aktprocsym^.definition^.parast^.datasize=0) and
  1234. not(ret_in_param(aktprocsym^.definition^.rettype.def)) then
  1235. begin
  1236. procinfo^.framepointer:=stack_pointer;
  1237. { set the right value for parameters }
  1238. dec(aktprocsym^.definition^.parast^.address_fixup,target_os.size_of_pointer);
  1239. dec(procinfo^.para_offset,target_os.size_of_pointer);
  1240. end;
  1241. { force the asm statement }
  1242. if token<>_ASM then
  1243. consume(_ASM);
  1244. procinfo^.Flags := procinfo^.Flags Or pi_is_assembler;
  1245. assembler_block:=_asm_statement;
  1246. { becuase the END is already read we need to get the
  1247. last_endtoken_filepos here (PFV) }
  1248. last_endtoken_filepos:=tokenpos;
  1249. end;
  1250. end.
  1251. {
  1252. $Log$
  1253. Revision 1.9 2000-10-01 19:48:25 peter
  1254. * lot of compile updates for cg11
  1255. Revision 1.8 2000/09/24 21:19:50 peter
  1256. * delphi compile fixes
  1257. Revision 1.7 2000/09/24 15:06:24 peter
  1258. * use defines.inc
  1259. Revision 1.6 2000/08/27 16:11:52 peter
  1260. * moved some util functions from globals,cobjects to cutils
  1261. * splitted files into finput,fmodule
  1262. Revision 1.5 2000/08/12 15:41:15 peter
  1263. * fixed bug 1096 (merged)
  1264. Revision 1.4 2000/08/12 06:46:06 florian
  1265. + case statement for int64/qword implemented
  1266. Revision 1.3 2000/07/13 12:08:27 michael
  1267. + patched to 1.1.0 with former 1.09patch from peter
  1268. Revision 1.2 2000/07/13 11:32:45 michael
  1269. + removed logs
  1270. }