nld.pas 26 KB

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