ncon.pas 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788
  1. {
  2. $Id$
  3. Copyright (c) 2000 by Florian Klaempfl
  4. Type checking and register allocation for constants
  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 ncon;
  19. {$i defines.inc}
  20. interface
  21. uses
  22. globtype,widestr,
  23. node,
  24. aasm,cpuinfo,
  25. symconst,symtype,symdef,symsym;
  26. type
  27. trealconstnode = class(tnode)
  28. value_real : bestreal;
  29. lab_real : pasmlabel;
  30. constructor create(v : bestreal;def : pdef);virtual;
  31. function getcopy : tnode;override;
  32. function pass_1 : tnode;override;
  33. function docompare(p: tnode) : boolean; override;
  34. end;
  35. tfixconstnode = class(tnode)
  36. value_fix: longint;
  37. constructor create(v : longint;def : pdef);virtual;
  38. function getcopy : tnode;override;
  39. function pass_1 : tnode;override;
  40. function docompare(p: tnode) : boolean; override;
  41. end;
  42. tordconstnode = class(tnode)
  43. value : TConstExprInt;
  44. constructor create(v : tconstexprint;def : pdef);virtual;
  45. function getcopy : tnode;override;
  46. function pass_1 : tnode;override;
  47. function docompare(p: tnode) : boolean; override;
  48. end;
  49. tpointerconstnode = class(tnode)
  50. value : TPointerOrd;
  51. constructor create(v : tpointerord;def : pdef);virtual;
  52. function getcopy : tnode;override;
  53. function pass_1 : tnode;override;
  54. function docompare(p: tnode) : boolean; override;
  55. end;
  56. tstringconstnode = class(tnode)
  57. value_str : pchar;
  58. len : longint;
  59. lab_str : pasmlabel;
  60. stringtype : tstringtype;
  61. constructor createstr(const s : string;st:tstringtype);virtual;
  62. constructor createpchar(s : pchar;l : longint);virtual;
  63. constructor createwstr(const w : tcompilerwidestring);virtual;
  64. destructor destroy;override;
  65. function getcopy : tnode;override;
  66. function pass_1 : tnode;override;
  67. function getpcharcopy : pchar;
  68. function docompare(p: tnode) : boolean; override;
  69. end;
  70. tsetconstnode = class(tunarynode)
  71. value_set : pconstset;
  72. lab_set : pasmlabel;
  73. constructor create(s : pconstset;settype : psetdef);virtual;
  74. destructor destroy;override;
  75. function getcopy : tnode;override;
  76. function pass_1 : tnode;override;
  77. function docompare(p: tnode) : boolean; override;
  78. end;
  79. tnilnode = class(tnode)
  80. constructor create;virtual;
  81. function pass_1 : tnode;override;
  82. end;
  83. var
  84. crealconstnode : class of trealconstnode;
  85. cfixconstnode : class of tfixconstnode;
  86. cordconstnode : class of tordconstnode;
  87. cpointerconstnode : class of tpointerconstnode;
  88. cstringconstnode : class of tstringconstnode;
  89. csetconstnode : class of tsetconstnode;
  90. cnilnode : class of tnilnode;
  91. function genordinalconstnode(v : TConstExprInt;def : pdef) : tordconstnode;
  92. { same as genordinalconstnode, but the resulttype }
  93. { is determines automatically }
  94. function genintconstnode(v : TConstExprInt) : tordconstnode;
  95. function genpointerconstnode(v : tpointerord;def : pdef) : tpointerconstnode;
  96. function genenumnode(v : penumsym) : tordconstnode;
  97. function genfixconstnode(v : longint;def : pdef) : tfixconstnode;
  98. function genrealconstnode(v : bestreal;def : pdef) : trealconstnode;
  99. { allow pchar or string for defining a pchar node }
  100. function genstringconstnode(const s : string;st:tstringtype) : tstringconstnode;
  101. { length is required for ansistrings }
  102. function genpcharconstnode(s : pchar;length : longint) : tstringconstnode;
  103. function genwstringconstnode(const w : tcompilerwidestring) : tnode;
  104. function gensetconstnode(s : pconstset;settype : psetdef) : tsetconstnode;
  105. { some helper routines }
  106. {$ifdef INT64FUNCRESOK}
  107. function get_ordinal_value(p : tnode) : TConstExprInt;
  108. {$else INT64FUNCRESOK}
  109. function get_ordinal_value(p : tnode) : longint;
  110. {$endif INT64FUNCRESOK}
  111. function is_constnode(p : tnode) : boolean;
  112. function is_constintnode(p : tnode) : boolean;
  113. function is_constcharnode(p : tnode) : boolean;
  114. function is_constrealnode(p : tnode) : boolean;
  115. function is_constboolnode(p : tnode) : boolean;
  116. function is_constresourcestringnode(p : tnode) : boolean;
  117. function str_length(p : tnode) : longint;
  118. function is_emptyset(p : tnode):boolean;
  119. function genconstsymtree(p : pconstsym) : tnode;
  120. implementation
  121. uses
  122. cutils,verbose,globals,systems,
  123. types,cpubase,nld;
  124. function genordinalconstnode(v : tconstexprint;def : pdef) : tordconstnode;
  125. begin
  126. genordinalconstnode:=cordconstnode.create(v,def);
  127. end;
  128. function genintconstnode(v : TConstExprInt) : tordconstnode;
  129. var
  130. i,i2 : TConstExprInt;
  131. begin
  132. { we need to bootstrap this code, so it's a little bit messy }
  133. i:=2147483647;
  134. { maxcardinal }
  135. i2 := i+i+1;
  136. if (v<=i) and (v>=-i-1) then
  137. genintconstnode:=genordinalconstnode(v,s32bitdef)
  138. else if (v > i) and (v <= i2) then
  139. genintconstnode:=genordinalconstnode(v,u32bitdef)
  140. else
  141. genintconstnode:=genordinalconstnode(v,cs64bitdef);
  142. end;
  143. function genpointerconstnode(v : tpointerord;def : pdef) : tpointerconstnode;
  144. begin
  145. genpointerconstnode:=cpointerconstnode.create(v,def);
  146. end;
  147. function genenumnode(v : penumsym) : tordconstnode;
  148. begin
  149. genenumnode:=cordconstnode.create(v^.value,v^.definition);
  150. end;
  151. function gensetconstnode(s : pconstset;settype : psetdef) : tsetconstnode;
  152. begin
  153. gensetconstnode:=csetconstnode.create(s,settype);
  154. end;
  155. function genrealconstnode(v : bestreal;def : pdef) : trealconstnode;
  156. begin
  157. genrealconstnode:=crealconstnode.create(v,def);
  158. end;
  159. function genfixconstnode(v : longint;def : pdef) : tfixconstnode;
  160. begin
  161. genfixconstnode:=cfixconstnode.create(v,def);
  162. end;
  163. function genstringconstnode(const s : string;st:tstringtype) : tstringconstnode;
  164. begin
  165. genstringconstnode:=cstringconstnode.createstr(s,st);
  166. end;
  167. function genwstringconstnode(const w : tcompilerwidestring) : tnode;
  168. begin
  169. genwstringconstnode:=cstringconstnode.createwstr(w);
  170. end;
  171. function genpcharconstnode(s : pchar;length : longint) : tstringconstnode;
  172. begin
  173. genpcharconstnode:=cstringconstnode.createpchar(s,length);
  174. end;
  175. {$ifdef INT64FUNCRESOK}
  176. function get_ordinal_value(p : tnode) : TConstExprInt;
  177. {$else INT64FUNCRESOK}
  178. function get_ordinal_value(p : tnode) : longint;
  179. {$endif INT64FUNCRESOK}
  180. begin
  181. if p.nodetype=ordconstn then
  182. get_ordinal_value:=tordconstnode(p).value
  183. else
  184. begin
  185. Message(type_e_ordinal_expr_expected);
  186. get_ordinal_value:=0;
  187. end;
  188. end;
  189. function is_constnode(p : tnode) : boolean;
  190. begin
  191. is_constnode:=(p.nodetype in [ordconstn,realconstn,stringconstn,fixconstn,setconstn]);
  192. end;
  193. function is_constintnode(p : tnode) : boolean;
  194. begin
  195. is_constintnode:=(p.nodetype=ordconstn) and is_integer(p.resulttype);
  196. end;
  197. function is_constcharnode(p : tnode) : boolean;
  198. begin
  199. is_constcharnode:=(p.nodetype=ordconstn) and is_char(p.resulttype);
  200. end;
  201. function is_constrealnode(p : tnode) : boolean;
  202. begin
  203. is_constrealnode:=(p.nodetype=realconstn);
  204. end;
  205. function is_constboolnode(p : tnode) : boolean;
  206. begin
  207. is_constboolnode:=(p.nodetype=ordconstn) and is_boolean(p.resulttype);
  208. end;
  209. function is_constresourcestringnode(p : tnode) : boolean;
  210. begin
  211. is_constresourcestringnode:=(p.nodetype=loadn) and
  212. (tloadnode(p).symtableentry^.typ=constsym) and
  213. (pconstsym(tloadnode(p).symtableentry)^.consttyp=constresourcestring);
  214. end;
  215. function str_length(p : tnode) : longint;
  216. begin
  217. str_length:=tstringconstnode(p).len;
  218. end;
  219. function is_emptyset(p : tnode):boolean;
  220. var
  221. i : longint;
  222. begin
  223. i:=0;
  224. if p.nodetype=setconstn then
  225. begin
  226. while (i<32) and (tsetconstnode(p).value_set^[i]=0) do
  227. inc(i);
  228. end;
  229. is_emptyset:=(i=32);
  230. end;
  231. function genconstsymtree(p : pconstsym) : tnode;
  232. var
  233. p1 : tnode;
  234. len : longint;
  235. pc : pchar;
  236. begin
  237. p1:=nil;
  238. case p^.consttyp of
  239. constint :
  240. if (p^.value >= -maxlongint-1) and (p^.value <= maxlongint) then
  241. p1:=genordinalconstnode(p^.value,s32bitdef)
  242. else if (p^.value > maxlongint) and (p^.value <= int64(maxlongint)+int64(maxlongint)+int64(1)) then
  243. p1:=genordinalconstnode(p^.value,u32bitdef)
  244. else
  245. p1:=genordinalconstnode(p^.value,cs64bitdef);
  246. conststring :
  247. begin
  248. len:=p^.len;
  249. if not(cs_ansistrings in aktlocalswitches) and (len>255) then
  250. len:=255;
  251. getmem(pc,len+1);
  252. move(pchar(tpointerord(p^.value))^,pc^,len);
  253. pc[len]:=#0;
  254. p1:=genpcharconstnode(pc,len);
  255. end;
  256. constchar :
  257. p1:=genordinalconstnode(p^.value,cchardef);
  258. constreal :
  259. p1:=genrealconstnode(pbestreal(tpointerord(p^.value))^,bestrealdef^);
  260. constbool :
  261. p1:=genordinalconstnode(p^.value,booldef);
  262. constset :
  263. p1:=gensetconstnode(pconstset(tpointerord(p^.value)),psetdef(p^.consttype.def));
  264. constord :
  265. p1:=genordinalconstnode(p^.value,p^.consttype.def);
  266. constpointer :
  267. p1:=genpointerconstnode(p^.value,p^.consttype.def);
  268. constnil :
  269. p1:=cnilnode.create;
  270. constresourcestring:
  271. begin
  272. p1:=genloadnode(pvarsym(p),pvarsym(p)^.owner);
  273. p1.resulttype:=cansistringdef;
  274. end;
  275. end;
  276. genconstsymtree:=p1;
  277. end;
  278. {*****************************************************************************
  279. TREALCONSTNODE
  280. *****************************************************************************}
  281. constructor trealconstnode.create(v : bestreal;def : pdef);
  282. begin
  283. inherited create(realconstn);
  284. resulttype:=def;
  285. value_real:=v;
  286. lab_real:=nil;
  287. end;
  288. function trealconstnode.getcopy : tnode;
  289. var
  290. n : trealconstnode;
  291. begin
  292. n:=trealconstnode(inherited getcopy);
  293. n.value_real:=value_real;
  294. n.lab_real:=lab_real;
  295. getcopy:=n;
  296. end;
  297. function trealconstnode.pass_1 : tnode;
  298. begin
  299. pass_1:=nil;
  300. if (value_real=1.0) or (value_real=0.0) then
  301. begin
  302. location.loc:=LOC_FPU;
  303. registersfpu:=1;
  304. end
  305. else
  306. location.loc:=LOC_MEM;
  307. end;
  308. function trealconstnode.docompare(p: tnode): boolean;
  309. begin
  310. docompare :=
  311. inherited docompare(p) and
  312. (value_real = trealconstnode(p).value_real);
  313. end;
  314. {*****************************************************************************
  315. TFIXCONSTNODE
  316. *****************************************************************************}
  317. constructor tfixconstnode.create(v : longint;def : pdef);
  318. begin
  319. inherited create(fixconstn);
  320. resulttype:=def;
  321. value_fix:=v;
  322. end;
  323. function tfixconstnode.getcopy : tnode;
  324. var
  325. n : tfixconstnode;
  326. begin
  327. n:=tfixconstnode(inherited getcopy);
  328. n.value_fix:=value_fix;
  329. getcopy:=n;
  330. end;
  331. function tfixconstnode.pass_1 : tnode;
  332. begin
  333. pass_1:=nil;
  334. location.loc:=LOC_MEM;
  335. end;
  336. function tfixconstnode.docompare(p: tnode): boolean;
  337. begin
  338. docompare :=
  339. inherited docompare(p) and
  340. (value_fix = tfixconstnode(p).value_fix);
  341. end;
  342. {*****************************************************************************
  343. TORDCONSTNODE
  344. *****************************************************************************}
  345. constructor tordconstnode.create(v : tconstexprint;def : pdef);
  346. begin
  347. inherited create(ordconstn);
  348. value:=v;
  349. resulttype:=def;
  350. if resulttype^.deftype=orddef then
  351. testrange(resulttype,value);
  352. end;
  353. function tordconstnode.getcopy : tnode;
  354. var
  355. n : tordconstnode;
  356. begin
  357. n:=tordconstnode(inherited getcopy);
  358. n.value:=value;
  359. getcopy:=n;
  360. end;
  361. function tordconstnode.pass_1 : tnode;
  362. begin
  363. pass_1:=nil;
  364. location.loc:=LOC_MEM;
  365. end;
  366. function tordconstnode.docompare(p: tnode): boolean;
  367. begin
  368. docompare :=
  369. inherited docompare(p) and
  370. (value = tordconstnode(p).value);
  371. end;
  372. {*****************************************************************************
  373. TPOINTERCONSTNODE
  374. *****************************************************************************}
  375. constructor tpointerconstnode.create(v : tpointerord;def : pdef);
  376. begin
  377. inherited create(pointerconstn);
  378. value:=v;
  379. resulttype:=def;
  380. end;
  381. function tpointerconstnode.getcopy : tnode;
  382. var
  383. n : tpointerconstnode;
  384. begin
  385. n:=tpointerconstnode(inherited getcopy);
  386. n.value:=value;
  387. getcopy:=n;
  388. end;
  389. function tpointerconstnode.pass_1 : tnode;
  390. begin
  391. pass_1:=nil;
  392. location.loc:=LOC_MEM;
  393. end;
  394. function tpointerconstnode.docompare(p: tnode): boolean;
  395. begin
  396. docompare :=
  397. inherited docompare(p) and
  398. (value = tpointerconstnode(p).value);
  399. end;
  400. {*****************************************************************************
  401. TSTRINGCONSTNODE
  402. *****************************************************************************}
  403. constructor tstringconstnode.createstr(const s : string;st:tstringtype);
  404. var
  405. l : longint;
  406. begin
  407. inherited create(stringconstn);
  408. l:=length(s);
  409. len:=l;
  410. { stringdup write even past a #0 }
  411. getmem(value_str,l+1);
  412. move(s[1],value_str^,l);
  413. value_str[l]:=#0;
  414. lab_str:=nil;
  415. if st=st_default then
  416. begin
  417. if cs_ansistrings in aktlocalswitches then
  418. stringtype:=st_ansistring
  419. else
  420. stringtype:=st_shortstring;
  421. end
  422. else
  423. stringtype:=st;
  424. case stringtype of
  425. st_shortstring :
  426. resulttype:=cshortstringdef;
  427. st_ansistring :
  428. resulttype:=cansistringdef;
  429. else
  430. internalerror(44990099);
  431. end;
  432. end;
  433. constructor tstringconstnode.createwstr(const w : tcompilerwidestring);
  434. begin
  435. inherited create(stringconstn);
  436. len:=getlengthwidestring(w);
  437. new(pcompilerwidestring(value_str));
  438. initwidestring(pcompilerwidestring(value_str)^);
  439. copywidestring(w,pcompilerwidestring(value_str)^);
  440. lab_str:=nil;
  441. stringtype:=st_widestring;
  442. resulttype:=cwidestringdef;
  443. end;
  444. constructor tstringconstnode.createpchar(s : pchar;l : longint);
  445. begin
  446. inherited create(stringconstn);
  447. len:=l;
  448. if (cs_ansistrings in aktlocalswitches) or
  449. (len>255) then
  450. begin
  451. stringtype:=st_ansistring;
  452. resulttype:=cansistringdef;
  453. end
  454. else
  455. begin
  456. stringtype:=st_shortstring;
  457. resulttype:=cshortstringdef;
  458. end;
  459. value_str:=s;
  460. lab_str:=nil;
  461. end;
  462. destructor tstringconstnode.destroy;
  463. begin
  464. ansistringdispose(value_str,len);
  465. inherited destroy;
  466. end;
  467. function tstringconstnode.getcopy : tnode;
  468. var
  469. n : tstringconstnode;
  470. begin
  471. n:=tstringconstnode(inherited getcopy);
  472. n.stringtype:=stringtype;
  473. n.len:=len;
  474. n.lab_str:=lab_str;
  475. if stringtype=st_widestring then
  476. copywidestring(pcompilerwidestring(value_str)^,
  477. pcompilerwidestring(n.value_str)^)
  478. else
  479. n.value_str:=getpcharcopy;
  480. getcopy:=n;
  481. end;
  482. function tstringconstnode.pass_1 : tnode;
  483. begin
  484. pass_1:=nil;
  485. case stringtype of
  486. st_shortstring :
  487. resulttype:=cshortstringdef;
  488. st_ansistring :
  489. resulttype:=cansistringdef;
  490. st_widestring :
  491. resulttype:=cwidestringdef;
  492. st_longstring :
  493. resulttype:=clongstringdef;
  494. end;
  495. location.loc:=LOC_MEM;
  496. end;
  497. function tstringconstnode.getpcharcopy : pchar;
  498. var
  499. pc : pchar;
  500. begin
  501. pc:=nil;
  502. getmem(pc,len+1);
  503. if pc=nil then
  504. Message(general_f_no_memory_left);
  505. move(value_str^,pc^,len+1);
  506. getpcharcopy:=pc;
  507. end;
  508. function tstringconstnode.docompare(p: tnode): boolean;
  509. begin
  510. docompare :=
  511. inherited docompare(p) and
  512. (len = tstringconstnode(p).len) and
  513. { Don't compare the pchars, since they may contain null chars }
  514. { Since all equal constant strings are replaced by the same }
  515. { label, the following compare should be enough (JM) }
  516. (lab_str = tstringconstnode(p).lab_str);
  517. end;
  518. {*****************************************************************************
  519. TSETCONSTNODE
  520. *****************************************************************************}
  521. constructor tsetconstnode.create(s : pconstset;settype : psetdef);
  522. begin
  523. inherited create(setconstn,nil);
  524. resulttype:=settype;
  525. if assigned(s) then
  526. begin
  527. new(value_set);
  528. value_set^:=s^;
  529. end
  530. else
  531. value_set:=nil;
  532. end;
  533. destructor tsetconstnode.destroy;
  534. begin
  535. if assigned(value_set) then
  536. dispose(value_set);
  537. inherited destroy;
  538. end;
  539. function tsetconstnode.getcopy : tnode;
  540. var
  541. n : tsetconstnode;
  542. begin
  543. n:=tsetconstnode(inherited getcopy);
  544. if assigned(value_set) then
  545. begin
  546. new(n.value_set);
  547. n.value_set^:=value_set^
  548. end
  549. else
  550. n.value_set:=nil;
  551. n.lab_set:=lab_set;
  552. getcopy:=n;
  553. end;
  554. function tsetconstnode.pass_1 : tnode;
  555. begin
  556. pass_1:=nil;
  557. location.loc:=LOC_MEM;
  558. end;
  559. function tsetconstnode.docompare(p: tnode): boolean;
  560. var
  561. i: 0..31;
  562. begin
  563. if inherited docompare(p) then
  564. begin
  565. for i := 0 to 31 do
  566. if (value_set^[i] <> tsetconstnode(p).value_set^[i]) then
  567. begin
  568. docompare := false;
  569. exit
  570. end;
  571. docompare := true;
  572. end
  573. else
  574. docompare := false;
  575. end;
  576. {*****************************************************************************
  577. TNILNODE
  578. *****************************************************************************}
  579. constructor tnilnode.create;
  580. begin
  581. inherited create(niln);
  582. end;
  583. function tnilnode.pass_1 : tnode;
  584. begin
  585. pass_1:=nil;
  586. resulttype:=voidpointerdef;
  587. location.loc:=LOC_MEM;
  588. end;
  589. begin
  590. crealconstnode:=trealconstnode;
  591. cfixconstnode:=tfixconstnode;
  592. cordconstnode:=tordconstnode;
  593. cpointerconstnode:=tpointerconstnode;
  594. cstringconstnode:=tstringconstnode;
  595. csetconstnode:=tsetconstnode;
  596. cnilnode:=tnilnode;
  597. end.
  598. {
  599. $Log$
  600. Revision 1.15 2000-12-31 11:14:10 jonas
  601. + implemented/fixed docompare() mathods for all nodes (not tested)
  602. + nopt.pas, nadd.pas, i386/n386opt.pas: optimized nodes for adding strings
  603. and constant strings/chars together
  604. * n386add.pas: don't copy temp strings (of size 256) to another temp string
  605. when adding
  606. Revision 1.14 2000/12/16 15:58:48 jonas
  607. * genintconstnode now returns cardinals instead of int64 constants if possible
  608. Revision 1.13 2000/12/15 13:26:01 jonas
  609. * only return int64's from functions if it int64funcresok is defined
  610. + added int64funcresok define to options.pas
  611. Revision 1.12 2000/12/07 17:19:42 jonas
  612. * new constant handling: from now on, hex constants >$7fffffff are
  613. parsed as unsigned constants (otherwise, $80000000 got sign extended
  614. and became $ffffffff80000000), all constants in the longint range
  615. become longints, all constants >$7fffffff and <=cardinal($ffffffff)
  616. are cardinals and the rest are int64's.
  617. * added lots of longint typecast to prevent range check errors in the
  618. compiler and rtl
  619. * type casts of symbolic ordinal constants are now preserved
  620. * fixed bug where the original resulttype wasn't restored correctly
  621. after doing a 64bit rangecheck
  622. Revision 1.11 2000/11/29 00:30:32 florian
  623. * unused units removed from uses clause
  624. * some changes for widestrings
  625. Revision 1.10 2000/10/31 22:02:48 peter
  626. * symtable splitted, no real code changes
  627. Revision 1.9 2000/10/14 21:52:55 peter
  628. * fixed memory leaks
  629. Revision 1.8 2000/10/14 10:14:50 peter
  630. * moehrendorf oct 2000 rewrite
  631. Revision 1.7 2000/09/28 19:49:52 florian
  632. *** empty log message ***
  633. Revision 1.6 2000/09/27 20:25:44 florian
  634. * more stuff fixed
  635. Revision 1.5 2000/09/27 18:14:31 florian
  636. * fixed a lot of syntax errors in the n*.pas stuff
  637. Revision 1.4 2000/09/26 14:59:34 florian
  638. * more conversion work done
  639. Revision 1.3 2000/09/24 21:15:34 florian
  640. * some errors fix to get more stuff compilable
  641. Revision 1.2 2000/09/24 15:06:19 peter
  642. * use defines.inc
  643. Revision 1.1 2000/09/22 21:44:48 florian
  644. + initial revision
  645. }