pstatmnt.pas 49 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428
  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
  22. tokens,node;
  23. function statement_block(starttoken : ttoken) : tnode;
  24. { reads an assembler block }
  25. function assembler_block : tnode;
  26. implementation
  27. uses
  28. { common }
  29. cutils,
  30. { global }
  31. globtype,globals,verbose,
  32. systems,cpuinfo,
  33. { aasm }
  34. cpubase,aasm,
  35. { symtable }
  36. symconst,symbase,symtype,symdef,symsym,symtable,types,
  37. { pass 1 }
  38. pass_1,htypechk,
  39. nbas,nmat,nadd,ncal,nmem,nset,ncnv,ninl,ncon,nld,nflw,
  40. { parser }
  41. scanner,
  42. pbase,pexpr,
  43. { codegen }
  44. tgcpu,cgbase
  45. {$ifdef i386}
  46. {$ifndef NoRa386Int}
  47. ,ra386int
  48. {$endif NoRa386Int}
  49. {$ifndef NoRa386Att}
  50. ,ra386att
  51. {$endif NoRa386Att}
  52. {$ifndef NoRa386Dir}
  53. ,ra386dir
  54. {$endif NoRa386Dir}
  55. {$endif i386}
  56. {$ifdef m68k}
  57. {$ifndef NoRa68kMot}
  58. ,ra68kmot
  59. {$endif NoRa68kMot}
  60. {$endif m68k}
  61. { codegen }
  62. {$ifdef newcg}
  63. ,cgbase
  64. {$endif newcg}
  65. ;
  66. function statement : tnode;forward;
  67. function if_statement : tnode;
  68. var
  69. ex,if_a,else_a : tnode;
  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 : tnode;
  86. var
  87. first,last : tstatementnode;
  88. begin
  89. first:=nil;
  90. while token<>_END do
  91. begin
  92. if first=nil then
  93. begin
  94. last:=cstatementnode.create(nil,statement);
  95. first:=last;
  96. end
  97. else
  98. begin
  99. last.left:=cstatementnode.create(nil,statement);
  100. last:=tstatementnode(last.left);
  101. end;
  102. if not try_to_consume(_SEMICOLON) then
  103. break;
  104. consume_emptystats;
  105. end;
  106. consume(_END);
  107. statements_til_end:=cblocknode.create(first);
  108. end;
  109. function case_statement : tnode;
  110. var
  111. { contains the label number of currently parsed case block }
  112. aktcaselabel : tasmlabel;
  113. firstlabel : boolean;
  114. root : pcaserecord;
  115. { the typ of the case expression }
  116. casedef : tdef;
  117. procedure newcaselabel(l,h : TConstExprInt;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 : tnode;
  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_resulttypepass(caseexpr);
  168. casedeferror:=false;
  169. casedef:=caseexpr.resulttype.def;
  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. caseexpr.free;
  176. caseexpr:=cordconstnode.create(0,u32bittype);
  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. if is_widechar(casedef) then
  191. begin
  192. if (p.nodetype=rangen) then
  193. begin
  194. trangenode(p).left:=ctypeconvnode.create(trangenode(p).left,cwidechartype);
  195. trangenode(p).right:=ctypeconvnode.create(trangenode(p).right,cwidechartype);
  196. end
  197. else
  198. p:=ctypeconvnode.create(p,cwidechartype);
  199. do_resulttypepass(p);
  200. end;
  201. hl1:=0;
  202. hl2:=0;
  203. if (p.nodetype=rangen) then
  204. begin
  205. { type checking for case statements }
  206. if is_subequal(casedef, trangenode(p).left.resulttype.def) and
  207. is_subequal(casedef, trangenode(p).right.resulttype.def) then
  208. begin
  209. hl1:=get_ordinal_value(trangenode(p).left);
  210. hl2:=get_ordinal_value(trangenode(p).right);
  211. if hl1>hl2 then
  212. CGMessage(parser_e_case_lower_less_than_upper_bound);
  213. if not casedeferror then
  214. begin
  215. testrange(casedef,hl1,false);
  216. testrange(casedef,hl2,false);
  217. end;
  218. end
  219. else
  220. CGMessage(parser_e_case_mismatch);
  221. newcaselabel(hl1,hl2,firstlabel);
  222. end
  223. else
  224. begin
  225. { type checking for case statements }
  226. if not is_subequal(casedef, p.resulttype.def) then
  227. CGMessage(parser_e_case_mismatch);
  228. hl1:=get_ordinal_value(p);
  229. if not casedeferror then
  230. testrange(casedef,hl1,false);
  231. newcaselabel(hl1,hl1,firstlabel);
  232. end;
  233. p.free;
  234. if token=_COMMA then
  235. consume(_COMMA)
  236. else
  237. break;
  238. firstlabel:=false;
  239. until false;
  240. consume(_COLON);
  241. { handles instruction block }
  242. p:=clabelnode.createcase(aktcaselabel,statement);
  243. { concats instruction }
  244. instruc:=cstatementnode.create(instruc,p);
  245. if not((token=_ELSE) or (token=_OTHERWISE) or (token=_END)) then
  246. consume(_SEMICOLON);
  247. until (token=_ELSE) or (token=_OTHERWISE) or (token=_END);
  248. if (token=_ELSE) or (token=_OTHERWISE) then
  249. begin
  250. if not try_to_consume(_ELSE) then
  251. consume(_OTHERWISE);
  252. elseblock:=statements_til_end;
  253. end
  254. else
  255. begin
  256. elseblock:=nil;
  257. consume(_END);
  258. end;
  259. dec(statement_level);
  260. code:=ccasenode.create(caseexpr,instruc,root);
  261. tcasenode(code).elseblock:=elseblock;
  262. case_statement:=code;
  263. end;
  264. function repeat_statement : tnode;
  265. var
  266. first,last,p_e : tnode;
  267. begin
  268. consume(_REPEAT);
  269. first:=nil;
  270. inc(statement_level);
  271. while token<>_UNTIL do
  272. begin
  273. if first=nil then
  274. begin
  275. last:=cstatementnode.create(nil,statement);
  276. first:=last;
  277. end
  278. else
  279. begin
  280. tstatementnode(last).left:=cstatementnode.create(nil,statement);
  281. last:=tstatementnode(last).left;
  282. end;
  283. if not try_to_consume(_SEMICOLON) then
  284. break;
  285. consume_emptystats;
  286. end;
  287. consume(_UNTIL);
  288. dec(statement_level);
  289. first:=cblocknode.create(first);
  290. p_e:=comp_expr(true);
  291. repeat_statement:=genloopnode(repeatn,p_e,first,nil,false);
  292. end;
  293. function while_statement : tnode;
  294. var
  295. p_e,p_a : tnode;
  296. begin
  297. consume(_WHILE);
  298. p_e:=comp_expr(true);
  299. consume(_DO);
  300. p_a:=statement;
  301. while_statement:=genloopnode(whilen,p_e,p_a,nil,false);
  302. end;
  303. function for_statement : tnode;
  304. var
  305. p_e,tovalue,p_a : tnode;
  306. backward : boolean;
  307. begin
  308. { parse loop header }
  309. consume(_FOR);
  310. p_e:=expr;
  311. if token=_DOWNTO then
  312. begin
  313. consume(_DOWNTO);
  314. backward:=true;
  315. end
  316. else
  317. begin
  318. consume(_TO);
  319. backward:=false;
  320. end;
  321. tovalue:=comp_expr(true);
  322. consume(_DO);
  323. { ... now the instruction }
  324. p_a:=statement;
  325. for_statement:=genloopnode(forn,p_e,tovalue,p_a,backward);
  326. end;
  327. function _with_statement : tnode;
  328. var
  329. right,p : tnode;
  330. i,levelcount : longint;
  331. withsymtable,symtab : tsymtable;
  332. obj : tobjectdef;
  333. hp : tnode;
  334. begin
  335. p:=comp_expr(true);
  336. do_resulttypepass(p);
  337. set_varstate(p,false);
  338. right:=nil;
  339. if (not codegenerror) and
  340. (p.resulttype.def.deftype in [objectdef,recorddef]) then
  341. begin
  342. case p.resulttype.def.deftype of
  343. objectdef : begin
  344. obj:=tobjectdef(p.resulttype.def);
  345. symtab:=twithsymtable.Create(obj,obj.symtable.symsearch);
  346. withsymtable:=symtab;
  347. if (p.nodetype=loadn) and
  348. (tloadnode(p).symtable=aktprocsym.definition.localst) then
  349. twithsymtable(symtab).direct_with:=true;
  350. twithsymtable(symtab).withrefnode:=p;
  351. levelcount:=1;
  352. obj:=obj.childof;
  353. while assigned(obj) do
  354. begin
  355. symtab.next:=twithsymtable.create(obj,obj.symtable.symsearch);
  356. symtab:=symtab.next;
  357. if (p.nodetype=loadn) and
  358. (tloadnode(p).symtable=aktprocsym.definition.localst) then
  359. twithsymtable(symtab).direct_with:=true;
  360. twithsymtable(symtab).withrefnode:=p;
  361. obj:=obj.childof;
  362. inc(levelcount);
  363. end;
  364. symtab.next:=symtablestack;
  365. symtablestack:=withsymtable;
  366. end;
  367. recorddef : begin
  368. symtab:=trecorddef(p.resulttype.def).symtable;
  369. levelcount:=1;
  370. withsymtable:=twithsymtable.create(trecorddef(p.resulttype.def),symtab.symsearch);
  371. if (p.nodetype=loadn) and
  372. (tloadnode(p).symtable=aktprocsym.definition.localst) then
  373. twithsymtable(withsymtable).direct_with:=true;
  374. twithsymtable(withsymtable).withrefnode:=p;
  375. withsymtable.next:=symtablestack;
  376. symtablestack:=withsymtable;
  377. end;
  378. end;
  379. if token=_COMMA then
  380. begin
  381. consume(_COMMA);
  382. right:=_with_statement{$ifdef FPCPROCVAR}(){$endif};
  383. end
  384. else
  385. begin
  386. consume(_DO);
  387. if token<>_SEMICOLON then
  388. right:=statement
  389. else
  390. right:=nil;
  391. end;
  392. for i:=1 to levelcount do
  393. symtablestack:=symtablestack.next;
  394. _with_statement:=cwithnode.create(twithsymtable(withsymtable),p,right,levelcount);
  395. end
  396. else
  397. begin
  398. Message(parser_e_false_with_expr);
  399. { try to recover from error }
  400. if token=_COMMA then
  401. begin
  402. consume(_COMMA);
  403. hp:=_with_statement{$ifdef FPCPROCVAR}(){$endif};
  404. if (hp=nil) then; { remove warning about unused }
  405. end
  406. else
  407. begin
  408. consume(_DO);
  409. { ignore all }
  410. if token<>_SEMICOLON then
  411. statement;
  412. end;
  413. _with_statement:=nil;
  414. end;
  415. end;
  416. function with_statement : tnode;
  417. begin
  418. consume(_WITH);
  419. with_statement:=_with_statement;
  420. end;
  421. function raise_statement : tnode;
  422. var
  423. p,pobj,paddr,pframe : tnode;
  424. begin
  425. pobj:=nil;
  426. paddr:=nil;
  427. pframe:=nil;
  428. consume(_RAISE);
  429. if not(token in [_SEMICOLON,_END]) then
  430. begin
  431. { object }
  432. pobj:=comp_expr(true);
  433. if try_to_consume(_AT) then
  434. begin
  435. paddr:=comp_expr(true);
  436. if try_to_consume(_COMMA) then
  437. pframe:=comp_expr(true);
  438. end;
  439. end
  440. else
  441. begin
  442. if (block_type<>bt_except) then
  443. Message(parser_e_no_reraise_possible);
  444. end;
  445. p:=craisenode.create(pobj,paddr,pframe);
  446. raise_statement:=p;
  447. end;
  448. function try_statement : tnode;
  449. var
  450. p_try_block,p_finally_block,first,last,
  451. p_default,p_specific,hp : tnode;
  452. ot : ttype;
  453. sym : tvarsym;
  454. old_block_type : tblock_type;
  455. exceptsymtable : tsymtable;
  456. objname,objrealname : stringid;
  457. srsym : tsym;
  458. srsymtable : tsymtable;
  459. oldaktexceptblock: integer;
  460. begin
  461. procinfo^.flags:=procinfo^.flags or pi_uses_exceptions;
  462. p_default:=nil;
  463. p_specific:=nil;
  464. { read statements to try }
  465. consume(_TRY);
  466. first:=nil;
  467. inc(exceptblockcounter);
  468. oldaktexceptblock := aktexceptblock;
  469. aktexceptblock := exceptblockcounter;
  470. inc(statement_level);
  471. while (token<>_FINALLY) and (token<>_EXCEPT) do
  472. begin
  473. if first=nil then
  474. begin
  475. last:=cstatementnode.create(nil,statement);
  476. first:=last;
  477. end
  478. else
  479. begin
  480. tstatementnode(last).left:=cstatementnode.create(nil,statement);
  481. last:=tstatementnode(last).left;
  482. end;
  483. if not try_to_consume(_SEMICOLON) then
  484. break;
  485. consume_emptystats;
  486. end;
  487. p_try_block:=cblocknode.create(first);
  488. if try_to_consume(_FINALLY) then
  489. begin
  490. inc(exceptblockcounter);
  491. aktexceptblock := exceptblockcounter;
  492. p_finally_block:=statements_til_end;
  493. try_statement:=ctryfinallynode.create(p_try_block,p_finally_block);
  494. dec(statement_level);
  495. end
  496. else
  497. begin
  498. consume(_EXCEPT);
  499. old_block_type:=block_type;
  500. block_type:=bt_except;
  501. inc(exceptblockcounter);
  502. aktexceptblock := exceptblockcounter;
  503. ot:=generrortype;
  504. p_specific:=nil;
  505. if (idtoken=_ON) then
  506. { catch specific exceptions }
  507. begin
  508. repeat
  509. consume(_ID);
  510. if token=_ID then
  511. begin
  512. objname:=pattern;
  513. objrealname:=orgpattern;
  514. { can't use consume_sym here, because we need already
  515. to check for the colon }
  516. searchsym(objname,srsym,srsymtable);
  517. consume(_ID);
  518. { is a explicit name for the exception given ? }
  519. if try_to_consume(_COLON) then
  520. begin
  521. consume_sym(srsym,srsymtable);
  522. if (srsym.typ=typesym) and
  523. is_class(ttypesym(srsym).restype.def) then
  524. begin
  525. ot:=ttypesym(srsym).restype;
  526. sym:=tvarsym.create(objrealname,ot);
  527. end
  528. else
  529. begin
  530. sym:=tvarsym.create(objrealname,generrortype);
  531. if (srsym.typ=typesym) then
  532. Message1(type_e_class_type_expected,ttypesym(srsym).restype.def.typename)
  533. else
  534. Message1(type_e_class_type_expected,ot.def.typename);
  535. end;
  536. exceptsymtable:=tstt_exceptsymtable.create;
  537. exceptsymtable.insert(sym);
  538. { insert the exception symtable stack }
  539. exceptsymtable.next:=symtablestack;
  540. symtablestack:=exceptsymtable;
  541. end
  542. else
  543. begin
  544. { check if type is valid, must be done here because
  545. with "e: Exception" the e is not necessary }
  546. if srsym=nil then
  547. begin
  548. identifier_not_found(objrealname);
  549. srsym:=generrorsym;
  550. end;
  551. { support unit.identifier }
  552. if srsym.typ=unitsym then
  553. begin
  554. consume(_POINT);
  555. srsym:=searchsymonlyin(tunitsym(srsym).unitsymtable,pattern);
  556. if srsym=nil then
  557. begin
  558. identifier_not_found(orgpattern);
  559. srsym:=generrorsym;
  560. end;
  561. consume(_ID);
  562. end;
  563. { check if type is valid, must be done here because
  564. with "e: Exception" the e is not necessary }
  565. if (srsym.typ=typesym) and
  566. is_class(ttypesym(srsym).restype.def) then
  567. ot:=ttypesym(srsym).restype
  568. else
  569. begin
  570. ot:=generrortype;
  571. if (srsym.typ=typesym) then
  572. Message1(type_e_class_type_expected,ttypesym(srsym).restype.def.typename)
  573. else
  574. Message1(type_e_class_type_expected,ot.def.typename);
  575. end;
  576. exceptsymtable:=nil;
  577. end;
  578. end
  579. else
  580. consume(_ID);
  581. consume(_DO);
  582. hp:=connode.create(nil,statement);
  583. if ot.def.deftype=errordef then
  584. begin
  585. hp.free;
  586. hp:=cerrornode.create;
  587. end;
  588. if p_specific=nil then
  589. begin
  590. last:=hp;
  591. p_specific:=last;
  592. end
  593. else
  594. begin
  595. tonnode(last).left:=hp;
  596. last:=tonnode(last).left;
  597. end;
  598. { set the informations }
  599. { only if the creation of the onnode was succesful, it's possible }
  600. { that last and hp are errornodes (JM) }
  601. if last.nodetype = onn then
  602. begin
  603. tonnode(last).excepttype:=tobjectdef(ot.def);
  604. tonnode(last).exceptsymtable:=exceptsymtable;
  605. end;
  606. { remove exception symtable }
  607. if assigned(exceptsymtable) then
  608. begin
  609. dellexlevel;
  610. if last.nodetype <> onn then
  611. exceptsymtable.free;
  612. end;
  613. if not try_to_consume(_SEMICOLON) then
  614. break;
  615. consume_emptystats;
  616. until (token=_END) or (token=_ELSE);
  617. if token=_ELSE then
  618. { catch the other exceptions }
  619. begin
  620. consume(_ELSE);
  621. p_default:=statements_til_end;
  622. end
  623. else
  624. consume(_END);
  625. end
  626. else
  627. { catch all exceptions }
  628. begin
  629. p_default:=statements_til_end;
  630. end;
  631. dec(statement_level);
  632. block_type:=old_block_type;
  633. try_statement:=ctryexceptnode.create(p_try_block,p_specific,p_default);
  634. end;
  635. aktexceptblock := oldaktexceptblock;
  636. end;
  637. function exit_statement : tnode;
  638. var
  639. p : tnode;
  640. begin
  641. consume(_EXIT);
  642. if try_to_consume(_LKLAMMER) then
  643. begin
  644. p:=comp_expr(true);
  645. consume(_RKLAMMER);
  646. if (block_type=bt_except) then
  647. Message(parser_e_exit_with_argument_not__possible);
  648. if is_void(aktprocsym.definition.rettype.def) then
  649. Message(parser_e_void_function);
  650. end
  651. else
  652. p:=nil;
  653. p:=cexitnode.create(p);
  654. do_resulttypepass(p);
  655. exit_statement:=p;
  656. end;
  657. function _asm_statement : tnode;
  658. var
  659. asmstat : tasmnode;
  660. Marker : tai;
  661. begin
  662. Inside_asm_statement:=true;
  663. case aktasmmode of
  664. asmmode_none : ; { just be there to allow to a compile without
  665. any assembler readers }
  666. {$ifdef i386}
  667. {$ifndef NoRA386Att}
  668. asmmode_i386_att:
  669. asmstat:=tasmnode(ra386att.assemble);
  670. {$endif NoRA386Att}
  671. {$ifndef NoRA386Int}
  672. asmmode_i386_intel:
  673. asmstat:=tasmnode(ra386int.assemble);
  674. {$endif NoRA386Int}
  675. {$ifndef NoRA386Dir}
  676. asmmode_i386_direct:
  677. begin
  678. if not target_asm.allowdirect then
  679. Message(parser_f_direct_assembler_not_allowed);
  680. if (pocall_inline in aktprocsym.definition.proccalloptions) then
  681. Begin
  682. Message1(parser_w_not_supported_for_inline,'direct asm');
  683. Message(parser_w_inlining_disabled);
  684. exclude(aktprocsym.definition.proccalloptions,pocall_inline);
  685. End;
  686. asmstat:=tasmnode(ra386dir.assemble);
  687. end;
  688. {$endif NoRA386Dir}
  689. {$endif}
  690. {$ifdef m68k}
  691. {$ifndef NoRA68kMot}
  692. asmmode_m68k_mot:
  693. asmstat:=tasmnode(ra68kmot.assemble);
  694. {$endif NoRA68kMot}
  695. {$endif}
  696. else
  697. Message(parser_f_assembler_reader_not_supported);
  698. end;
  699. { Read first the _ASM statement }
  700. consume(_ASM);
  701. {$ifndef newcg}
  702. { END is read }
  703. if try_to_consume(_LECKKLAMMER) then
  704. begin
  705. { it's possible to specify the modified registers }
  706. include(asmstat.flags,nf_object_preserved);
  707. if token<>_RECKKLAMMER then
  708. repeat
  709. { uppercase, because it's a CSTRING }
  710. uppervar(pattern);
  711. {$ifdef i386}
  712. if pattern='EAX' then
  713. usedinproc:=usedinproc or ($80 shr byte(R_EAX))
  714. else if pattern='EBX' then
  715. usedinproc:=usedinproc or ($80 shr byte(R_EBX))
  716. else if pattern='ECX' then
  717. usedinproc:=usedinproc or ($80 shr byte(R_ECX))
  718. else if pattern='EDX' then
  719. usedinproc:=usedinproc or ($80 shr byte(R_EDX))
  720. else if pattern='ESI' then
  721. begin
  722. usedinproc:=usedinproc or ($80 shr byte(R_ESI));
  723. exclude(asmstat.flags,nf_object_preserved);
  724. end
  725. else if pattern='EDI' then
  726. usedinproc:=usedinproc or ($80 shr byte(R_EDI))
  727. {$endif i386}
  728. {$ifdef m68k}
  729. if pattern='D0' then
  730. usedinproc:=usedinproc +[R_D0]
  731. else if pattern='D1' then
  732. usedinproc:=usedinproc + [R_D1]
  733. else if pattern='D2' then
  734. usedinproc:=usedinproc + [R_D2]
  735. else if pattern='D3' then
  736. usedinproc:=usedinproc + [R_D3]
  737. else if pattern='D4' then
  738. usedinproc:=usedinproc + [R_D4]
  739. else if pattern='D5' then
  740. usedinproc:=usedinproc + [R_D5]
  741. else if pattern='D6' then
  742. usedinproc:=usedinproc + [R_D6]
  743. else if pattern='D7' then
  744. usedinproc:=usedinproc + [R_D7]
  745. else if pattern='A0' then
  746. usedinproc:=usedinproc + [R_A0]
  747. else if pattern='A1' then
  748. usedinproc:=usedinproc + [R_A1]
  749. else if pattern='A2' then
  750. usedinproc:=usedinproc + [R_A2]
  751. else if pattern='A3' then
  752. usedinproc:=usedinproc + [R_A3]
  753. else if pattern='A4' then
  754. usedinproc:=usedinproc + [R_A4]
  755. else if pattern='A5' then
  756. usedinproc:=usedinproc + [R_A5]
  757. {$endif m68k}
  758. {$ifdef powerpc}
  759. if pattern<>'' then
  760. internalerror(200108251)
  761. {$endif powerpc}
  762. else consume(_RECKKLAMMER);
  763. consume(_CSTRING);
  764. if not try_to_consume(_COMMA) then
  765. break;
  766. until false;
  767. consume(_RECKKLAMMER);
  768. end
  769. {$ifdef i386}
  770. else usedinproc:=$ff;
  771. {$else}
  772. {$ifdef powerpc}
  773. else usedinproc := 0;
  774. {$else powerpc}
  775. else usedinproc := ALL_REGISTERS;
  776. {$endif powerpc}
  777. {$endif i386}
  778. {$endif newcg}
  779. { mark the start and the end of the assembler block
  780. this is needed for the optimizer }
  781. If Assigned(AsmStat.p_asm) Then
  782. Begin
  783. Marker := Tai_Marker.Create(AsmBlockStart);
  784. AsmStat.p_asm.Insert(Marker);
  785. Marker := Tai_Marker.Create(AsmBlockEnd);
  786. AsmStat.p_asm.Concat(Marker);
  787. End;
  788. Inside_asm_statement:=false;
  789. _asm_statement:=asmstat;
  790. end;
  791. function new_dispose_statement : tnode;
  792. var
  793. p,p2 : tnode;
  794. again : boolean; { dummy for do_proc_call }
  795. destructorname : stringid;
  796. sym : tsym;
  797. classh : tobjectdef;
  798. destructorpos,
  799. storepos : tfileposinfo;
  800. is_new : boolean;
  801. begin
  802. if try_to_consume(_NEW) then
  803. is_new:=true
  804. else
  805. begin
  806. consume(_DISPOSE);
  807. is_new:=false;
  808. end;
  809. consume(_LKLAMMER);
  810. p:=comp_expr(true);
  811. { calc return type }
  812. cleartempgen;
  813. set_varstate(p,(not is_new));
  814. { constructor,destructor specified }
  815. if try_to_consume(_COMMA) then
  816. begin
  817. { extended syntax of new and dispose }
  818. { function styled new is handled in factor }
  819. { destructors have no parameters }
  820. destructorname:=pattern;
  821. destructorpos:=akttokenpos;
  822. consume(_ID);
  823. if (p.resulttype.def.deftype<>pointerdef) then
  824. begin
  825. Message1(type_e_pointer_type_expected,p.resulttype.def.typename);
  826. p.free;
  827. p:=factor(false);
  828. p.free;
  829. consume(_RKLAMMER);
  830. new_dispose_statement:=cerrornode.create;
  831. exit;
  832. end;
  833. { first parameter must be an object or class }
  834. if tpointerdef(p.resulttype.def).pointertype.def.deftype<>objectdef then
  835. begin
  836. Message(parser_e_pointer_to_class_expected);
  837. p.free;
  838. new_dispose_statement:=factor(false);
  839. consume_all_until(_RKLAMMER);
  840. consume(_RKLAMMER);
  841. exit;
  842. end;
  843. { check, if the first parameter is a pointer to a _class_ }
  844. classh:=tobjectdef(tpointerdef(p.resulttype.def).pointertype.def);
  845. if is_class(classh) then
  846. begin
  847. Message(parser_e_no_new_or_dispose_for_classes);
  848. new_dispose_statement:=factor(false);
  849. consume_all_until(_RKLAMMER);
  850. consume(_RKLAMMER);
  851. exit;
  852. end;
  853. { search cons-/destructor, also in parent classes }
  854. storepos:=akttokenpos;
  855. akttokenpos:=destructorpos;
  856. sym:=search_class_member(classh,destructorname);
  857. akttokenpos:=storepos;
  858. { the second parameter of new/dispose must be a call }
  859. { to a cons-/destructor }
  860. if (not assigned(sym)) or (sym.typ<>procsym) then
  861. begin
  862. if is_new then
  863. Message(parser_e_expr_have_to_be_constructor_call)
  864. else
  865. Message(parser_e_expr_have_to_be_destructor_call);
  866. p.free;
  867. new_dispose_statement:=cerrornode.create;
  868. end
  869. else
  870. begin
  871. if is_new then
  872. p2:=chnewnode.create
  873. else
  874. p2:=chdisposenode.create(p);
  875. do_resulttypepass(p2);
  876. p2.resulttype:=tpointerdef(p.resulttype.def).pointertype;
  877. if is_new then
  878. do_member_read(false,sym,p2,again)
  879. else
  880. begin
  881. if (m_tp in aktmodeswitches) then
  882. do_member_read(false,sym,p2,again)
  883. else
  884. begin
  885. p2:=ccallnode.create(nil,tprocsym(sym),sym.owner,p2);
  886. { support dispose(p,done()); }
  887. if try_to_consume(_LKLAMMER) then
  888. begin
  889. if not try_to_consume(_RKLAMMER) then
  890. begin
  891. Message(parser_e_no_paras_for_destructor);
  892. consume_all_until(_RKLAMMER);
  893. consume(_RKLAMMER);
  894. end;
  895. end;
  896. end;
  897. end;
  898. { we need the real called method }
  899. cleartempgen;
  900. do_resulttypepass(p2);
  901. if not codegenerror then
  902. begin
  903. if is_new then
  904. begin
  905. if (tcallnode(p2).procdefinition.proctypeoption<>potype_constructor) then
  906. Message(parser_e_expr_have_to_be_constructor_call);
  907. p2:=cnewnode.create(p2);
  908. do_resulttypepass(p2);
  909. p2.resulttype:=p.resulttype;
  910. p2:=cassignmentnode.create(p,p2);
  911. end
  912. else
  913. begin
  914. if (tcallnode(p2).procdefinition.proctypeoption<>potype_destructor) then
  915. Message(parser_e_expr_have_to_be_destructor_call);
  916. end;
  917. end;
  918. new_dispose_statement:=p2;
  919. end;
  920. end
  921. else
  922. begin
  923. if (p.resulttype.def.deftype<>pointerdef) then
  924. Begin
  925. Message1(type_e_pointer_type_expected,p.resulttype.def.typename);
  926. new_dispose_statement:=cerrornode.create;
  927. end
  928. else
  929. begin
  930. if (tpointerdef(p.resulttype.def).pointertype.def.deftype=objectdef) and
  931. (oo_has_vmt in tobjectdef(tpointerdef(p.resulttype.def).pointertype.def).objectoptions) then
  932. Message(parser_w_use_extended_syntax_for_objects);
  933. if (tpointerdef(p.resulttype.def).pointertype.def.deftype=orddef) and
  934. (torddef(tpointerdef(p.resulttype.def).pointertype.def).typ=uvoid) then
  935. begin
  936. if (m_tp in aktmodeswitches) or
  937. (m_delphi in aktmodeswitches) then
  938. Message(parser_w_no_new_dispose_on_void_pointers)
  939. else
  940. Message(parser_e_no_new_dispose_on_void_pointers);
  941. end;
  942. if is_new then
  943. new_dispose_statement:=csimplenewdisposenode.create(simplenewn,p)
  944. else
  945. new_dispose_statement:=csimplenewdisposenode.create(simpledisposen,p);
  946. end;
  947. end;
  948. consume(_RKLAMMER);
  949. end;
  950. function statement : tnode;
  951. var
  952. p : tnode;
  953. code : tnode;
  954. filepos : tfileposinfo;
  955. srsym : tsym;
  956. srsymtable : tsymtable;
  957. begin
  958. filepos:=akttokenpos;
  959. case token of
  960. _GOTO :
  961. begin
  962. if not(cs_support_goto in aktmoduleswitches)then
  963. Message(sym_e_goto_and_label_not_supported);
  964. consume(_GOTO);
  965. if (token<>_INTCONST) and (token<>_ID) then
  966. begin
  967. Message(sym_e_label_not_found);
  968. code:=cerrornode.create;
  969. end
  970. else
  971. begin
  972. consume_sym(srsym,srsymtable);
  973. if srsym.typ<>labelsym then
  974. begin
  975. Message(sym_e_id_is_no_label_id);
  976. code:=cerrornode.create;
  977. end
  978. else
  979. begin
  980. code:=cgotonode.create(tlabelsym(srsym));
  981. tgotonode(code).labsym:=tlabelsym(srsym);
  982. { set flag that this label is used }
  983. tlabelsym(srsym).used:=true;
  984. end;
  985. end;
  986. end;
  987. _BEGIN :
  988. code:=statement_block(_BEGIN);
  989. _IF :
  990. code:=if_statement;
  991. _CASE :
  992. code:=case_statement;
  993. _REPEAT :
  994. code:=repeat_statement;
  995. _WHILE :
  996. code:=while_statement;
  997. _FOR :
  998. code:=for_statement;
  999. _WITH :
  1000. code:=with_statement;
  1001. _TRY :
  1002. code:=try_statement;
  1003. _RAISE :
  1004. code:=raise_statement;
  1005. { semicolons,else until and end are ignored }
  1006. _SEMICOLON,
  1007. _ELSE,
  1008. _UNTIL,
  1009. _END:
  1010. code:=cnothingnode.create;
  1011. _FAIL :
  1012. begin
  1013. if (aktprocsym.definition.proctypeoption<>potype_constructor) then
  1014. Message(parser_e_fail_only_in_constructor);
  1015. consume(_FAIL);
  1016. code:=cfailnode.create;
  1017. end;
  1018. _EXIT :
  1019. code:=exit_statement;
  1020. _ASM :
  1021. code:=_asm_statement;
  1022. _EOF :
  1023. Message(scan_f_end_of_file);
  1024. else
  1025. begin
  1026. if (idtoken=_NEW) or (idtoken=_DISPOSE) then
  1027. code:=new_dispose_statement
  1028. else
  1029. begin
  1030. p:=expr;
  1031. if p.nodetype=labeln then
  1032. begin
  1033. { the pointer to the following instruction }
  1034. { isn't a very clean way }
  1035. tlabelnode(p).left:=statement{$ifdef FPCPROCVAR}(){$endif};
  1036. { be sure to have left also resulttypepass }
  1037. resulttypepass(tlabelnode(p).left);
  1038. end;
  1039. { blockn support because a read/write is changed into a blocknode }
  1040. { with a separate statement for each read/write operation (JM) }
  1041. { the same is true for val() if the third parameter is not 32 bit }
  1042. if not(p.nodetype in [calln,assignn,breakn,inlinen,continuen,labeln,blockn]) then
  1043. Message(cg_e_illegal_expression);
  1044. { specify that we don't use the value returned by the call }
  1045. { Question : can this be also improtant
  1046. for inlinen ??
  1047. it is used for :
  1048. - dispose of temp stack space
  1049. - dispose on FPU stack }
  1050. if p.nodetype=calln then
  1051. exclude(p.flags,nf_return_value_used);
  1052. code:=p;
  1053. end;
  1054. end;
  1055. end;
  1056. if assigned(code) then
  1057. code.set_tree_filepos(filepos);
  1058. statement:=code;
  1059. end;
  1060. function statement_block(starttoken : ttoken) : tnode;
  1061. var
  1062. first,last : tnode;
  1063. filepos : tfileposinfo;
  1064. begin
  1065. first:=nil;
  1066. filepos:=akttokenpos;
  1067. consume(starttoken);
  1068. inc(statement_level);
  1069. while not(token in [_END,_FINALIZATION]) do
  1070. begin
  1071. if first=nil then
  1072. begin
  1073. last:=cstatementnode.create(nil,statement);
  1074. first:=last;
  1075. end
  1076. else
  1077. begin
  1078. tstatementnode(last).left:=cstatementnode.create(nil,statement);
  1079. last:=tstatementnode(last).left;
  1080. end;
  1081. if (token in [_END,_FINALIZATION]) then
  1082. break
  1083. else
  1084. begin
  1085. { if no semicolon, then error and go on }
  1086. if token<>_SEMICOLON then
  1087. begin
  1088. consume(_SEMICOLON);
  1089. consume_all_until(_SEMICOLON);
  1090. end;
  1091. consume(_SEMICOLON);
  1092. end;
  1093. consume_emptystats;
  1094. end;
  1095. { don't consume the finalization token, it is consumed when
  1096. reading the finalization block, but allow it only after
  1097. an initalization ! }
  1098. if (starttoken<>_INITIALIZATION) or (token<>_FINALIZATION) then
  1099. consume(_END);
  1100. dec(statement_level);
  1101. last:=cblocknode.create(first);
  1102. last.set_tree_filepos(filepos);
  1103. statement_block:=last;
  1104. end;
  1105. function assembler_block : tnode;
  1106. begin
  1107. { temporary space is set, while the BEGIN of the procedure }
  1108. if symtablestack.symtabletype=localsymtable then
  1109. procinfo^.firsttemp_offset := -symtablestack.datasize
  1110. else
  1111. procinfo^.firsttemp_offset := 0;
  1112. { assembler code does not allocate }
  1113. { space for the return value }
  1114. if not is_void(aktprocsym.definition.rettype.def) then
  1115. begin
  1116. aktprocsym.definition.funcretsym:=tfuncretsym.create(aktprocsym.name,aktprocsym.definition.rettype);
  1117. if ret_in_acc(aktprocsym.definition.rettype.def) then
  1118. begin
  1119. { in assembler code the result should be directly in %eax
  1120. procinfo^.retoffset:=procinfo^.firsttemp-procinfo^.retdef.size;
  1121. procinfo^.firsttemp:=procinfo^.retoffset; }
  1122. {$ifndef newcg}
  1123. {$ifdef i386}
  1124. usedinproc:=usedinproc or ($80 shr byte(R_EAX))
  1125. {$else}
  1126. {$ifdef POWERPC}
  1127. usedinproc:=0;
  1128. {$else POWERPC}
  1129. usedinproc:=usedinproc + [accumulator];
  1130. {$endif POWERPC}
  1131. {$endif i386}
  1132. {$endif newcg}
  1133. end
  1134. {
  1135. else if not is_fpu(procinfo^.retdef) then
  1136. should we allow assembler functions of big elements ?
  1137. YES (FK)!!
  1138. Message(parser_e_asm_incomp_with_function_return);
  1139. }
  1140. end;
  1141. { set the framepointer to esp for assembler functions }
  1142. { but only if the are no local variables }
  1143. { added no parameter also (PM) }
  1144. { disable for methods, because self pointer is expected }
  1145. { at -8(%ebp) (JM) }
  1146. { why if se use %esp then self is still at the correct address PM }
  1147. if {not(assigned(procinfo^._class)) and}
  1148. (po_assembler in aktprocsym.definition.procoptions) and
  1149. (aktprocsym.definition.localst.datasize=0) and
  1150. (aktprocsym.definition.parast.datasize=0) and
  1151. not(ret_in_param(aktprocsym.definition.rettype.def)) then
  1152. begin
  1153. procinfo^.framepointer:=stack_pointer;
  1154. { set the right value for parameters }
  1155. dec(aktprocsym.definition.parast.address_fixup,target_info.size_of_pointer);
  1156. dec(procinfo^.para_offset,target_info.size_of_pointer);
  1157. end;
  1158. { only insert now in the symtable, otherwise the }
  1159. { "aktprocsym.definition.localst.datasize=0" check above will }
  1160. { always fail (JM) }
  1161. if not is_void(aktprocsym.definition.rettype.def) then
  1162. begin
  1163. { insert in local symtable }
  1164. symtablestack.insert(aktprocsym.definition.funcretsym);
  1165. end;
  1166. { force the asm statement }
  1167. if token<>_ASM then
  1168. consume(_ASM);
  1169. procinfo^.Flags := procinfo^.Flags Or pi_is_assembler;
  1170. assembler_block:=_asm_statement;
  1171. { becuase the END is already read we need to get the
  1172. last_endtoken_filepos here (PFV) }
  1173. last_endtoken_filepos:=akttokenpos;
  1174. end;
  1175. end.
  1176. {
  1177. $Log$
  1178. Revision 1.39 2001-10-17 22:41:04 florian
  1179. * several widechar fixes, case works now
  1180. Revision 1.38 2001/10/16 15:10:35 jonas
  1181. * fixed goto/label/try bugs
  1182. Revision 1.37 2001/09/22 11:11:43 peter
  1183. * "fpc -P?" command to query for used ppcXXX compiler
  1184. Revision 1.36 2001/09/06 10:21:50 jonas
  1185. * fixed superfluous generation of stackframes for assembler procedures
  1186. with no local vars or para's (this broke the backtrace printing in case
  1187. of an rte)
  1188. Revision 1.35 2001/09/03 13:19:12 jonas
  1189. * set funcretsym for assembler procedures too (otherwise using __RESULT
  1190. in assembler procedures causes a crash)
  1191. Revision 1.34 2001/08/26 13:36:46 florian
  1192. * some cg reorganisation
  1193. * some PPC updates
  1194. Revision 1.33 2001/08/23 14:28:36 jonas
  1195. + tempcreate/ref/delete nodes (allows the use of temps in the
  1196. resulttype and first pass)
  1197. * made handling of read(ln)/write(ln) processor independent
  1198. * moved processor independent handling for str and reset/rewrite-typed
  1199. from firstpass to resulttype pass
  1200. * changed names of helpers in text.inc to be generic for use as
  1201. compilerprocs + added "iocheck" directive for most of them
  1202. * reading of ordinals is done by procedures instead of functions
  1203. because otherwise FPC_IOCHECK overwrote the result before it could
  1204. be stored elsewhere (range checking still works)
  1205. * compilerprocs can now be used in the system unit before they are
  1206. implemented
  1207. * added note to errore.msg that booleans can't be read using read/readln
  1208. Revision 1.32 2001/08/06 21:40:47 peter
  1209. * funcret moved from tprocinfo to tprocdef
  1210. Revision 1.31 2001/06/03 21:57:37 peter
  1211. + hint directive parsing support
  1212. Revision 1.30 2001/05/17 13:25:24 jonas
  1213. * fixed web bugs 1480 and 1481
  1214. Revision 1.29 2001/05/04 15:52:04 florian
  1215. * some Delphi incompatibilities fixed:
  1216. - out, dispose and new can be used as idenfiers now
  1217. - const p = apointerype(nil); is supported now
  1218. + support for const p = apointertype(pointer(1234)); added
  1219. Revision 1.28 2001/04/21 12:03:11 peter
  1220. * m68k updates merged from fixes branch
  1221. Revision 1.27 2001/04/18 22:01:57 peter
  1222. * registration of targets and assemblers
  1223. Revision 1.26 2001/04/15 09:48:30 peter
  1224. * fixed crash in labelnode
  1225. * easier detection of goto and label in try blocks
  1226. Revision 1.25 2001/04/14 14:07:11 peter
  1227. * moved more code from pass_1 to det_resulttype
  1228. Revision 1.24 2001/04/13 01:22:13 peter
  1229. * symtable change to classes
  1230. * range check generation and errors fixed, make cycle DEBUG=1 works
  1231. * memory leaks fixed
  1232. Revision 1.23 2001/04/04 22:43:52 peter
  1233. * remove unnecessary calls to firstpass
  1234. Revision 1.22 2001/04/02 21:20:34 peter
  1235. * resulttype rewrite
  1236. Revision 1.21 2001/03/22 22:35:42 florian
  1237. + support for type a = (a=1); in Delphi mode added
  1238. + procedure p(); in Delphi mode supported
  1239. + on isn't keyword anymore, it can be used as
  1240. id etc. now
  1241. Revision 1.20 2001/03/11 22:58:50 peter
  1242. * getsym redesign, removed the globals srsym,srsymtable
  1243. Revision 1.19 2000/12/25 00:07:27 peter
  1244. + new tlinkedlist class (merge of old tstringqueue,tcontainer and
  1245. tlinkedlist objects)
  1246. Revision 1.18 2000/12/23 19:59:35 peter
  1247. * object to class for ow/og objects
  1248. * split objectdata from objectoutput
  1249. Revision 1.17 2000/12/16 22:45:55 jonas
  1250. * fixed case statements with int64 values
  1251. Revision 1.16 2000/11/29 00:30:37 florian
  1252. * unused units removed from uses clause
  1253. * some changes for widestrings
  1254. Revision 1.15 2000/11/27 15:47:19 jonas
  1255. * fix for web bug 1251 (example 1)
  1256. Revision 1.14 2000/11/22 22:43:34 peter
  1257. * fixed crash with exception without sysutils (merged)
  1258. Revision 1.13 2000/11/04 14:25:21 florian
  1259. + merged Attila's changes for interfaces, not tested yet
  1260. Revision 1.12 2000/10/31 22:02:50 peter
  1261. * symtable splitted, no real code changes
  1262. Revision 1.11 2000/10/14 21:52:56 peter
  1263. * fixed memory leaks
  1264. Revision 1.10 2000/10/14 10:14:52 peter
  1265. * moehrendorf oct 2000 rewrite
  1266. Revision 1.9 2000/10/01 19:48:25 peter
  1267. * lot of compile updates for cg11
  1268. Revision 1.8 2000/09/24 21:19:50 peter
  1269. * delphi compile fixes
  1270. Revision 1.7 2000/09/24 15:06:24 peter
  1271. * use defines.inc
  1272. Revision 1.6 2000/08/27 16:11:52 peter
  1273. * moved some util functions from globals,cobjects to cutils
  1274. * splitted files into finput,fmodule
  1275. Revision 1.5 2000/08/12 15:41:15 peter
  1276. * fixed bug 1096 (merged)
  1277. Revision 1.4 2000/08/12 06:46:06 florian
  1278. + case statement for int64/qword implemented
  1279. Revision 1.3 2000/07/13 12:08:27 michael
  1280. + patched to 1.1.0 with former 1.09patch from peter
  1281. Revision 1.2 2000/07/13 11:32:45 michael
  1282. + removed logs
  1283. }