ncon.pas 23 KB

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