tcinl.pas 54 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327
  1. {
  2. $Id$
  3. Copyright (c) 1993-98 by Florian Klaempfl
  4. Type checking and register allocation for inline 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 tcinl;
  19. interface
  20. uses
  21. tree;
  22. procedure firstinline(var p : ptree);
  23. implementation
  24. uses
  25. cobjects,verbose,globals,systems,
  26. globtype,
  27. symconst,symtable,aasm,types,
  28. hcodegen,htypechk,pass_1,
  29. tccal,cpubase
  30. {$ifdef i386}
  31. ,tgeni386
  32. {$endif}
  33. ;
  34. {*****************************************************************************
  35. FirstInLine
  36. *****************************************************************************}
  37. procedure firstinline(var p : ptree);
  38. var
  39. vl,vl2 : longint;
  40. vr : bestreal;
  41. p1,hp,hpp : ptree;
  42. {$ifndef NOCOLONCHECK}
  43. frac_para,length_para : ptree;
  44. {$endif ndef NOCOLONCHECK}
  45. store_count_ref,
  46. isreal,
  47. dowrite,
  48. store_valid,
  49. file_is_typed : boolean;
  50. procedure do_lowhigh(adef : pdef);
  51. var
  52. v : longint;
  53. enum : penumsym;
  54. begin
  55. case Adef^.deftype of
  56. orddef:
  57. begin
  58. if p^.inlinenumber=in_low_x then
  59. v:=porddef(Adef)^.low
  60. else
  61. v:=porddef(Adef)^.high;
  62. hp:=genordinalconstnode(v,adef);
  63. firstpass(hp);
  64. disposetree(p);
  65. p:=hp;
  66. end;
  67. enumdef:
  68. begin
  69. enum:=Penumdef(Adef)^.firstenum;
  70. if p^.inlinenumber=in_high_x then
  71. while enum^.nextenum<>nil do
  72. enum:=enum^.nextenum;
  73. hp:=genenumnode(enum);
  74. disposetree(p);
  75. p:=hp;
  76. end;
  77. else
  78. internalerror(87);
  79. end;
  80. end;
  81. begin
  82. store_valid:=must_be_valid;
  83. store_count_ref:=count_ref;
  84. count_ref:=false;
  85. if not (p^.inlinenumber in [in_read_x,in_readln_x,in_sizeof_x,
  86. in_typeof_x,in_ord_x,in_str_x_string,in_val_x,
  87. in_reset_typedfile,in_rewrite_typedfile]) then
  88. must_be_valid:=true
  89. else
  90. must_be_valid:=false;
  91. { if we handle writeln; p^.left contains no valid address }
  92. if assigned(p^.left) then
  93. begin
  94. if p^.left^.treetype=callparan then
  95. firstcallparan(p^.left,nil)
  96. else
  97. firstpass(p^.left);
  98. left_right_max(p);
  99. set_location(p^.location,p^.left^.location);
  100. end;
  101. { handle intern constant functions in separate case }
  102. if p^.inlineconst then
  103. begin
  104. hp:=nil;
  105. { no parameters? }
  106. if not assigned(p^.left) then
  107. begin
  108. case p^.inlinenumber of
  109. in_const_pi :
  110. hp:=genrealconstnode(pi,bestrealdef^);
  111. else
  112. internalerror(89);
  113. end;
  114. end
  115. else
  116. { process constant expression with parameter }
  117. begin
  118. vl:=0;
  119. vl2:=0; { second parameter Ex: ptr(vl,vl2) }
  120. vr:=0;
  121. isreal:=false;
  122. case p^.left^.treetype of
  123. realconstn :
  124. begin
  125. isreal:=true;
  126. vr:=p^.left^.value_real;
  127. end;
  128. ordconstn :
  129. vl:=p^.left^.value;
  130. callparan :
  131. begin
  132. { both exists, else it was not generated }
  133. vl:=p^.left^.left^.value;
  134. vl2:=p^.left^.right^.left^.value;
  135. end;
  136. else
  137. CGMessage(cg_e_illegal_expression);
  138. end;
  139. case p^.inlinenumber of
  140. in_const_trunc :
  141. begin
  142. if isreal then
  143. begin
  144. if (vr>=2147483648.0) or (vr<=-2147483649.0) then
  145. begin
  146. CGMessage(parser_e_range_check_error);
  147. hp:=genordinalconstnode(1,s32bitdef)
  148. end
  149. else
  150. hp:=genordinalconstnode(trunc(vr),s32bitdef)
  151. end
  152. else
  153. hp:=genordinalconstnode(trunc(vl),s32bitdef);
  154. end;
  155. in_const_round :
  156. begin
  157. if isreal then
  158. begin
  159. if (vr>=2147483647.5) or (vr<=-2147483648.5) then
  160. begin
  161. CGMessage(parser_e_range_check_error);
  162. hp:=genordinalconstnode(1,s32bitdef)
  163. end
  164. else
  165. hp:=genordinalconstnode(round(vr),s32bitdef)
  166. end
  167. else
  168. hp:=genordinalconstnode(round(vl),s32bitdef);
  169. end;
  170. in_const_frac :
  171. begin
  172. if isreal then
  173. hp:=genrealconstnode(frac(vr),bestrealdef^)
  174. else
  175. hp:=genrealconstnode(frac(vl),bestrealdef^);
  176. end;
  177. in_const_int :
  178. begin
  179. if isreal then
  180. hp:=genrealconstnode(int(vr),bestrealdef^)
  181. else
  182. hp:=genrealconstnode(int(vl),bestrealdef^);
  183. end;
  184. in_const_abs :
  185. begin
  186. if isreal then
  187. hp:=genrealconstnode(abs(vr),bestrealdef^)
  188. else
  189. hp:=genordinalconstnode(abs(vl),p^.left^.resulttype);
  190. end;
  191. in_const_sqr :
  192. begin
  193. if isreal then
  194. hp:=genrealconstnode(sqr(vr),bestrealdef^)
  195. else
  196. hp:=genordinalconstnode(sqr(vl),p^.left^.resulttype);
  197. end;
  198. in_const_odd :
  199. begin
  200. if isreal then
  201. CGMessage1(type_e_integer_expr_expected,p^.left^.resulttype^.typename)
  202. else
  203. hp:=genordinalconstnode(byte(odd(vl)),booldef);
  204. end;
  205. in_const_swap_word :
  206. begin
  207. if isreal then
  208. CGMessage1(type_e_integer_expr_expected,p^.left^.resulttype^.typename)
  209. else
  210. hp:=genordinalconstnode((vl and $ff) shl 8+(vl shr 8),p^.left^.resulttype);
  211. end;
  212. in_const_swap_long :
  213. begin
  214. if isreal then
  215. CGMessage(type_e_mismatch)
  216. else
  217. hp:=genordinalconstnode((vl and $ffff) shl 16+(vl shr 16),p^.left^.resulttype);
  218. end;
  219. in_const_ptr :
  220. begin
  221. if isreal then
  222. CGMessage(type_e_mismatch)
  223. else
  224. hp:=genordinalconstnode((vl2 shl 16) or vl,voidpointerdef);
  225. end;
  226. in_const_sqrt :
  227. begin
  228. if isreal then
  229. begin
  230. if vr<0.0 then
  231. CGMessage(type_e_wrong_math_argument)
  232. else
  233. hp:=genrealconstnode(sqrt(vr),bestrealdef^)
  234. end
  235. else
  236. begin
  237. if vl<0 then
  238. CGMessage(type_e_wrong_math_argument)
  239. else
  240. hp:=genrealconstnode(sqrt(vl),bestrealdef^);
  241. end;
  242. end;
  243. in_const_arctan :
  244. begin
  245. if isreal then
  246. hp:=genrealconstnode(arctan(vr),bestrealdef^)
  247. else
  248. hp:=genrealconstnode(arctan(vl),bestrealdef^);
  249. end;
  250. in_const_cos :
  251. begin
  252. if isreal then
  253. hp:=genrealconstnode(cos(vr),bestrealdef^)
  254. else
  255. hp:=genrealconstnode(cos(vl),bestrealdef^);
  256. end;
  257. in_const_sin :
  258. begin
  259. if isreal then
  260. hp:=genrealconstnode(sin(vr),bestrealdef^)
  261. else
  262. hp:=genrealconstnode(sin(vl),bestrealdef^);
  263. end;
  264. in_const_exp :
  265. begin
  266. if isreal then
  267. hp:=genrealconstnode(exp(vr),bestrealdef^)
  268. else
  269. hp:=genrealconstnode(exp(vl),bestrealdef^);
  270. end;
  271. in_const_ln :
  272. begin
  273. if isreal then
  274. begin
  275. if vr<=0.0 then
  276. CGMessage(type_e_wrong_math_argument)
  277. else
  278. hp:=genrealconstnode(ln(vr),bestrealdef^)
  279. end
  280. else
  281. begin
  282. if vl<=0 then
  283. CGMessage(type_e_wrong_math_argument)
  284. else
  285. hp:=genrealconstnode(ln(vl),bestrealdef^);
  286. end;
  287. end;
  288. else
  289. internalerror(88);
  290. end;
  291. end;
  292. disposetree(p);
  293. if hp=nil then
  294. hp:=genzeronode(errorn);
  295. firstpass(hp);
  296. p:=hp;
  297. end
  298. else
  299. begin
  300. case p^.inlinenumber of
  301. in_lo_qword,
  302. in_hi_qword,
  303. in_lo_long,
  304. in_hi_long,
  305. in_lo_word,
  306. in_hi_word:
  307. begin
  308. if p^.registers32<1 then
  309. p^.registers32:=1;
  310. if p^.inlinenumber in [in_lo_word,in_hi_word] then
  311. p^.resulttype:=u8bitdef
  312. else if p^.inlinenumber in [in_lo_qword,in_hi_qword] then
  313. begin
  314. p^.resulttype:=u32bitdef;
  315. if (m_tp in aktmodeswitches) or
  316. (m_delphi in aktmodeswitches) then
  317. CGMessage(type_w_maybe_wrong_hi_lo);
  318. end
  319. else
  320. begin
  321. p^.resulttype:=u16bitdef;
  322. if (m_tp in aktmodeswitches) or
  323. (m_delphi in aktmodeswitches) then
  324. CGMessage(type_w_maybe_wrong_hi_lo);
  325. end;
  326. p^.location.loc:=LOC_REGISTER;
  327. if not is_integer(p^.left^.resulttype) then
  328. CGMessage(type_e_mismatch)
  329. else
  330. begin
  331. if p^.left^.treetype=ordconstn then
  332. begin
  333. case p^.inlinenumber of
  334. in_lo_word : hp:=genordinalconstnode(p^.left^.value and $ff,p^.left^.resulttype);
  335. in_hi_word : hp:=genordinalconstnode(p^.left^.value shr 8,p^.left^.resulttype);
  336. in_lo_long : hp:=genordinalconstnode(p^.left^.value and $ffff,p^.left^.resulttype);
  337. in_hi_long : hp:=genordinalconstnode(p^.left^.value shr 16,p^.left^.resulttype);
  338. in_lo_qword : hp:=genordinalconstnode(p^.left^.value and $ffffffff,p^.left^.resulttype);
  339. in_hi_qword : hp:=genordinalconstnode(p^.left^.value shr 32,p^.left^.resulttype);
  340. end;
  341. disposetree(p);
  342. firstpass(hp);
  343. p:=hp;
  344. end;
  345. end;
  346. end;
  347. in_sizeof_x:
  348. begin
  349. if push_high_param(p^.left^.resulttype) then
  350. begin
  351. getsymonlyin(p^.left^.symtable,'high'+pvarsym(p^.left^.symtableentry)^.name);
  352. hp:=gennode(addn,genloadnode(pvarsym(srsym),p^.left^.symtable),
  353. genordinalconstnode(1,s32bitdef));
  354. if (p^.left^.resulttype^.deftype=arraydef) and
  355. (parraydef(p^.left^.resulttype)^.elesize<>1) then
  356. hp:=gennode(muln,hp,genordinalconstnode(parraydef(p^.left^.resulttype)^.elesize,s32bitdef));
  357. disposetree(p);
  358. p:=hp;
  359. firstpass(p);
  360. end;
  361. if p^.registers32<1 then
  362. p^.registers32:=1;
  363. p^.resulttype:=s32bitdef;
  364. p^.location.loc:=LOC_REGISTER;
  365. end;
  366. in_typeof_x:
  367. begin
  368. if p^.registers32<1 then
  369. p^.registers32:=1;
  370. p^.location.loc:=LOC_REGISTER;
  371. p^.resulttype:=voidpointerdef;
  372. end;
  373. in_ord_x:
  374. begin
  375. if (p^.left^.treetype=ordconstn) then
  376. begin
  377. hp:=genordinalconstnode(p^.left^.value,s32bitdef);
  378. disposetree(p);
  379. p:=hp;
  380. firstpass(p);
  381. end
  382. else
  383. begin
  384. if (p^.left^.resulttype^.deftype=orddef) then
  385. if (porddef(p^.left^.resulttype)^.typ in [uchar,bool8bit]) then
  386. begin
  387. if porddef(p^.left^.resulttype)^.typ=bool8bit then
  388. begin
  389. hp:=gentypeconvnode(p^.left,u8bitdef);
  390. putnode(p);
  391. p:=hp;
  392. p^.convtyp:=tc_bool_2_int;
  393. p^.explizit:=true;
  394. firstpass(p);
  395. end
  396. else
  397. begin
  398. hp:=gentypeconvnode(p^.left,u8bitdef);
  399. putnode(p);
  400. p:=hp;
  401. p^.explizit:=true;
  402. firstpass(p);
  403. end;
  404. end
  405. { can this happen ? }
  406. else if (porddef(p^.left^.resulttype)^.typ=uvoid) then
  407. CGMessage(type_e_mismatch)
  408. else
  409. { all other orddef need no transformation }
  410. begin
  411. hp:=p^.left;
  412. putnode(p);
  413. p:=hp;
  414. end
  415. else if (p^.left^.resulttype^.deftype=enumdef) then
  416. begin
  417. hp:=gentypeconvnode(p^.left,s32bitdef);
  418. putnode(p);
  419. p:=hp;
  420. p^.explizit:=true;
  421. firstpass(p);
  422. end
  423. else
  424. begin
  425. { can anything else be ord() ?}
  426. CGMessage(type_e_mismatch);
  427. end;
  428. end;
  429. end;
  430. in_chr_byte:
  431. begin
  432. hp:=gentypeconvnode(p^.left,cchardef);
  433. putnode(p);
  434. p:=hp;
  435. p^.explizit:=true;
  436. firstpass(p);
  437. end;
  438. in_length_string:
  439. begin
  440. if is_ansistring(p^.left^.resulttype) then
  441. p^.resulttype:=s32bitdef
  442. else
  443. p^.resulttype:=u8bitdef;
  444. { we don't need string conversations here }
  445. if (p^.left^.treetype=typeconvn) and
  446. (p^.left^.left^.resulttype^.deftype=stringdef) then
  447. begin
  448. hp:=p^.left^.left;
  449. putnode(p^.left);
  450. p^.left:=hp;
  451. end;
  452. { check the type, must be string or char }
  453. if (p^.left^.resulttype^.deftype<>stringdef) and
  454. (not is_char(p^.left^.resulttype)) then
  455. CGMessage(type_e_mismatch);
  456. { evaluates length of constant strings direct }
  457. if (p^.left^.treetype=stringconstn) then
  458. begin
  459. hp:=genordinalconstnode(p^.left^.length,s32bitdef);
  460. disposetree(p);
  461. firstpass(hp);
  462. p:=hp;
  463. end
  464. { length of char is one allways }
  465. else if is_constcharnode(p^.left) then
  466. begin
  467. hp:=genordinalconstnode(1,s32bitdef);
  468. disposetree(p);
  469. firstpass(hp);
  470. p:=hp;
  471. end;
  472. end;
  473. in_assigned_x:
  474. begin
  475. p^.resulttype:=booldef;
  476. p^.location.loc:=LOC_FLAGS;
  477. end;
  478. in_pred_x,
  479. in_succ_x:
  480. begin
  481. inc(p^.registers32);
  482. p^.resulttype:=p^.left^.resulttype;
  483. p^.location.loc:=LOC_REGISTER;
  484. if not is_ordinal(p^.resulttype) then
  485. CGMessage(type_e_ordinal_expr_expected)
  486. else
  487. begin
  488. if (p^.resulttype^.deftype=enumdef) and
  489. (penumdef(p^.resulttype)^.has_jumps) then
  490. CGMessage(type_e_succ_and_pred_enums_with_assign_not_possible)
  491. else
  492. if p^.left^.treetype=ordconstn then
  493. begin
  494. if p^.inlinenumber=in_succ_x then
  495. hp:=genordinalconstnode(p^.left^.value+1,p^.left^.resulttype)
  496. else
  497. hp:=genordinalconstnode(p^.left^.value-1,p^.left^.resulttype);
  498. disposetree(p);
  499. firstpass(hp);
  500. p:=hp;
  501. end;
  502. end;
  503. end;
  504. in_inc_x,
  505. in_dec_x:
  506. begin
  507. p^.resulttype:=voiddef;
  508. if assigned(p^.left) then
  509. begin
  510. firstcallparan(p^.left,nil);
  511. if codegenerror then
  512. exit;
  513. { first param must be var }
  514. if p^.left^.left^.location.loc<>LOC_REFERENCE then
  515. CGMessage(type_e_argument_must_be_lvalue);
  516. { check type }
  517. if (p^.left^.resulttype^.deftype in [enumdef,pointerdef]) or
  518. is_ordinal(p^.left^.resulttype) then
  519. begin
  520. { two paras ? }
  521. if assigned(p^.left^.right) then
  522. begin
  523. { insert a type conversion }
  524. { the second param is always longint }
  525. p^.left^.right^.left:=gentypeconvnode(p^.left^.right^.left,s32bitdef);
  526. { check the type conversion }
  527. firstpass(p^.left^.right^.left);
  528. { need we an additional register ? }
  529. if not(is_constintnode(p^.left^.right^.left)) and
  530. (p^.left^.right^.left^.location.loc in [LOC_MEM,LOC_REFERENCE]) and
  531. (p^.left^.right^.left^.registers32<=1) then
  532. inc(p^.registers32);
  533. if assigned(p^.left^.right^.right) then
  534. CGMessage(cg_e_illegal_expression);
  535. end;
  536. end
  537. else
  538. CGMessage(type_e_ordinal_expr_expected);
  539. end
  540. else
  541. CGMessage(type_e_mismatch);
  542. end;
  543. in_read_x,
  544. in_readln_x,
  545. in_write_x,
  546. in_writeln_x :
  547. begin
  548. { needs a call }
  549. procinfo.flags:=procinfo.flags or pi_do_call;
  550. p^.resulttype:=voiddef;
  551. { we must know if it is a typed file or not }
  552. { but we must first do the firstpass for it }
  553. file_is_typed:=false;
  554. if assigned(p^.left) then
  555. begin
  556. dowrite:=(p^.inlinenumber in [in_write_x,in_writeln_x]);
  557. firstcallparan(p^.left,nil);
  558. { now we can check }
  559. hp:=p^.left;
  560. while assigned(hp^.right) do
  561. hp:=hp^.right;
  562. { if resulttype is not assigned, then automatically }
  563. { file is not typed. }
  564. if assigned(hp) and assigned(hp^.resulttype) then
  565. Begin
  566. if (hp^.resulttype^.deftype=filedef) and
  567. (pfiledef(hp^.resulttype)^.filetype=ft_typed) then
  568. begin
  569. file_is_typed:=true;
  570. { test the type }
  571. hpp:=p^.left;
  572. while (hpp<>hp) do
  573. begin
  574. if (hpp^.left^.treetype=typen) then
  575. CGMessage(type_e_cant_read_write_type);
  576. if not is_equal(hpp^.resulttype,pfiledef(hp^.resulttype)^.typed_as) then
  577. CGMessage(type_e_mismatch);
  578. { generate the high() value for the shortstring }
  579. if ((not dowrite) and is_shortstring(hpp^.left^.resulttype)) or
  580. (is_chararray(hpp^.left^.resulttype)) then
  581. gen_high_tree(hpp,true);
  582. hpp:=hpp^.right;
  583. end;
  584. end;
  585. end; { endif assigned(hp) }
  586. { insert type conversions for write(ln) }
  587. if (not file_is_typed) then
  588. begin
  589. hp:=p^.left;
  590. while assigned(hp) do
  591. begin
  592. if (hp^.left^.treetype=typen) then
  593. CGMessage(type_e_cant_read_write_type);
  594. if assigned(hp^.left^.resulttype) then
  595. begin
  596. isreal:=false;
  597. { support writeln(procvar) }
  598. if (hp^.left^.resulttype^.deftype=procvardef) then
  599. begin
  600. p1:=gencallnode(nil,nil);
  601. p1^.right:=hp^.left;
  602. p1^.resulttype:=pprocvardef(hp^.left^.resulttype)^.retdef;
  603. firstpass(p1);
  604. hp^.left:=p1;
  605. end;
  606. case hp^.left^.resulttype^.deftype of
  607. filedef :
  608. begin
  609. { only allowed as first parameter }
  610. if assigned(hp^.right) then
  611. CGMessage(type_e_cant_read_write_type);
  612. end;
  613. stringdef :
  614. begin
  615. { generate the high() value for the shortstring }
  616. if (not dowrite) and
  617. is_shortstring(hp^.left^.resulttype) then
  618. gen_high_tree(hp,true);
  619. end;
  620. pointerdef :
  621. begin
  622. if not is_pchar(hp^.left^.resulttype) then
  623. CGMessage(type_e_cant_read_write_type);
  624. end;
  625. floatdef :
  626. begin
  627. isreal:=true;
  628. end;
  629. orddef :
  630. begin
  631. case porddef(hp^.left^.resulttype)^.typ of
  632. uchar,
  633. u32bit,s32bit,
  634. u64bit,s64bit:
  635. ;
  636. u8bit,s8bit,
  637. u16bit,s16bit :
  638. if dowrite then
  639. hp^.left:=gentypeconvnode(hp^.left,s32bitdef);
  640. bool8bit,
  641. bool16bit,
  642. bool32bit :
  643. if dowrite then
  644. hp^.left:=gentypeconvnode(hp^.left,booldef)
  645. else
  646. CGMessage(type_e_cant_read_write_type);
  647. else
  648. CGMessage(type_e_cant_read_write_type);
  649. end;
  650. end;
  651. arraydef :
  652. begin
  653. if is_chararray(hp^.left^.resulttype) then
  654. gen_high_tree(hp,true)
  655. else
  656. CGMessage(type_e_cant_read_write_type);
  657. end;
  658. else
  659. CGMessage(type_e_cant_read_write_type);
  660. end;
  661. { some format options ? }
  662. if hp^.is_colon_para then
  663. begin
  664. if hp^.right^.is_colon_para then
  665. begin
  666. frac_para:=hp;
  667. length_para:=hp^.right;
  668. hp:=hp^.right;
  669. hpp:=hp^.right;
  670. end
  671. else
  672. begin
  673. length_para:=hp;
  674. frac_para:=nil;
  675. hpp:=hp^.right;
  676. end;
  677. isreal:=(hpp^.left^.resulttype^.deftype=floatdef);
  678. if (not is_integer(length_para^.left^.resulttype)) then
  679. CGMessage1(type_e_integer_expr_expected,length_para^.left^.resulttype^.typename)
  680. else
  681. length_para^.left:=gentypeconvnode(length_para^.left,s32bitdef);
  682. if assigned(frac_para) then
  683. begin
  684. if isreal then
  685. begin
  686. if (not is_integer(frac_para^.left^.resulttype)) then
  687. CGMessage1(type_e_integer_expr_expected,frac_para^.left^.resulttype^.typename)
  688. else
  689. frac_para^.left:=gentypeconvnode(frac_para^.left,s32bitdef);
  690. end
  691. else
  692. CGMessage(parser_e_illegal_colon_qualifier);
  693. end;
  694. { do the checking for the colon'd arg }
  695. hp:=length_para;
  696. end;
  697. end;
  698. hp:=hp^.right;
  699. end;
  700. end;
  701. { pass all parameters again for the typeconversions }
  702. if codegenerror then
  703. exit;
  704. must_be_valid:=true;
  705. firstcallparan(p^.left,nil);
  706. { calc registers }
  707. left_right_max(p);
  708. end;
  709. end;
  710. in_settextbuf_file_x :
  711. begin
  712. { warning here p^.left is the callparannode
  713. not the argument directly }
  714. { p^.left^.left is text var }
  715. { p^.left^.right^.left is the buffer var }
  716. { firstcallparan(p^.left,nil);
  717. already done in firstcalln }
  718. { now we know the type of buffer }
  719. getsymonlyin(systemunit,'SETTEXTBUF');
  720. hp:=gencallnode(pprocsym(srsym),systemunit);
  721. hp^.left:=gencallparanode(
  722. genordinalconstnode(p^.left^.left^.resulttype^.size,s32bitdef),p^.left);
  723. putnode(p);
  724. p:=hp;
  725. firstpass(p);
  726. end;
  727. { the firstpass of the arg has been done in firstcalln ? }
  728. in_reset_typedfile,
  729. in_rewrite_typedfile :
  730. begin
  731. procinfo.flags:=procinfo.flags or pi_do_call;
  732. { to be sure the right definition is loaded }
  733. p^.left^.resulttype:=nil;
  734. firstpass(p^.left);
  735. p^.resulttype:=voiddef;
  736. end;
  737. in_str_x_string :
  738. begin
  739. procinfo.flags:=procinfo.flags or pi_do_call;
  740. p^.resulttype:=voiddef;
  741. { check the amount of parameters }
  742. if not(assigned(p^.left)) or
  743. not(assigned(p^.left^.right)) then
  744. begin
  745. CGMessage(parser_e_wrong_parameter_size);
  746. exit;
  747. end;
  748. { first pass just the string for first local use }
  749. hp:=p^.left^.right;
  750. must_be_valid:=false;
  751. count_ref:=true;
  752. p^.left^.right:=nil;
  753. firstcallparan(p^.left,nil);
  754. { remove warning when result is passed }
  755. if (p^.left^.left^.treetype=funcretn) then
  756. procinfo.funcret_is_valid:=true;
  757. must_be_valid:=true;
  758. p^.left^.right:=hp;
  759. firstcallparan(p^.left^.right,nil);
  760. hp:=p^.left;
  761. { valid string ? }
  762. if not assigned(hp) or
  763. (hp^.left^.resulttype^.deftype<>stringdef) or
  764. (hp^.right=nil) or
  765. (hp^.left^.location.loc<>LOC_REFERENCE) then
  766. CGMessage(cg_e_illegal_expression);
  767. { generate the high() value for the shortstring }
  768. if is_shortstring(hp^.left^.resulttype) then
  769. gen_high_tree(hp,true);
  770. { !!!! check length of string }
  771. while assigned(hp^.right) do
  772. hp:=hp^.right;
  773. { check and convert the first param }
  774. if hp^.is_colon_para then
  775. CGMessage(cg_e_illegal_expression);
  776. isreal:=false;
  777. case hp^.resulttype^.deftype of
  778. orddef :
  779. begin
  780. case porddef(hp^.left^.resulttype)^.typ of
  781. u32bit,s32bit,
  782. s64bit,u64bit:
  783. ;
  784. u8bit,s8bit,
  785. u16bit,s16bit:
  786. hp^.left:=gentypeconvnode(hp^.left,s32bitdef);
  787. else
  788. CGMessage(type_e_integer_or_real_expr_expected);
  789. end;
  790. end;
  791. floatdef :
  792. begin
  793. isreal:=true;
  794. end;
  795. else
  796. CGMessage(type_e_integer_or_real_expr_expected);
  797. end;
  798. { some format options ? }
  799. hpp:=p^.left^.right;
  800. if assigned(hpp) and hpp^.is_colon_para then
  801. begin
  802. if (not is_integer(hpp^.resulttype)) then
  803. CGMessage1(type_e_integer_expr_expected,hpp^.resulttype^.typename)
  804. else
  805. hpp^.left:=gentypeconvnode(hpp^.left,s32bitdef);
  806. hpp:=hpp^.right;
  807. if assigned(hpp) and hpp^.is_colon_para then
  808. begin
  809. if isreal then
  810. begin
  811. if (not is_integer(hpp^.resulttype)) then
  812. CGMessage1(type_e_integer_expr_expected,hpp^.resulttype^.typename)
  813. else
  814. hpp^.left:=gentypeconvnode(hpp^.left,s32bitdef);
  815. end
  816. else
  817. CGMessage(parser_e_illegal_colon_qualifier);
  818. end;
  819. end;
  820. { for first local use }
  821. must_be_valid:=false;
  822. count_ref:=true;
  823. { pass all parameters again for the typeconversions }
  824. if codegenerror then
  825. exit;
  826. must_be_valid:=true;
  827. firstcallparan(p^.left,nil);
  828. { calc registers }
  829. left_right_max(p);
  830. end;
  831. in_val_x :
  832. begin
  833. procinfo.flags:=procinfo.flags or pi_do_call;
  834. p^.resulttype:=voiddef;
  835. { check the amount of parameters }
  836. if not(assigned(p^.left)) or
  837. not(assigned(p^.left^.right)) then
  838. begin
  839. CGMessage(parser_e_wrong_parameter_size);
  840. exit;
  841. end;
  842. If Assigned(p^.left^.right^.right) Then
  843. {there is a "code" parameter}
  844. Begin
  845. { first pass just the code parameter for first local use}
  846. hp := p^.left^.right;
  847. p^.left^.right := nil;
  848. must_be_valid := false;
  849. count_ref := true;
  850. make_not_regable(p^.left^.left);
  851. firstcallparan(p^.left, nil);
  852. if codegenerror then exit;
  853. p^.left^.right := hp;
  854. {code has to be a var parameter}
  855. if (p^.left^.left^.location.loc<>LOC_REFERENCE) then
  856. CGMessage(type_e_variable_id_expected)
  857. else
  858. if (p^.left^.left^.resulttype^.deftype <> orddef) or
  859. not(porddef(p^.left^.left^.resulttype)^.typ in
  860. [u16bit,s16bit,u32bit,s32bit]) then
  861. CGMessage(type_e_mismatch);
  862. hpp := p^.left^.right
  863. End
  864. Else hpp := p^.left;
  865. {now hpp = the destination value tree}
  866. { first pass just the destination parameter for first local use}
  867. hp:=hpp^.right;
  868. must_be_valid:=false;
  869. count_ref:=true;
  870. hpp^.right:=nil;
  871. {hpp = destination}
  872. make_not_regable(hpp^.left);
  873. firstcallparan(hpp,nil);
  874. if codegenerror then
  875. exit;
  876. { remove warning when result is passed }
  877. if (hpp^.left^.treetype=funcretn) then
  878. procinfo.funcret_is_valid:=true;
  879. hpp^.right := hp;
  880. if (hpp^.left^.location.loc<>LOC_REFERENCE) then
  881. CGMessage(type_e_variable_id_expected)
  882. else
  883. If Not((hpp^.left^.resulttype^.deftype = floatdef) or
  884. ((hpp^.left^.resulttype^.deftype = orddef) And
  885. (POrdDef(hpp^.left^.resulttype)^.typ in
  886. [u32bit,s32bit,
  887. u8bit,s8bit,u16bit,s16bit,s64bit,u64bit])))
  888. Then CGMessage(type_e_mismatch);
  889. must_be_valid:=true;
  890. {hp = source (String)}
  891. count_ref := false;
  892. must_be_valid := true;
  893. firstcallparan(hp,nil);
  894. if codegenerror then
  895. exit;
  896. { if not a stringdef then insert a type conv which
  897. does the other type checking }
  898. If (hp^.left^.resulttype^.deftype<>stringdef) then
  899. begin
  900. hp^.left:=gentypeconvnode(hp^.left,cshortstringdef);
  901. firstpass(hp);
  902. end;
  903. { calc registers }
  904. left_right_max(p);
  905. { val doesn't calculate the registers really }
  906. { correct, we need one register extra (FK) }
  907. if is_64bitint(hpp^.left^.resulttype) then
  908. inc(p^.registers32,2)
  909. else
  910. inc(p^.registers32,1);
  911. end;
  912. in_include_x_y,
  913. in_exclude_x_y:
  914. begin
  915. p^.resulttype:=voiddef;
  916. if assigned(p^.left) then
  917. begin
  918. firstcallparan(p^.left,nil);
  919. p^.registers32:=p^.left^.registers32;
  920. p^.registersfpu:=p^.left^.registersfpu;
  921. {$ifdef SUPPORT_MMX}
  922. p^.registersmmx:=p^.left^.registersmmx;
  923. {$endif SUPPORT_MMX}
  924. { remove warning when result is passed }
  925. if (p^.left^.left^.treetype=funcretn) then
  926. procinfo.funcret_is_valid:=true;
  927. { first param must be var }
  928. if (p^.left^.left^.location.loc<>LOC_REFERENCE) and
  929. (p^.left^.left^.location.loc<>LOC_CREGISTER) then
  930. CGMessage(cg_e_illegal_expression);
  931. { check type }
  932. if (p^.left^.resulttype^.deftype=setdef) then
  933. begin
  934. { two paras ? }
  935. if assigned(p^.left^.right) then
  936. begin
  937. { insert a type conversion }
  938. { to the type of the set elements }
  939. p^.left^.right^.left:=gentypeconvnode(
  940. p^.left^.right^.left,
  941. psetdef(p^.left^.resulttype)^.setof);
  942. { check the type conversion }
  943. firstpass(p^.left^.right^.left);
  944. { only three parameters are allowed }
  945. if assigned(p^.left^.right^.right) then
  946. CGMessage(cg_e_illegal_expression);
  947. end;
  948. end
  949. else
  950. CGMessage(type_e_mismatch);
  951. end
  952. else
  953. CGMessage(type_e_mismatch);
  954. end;
  955. in_low_x,
  956. in_high_x:
  957. begin
  958. if p^.left^.treetype in [typen,loadn,subscriptn] then
  959. begin
  960. case p^.left^.resulttype^.deftype of
  961. orddef,enumdef:
  962. begin
  963. do_lowhigh(p^.left^.resulttype);
  964. firstpass(p);
  965. end;
  966. setdef:
  967. begin
  968. do_lowhigh(Psetdef(p^.left^.resulttype)^.setof);
  969. firstpass(p);
  970. end;
  971. arraydef:
  972. begin
  973. if p^.inlinenumber=in_low_x then
  974. begin
  975. hp:=genordinalconstnode(Parraydef(p^.left^.resulttype)^.lowrange,
  976. Parraydef(p^.left^.resulttype)^.rangedef);
  977. disposetree(p);
  978. p:=hp;
  979. firstpass(p);
  980. end
  981. else
  982. begin
  983. if is_open_array(p^.left^.resulttype) or
  984. is_array_of_const(p^.left^.resulttype) then
  985. begin
  986. getsymonlyin(p^.left^.symtable,'high'+pvarsym(p^.left^.symtableentry)^.name);
  987. hp:=genloadnode(pvarsym(srsym),p^.left^.symtable);
  988. disposetree(p);
  989. p:=hp;
  990. firstpass(p);
  991. end
  992. else
  993. begin
  994. hp:=genordinalconstnode(Parraydef(p^.left^.resulttype)^.highrange,
  995. Parraydef(p^.left^.resulttype)^.rangedef);
  996. disposetree(p);
  997. p:=hp;
  998. firstpass(p);
  999. end;
  1000. end;
  1001. end;
  1002. stringdef:
  1003. begin
  1004. if p^.inlinenumber=in_low_x then
  1005. begin
  1006. hp:=genordinalconstnode(0,u8bitdef);
  1007. disposetree(p);
  1008. p:=hp;
  1009. firstpass(p);
  1010. end
  1011. else
  1012. begin
  1013. if is_open_string(p^.left^.resulttype) then
  1014. begin
  1015. getsymonlyin(p^.left^.symtable,'high'+pvarsym(p^.left^.symtableentry)^.name);
  1016. hp:=genloadnode(pvarsym(srsym),p^.left^.symtable);
  1017. disposetree(p);
  1018. p:=hp;
  1019. firstpass(p);
  1020. end
  1021. else
  1022. begin
  1023. hp:=genordinalconstnode(Pstringdef(p^.left^.resulttype)^.len,u8bitdef);
  1024. disposetree(p);
  1025. p:=hp;
  1026. firstpass(p);
  1027. end;
  1028. end;
  1029. end;
  1030. else
  1031. CGMessage(type_e_mismatch);
  1032. end;
  1033. end
  1034. else
  1035. CGMessage(type_e_varid_or_typeid_expected);
  1036. end;
  1037. {$ifdef SUPPORT_MMX}
  1038. in_mmx_pcmpeqb..in_mmx_pcmpgtw:
  1039. begin
  1040. end;
  1041. {$endif SUPPORT_MMX}
  1042. in_assert_x_y :
  1043. begin
  1044. p^.resulttype:=voiddef;
  1045. if assigned(p^.left) then
  1046. begin
  1047. firstcallparan(p^.left,nil);
  1048. p^.registers32:=p^.left^.registers32;
  1049. p^.registersfpu:=p^.left^.registersfpu;
  1050. {$ifdef SUPPORT_MMX}
  1051. p^.registersmmx:=p^.left^.registersmmx;
  1052. {$endif SUPPORT_MMX}
  1053. { check type }
  1054. if is_boolean(p^.left^.resulttype) then
  1055. begin
  1056. { must always be a string }
  1057. p^.left^.right^.left:=gentypeconvnode(p^.left^.right^.left,cshortstringdef);
  1058. firstpass(p^.left^.right^.left);
  1059. end
  1060. else
  1061. CGMessage(type_e_mismatch);
  1062. end
  1063. else
  1064. CGMessage(type_e_mismatch);
  1065. end;
  1066. else
  1067. internalerror(8);
  1068. end;
  1069. end;
  1070. { generate an error if no resulttype is set }
  1071. if not assigned(p^.resulttype) then
  1072. p^.resulttype:=generrordef;
  1073. must_be_valid:=store_valid;
  1074. count_ref:=store_count_ref;
  1075. end;
  1076. end.
  1077. {
  1078. $Log$
  1079. Revision 1.50 1999-09-07 14:05:11 pierre
  1080. * halt removed in do_lowhigh
  1081. Revision 1.49 1999/08/28 15:34:21 florian
  1082. * bug 519 fixed
  1083. Revision 1.48 1999/08/23 23:41:04 pierre
  1084. * in_inc_x register allocation corrected
  1085. Revision 1.47 1999/08/06 12:43:13 jonas
  1086. * fix for regvars with the val code
  1087. Revision 1.46 1999/08/05 16:53:23 peter
  1088. * V_Fatal=1, all other V_ are also increased
  1089. * Check for local procedure when assigning procvar
  1090. * fixed comment parsing because directives
  1091. * oldtp mode directives better supported
  1092. * added some messages to errore.msg
  1093. Revision 1.45 1999/08/04 00:23:40 florian
  1094. * renamed i386asm and i386base to cpuasm and cpubase
  1095. Revision 1.44 1999/08/03 22:03:32 peter
  1096. * moved bitmask constants to sets
  1097. * some other type/const renamings
  1098. Revision 1.43 1999/07/30 12:28:43 peter
  1099. * fixed crash with unknown id and colon parameter in write
  1100. Revision 1.42 1999/07/18 14:47:35 florian
  1101. * bug 487 fixed, (inc(<property>) isn't allowed)
  1102. * more fixes to compile with Delphi
  1103. Revision 1.41 1999/07/05 20:25:40 peter
  1104. * merged
  1105. Revision 1.40 1999/07/05 20:13:18 peter
  1106. * removed temp defines
  1107. Revision 1.39 1999/07/03 14:14:31 florian
  1108. + start of val(int64/qword)
  1109. * longbool, wordbool constants weren't written, fixed
  1110. Revision 1.38 1999/07/01 15:49:22 florian
  1111. * int64/qword type release
  1112. + lo/hi for int64/qword
  1113. Revision 1.37 1999/06/25 10:02:56 florian
  1114. * bug 459 fixed
  1115. Revision 1.36 1999/06/15 18:58:36 peter
  1116. * merged
  1117. Revision 1.35.2.2 1999/07/05 20:06:46 peter
  1118. * give error instead of warning for ln(0) and sqrt(0)
  1119. Revision 1.35.2.1 1999/06/15 18:54:54 peter
  1120. * more procvar fixes
  1121. Revision 1.35 1999/05/27 19:45:19 peter
  1122. * removed oldasm
  1123. * plabel -> pasmlabel
  1124. * -a switches to source writing automaticly
  1125. * assembler readers OOPed
  1126. * asmsymbol automaticly external
  1127. * jumptables and other label fixes for asm readers
  1128. Revision 1.34 1999/05/23 18:42:20 florian
  1129. * better error recovering in typed constants
  1130. * some problems with arrays of const fixed, some problems
  1131. due my previous
  1132. - the location type of array constructor is now LOC_MEM
  1133. - the pushing of high fixed
  1134. - parameter copying fixed
  1135. - zero temp. allocation removed
  1136. * small problem in the assembler writers fixed:
  1137. ref to nil wasn't written correctly
  1138. Revision 1.33 1999/05/06 09:05:35 peter
  1139. * generic write_float and str_float
  1140. * fixed constant float conversions
  1141. Revision 1.32 1999/05/05 22:25:21 florian
  1142. * fixed register allocation for val
  1143. Revision 1.31 1999/05/02 21:33:57 florian
  1144. * several bugs regarding -Or fixed
  1145. Revision 1.30 1999/05/01 13:24:53 peter
  1146. * merged nasm compiler
  1147. * old asm moved to oldasm/
  1148. Revision 1.29 1999/04/28 06:02:15 florian
  1149. * changes of Bruessel:
  1150. + message handler can now take an explicit self
  1151. * typinfo fixed: sometimes the type names weren't written
  1152. * the type checking for pointer comparisations and subtraction
  1153. and are now more strict (was also buggy)
  1154. * small bug fix to link.pas to support compiling on another
  1155. drive
  1156. * probable bug in popt386 fixed: call/jmp => push/jmp
  1157. transformation didn't count correctly the jmp references
  1158. + threadvar support
  1159. * warning if ln/sqrt gets an invalid constant argument
  1160. Revision 1.28 1999/04/26 18:28:12 peter
  1161. * better read/write array
  1162. Revision 1.27 1999/04/26 09:32:22 peter
  1163. * try to convert to string for val()
  1164. Revision 1.26 1999/04/15 14:10:51 pierre
  1165. * fix for bug0238.pp
  1166. Revision 1.25 1999/04/15 10:00:35 peter
  1167. * writeln(procvar) support for tp7 mode
  1168. Revision 1.24 1999/04/14 09:15:07 peter
  1169. * first things to store the symbol/def number in the ppu
  1170. Revision 1.23 1999/04/08 10:16:48 peter
  1171. * funcret_valid flag is set for inline functions
  1172. Revision 1.22 1999/03/26 00:05:48 peter
  1173. * released valintern
  1174. + deffile is now removed when compiling is finished
  1175. * ^( compiles now correct
  1176. + static directive
  1177. * shrd fixed
  1178. Revision 1.21 1999/03/24 23:17:37 peter
  1179. * fixed bugs 212,222,225,227,229,231,233
  1180. Revision 1.20 1999/03/16 17:52:55 jonas
  1181. * changes for internal Val code (do a "make cycle OPT=-dvalintern" to test)
  1182. * in cgi386inl: also range checking for subrange types (compile with "-dreadrangecheck")
  1183. * in cgai386: also small fixes to emitrangecheck
  1184. Revision 1.19 1999/02/22 12:36:34 florian
  1185. + warning for lo/hi(longint/dword) in -So and -Sd mode added
  1186. Revision 1.18 1999/02/22 02:15:49 peter
  1187. * updates for ag386bin
  1188. Revision 1.17 1999/02/01 00:00:50 florian
  1189. * compiler crash fixed when constant arguments passed to round/trunc
  1190. exceeds the longint range
  1191. Revision 1.16 1999/01/28 19:43:43 peter
  1192. * fixed high generation for ansistrings with str,writeln
  1193. Revision 1.15 1999/01/27 16:28:22 pierre
  1194. * bug0157 solved : write(x:5.3) is rejected now
  1195. Revision 1.14 1999/01/21 22:10:50 peter
  1196. * fixed array of const
  1197. * generic platform independent high() support
  1198. Revision 1.13 1998/12/30 22:13:13 peter
  1199. * check the amount of paras for Str()
  1200. Revision 1.12 1998/12/15 10:23:31 peter
  1201. + -iSO, -iSP, -iTO, -iTP
  1202. Revision 1.11 1998/12/11 23:36:08 florian
  1203. + again more stuff for int64/qword:
  1204. - comparision operators
  1205. - code generation for: str, read(ln), write(ln)
  1206. Revision 1.10 1998/11/27 14:50:53 peter
  1207. + open strings, $P switch support
  1208. Revision 1.9 1998/11/24 17:04:28 peter
  1209. * fixed length(char) when char is a variable
  1210. Revision 1.8 1998/11/14 10:51:33 peter
  1211. * fixed low/high for record.field
  1212. Revision 1.7 1998/11/13 10:15:52 peter
  1213. * fixed ptr() with constants
  1214. Revision 1.6 1998/11/05 12:03:05 peter
  1215. * released useansistring
  1216. * removed -Sv, its now available in fpc modes
  1217. Revision 1.5 1998/10/20 11:16:47 pierre
  1218. + length(c) where C is a char is allways 1
  1219. Revision 1.4 1998/10/06 20:49:11 peter
  1220. * m68k compiler compiles again
  1221. Revision 1.3 1998/10/05 12:32:49 peter
  1222. + assert() support
  1223. Revision 1.2 1998/10/02 09:24:23 peter
  1224. * more constant expression evaluators
  1225. Revision 1.1 1998/09/23 20:42:24 peter
  1226. * splitted pass_1
  1227. }