tcadd.pas 48 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252
  1. {
  2. $Id$
  3. Copyright (c) 1993-98 by Florian Klaempfl
  4. Type checking and register allocation for add node
  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 tcadd;
  19. interface
  20. uses
  21. tree;
  22. procedure firstadd(var p : ptree);
  23. implementation
  24. uses
  25. globtype,systems,tokens,
  26. cobjects,verbose,globals,
  27. symconst,symtable,aasm,types,
  28. hcodegen,htypechk,pass_1,
  29. cpubase,tccnv
  30. ;
  31. {*****************************************************************************
  32. FirstAdd
  33. *****************************************************************************}
  34. procedure firstadd(var p : ptree);
  35. procedure make_bool_equal_size(var p:ptree);
  36. begin
  37. if porddef(p^.left^.resulttype)^.typ>porddef(p^.right^.resulttype)^.typ then
  38. begin
  39. p^.right:=gentypeconvnode(p^.right,porddef(p^.left^.resulttype));
  40. p^.right^.convtyp:=tc_bool_2_int;
  41. p^.right^.explizit:=true;
  42. firstpass(p^.right);
  43. end
  44. else
  45. if porddef(p^.left^.resulttype)^.typ<porddef(p^.right^.resulttype)^.typ then
  46. begin
  47. p^.left:=gentypeconvnode(p^.left,porddef(p^.right^.resulttype));
  48. p^.left^.convtyp:=tc_bool_2_int;
  49. p^.left^.explizit:=true;
  50. firstpass(p^.left);
  51. end;
  52. end;
  53. var
  54. t,hp : ptree;
  55. ot,
  56. lt,rt : ttreetyp;
  57. rv,lv : longint;
  58. rvd,lvd : bestreal;
  59. resdef,
  60. rd,ld : pdef;
  61. tempdef : pdef;
  62. concatstrings : boolean;
  63. { to evalute const sets }
  64. resultset : pconstset;
  65. i : longint;
  66. b : boolean;
  67. optoken : ttoken;
  68. convdone : boolean;
  69. s1,s2 : pchar;
  70. l1,l2 : longint;
  71. { this totally forgets to set the pi_do_call flag !! }
  72. label
  73. no_overload;
  74. begin
  75. { first do the two subtrees }
  76. firstpass(p^.left);
  77. firstpass(p^.right);
  78. if codegenerror then
  79. exit;
  80. { convert array constructors to sets, because there is no other operator
  81. possible for array constructors }
  82. if is_array_constructor(p^.left^.resulttype) then
  83. arrayconstructor_to_set(p^.left);
  84. if is_array_constructor(p^.right^.resulttype) then
  85. arrayconstructor_to_set(p^.right);
  86. { load easier access variables }
  87. lt:=p^.left^.treetype;
  88. rt:=p^.right^.treetype;
  89. rd:=p^.right^.resulttype;
  90. ld:=p^.left^.resulttype;
  91. convdone:=false;
  92. { overloaded operator ? }
  93. if (p^.treetype=starstarn) or
  94. (ld^.deftype=recorddef) or
  95. ((ld^.deftype=arraydef) and
  96. not((cs_mmx in aktlocalswitches) and
  97. is_mmx_able_array(ld)) and
  98. (not (rd^.deftype in [orddef])) and
  99. (not is_chararray(ld))
  100. ) or
  101. { <> and = are defined for classes }
  102. ((ld^.deftype=objectdef) and
  103. (not(pobjectdef(ld)^.is_class) or
  104. not(p^.treetype in [equaln,unequaln])
  105. )
  106. ) or
  107. (rd^.deftype=recorddef) or
  108. ((rd^.deftype=arraydef) and
  109. not((cs_mmx in aktlocalswitches) and
  110. is_mmx_able_array(rd)) and
  111. (not (ld^.deftype in [orddef])) and
  112. (not is_chararray(rd))
  113. ) or
  114. { <> and = are defined for classes }
  115. ((rd^.deftype=objectdef) and
  116. (not(pobjectdef(rd)^.is_class) or
  117. not(p^.treetype in [equaln,unequaln])
  118. )
  119. ) then
  120. begin
  121. {!!!!!!!!! handle paras }
  122. case p^.treetype of
  123. { the nil as symtable signs firstcalln that this is
  124. an overloaded operator }
  125. addn:
  126. optoken:=_PLUS;
  127. subn:
  128. optoken:=_MINUS;
  129. muln:
  130. optoken:=_STAR;
  131. starstarn:
  132. optoken:=_STARSTAR;
  133. slashn:
  134. optoken:=_SLASH;
  135. ltn:
  136. optoken:=tokens._lt;
  137. gtn:
  138. optoken:=tokens._gt;
  139. lten:
  140. optoken:=_lte;
  141. gten:
  142. optoken:=_gte;
  143. equaln,unequaln :
  144. optoken:=_EQUAL;
  145. symdifn :
  146. optoken:=_SYMDIF;
  147. modn :
  148. optoken:=_OP_MOD;
  149. orn :
  150. optoken:=_OP_OR;
  151. xorn :
  152. optoken:=_OP_XOR;
  153. andn :
  154. optoken:=_OP_AND;
  155. divn :
  156. optoken:=_OP_DIV;
  157. shln :
  158. optoken:=_OP_SHL;
  159. shrn :
  160. optoken:=_OP_SHR;
  161. else goto no_overload;
  162. end;
  163. t:=gencallnode(overloaded_operators[optoken],nil);
  164. { we have to convert p^.left and p^.right into
  165. callparanodes }
  166. if t^.symtableprocentry=nil then
  167. begin
  168. CGMessage(parser_e_operator_not_overloaded);
  169. putnode(t);
  170. end
  171. else
  172. begin
  173. inc(t^.symtableprocentry^.refs);
  174. t^.left:=gencallparanode(p^.left,nil);
  175. t^.left:=gencallparanode(p^.right,t^.left);
  176. if p^.treetype=unequaln then
  177. t:=gensinglenode(notn,t);
  178. firstpass(t);
  179. putnode(p);
  180. p:=t;
  181. exit;
  182. end;
  183. end;
  184. no_overload:
  185. { compact consts }
  186. { convert int consts to real consts, if the }
  187. { other operand is a real const }
  188. if (rt=realconstn) and is_constintnode(p^.left) then
  189. begin
  190. t:=genrealconstnode(p^.left^.value,p^.right^.resulttype);
  191. disposetree(p^.left);
  192. p^.left:=t;
  193. lt:=realconstn;
  194. end;
  195. if (lt=realconstn) and is_constintnode(p^.right) then
  196. begin
  197. t:=genrealconstnode(p^.right^.value,p^.left^.resulttype);
  198. disposetree(p^.right);
  199. p^.right:=t;
  200. rt:=realconstn;
  201. end;
  202. { both are int constants, also allow operations on two equal enums
  203. in fpc mode (Needed for conversion of C code) }
  204. if ((lt=ordconstn) and (rt=ordconstn)) and
  205. ((is_constintnode(p^.left) and is_constintnode(p^.right)) or
  206. (is_constboolnode(p^.left) and is_constboolnode(p^.right) and
  207. (p^.treetype in [ltn,lten,gtn,gten,equaln,unequaln,andn,xorn,orn]))) then
  208. begin
  209. { return a boolean for boolean operations (and,xor,or) }
  210. if is_constboolnode(p^.left) then
  211. resdef:=booldef
  212. else
  213. resdef:=s32bitdef;
  214. lv:=p^.left^.value;
  215. rv:=p^.right^.value;
  216. case p^.treetype of
  217. addn : t:=genordinalconstnode(lv+rv,resdef);
  218. subn : t:=genordinalconstnode(lv-rv,resdef);
  219. muln : t:=genordinalconstnode(lv*rv,resdef);
  220. xorn : t:=genordinalconstnode(lv xor rv,resdef);
  221. orn : t:=genordinalconstnode(lv or rv,resdef);
  222. andn : t:=genordinalconstnode(lv and rv,resdef);
  223. ltn : t:=genordinalconstnode(ord(lv<rv),booldef);
  224. lten : t:=genordinalconstnode(ord(lv<=rv),booldef);
  225. gtn : t:=genordinalconstnode(ord(lv>rv),booldef);
  226. gten : t:=genordinalconstnode(ord(lv>=rv),booldef);
  227. equaln : t:=genordinalconstnode(ord(lv=rv),booldef);
  228. unequaln : t:=genordinalconstnode(ord(lv<>rv),booldef);
  229. slashn : begin
  230. { int/int becomes a real }
  231. if int(rv)=0 then
  232. begin
  233. Message(parser_e_invalid_float_operation);
  234. t:=genrealconstnode(0,bestrealdef^);
  235. end
  236. else
  237. t:=genrealconstnode(int(lv)/int(rv),bestrealdef^);
  238. firstpass(t);
  239. end;
  240. else
  241. CGMessage(type_e_mismatch);
  242. end;
  243. disposetree(p);
  244. firstpass(t);
  245. p:=t;
  246. exit;
  247. end;
  248. { both real constants ? }
  249. if (lt=realconstn) and (rt=realconstn) then
  250. begin
  251. lvd:=p^.left^.value_real;
  252. rvd:=p^.right^.value_real;
  253. case p^.treetype of
  254. addn : t:=genrealconstnode(lvd+rvd,bestrealdef^);
  255. subn : t:=genrealconstnode(lvd-rvd,bestrealdef^);
  256. muln : t:=genrealconstnode(lvd*rvd,bestrealdef^);
  257. caretn : t:=genrealconstnode(exp(ln(lvd)*rvd),bestrealdef^);
  258. slashn : begin
  259. if rvd=0 then
  260. begin
  261. Message(parser_e_invalid_float_operation);
  262. t:=genrealconstnode(0,bestrealdef^);
  263. end
  264. else
  265. t:=genrealconstnode(lvd/rvd,bestrealdef^);
  266. end;
  267. ltn : t:=genordinalconstnode(ord(lvd<rvd),booldef);
  268. lten : t:=genordinalconstnode(ord(lvd<=rvd),booldef);
  269. gtn : t:=genordinalconstnode(ord(lvd>rvd),booldef);
  270. gten : t:=genordinalconstnode(ord(lvd>=rvd),booldef);
  271. equaln : t:=genordinalconstnode(ord(lvd=rvd),booldef);
  272. unequaln : t:=genordinalconstnode(ord(lvd<>rvd),booldef);
  273. else
  274. CGMessage(type_e_mismatch);
  275. end;
  276. disposetree(p);
  277. p:=t;
  278. firstpass(p);
  279. exit;
  280. end;
  281. { concating strings ? }
  282. concatstrings:=false;
  283. s1:=nil;
  284. s2:=nil;
  285. if (lt=ordconstn) and (rt=ordconstn) and
  286. is_char(ld) and is_char(rd) then
  287. begin
  288. s1:=strpnew(char(byte(p^.left^.value)));
  289. s2:=strpnew(char(byte(p^.right^.value)));
  290. l1:=1;
  291. l2:=1;
  292. concatstrings:=true;
  293. end
  294. else
  295. if (lt=stringconstn) and (rt=ordconstn) and is_char(rd) then
  296. begin
  297. s1:=getpcharcopy(p^.left);
  298. l1:=p^.left^.length;
  299. s2:=strpnew(char(byte(p^.right^.value)));
  300. l2:=1;
  301. concatstrings:=true;
  302. end
  303. else
  304. if (lt=ordconstn) and (rt=stringconstn) and is_char(ld) then
  305. begin
  306. s1:=strpnew(char(byte(p^.left^.value)));
  307. l1:=1;
  308. s2:=getpcharcopy(p^.right);
  309. l2:=p^.right^.length;
  310. concatstrings:=true;
  311. end
  312. else if (lt=stringconstn) and (rt=stringconstn) then
  313. begin
  314. s1:=getpcharcopy(p^.left);
  315. l1:=p^.left^.length;
  316. s2:=getpcharcopy(p^.right);
  317. l2:=p^.right^.length;
  318. concatstrings:=true;
  319. end;
  320. { I will need to translate all this to ansistrings !!! }
  321. if concatstrings then
  322. begin
  323. case p^.treetype of
  324. addn :
  325. t:=genpcharconstnode(concatansistrings(s1,s2,l1,l2),l1+l2);
  326. ltn :
  327. t:=genordinalconstnode(byte(compareansistrings(s1,s2,l1,l2)<0),booldef);
  328. lten :
  329. t:=genordinalconstnode(byte(compareansistrings(s1,s2,l1,l2)<=0),booldef);
  330. gtn :
  331. t:=genordinalconstnode(byte(compareansistrings(s1,s2,l1,l2)>0),booldef);
  332. gten :
  333. t:=genordinalconstnode(byte(compareansistrings(s1,s2,l1,l2)>=0),booldef);
  334. equaln :
  335. t:=genordinalconstnode(byte(compareansistrings(s1,s2,l1,l2)=0),booldef);
  336. unequaln :
  337. t:=genordinalconstnode(byte(compareansistrings(s1,s2,l1,l2)<>0),booldef);
  338. end;
  339. ansistringdispose(s1,l1);
  340. ansistringdispose(s2,l2);
  341. disposetree(p);
  342. firstpass(t);
  343. p:=t;
  344. exit;
  345. end;
  346. { if both are orddefs then check sub types }
  347. if (ld^.deftype=orddef) and (rd^.deftype=orddef) then
  348. begin
  349. { 2 booleans ? }
  350. if is_boolean(ld) and is_boolean(rd) then
  351. begin
  352. case p^.treetype of
  353. andn,
  354. orn:
  355. begin
  356. calcregisters(p,0,0,0);
  357. make_bool_equal_size(p);
  358. p^.location.loc:=LOC_JUMP;
  359. end;
  360. xorn,ltn,lten,gtn,gten :
  361. begin
  362. make_bool_equal_size(p);
  363. if (p^.left^.location.loc in [LOC_JUMP,LOC_FLAGS]) and
  364. (p^.left^.location.loc in [LOC_JUMP,LOC_FLAGS]) then
  365. calcregisters(p,2,0,0)
  366. else
  367. calcregisters(p,1,0,0);
  368. end;
  369. unequaln,
  370. equaln:
  371. begin
  372. make_bool_equal_size(p);
  373. { Remove any compares with constants }
  374. if (p^.left^.treetype=ordconstn) then
  375. begin
  376. hp:=p^.right;
  377. b:=(p^.left^.value<>0);
  378. ot:=p^.treetype;
  379. disposetree(p^.left);
  380. putnode(p);
  381. p:=hp;
  382. if (not(b) and (ot=equaln)) or
  383. (b and (ot=unequaln)) then
  384. begin
  385. p:=gensinglenode(notn,p);
  386. firstpass(p);
  387. end;
  388. exit;
  389. end;
  390. if (p^.right^.treetype=ordconstn) then
  391. begin
  392. hp:=p^.left;
  393. b:=(p^.right^.value<>0);
  394. ot:=p^.treetype;
  395. disposetree(p^.right);
  396. putnode(p);
  397. p:=hp;
  398. if (not(b) and (ot=equaln)) or
  399. (b and (ot=unequaln)) then
  400. begin
  401. p:=gensinglenode(notn,p);
  402. firstpass(p);
  403. end;
  404. exit;
  405. end;
  406. if (p^.left^.location.loc in [LOC_JUMP,LOC_FLAGS]) and
  407. (p^.left^.location.loc in [LOC_JUMP,LOC_FLAGS]) then
  408. calcregisters(p,2,0,0)
  409. else
  410. calcregisters(p,1,0,0);
  411. end;
  412. else
  413. CGMessage(type_e_mismatch);
  414. end;
  415. { these one can't be in flags! }
  416. if p^.treetype in [xorn,unequaln,equaln] then
  417. begin
  418. if p^.left^.location.loc=LOC_FLAGS then
  419. begin
  420. p^.left:=gentypeconvnode(p^.left,porddef(p^.left^.resulttype));
  421. p^.left^.convtyp:=tc_bool_2_int;
  422. p^.left^.explizit:=true;
  423. firstpass(p^.left);
  424. end;
  425. if p^.right^.location.loc=LOC_FLAGS then
  426. begin
  427. p^.right:=gentypeconvnode(p^.right,porddef(p^.right^.resulttype));
  428. p^.right^.convtyp:=tc_bool_2_int;
  429. p^.right^.explizit:=true;
  430. firstpass(p^.right);
  431. end;
  432. { readjust registers }
  433. calcregisters(p,1,0,0);
  434. end;
  435. convdone:=true;
  436. end
  437. else
  438. { Both are chars? only convert to shortstrings for addn }
  439. if is_char(rd) and is_char(ld) then
  440. begin
  441. if p^.treetype=addn then
  442. begin
  443. p^.left:=gentypeconvnode(p^.left,cshortstringdef);
  444. p^.right:=gentypeconvnode(p^.right,cshortstringdef);
  445. firstpass(p^.left);
  446. firstpass(p^.right);
  447. { here we call STRCOPY }
  448. procinfo^.flags:=procinfo^.flags or pi_do_call;
  449. calcregisters(p,0,0,0);
  450. p^.location.loc:=LOC_MEM;
  451. end
  452. else
  453. calcregisters(p,1,0,0);
  454. convdone:=true;
  455. end
  456. { is there a 64 bit type ? }
  457. else if (porddef(rd)^.typ=s64bit) or (porddef(ld)^.typ=s64bit) then
  458. begin
  459. if (porddef(ld)^.typ<>s64bit) then
  460. begin
  461. p^.left:=gentypeconvnode(p^.left,cs64bitdef);
  462. firstpass(p^.left);
  463. end;
  464. if (porddef(rd)^.typ<>s64bit) then
  465. begin
  466. p^.right:=gentypeconvnode(p^.right,cs64bitdef);
  467. firstpass(p^.right);
  468. end;
  469. calcregisters(p,2,0,0);
  470. convdone:=true;
  471. end
  472. else if (porddef(rd)^.typ=u64bit) or (porddef(ld)^.typ=u64bit) then
  473. begin
  474. if (porddef(ld)^.typ<>u64bit) then
  475. begin
  476. p^.left:=gentypeconvnode(p^.left,cu64bitdef);
  477. firstpass(p^.left);
  478. end;
  479. if (porddef(rd)^.typ<>u64bit) then
  480. begin
  481. p^.right:=gentypeconvnode(p^.right,cu64bitdef);
  482. firstpass(p^.right);
  483. end;
  484. calcregisters(p,2,0,0);
  485. convdone:=true;
  486. end
  487. else
  488. { is there a cardinal? }
  489. if (porddef(rd)^.typ=u32bit) or (porddef(ld)^.typ=u32bit) then
  490. begin
  491. { convert constants to u32bit }
  492. if (porddef(ld)^.typ<>u32bit) then
  493. begin
  494. { s32bit will be used for when the other is also s32bit }
  495. if (porddef(rd)^.typ=s32bit) and (lt<>ordconstn) then
  496. p^.left:=gentypeconvnode(p^.left,s32bitdef)
  497. else
  498. p^.left:=gentypeconvnode(p^.left,u32bitdef);
  499. firstpass(p^.left);
  500. end;
  501. if (porddef(rd)^.typ<>u32bit) then
  502. begin
  503. { s32bit will be used for when the other is also s32bit }
  504. if (porddef(ld)^.typ=s32bit) and (rt<>ordconstn) then
  505. p^.right:=gentypeconvnode(p^.right,s32bitdef)
  506. else
  507. p^.right:=gentypeconvnode(p^.right,u32bitdef);
  508. firstpass(p^.right);
  509. end;
  510. calcregisters(p,1,0,0);
  511. { for unsigned mul we need an extra register }
  512. { p^.registers32:=p^.left^.registers32+p^.right^.registers32; }
  513. if p^.treetype=muln then
  514. inc(p^.registers32);
  515. convdone:=true;
  516. end;
  517. end
  518. else
  519. { left side a setdef, must be before string processing,
  520. else array constructor can be seen as array of char (PFV) }
  521. if (ld^.deftype=setdef) {or is_array_constructor(ld)} then
  522. begin
  523. { trying to add a set element? }
  524. if (p^.treetype=addn) and (rd^.deftype<>setdef) then
  525. begin
  526. if (rt=setelementn) then
  527. begin
  528. if not(is_equal(psetdef(ld)^.setof,rd)) then
  529. CGMessage(type_e_set_element_are_not_comp);
  530. end
  531. else
  532. CGMessage(type_e_mismatch)
  533. end
  534. else
  535. begin
  536. if not(p^.treetype in [addn,subn,symdifn,muln,equaln,unequaln
  537. {$IfNDef NoSetInclusion}
  538. ,lten,gten
  539. {$EndIf NoSetInclusion}
  540. ]) then
  541. CGMessage(type_e_set_operation_unknown);
  542. { right def must be a also be set }
  543. if (rd^.deftype<>setdef) or not(is_equal(rd,ld)) then
  544. CGMessage(type_e_set_element_are_not_comp);
  545. end;
  546. { ranges require normsets }
  547. if (psetdef(ld)^.settype=smallset) and
  548. (rt=setelementn) and
  549. assigned(p^.right^.right) then
  550. begin
  551. { generate a temporary normset def }
  552. tempdef:=new(psetdef,init(psetdef(ld)^.setof,255));
  553. p^.left:=gentypeconvnode(p^.left,tempdef);
  554. firstpass(p^.left);
  555. dispose(tempdef,done);
  556. ld:=p^.left^.resulttype;
  557. end;
  558. { if the destination is not a smallset then insert a typeconv
  559. which loads a smallset into a normal set }
  560. if (psetdef(ld)^.settype<>smallset) and
  561. (psetdef(rd)^.settype=smallset) then
  562. begin
  563. if (p^.right^.treetype=setconstn) then
  564. begin
  565. t:=gensetconstnode(p^.right^.value_set,psetdef(p^.left^.resulttype));
  566. t^.left:=p^.right^.left;
  567. putnode(p^.right);
  568. p^.right:=t;
  569. end
  570. else
  571. p^.right:=gentypeconvnode(p^.right,psetdef(p^.left^.resulttype));
  572. firstpass(p^.right);
  573. end;
  574. { do constant evaluation }
  575. if (p^.right^.treetype=setconstn) and
  576. not assigned(p^.right^.left) and
  577. (p^.left^.treetype=setconstn) and
  578. not assigned(p^.left^.left) then
  579. begin
  580. new(resultset);
  581. case p^.treetype of
  582. addn : begin
  583. for i:=0 to 31 do
  584. resultset^[i]:=
  585. p^.right^.value_set^[i] or p^.left^.value_set^[i];
  586. t:=gensetconstnode(resultset,psetdef(ld));
  587. end;
  588. muln : begin
  589. for i:=0 to 31 do
  590. resultset^[i]:=
  591. p^.right^.value_set^[i] and p^.left^.value_set^[i];
  592. t:=gensetconstnode(resultset,psetdef(ld));
  593. end;
  594. subn : begin
  595. for i:=0 to 31 do
  596. resultset^[i]:=
  597. p^.left^.value_set^[i] and not(p^.right^.value_set^[i]);
  598. t:=gensetconstnode(resultset,psetdef(ld));
  599. end;
  600. symdifn : begin
  601. for i:=0 to 31 do
  602. resultset^[i]:=
  603. p^.left^.value_set^[i] xor p^.right^.value_set^[i];
  604. t:=gensetconstnode(resultset,psetdef(ld));
  605. end;
  606. unequaln : begin
  607. b:=true;
  608. for i:=0 to 31 do
  609. if p^.right^.value_set^[i]=p^.left^.value_set^[i] then
  610. begin
  611. b:=false;
  612. break;
  613. end;
  614. t:=genordinalconstnode(ord(b),booldef);
  615. end;
  616. equaln : begin
  617. b:=true;
  618. for i:=0 to 31 do
  619. if p^.right^.value_set^[i]<>p^.left^.value_set^[i] then
  620. begin
  621. b:=false;
  622. break;
  623. end;
  624. t:=genordinalconstnode(ord(b),booldef);
  625. end;
  626. {$IfNDef NoSetInclusion}
  627. lten : Begin
  628. b := true;
  629. For i := 0 to 31 Do
  630. If (p^.right^.value_set^[i] And p^.left^.value_set^[i]) <>
  631. p^.left^.value_set^[i] Then
  632. Begin
  633. b := false;
  634. Break
  635. End;
  636. t := genordinalconstnode(ord(b),booldef);
  637. End;
  638. gten : Begin
  639. b := true;
  640. For i := 0 to 31 Do
  641. If (p^.left^.value_set^[i] And p^.right^.value_set^[i]) <>
  642. p^.right^.value_set^[i] Then
  643. Begin
  644. b := false;
  645. Break
  646. End;
  647. t := genordinalconstnode(ord(b),booldef);
  648. End;
  649. {$EndIf NoSetInclusion}
  650. end;
  651. dispose(resultset);
  652. disposetree(p);
  653. p:=t;
  654. firstpass(p);
  655. exit;
  656. end
  657. else
  658. if psetdef(ld)^.settype=smallset then
  659. begin
  660. calcregisters(p,1,0,0);
  661. { are we adding set elements ? }
  662. if p^.right^.treetype=setelementn then
  663. begin
  664. { we need at least two registers PM }
  665. if p^.registers32<2 then
  666. p^.registers32:=2;
  667. end;
  668. p^.location.loc:=LOC_REGISTER;
  669. end
  670. else
  671. begin
  672. calcregisters(p,0,0,0);
  673. { here we call SET... }
  674. procinfo^.flags:=procinfo^.flags or pi_do_call;
  675. p^.location.loc:=LOC_MEM;
  676. end;
  677. convdone:=true;
  678. end
  679. else
  680. { is one of the operands a string?,
  681. chararrays are also handled as strings (after conversion) }
  682. if (rd^.deftype=stringdef) or (ld^.deftype=stringdef) or
  683. (is_chararray(rd) and is_chararray(ld)) then
  684. begin
  685. if is_widestring(rd) or is_widestring(ld) then
  686. begin
  687. if not(is_widestring(rd)) then
  688. p^.right:=gentypeconvnode(p^.right,cwidestringdef);
  689. if not(is_widestring(ld)) then
  690. p^.left:=gentypeconvnode(p^.left,cwidestringdef);
  691. p^.resulttype:=cwidestringdef;
  692. { this is only for add, the comparisaion is handled later }
  693. p^.location.loc:=LOC_REGISTER;
  694. end
  695. else if is_ansistring(rd) or is_ansistring(ld) then
  696. begin
  697. if not(is_ansistring(rd)) then
  698. p^.right:=gentypeconvnode(p^.right,cansistringdef);
  699. if not(is_ansistring(ld)) then
  700. p^.left:=gentypeconvnode(p^.left,cansistringdef);
  701. p^.resulttype:=cansistringdef;
  702. { this is only for add, the comparisaion is handled later }
  703. p^.location.loc:=LOC_REGISTER;
  704. end
  705. else if is_longstring(rd) or is_longstring(ld) then
  706. begin
  707. if not(is_longstring(rd)) then
  708. p^.right:=gentypeconvnode(p^.right,clongstringdef);
  709. if not(is_longstring(ld)) then
  710. p^.left:=gentypeconvnode(p^.left,clongstringdef);
  711. p^.resulttype:=clongstringdef;
  712. { this is only for add, the comparisaion is handled later }
  713. p^.location.loc:=LOC_MEM;
  714. end
  715. else
  716. begin
  717. if not(is_shortstring(rd)) then
  718. p^.right:=gentypeconvnode(p^.right,cshortstringdef);
  719. if not(is_shortstring(ld)) then
  720. p^.left:=gentypeconvnode(p^.left,cshortstringdef);
  721. p^.resulttype:=cshortstringdef;
  722. { this is only for add, the comparisaion is handled later }
  723. p^.location.loc:=LOC_MEM;
  724. end;
  725. { only if there is a type cast we need to do again }
  726. { the first pass }
  727. if p^.left^.treetype=typeconvn then
  728. firstpass(p^.left);
  729. if p^.right^.treetype=typeconvn then
  730. firstpass(p^.right);
  731. { here we call STRCONCAT or STRCMP or STRCOPY }
  732. procinfo^.flags:=procinfo^.flags or pi_do_call;
  733. if p^.location.loc=LOC_MEM then
  734. calcregisters(p,0,0,0)
  735. else
  736. calcregisters(p,1,0,0);
  737. convdone:=true;
  738. end
  739. else
  740. { is one a real float ? }
  741. if (rd^.deftype=floatdef) or (ld^.deftype=floatdef) then
  742. begin
  743. { if one is a fixed, then convert to f32bit }
  744. if ((rd^.deftype=floatdef) and (pfloatdef(rd)^.typ=f32bit)) or
  745. ((ld^.deftype=floatdef) and (pfloatdef(ld)^.typ=f32bit)) then
  746. begin
  747. if not is_integer(rd) or (p^.treetype<>muln) then
  748. p^.right:=gentypeconvnode(p^.right,s32fixeddef);
  749. if not is_integer(ld) or (p^.treetype<>muln) then
  750. p^.left:=gentypeconvnode(p^.left,s32fixeddef);
  751. firstpass(p^.left);
  752. firstpass(p^.right);
  753. calcregisters(p,1,0,0);
  754. p^.location.loc:=LOC_REGISTER;
  755. end
  756. else
  757. { convert both to bestreal }
  758. begin
  759. p^.right:=gentypeconvnode(p^.right,bestrealdef^);
  760. p^.left:=gentypeconvnode(p^.left,bestrealdef^);
  761. firstpass(p^.left);
  762. firstpass(p^.right);
  763. calcregisters(p,1,1,0);
  764. p^.location.loc:=LOC_FPU;
  765. end;
  766. convdone:=true;
  767. end
  768. else
  769. { pointer comperation and subtraction }
  770. if (rd^.deftype=pointerdef) and (ld^.deftype=pointerdef) then
  771. begin
  772. p^.location.loc:=LOC_REGISTER;
  773. { p^.right:=gentypeconvnode(p^.right,ld); }
  774. { firstpass(p^.right); }
  775. calcregisters(p,1,0,0);
  776. case p^.treetype of
  777. equaln,unequaln :
  778. begin
  779. if is_equal(p^.right^.resulttype,voidpointerdef) then
  780. begin
  781. p^.right:=gentypeconvnode(p^.right,ld);
  782. firstpass(p^.right);
  783. end
  784. else if is_equal(p^.left^.resulttype,voidpointerdef) then
  785. begin
  786. p^.left:=gentypeconvnode(p^.left,rd);
  787. firstpass(p^.left);
  788. end
  789. else if not(is_equal(ld,rd)) then
  790. CGMessage(type_e_mismatch);
  791. end;
  792. ltn,lten,gtn,gten:
  793. begin
  794. if is_equal(p^.right^.resulttype,voidpointerdef) then
  795. begin
  796. p^.right:=gentypeconvnode(p^.right,ld);
  797. firstpass(p^.right);
  798. end
  799. else if is_equal(p^.left^.resulttype,voidpointerdef) then
  800. begin
  801. p^.left:=gentypeconvnode(p^.left,rd);
  802. firstpass(p^.left);
  803. end
  804. else if not(is_equal(ld,rd)) then
  805. CGMessage(type_e_mismatch);
  806. if not(cs_extsyntax in aktmoduleswitches) then
  807. CGMessage(type_e_mismatch);
  808. end;
  809. subn:
  810. begin
  811. if not(is_equal(ld,rd)) then
  812. CGMessage(type_e_mismatch);
  813. if not(cs_extsyntax in aktmoduleswitches) then
  814. CGMessage(type_e_mismatch);
  815. p^.resulttype:=s32bitdef;
  816. exit;
  817. end;
  818. else CGMessage(type_e_mismatch);
  819. end;
  820. convdone:=true;
  821. end
  822. else
  823. if (rd^.deftype=objectdef) and (ld^.deftype=objectdef) and
  824. pobjectdef(rd)^.is_class and pobjectdef(ld)^.is_class then
  825. begin
  826. p^.location.loc:=LOC_REGISTER;
  827. if pobjectdef(rd)^.is_related(pobjectdef(ld)) then
  828. p^.right:=gentypeconvnode(p^.right,ld)
  829. else
  830. p^.left:=gentypeconvnode(p^.left,rd);
  831. firstpass(p^.right);
  832. firstpass(p^.left);
  833. calcregisters(p,1,0,0);
  834. case p^.treetype of
  835. equaln,unequaln : ;
  836. else CGMessage(type_e_mismatch);
  837. end;
  838. convdone:=true;
  839. end
  840. else
  841. if (rd^.deftype=classrefdef) and (ld^.deftype=classrefdef) then
  842. begin
  843. p^.location.loc:=LOC_REGISTER;
  844. if pobjectdef(pclassrefdef(rd)^.definition)^.is_related(pobjectdef(
  845. pclassrefdef(ld)^.definition)) then
  846. p^.right:=gentypeconvnode(p^.right,ld)
  847. else
  848. p^.left:=gentypeconvnode(p^.left,rd);
  849. firstpass(p^.right);
  850. firstpass(p^.left);
  851. calcregisters(p,1,0,0);
  852. case p^.treetype of
  853. equaln,unequaln : ;
  854. else CGMessage(type_e_mismatch);
  855. end;
  856. convdone:=true;
  857. end
  858. else
  859. { allows comperasion with nil pointer }
  860. if (rd^.deftype=objectdef) and
  861. pobjectdef(rd)^.is_class then
  862. begin
  863. p^.location.loc:=LOC_REGISTER;
  864. p^.left:=gentypeconvnode(p^.left,rd);
  865. firstpass(p^.left);
  866. calcregisters(p,1,0,0);
  867. case p^.treetype of
  868. equaln,unequaln : ;
  869. else CGMessage(type_e_mismatch);
  870. end;
  871. convdone:=true;
  872. end
  873. else
  874. if (ld^.deftype=objectdef) and
  875. pobjectdef(ld)^.is_class then
  876. begin
  877. p^.location.loc:=LOC_REGISTER;
  878. p^.right:=gentypeconvnode(p^.right,ld);
  879. firstpass(p^.right);
  880. calcregisters(p,1,0,0);
  881. case p^.treetype of
  882. equaln,unequaln : ;
  883. else CGMessage(type_e_mismatch);
  884. end;
  885. convdone:=true;
  886. end
  887. else
  888. if (rd^.deftype=classrefdef) then
  889. begin
  890. p^.left:=gentypeconvnode(p^.left,rd);
  891. firstpass(p^.left);
  892. calcregisters(p,1,0,0);
  893. case p^.treetype of
  894. equaln,unequaln : ;
  895. else CGMessage(type_e_mismatch);
  896. end;
  897. convdone:=true;
  898. end
  899. else
  900. if (ld^.deftype=classrefdef) then
  901. begin
  902. p^.right:=gentypeconvnode(p^.right,ld);
  903. firstpass(p^.right);
  904. calcregisters(p,1,0,0);
  905. case p^.treetype of
  906. equaln,unequaln : ;
  907. else
  908. CGMessage(type_e_mismatch);
  909. end;
  910. convdone:=true;
  911. end
  912. else
  913. { support procvar=nil,procvar<>nil }
  914. if ((ld^.deftype=procvardef) and (rt=niln)) or
  915. ((rd^.deftype=procvardef) and (lt=niln)) then
  916. begin
  917. calcregisters(p,1,0,0);
  918. p^.location.loc:=LOC_REGISTER;
  919. case p^.treetype of
  920. equaln,unequaln : ;
  921. else
  922. CGMessage(type_e_mismatch);
  923. end;
  924. convdone:=true;
  925. end
  926. else
  927. if (rd^.deftype=pointerdef) or
  928. is_zero_based_array(rd) then
  929. begin
  930. if is_zero_based_array(rd) then
  931. begin
  932. p^.resulttype:=new(ppointerdef,init(parraydef(rd)^.definition));
  933. p^.right:=gentypeconvnode(p^.right,p^.resulttype);
  934. firstpass(p^.right);
  935. end;
  936. p^.location.loc:=LOC_REGISTER;
  937. p^.left:=gentypeconvnode(p^.left,s32bitdef);
  938. firstpass(p^.left);
  939. calcregisters(p,1,0,0);
  940. if p^.treetype=addn then
  941. begin
  942. if not(cs_extsyntax in aktmoduleswitches) or
  943. (not(is_pchar(ld)) and not(m_add_pointer in aktmodeswitches)) then
  944. CGMessage(type_e_mismatch);
  945. { Dirty hack, to support multiple firstpasses (PFV) }
  946. if (p^.resulttype=nil) and
  947. (rd^.deftype=pointerdef) and
  948. (ppointerdef(rd)^.definition^.size>1) then
  949. begin
  950. p^.left:=gennode(muln,p^.left,genordinalconstnode(ppointerdef(rd)^.definition^.size,s32bitdef));
  951. firstpass(p^.left);
  952. end;
  953. end
  954. else
  955. CGMessage(type_e_mismatch);
  956. convdone:=true;
  957. end
  958. else
  959. if (ld^.deftype=pointerdef) or
  960. is_zero_based_array(ld) then
  961. begin
  962. if is_zero_based_array(ld) then
  963. begin
  964. p^.resulttype:=new(ppointerdef,init(parraydef(ld)^.definition));
  965. p^.left:=gentypeconvnode(p^.left,p^.resulttype);
  966. firstpass(p^.left);
  967. end;
  968. p^.location.loc:=LOC_REGISTER;
  969. p^.right:=gentypeconvnode(p^.right,s32bitdef);
  970. firstpass(p^.right);
  971. calcregisters(p,1,0,0);
  972. case p^.treetype of
  973. addn,subn : begin
  974. if not(cs_extsyntax in aktmoduleswitches) or
  975. (not(is_pchar(ld)) and not(m_add_pointer in aktmodeswitches)) then
  976. CGMessage(type_e_mismatch);
  977. { Dirty hack, to support multiple firstpasses (PFV) }
  978. if (p^.resulttype=nil) and
  979. (ld^.deftype=pointerdef) and
  980. (ppointerdef(ld)^.definition^.size>1) then
  981. begin
  982. p^.right:=gennode(muln,p^.right,
  983. genordinalconstnode(ppointerdef(ld)^.definition^.size,s32bitdef));
  984. firstpass(p^.right);
  985. end;
  986. end;
  987. else
  988. CGMessage(type_e_mismatch);
  989. end;
  990. convdone:=true;
  991. end
  992. else
  993. if (rd^.deftype=procvardef) and (ld^.deftype=procvardef) and is_equal(rd,ld) then
  994. begin
  995. calcregisters(p,1,0,0);
  996. p^.location.loc:=LOC_REGISTER;
  997. case p^.treetype of
  998. equaln,unequaln : ;
  999. else
  1000. CGMessage(type_e_mismatch);
  1001. end;
  1002. convdone:=true;
  1003. end
  1004. else
  1005. {$ifdef SUPPORT_MMX}
  1006. if (cs_mmx in aktlocalswitches) and is_mmx_able_array(ld) and
  1007. is_mmx_able_array(rd) and is_equal(ld,rd) then
  1008. begin
  1009. firstpass(p^.right);
  1010. firstpass(p^.left);
  1011. case p^.treetype of
  1012. addn,subn,xorn,orn,andn:
  1013. ;
  1014. { mul is a little bit restricted }
  1015. muln:
  1016. if not(mmx_type(p^.left^.resulttype) in
  1017. [mmxu16bit,mmxs16bit,mmxfixed16]) then
  1018. CGMessage(type_e_mismatch);
  1019. else
  1020. CGMessage(type_e_mismatch);
  1021. end;
  1022. p^.location.loc:=LOC_MMXREGISTER;
  1023. calcregisters(p,0,0,1);
  1024. convdone:=true;
  1025. end
  1026. else
  1027. {$endif SUPPORT_MMX}
  1028. if (ld^.deftype=enumdef) and (rd^.deftype=enumdef) and (is_equal(ld,rd)) then
  1029. begin
  1030. calcregisters(p,1,0,0);
  1031. case p^.treetype of
  1032. equaln,unequaln,
  1033. ltn,lten,gtn,gten : ;
  1034. else CGMessage(type_e_mismatch);
  1035. end;
  1036. convdone:=true;
  1037. end;
  1038. { the general solution is to convert to 32 bit int }
  1039. if not convdone then
  1040. begin
  1041. { but an int/int gives real/real! }
  1042. if p^.treetype=slashn then
  1043. begin
  1044. CGMessage(type_h_use_div_for_int);
  1045. p^.right:=gentypeconvnode(p^.right,bestrealdef^);
  1046. p^.left:=gentypeconvnode(p^.left,bestrealdef^);
  1047. firstpass(p^.left);
  1048. firstpass(p^.right);
  1049. { maybe we need an integer register to save }
  1050. { a reference }
  1051. if ((p^.left^.location.loc<>LOC_FPU) or
  1052. (p^.right^.location.loc<>LOC_FPU)) and
  1053. (p^.left^.registers32=p^.right^.registers32) then
  1054. calcregisters(p,1,1,0)
  1055. else
  1056. calcregisters(p,0,1,0);
  1057. p^.location.loc:=LOC_FPU;
  1058. end
  1059. else
  1060. begin
  1061. p^.right:=gentypeconvnode(p^.right,s32bitdef);
  1062. p^.left:=gentypeconvnode(p^.left,s32bitdef);
  1063. firstpass(p^.left);
  1064. firstpass(p^.right);
  1065. calcregisters(p,1,0,0);
  1066. p^.location.loc:=LOC_REGISTER;
  1067. end;
  1068. end;
  1069. if codegenerror then
  1070. exit;
  1071. { determines result type for comparions }
  1072. { here the is a problem with multiple passes }
  1073. { example length(s)+1 gets internal 'longint' type first }
  1074. { if it is a arg it is converted to 'LONGINT' }
  1075. { but a second first pass will reset this to 'longint' }
  1076. case p^.treetype of
  1077. ltn,lten,gtn,gten,equaln,unequaln:
  1078. begin
  1079. if (not assigned(p^.resulttype)) or
  1080. (p^.resulttype^.deftype=stringdef) then
  1081. p^.resulttype:=booldef;
  1082. if is_64bitint(p^.left^.resulttype) then
  1083. p^.location.loc:=LOC_JUMP
  1084. else
  1085. p^.location.loc:=LOC_FLAGS;
  1086. end;
  1087. xorn:
  1088. begin
  1089. if not assigned(p^.resulttype) then
  1090. p^.resulttype:=p^.left^.resulttype;
  1091. p^.location.loc:=LOC_REGISTER;
  1092. end;
  1093. addn:
  1094. begin
  1095. if not assigned(p^.resulttype) then
  1096. begin
  1097. { for strings, return is always a 255 char string }
  1098. if is_shortstring(p^.left^.resulttype) then
  1099. p^.resulttype:=cshortstringdef
  1100. else
  1101. p^.resulttype:=p^.left^.resulttype;
  1102. end;
  1103. end;
  1104. else
  1105. p^.resulttype:=p^.left^.resulttype;
  1106. end;
  1107. end;
  1108. end.
  1109. {
  1110. $Log$
  1111. Revision 1.55 1999-11-17 17:05:06 pierre
  1112. * Notes/hints changes
  1113. Revision 1.54 1999/11/16 23:45:28 pierre
  1114. * global var token was changed by overload code (form bug 707)
  1115. Revision 1.53 1999/11/15 21:53:42 peter
  1116. * fixed constant eval for bool xor/or/and bool
  1117. Revision 1.52 1999/11/15 17:53:00 pierre
  1118. + one field added for ttoken record for operator
  1119. linking the id to the corresponding operator token that
  1120. can now now all be overloaded
  1121. * overloaded operators are resetted to nil in InitSymtable
  1122. (bug when trying to compile a uint that overloads operators twice)
  1123. Revision 1.51 1999/11/06 14:34:29 peter
  1124. * truncated log to 20 revs
  1125. Revision 1.50 1999/09/27 23:45:00 peter
  1126. * procinfo is now a pointer
  1127. * support for result setting in sub procedure
  1128. Revision 1.49 1999/09/16 13:39:14 peter
  1129. * arrayconstructor 2 set conversion is now called always in the
  1130. beginning of firstadd
  1131. Revision 1.48 1999/09/15 20:35:45 florian
  1132. * small fix to operator overloading when in MMX mode
  1133. + the compiler uses now fldz and fld1 if possible
  1134. + some fixes to floating point registers
  1135. + some math. functions (arctan, ln, sin, cos, sqrt, sqr, pi) are now inlined
  1136. * .... ???
  1137. Revision 1.47 1999/09/13 16:28:05 peter
  1138. * typo in previous commit open_array -> chararray :(
  1139. Revision 1.46 1999/09/10 15:40:46 peter
  1140. * fixed array check for operators, becuase array can also be a set
  1141. Revision 1.45 1999/09/08 16:05:29 peter
  1142. * pointer add/sub is now as expected and the same results as inc/dec
  1143. Revision 1.44 1999/09/07 07:52:19 peter
  1144. * > < >= <= support for boolean
  1145. * boolean constants are now calculated like integer constants
  1146. Revision 1.43 1999/08/23 23:44:05 pierre
  1147. * setelementn registers32 corrected
  1148. Revision 1.42 1999/08/07 11:29:27 peter
  1149. * better fix for muln register allocation
  1150. Revision 1.41 1999/08/05 21:58:57 peter
  1151. * fixed register count ord*ord
  1152. Revision 1.40 1999/08/04 13:03:13 jonas
  1153. * all tokens now start with an underscore
  1154. * PowerPC compiles!!
  1155. Revision 1.39 1999/08/04 00:23:33 florian
  1156. * renamed i386asm and i386base to cpuasm and cpubase
  1157. Revision 1.38 1999/08/03 22:03:24 peter
  1158. * moved bitmask constants to sets
  1159. * some other type/const renamings
  1160. Revision 1.37 1999/07/16 10:04:37 peter
  1161. * merged
  1162. Revision 1.36 1999/06/17 15:32:48 pierre
  1163. * merged from 0-99-12 branch
  1164. Revision 1.34.2.3 1999/07/16 09:54:58 peter
  1165. * @procvar support in tp7 mode works again
  1166. Revision 1.34.2.2 1999/06/17 15:25:07 pierre
  1167. * for arrays of char operators can not be overloaded
  1168. Revision 1.35 1999/06/17 13:19:57 pierre
  1169. * merged from 0_99_12 branch
  1170. Revision 1.34.2.1 1999/06/17 12:35:23 pierre
  1171. * allow array binary operator overloading if not with orddef
  1172. Revision 1.34 1999/06/02 10:11:52 florian
  1173. * make cycle fixed i.e. compilation with 0.99.10
  1174. * some fixes for qword
  1175. * start of register calling conventions
  1176. }