tcinl.pas 56 KB

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