nld.pas 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788
  1. {
  2. $Id$
  3. Copyright (c) 2000 by Florian Klaempfl
  4. Type checking and register allocation for load/assignment nodes
  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 nld;
  19. {$i defines.inc}
  20. interface
  21. uses
  22. node,
  23. symbase,symtype,symsym;
  24. type
  25. tloadnode = class(tunarynode)
  26. symtableentry : tsym;
  27. symtable : tsymtable;
  28. constructor create(v : tsym;st : tsymtable);virtual;
  29. procedure set_mp(p:tnode);
  30. function getcopy : tnode;override;
  31. function pass_1 : tnode;override;
  32. function det_resulttype:tnode;override;
  33. function docompare(p: tnode): boolean; override;
  34. end;
  35. { different assignment types }
  36. tassigntype = (at_normal,at_plus,at_minus,at_star,at_slash);
  37. tassignmentnode = class(tbinarynode)
  38. assigntype : tassigntype;
  39. constructor create(l,r : tnode);virtual;
  40. function getcopy : tnode;override;
  41. function pass_1 : tnode;override;
  42. function det_resulttype:tnode;override;
  43. function docompare(p: tnode): boolean; override;
  44. end;
  45. tfuncretnode = class(tnode)
  46. funcretprocinfo : pointer;
  47. constructor create(p:pointer);virtual;
  48. function getcopy : tnode;override;
  49. function pass_1 : tnode;override;
  50. function det_resulttype:tnode;override;
  51. function docompare(p: tnode): boolean; override;
  52. end;
  53. tarrayconstructorrangenode = class(tbinarynode)
  54. constructor create(l,r : tnode);virtual;
  55. function pass_1 : tnode;override;
  56. function det_resulttype:tnode;override;
  57. end;
  58. tarrayconstructornode = class(tbinarynode)
  59. constructortype : ttype;
  60. constructor create(l,r : tnode);virtual;
  61. function getcopy : tnode;override;
  62. function pass_1 : tnode;override;
  63. function det_resulttype:tnode;override;
  64. function docompare(p: tnode): boolean; override;
  65. end;
  66. ttypenode = class(tnode)
  67. restype : ttype;
  68. constructor create(t : ttype);virtual;
  69. function pass_1 : tnode;override;
  70. function det_resulttype:tnode;override;
  71. function docompare(p: tnode): boolean; override;
  72. end;
  73. var
  74. cloadnode : class of tloadnode;
  75. cassignmentnode : class of tassignmentnode;
  76. cfuncretnode : class of tfuncretnode;
  77. carrayconstructorrangenode : class of tarrayconstructorrangenode;
  78. carrayconstructornode : class of tarrayconstructornode;
  79. ctypenode : class of ttypenode;
  80. implementation
  81. uses
  82. cutils,verbose,globtype,globals,systems,
  83. symconst,symdef,symtable,types,
  84. htypechk,pass_1,
  85. ncnv,nmem,cpubase,tgcpu,hcodegen
  86. {$ifdef newcg}
  87. ,cgbase
  88. ,tgobj
  89. {$endif newcg}
  90. ;
  91. {*****************************************************************************
  92. TLOADNODE
  93. *****************************************************************************}
  94. constructor tloadnode.create(v : tsym;st : tsymtable);
  95. begin
  96. inherited create(loadn,nil);
  97. symtableentry:=v;
  98. symtable:=st;
  99. end;
  100. procedure tloadnode.set_mp(p:tnode);
  101. begin
  102. left:=p;
  103. end;
  104. function tloadnode.getcopy : tnode;
  105. var
  106. n : tloadnode;
  107. begin
  108. n:=tloadnode(inherited getcopy);
  109. n.symtable:=symtable;
  110. n.symtableentry:=symtableentry;
  111. result:=n;
  112. end;
  113. function tloadnode.det_resulttype:tnode;
  114. begin
  115. result:=nil;
  116. case symtableentry.typ of
  117. absolutesym,
  118. varsym :
  119. resulttype:=tvarsym(symtableentry).vartype;
  120. constsym :
  121. resulttype:=tconstsym(symtableentry).consttype;
  122. typedconstsym :
  123. resulttype:=ttypedconstsym(symtableentry).typedconsttype;
  124. procsym :
  125. resulttype.setdef(tprocsym(symtableentry).definition);
  126. else
  127. internalerror(534785349);
  128. end;
  129. end;
  130. function tloadnode.pass_1 : tnode;
  131. var
  132. p1 : tnode;
  133. begin
  134. result:=nil;
  135. { optimize simple with loadings }
  136. if (symtable.symtabletype=withsymtable) and
  137. (twithsymtable(symtable).direct_with) and
  138. (symtableentry.typ=varsym) then
  139. begin
  140. p1:=tnode(twithsymtable(symtable).withrefnode).getcopy;
  141. p1:=csubscriptnode.create(tvarsym(symtableentry),p1);
  142. left:=nil;
  143. firstpass(p1);
  144. result:=p1;
  145. exit;
  146. end;
  147. location.loc:=LOC_REFERENCE;
  148. registers32:=0;
  149. registersfpu:=0;
  150. {$ifdef SUPPORT_MMX}
  151. registersmmx:=0;
  152. {$endif SUPPORT_MMX}
  153. { handle first absolute as it will replace the symtableentry }
  154. if symtableentry.typ=absolutesym then
  155. begin
  156. { replace the symtableentry when it points to a var, else
  157. we are finished }
  158. if tabsolutesym(symtableentry).abstyp=tovar then
  159. begin
  160. symtableentry:=tabsolutesym(symtableentry).ref;
  161. symtable:=symtableentry.owner;
  162. include(flags,nf_absolute);
  163. end
  164. else
  165. exit;
  166. end;
  167. case symtableentry.typ of
  168. funcretsym :
  169. begin
  170. p1:=cfuncretnode.create(tfuncretsym(symtableentry).funcretprocinfo);
  171. firstpass(p1);
  172. { if it's refered as absolute then we need to have the
  173. type of the absolute instead of the function return,
  174. the function return is then also assigned }
  175. if nf_absolute in flags then
  176. begin
  177. pprocinfo(tfuncretnode(p1).funcretprocinfo)^.funcret_state:=vs_assigned;
  178. p1.resulttype:=resulttype;
  179. end;
  180. left:=nil;
  181. result:=p1;
  182. end;
  183. constsym:
  184. begin
  185. if tconstsym(symtableentry).consttyp=constresourcestring then
  186. begin
  187. resulttype:=cansistringtype;
  188. { we use ansistrings so no fast exit here }
  189. if assigned(procinfo) then
  190. procinfo^.no_fast_exit:=true;
  191. location.loc:=LOC_MEM;
  192. end
  193. else
  194. internalerror(22799);
  195. end;
  196. varsym :
  197. begin
  198. { if it's refered by absolute then it's used }
  199. if nf_absolute in flags then
  200. tvarsym(symtableentry).varstate:=vs_used;
  201. if (symtable.symtabletype in [parasymtable,localsymtable]) and
  202. (lexlevel>symtable.symtablelevel) then
  203. begin
  204. { if the variable is in an other stackframe then we need
  205. a register to dereference }
  206. if (symtable.symtablelevel)>0 then
  207. begin
  208. registers32:=1;
  209. { further, the variable can't be put into a register }
  210. tvarsym(symtableentry).varoptions:=
  211. tvarsym(symtableentry).varoptions-[vo_fpuregable,vo_regable];
  212. end;
  213. end;
  214. if (tvarsym(symtableentry).varspez=vs_const) then
  215. location.loc:=LOC_MEM;
  216. { we need a register for call by reference parameters }
  217. if (tvarsym(symtableentry).varspez in [vs_var,vs_out]) or
  218. ((tvarsym(symtableentry).varspez=vs_const) and
  219. push_addr_param(tvarsym(symtableentry).vartype.def)) or
  220. { call by value open arrays are also indirect addressed }
  221. is_open_array(tvarsym(symtableentry).vartype.def) then
  222. registers32:=1;
  223. if symtable.symtabletype=withsymtable then
  224. inc(registers32);
  225. if ([vo_is_thread_var,vo_is_dll_var]*tvarsym(symtableentry).varoptions)<>[] then
  226. registers32:=1;
  227. { count variable references }
  228. { this will create problem with local var set by
  229. under_procedures
  230. if (assigned(tvarsym(symtableentry).owner) and assigned(aktprocsym)
  231. and ((tvarsym(symtableentry).owner = aktprocsym.definition.localst)
  232. or (tvarsym(symtableentry).owner = aktprocsym.definition.localst))) then }
  233. if t_times<1 then
  234. inc(tvarsym(symtableentry).refs)
  235. else
  236. inc(tvarsym(symtableentry).refs,t_times);
  237. end;
  238. typedconstsym :
  239. if not(nf_absolute in flags) then
  240. resulttype:=ttypedconstsym(symtableentry).typedconsttype;
  241. procsym :
  242. begin
  243. if assigned(tprocsym(symtableentry).definition.nextoverloaded) then
  244. CGMessage(parser_e_no_overloaded_procvars);
  245. resulttype.setdef(tprocsym(symtableentry).definition);
  246. { if the owner of the procsym is a object, }
  247. { left must be set, if left isn't set }
  248. { it can be only self }
  249. { this code is only used in TP procvar mode }
  250. if (m_tp_procvar in aktmodeswitches) and
  251. not(assigned(left)) and
  252. (tprocsym(symtableentry).owner.symtabletype=objectsymtable) then
  253. begin
  254. left:=cselfnode.create(tobjectdef(symtableentry.owner.defowner));
  255. end;
  256. { method pointer ? }
  257. if assigned(left) then
  258. begin
  259. firstpass(left);
  260. registers32:=max(registers32,left.registers32);
  261. registersfpu:=max(registersfpu,left.registersfpu);
  262. {$ifdef SUPPORT_MMX}
  263. registersmmx:=max(registersmmx,left.registersmmx);
  264. {$endif SUPPORT_MMX}
  265. end;
  266. end;
  267. else
  268. internalerror(3);
  269. end;
  270. end;
  271. function tloadnode.docompare(p: tnode): boolean;
  272. begin
  273. docompare :=
  274. inherited docompare(p) and
  275. (symtableentry = tloadnode(p).symtableentry) and
  276. (symtable = tloadnode(p).symtable);
  277. end;
  278. {*****************************************************************************
  279. TASSIGNMENTNODE
  280. *****************************************************************************}
  281. constructor tassignmentnode.create(l,r : tnode);
  282. begin
  283. inherited create(assignn,l,r);
  284. assigntype:=at_normal;
  285. end;
  286. function tassignmentnode.getcopy : tnode;
  287. var
  288. n : tassignmentnode;
  289. begin
  290. n:=tassignmentnode(inherited getcopy);
  291. n.assigntype:=assigntype;
  292. getcopy:=n;
  293. end;
  294. function tassignmentnode.det_resulttype:tnode;
  295. begin
  296. result:=nil;
  297. resulttype:=voidtype;
  298. { must be made unique }
  299. if assigned(left) then
  300. begin
  301. set_unique(left);
  302. { set we the function result? }
  303. set_funcret_is_valid(left);
  304. end;
  305. resulttypepass(left);
  306. resulttypepass(right);
  307. set_varstate(left,false);
  308. set_varstate(right,true);
  309. if codegenerror then
  310. exit;
  311. { assignments to open arrays aren't allowed }
  312. if is_open_array(left.resulttype.def) then
  313. CGMessage(type_e_mismatch);
  314. { some string functions don't need conversion, so treat them separatly }
  315. if not (
  316. is_shortstring(left.resulttype.def) and
  317. (
  318. is_shortstring(right.resulttype.def) or
  319. is_ansistring(right.resulttype.def) or
  320. is_char(right.resulttype.def)
  321. )
  322. ) then
  323. inserttypeconv(right,left.resulttype);
  324. { test if node can be assigned, properties are allowed }
  325. valid_for_assign(left,true);
  326. { check if local proc/func is assigned to procvar }
  327. if right.resulttype.def.deftype=procvardef then
  328. test_local_to_procvar(tprocvardef(right.resulttype.def),left.resulttype.def);
  329. end;
  330. function tassignmentnode.pass_1 : tnode;
  331. begin
  332. result:=nil;
  333. firstpass(left);
  334. firstpass(right);
  335. if codegenerror then
  336. exit;
  337. { some string functions don't need conversion, so treat them separatly }
  338. if is_shortstring(left.resulttype.def) and
  339. (
  340. is_shortstring(right.resulttype.def) or
  341. is_ansistring(right.resulttype.def) or
  342. is_char(right.resulttype.def)
  343. ) then
  344. begin
  345. { we call STRCOPY }
  346. procinfo^.flags:=procinfo^.flags or pi_do_call;
  347. { test for s:=s+anything ... }
  348. { the problem is for
  349. s:=s+s+s;
  350. this is broken here !! }
  351. {$ifdef newoptimizations2}
  352. { the above is fixed now, but still problem with s := s + f(); if }
  353. { f modifies s (bad programming, so only enable if uncertain }
  354. { optimizations are on) (JM) }
  355. if (cs_UncertainOpts in aktglobalswitches) then
  356. begin
  357. hp := right;
  358. while hp.treetype=addn do hp:=hp.left;
  359. if equal_trees(left,hp) and
  360. not multiple_uses(left,right) then
  361. begin
  362. concat_string:=true;
  363. hp:=right;
  364. while hp.treetype=addn do
  365. begin
  366. hp.use_strconcat:=true;
  367. hp:=hp.left;
  368. end;
  369. end;
  370. end;
  371. {$endif newoptimizations2}
  372. end;
  373. registers32:=left.registers32+right.registers32;
  374. registersfpu:=max(left.registersfpu,right.registersfpu);
  375. {$ifdef SUPPORT_MMX}
  376. registersmmx:=max(left.registersmmx,right.registersmmx);
  377. {$endif SUPPORT_MMX}
  378. end;
  379. function tassignmentnode.docompare(p: tnode): boolean;
  380. begin
  381. docompare :=
  382. inherited docompare(p) and
  383. (assigntype = tassignmentnode(p).assigntype);
  384. end;
  385. {*****************************************************************************
  386. TFUNCRETNODE
  387. *****************************************************************************}
  388. constructor tfuncretnode.create(p:pointer);
  389. begin
  390. inherited create(funcretn);
  391. funcretprocinfo:=p;
  392. end;
  393. function tfuncretnode.getcopy : tnode;
  394. var
  395. n : tfuncretnode;
  396. begin
  397. n:=tfuncretnode(inherited getcopy);
  398. n.funcretprocinfo:=funcretprocinfo;
  399. getcopy:=n;
  400. end;
  401. function tfuncretnode.det_resulttype:tnode;
  402. begin
  403. result:=nil;
  404. resulttype:=pprocinfo(funcretprocinfo)^.returntype;
  405. end;
  406. function tfuncretnode.pass_1 : tnode;
  407. begin
  408. result:=nil;
  409. location.loc:=LOC_REFERENCE;
  410. if ret_in_param(resulttype.def) or
  411. (procinfo<>pprocinfo(funcretprocinfo)) then
  412. registers32:=1;
  413. end;
  414. function tfuncretnode.docompare(p: tnode): boolean;
  415. begin
  416. docompare :=
  417. inherited docompare(p) and
  418. (funcretprocinfo = tfuncretnode(p).funcretprocinfo);
  419. end;
  420. {*****************************************************************************
  421. TARRAYCONSTRUCTORRANGENODE
  422. *****************************************************************************}
  423. constructor tarrayconstructorrangenode.create(l,r : tnode);
  424. begin
  425. inherited create(arrayconstructorrangen,l,r);
  426. end;
  427. function tarrayconstructorrangenode.det_resulttype:tnode;
  428. begin
  429. result:=nil;
  430. resulttypepass(left);
  431. resulttypepass(right);
  432. set_varstate(left,true);
  433. set_varstate(right,true);
  434. if codegenerror then
  435. exit;
  436. resulttype:=left.resulttype;
  437. end;
  438. function tarrayconstructorrangenode.pass_1 : tnode;
  439. begin
  440. firstpass(left);
  441. firstpass(right);
  442. calcregisters(self,0,0,0);
  443. result:=nil;
  444. end;
  445. {****************************************************************************
  446. TARRAYCONSTRUCTORNODE
  447. *****************************************************************************}
  448. constructor tarrayconstructornode.create(l,r : tnode);
  449. begin
  450. inherited create(arrayconstructorn,l,r);
  451. constructortype.reset;
  452. end;
  453. function tarrayconstructornode.getcopy : tnode;
  454. var
  455. n : tarrayconstructornode;
  456. begin
  457. n:=tarrayconstructornode(inherited getcopy);
  458. n.constructortype:=constructortype;
  459. result:=n;
  460. end;
  461. function tarrayconstructornode.det_resulttype:tnode;
  462. var
  463. htype : ttype;
  464. hp : tarrayconstructornode;
  465. len : longint;
  466. varia : boolean;
  467. begin
  468. result:=nil;
  469. { are we allowing array constructor? Then convert it to a set }
  470. if not allow_array_constructor then
  471. begin
  472. hp:=tarrayconstructornode(getcopy);
  473. arrayconstructor_to_set(hp);
  474. resulttypepass(hp);
  475. result:=hp;
  476. exit;
  477. end;
  478. { only pass left tree, right tree contains next construct if any }
  479. htype:=constructortype;
  480. len:=0;
  481. varia:=false;
  482. if assigned(left) then
  483. begin
  484. hp:=self;
  485. while assigned(hp) do
  486. begin
  487. resulttypepass(hp.left);
  488. set_varstate(hp.left,true);
  489. if (htype.def=nil) then
  490. htype:=hp.left.resulttype
  491. else
  492. begin
  493. if ((nf_novariaallowed in flags) or (not varia)) and
  494. (not is_equal(htype.def,hp.left.resulttype.def)) then
  495. begin
  496. varia:=true;
  497. end;
  498. end;
  499. inc(len);
  500. hp:=tarrayconstructornode(hp.right);
  501. end;
  502. end;
  503. if not assigned(htype.def) then
  504. htype:=voidtype;
  505. resulttype.setdef(tarraydef.create(0,len-1,s32bittype));
  506. tarraydef(resulttype.def).elementtype:=htype;
  507. tarraydef(resulttype.def).IsConstructor:=true;
  508. tarraydef(resulttype.def).IsVariant:=varia;
  509. end;
  510. function tarrayconstructornode.pass_1 : tnode;
  511. var
  512. thp,
  513. chp,
  514. hp : tarrayconstructornode;
  515. dovariant : boolean;
  516. htype : ttype;
  517. begin
  518. dovariant:=(nf_forcevaria in flags) or tarraydef(resulttype.def).isvariant;
  519. result:=nil;
  520. { only pass left tree, right tree contains next construct if any }
  521. if assigned(left) then
  522. begin
  523. hp:=self;
  524. while assigned(hp) do
  525. begin
  526. firstpass(hp.left);
  527. { Insert typeconvs for array of const }
  528. if dovariant then
  529. begin
  530. case hp.left.resulttype.def.deftype of
  531. enumdef :
  532. begin
  533. hp.left:=ctypeconvnode.create(hp.left,s32bittype);
  534. firstpass(hp.left);
  535. end;
  536. orddef :
  537. begin
  538. if is_integer(hp.left.resulttype.def) and
  539. not(is_64bitint(hp.left.resulttype.def)) then
  540. begin
  541. hp.left:=ctypeconvnode.create(hp.left,s32bittype);
  542. firstpass(hp.left);
  543. end;
  544. end;
  545. floatdef :
  546. begin
  547. hp.left:=ctypeconvnode.create(hp.left,pbestrealtype^);
  548. firstpass(hp.left);
  549. end;
  550. stringdef :
  551. begin
  552. if nf_cargs in flags then
  553. begin
  554. hp.left:=ctypeconvnode.create(hp.left,charpointertype);
  555. firstpass(hp.left);
  556. end;
  557. end;
  558. procvardef :
  559. begin
  560. hp.left:=ctypeconvnode.create(hp.left,voidpointertype);
  561. firstpass(hp.left);
  562. end;
  563. pointerdef,
  564. classrefdef,
  565. objectdef : ;
  566. else
  567. CGMessagePos1(hp.left.fileinfo,type_e_wrong_type_in_array_constructor,hp.left.resulttype.def.typename);
  568. end;
  569. end;
  570. hp:=tarrayconstructornode(hp.right);
  571. end;
  572. { swap the tree for cargs }
  573. if (nf_cargs in flags) and (not(nf_cargswap in flags)) then
  574. begin
  575. chp:=nil;
  576. { save resulttype }
  577. htype:=resulttype;
  578. { we need a copy here, because self is destroyed }
  579. { by firstpass later }
  580. hp:=tarrayconstructornode(getcopy);
  581. while assigned(hp) do
  582. begin
  583. thp:=tarrayconstructornode(hp.right);
  584. hp.right:=chp;
  585. chp:=hp;
  586. hp:=thp;
  587. end;
  588. include(chp.flags,nf_cargs);
  589. include(chp.flags,nf_cargswap);
  590. calcregisters(chp,0,0,0);
  591. chp.location.loc:=LOC_MEM;
  592. chp.resulttype:=htype;
  593. result:=chp;
  594. exit;
  595. end;
  596. end;
  597. calcregisters(self,0,0,0);
  598. location.loc:=LOC_MEM;
  599. end;
  600. function tarrayconstructornode.docompare(p: tnode): boolean;
  601. begin
  602. docompare :=
  603. inherited docompare(p) and
  604. (constructortype.def = tarrayconstructornode(p).constructortype.def);
  605. end;
  606. {*****************************************************************************
  607. TTYPENODE
  608. *****************************************************************************}
  609. constructor ttypenode.create(t : ttype);
  610. begin
  611. inherited create(typen);
  612. restype:=t;
  613. end;
  614. function ttypenode.det_resulttype:tnode;
  615. begin
  616. result:=nil;
  617. resulttype:=restype;
  618. end;
  619. function ttypenode.pass_1 : tnode;
  620. begin
  621. result:=nil;
  622. end;
  623. function ttypenode.docompare(p: tnode): boolean;
  624. begin
  625. docompare :=
  626. inherited docompare(p);
  627. end;
  628. begin
  629. cloadnode:=tloadnode;
  630. cassignmentnode:=tassignmentnode;
  631. cfuncretnode:=tfuncretnode;
  632. carrayconstructorrangenode:=tarrayconstructorrangenode;
  633. carrayconstructornode:=tarrayconstructornode;
  634. ctypenode:=ttypenode;
  635. end.
  636. {
  637. $Log$
  638. Revision 1.14 2001-04-13 01:22:10 peter
  639. * symtable change to classes
  640. * range check generation and errors fixed, make cycle DEBUG=1 works
  641. * memory leaks fixed
  642. Revision 1.13 2001/04/05 21:03:08 peter
  643. * array constructor fix
  644. Revision 1.12 2001/04/04 22:42:40 peter
  645. * move constant folding into det_resulttype
  646. Revision 1.11 2001/04/02 21:20:31 peter
  647. * resulttype rewrite
  648. Revision 1.10 2000/12/31 11:14:10 jonas
  649. + implemented/fixed docompare() mathods for all nodes (not tested)
  650. + nopt.pas, nadd.pas, i386/n386opt.pas: optimized nodes for adding strings
  651. and constant strings/chars together
  652. * n386add.pas: don't copy temp strings (of size 256) to another temp string
  653. when adding
  654. Revision 1.9 2000/11/29 00:30:33 florian
  655. * unused units removed from uses clause
  656. * some changes for widestrings
  657. Revision 1.8 2000/11/04 14:25:20 florian
  658. + merged Attila's changes for interfaces, not tested yet
  659. Revision 1.7 2000/10/31 22:02:49 peter
  660. * symtable splitted, no real code changes
  661. Revision 1.6 2000/10/14 10:14:50 peter
  662. * moehrendorf oct 2000 rewrite
  663. Revision 1.5 2000/10/01 19:48:24 peter
  664. * lot of compile updates for cg11
  665. Revision 1.4 2000/09/28 19:49:52 florian
  666. *** empty log message ***
  667. Revision 1.3 2000/09/27 18:14:31 florian
  668. * fixed a lot of syntax errors in the n*.pas stuff
  669. Revision 1.2 2000/09/25 15:37:14 florian
  670. * more fixes
  671. Revision 1.1 2000/09/25 14:55:05 florian
  672. * initial revision
  673. }