tcadd.pas 48 KB

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