tcinl.pas 56 KB

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