htypechk.pas 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729
  1. {
  2. $Id$
  3. Copyright (c) 1996-98 by Florian Klaempfl
  4. This unit exports some help routines for the type checking
  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 htypechk;
  19. interface
  20. uses
  21. tree,symtable;
  22. const
  23. { firstcallparan without varspez we don't count the ref }
  24. count_ref : boolean = true;
  25. get_para_resulttype : boolean = false;
  26. allow_array_constructor : boolean = false;
  27. { Conversion }
  28. function isconvertable(def_from,def_to : pdef;
  29. var doconv : tconverttype;fromtreetype : ttreetyp;
  30. explicit : boolean) : byte;
  31. { Register Allocation }
  32. procedure make_not_regable(p : ptree);
  33. procedure left_right_max(p : ptree);
  34. procedure calcregisters(p : ptree;r32,fpu,mmx : word);
  35. { subroutine handling }
  36. procedure test_protected_sym(sym : psym);
  37. procedure test_protected(p : ptree);
  38. function valid_for_formal_var(p : ptree) : boolean;
  39. function valid_for_formal_const(p : ptree) : boolean;
  40. function is_procsym_load(p:Ptree):boolean;
  41. function is_procsym_call(p:Ptree):boolean;
  42. function is_assignment_overloaded(from_def,to_def : pdef) : boolean;
  43. implementation
  44. uses
  45. globtype,systems,tokens,
  46. cobjects,verbose,globals,
  47. types,
  48. hcodegen;
  49. {****************************************************************************
  50. Convert
  51. ****************************************************************************}
  52. { Returns:
  53. 0 - Not convertable
  54. 1 - Convertable
  55. 2 - Convertable, but not first choice }
  56. function isconvertable(def_from,def_to : pdef;
  57. var doconv : tconverttype;fromtreetype : ttreetyp;
  58. explicit : boolean) : byte;
  59. { Tbasetype: uauto,uvoid,uchar,
  60. u8bit,u16bit,u32bit,
  61. s8bit,s16bit,s32,
  62. bool8bit,bool16bit,bool32bit,
  63. u64bit,s64bitint }
  64. type
  65. tbasedef=(bvoid,bchar,bint,bbool);
  66. const
  67. basedeftbl:array[tbasetype] of tbasedef =
  68. (bvoid,bvoid,bchar,
  69. bint,bint,bint,
  70. bint,bint,bint,
  71. bbool,bbool,bbool,bint,bint);
  72. basedefconverts : array[tbasedef,tbasedef] of tconverttype =
  73. ((tc_not_possible,tc_not_possible,tc_not_possible,tc_not_possible),
  74. (tc_not_possible,tc_equal,tc_not_possible,tc_not_possible),
  75. (tc_not_possible,tc_not_possible,tc_int_2_int,tc_int_2_bool),
  76. (tc_not_possible,tc_not_possible,tc_bool_2_int,tc_bool_2_bool));
  77. var
  78. b : byte;
  79. hd1,hd2 : pdef;
  80. begin
  81. { safety check }
  82. if not(assigned(def_from) and assigned(def_to)) then
  83. begin
  84. isconvertable:=0;
  85. exit;
  86. end;
  87. b:=0;
  88. { we walk the wanted (def_to) types and check then the def_from
  89. types if there is a conversion possible }
  90. case def_to^.deftype of
  91. orddef :
  92. begin
  93. case def_from^.deftype of
  94. orddef :
  95. begin
  96. doconv:=basedefconverts[basedeftbl[porddef(def_from)^.typ],basedeftbl[porddef(def_to)^.typ]];
  97. b:=1;
  98. if (doconv=tc_not_possible) or
  99. ((doconv=tc_int_2_bool) and
  100. (not explicit) and
  101. (not is_boolean(def_from))) or
  102. ((doconv=tc_bool_2_int) and
  103. (not explicit) and
  104. (not is_boolean(def_to))) then
  105. b:=0;
  106. end;
  107. enumdef :
  108. begin
  109. doconv:=tc_int_2_int;
  110. b:=1;
  111. end;
  112. end;
  113. end;
  114. stringdef :
  115. begin
  116. case def_from^.deftype of
  117. stringdef : begin
  118. doconv:=tc_string_2_string;
  119. b:=1;
  120. end;
  121. orddef : begin
  122. { char to string}
  123. if is_char(def_from) then
  124. begin
  125. doconv:=tc_char_2_string;
  126. b:=1;
  127. end;
  128. end;
  129. arraydef : begin
  130. { string to array of char, the length check is done by the firstpass of this node }
  131. if is_equal(parraydef(def_from)^.definition,cchardef) then
  132. begin
  133. doconv:=tc_chararray_2_string;
  134. if (not(cs_ansistrings in aktlocalswitches) and
  135. is_shortstring(def_to)) or
  136. ((cs_ansistrings in aktlocalswitches) and
  137. is_ansistring(def_to)) then
  138. b:=1
  139. else
  140. b:=2;
  141. end;
  142. end;
  143. pointerdef : begin
  144. { pchar can be assigned to short/ansistrings }
  145. if is_pchar(def_from) and not(m_tp in aktmodeswitches) then
  146. begin
  147. doconv:=tc_pchar_2_string;
  148. b:=1;
  149. end;
  150. end;
  151. end;
  152. end;
  153. floatdef :
  154. begin
  155. case def_from^.deftype of
  156. orddef : begin { ordinal to real }
  157. if is_integer(def_from) then
  158. begin
  159. if pfloatdef(def_to)^.typ=f32bit then
  160. doconv:=tc_int_2_fix
  161. else
  162. doconv:=tc_int_2_real;
  163. b:=1;
  164. end;
  165. end;
  166. floatdef : begin { 2 float types ? }
  167. if pfloatdef(def_from)^.typ=pfloatdef(def_to)^.typ then
  168. doconv:=tc_equal
  169. else
  170. begin
  171. if pfloatdef(def_from)^.typ=f32bit then
  172. doconv:=tc_fix_2_real
  173. else
  174. if pfloatdef(def_to)^.typ=f32bit then
  175. doconv:=tc_real_2_fix
  176. else
  177. doconv:=tc_real_2_real;
  178. end;
  179. b:=1;
  180. end;
  181. end;
  182. end;
  183. enumdef :
  184. begin
  185. if (def_from^.deftype=enumdef) then
  186. begin
  187. if assigned(penumdef(def_from)^.basedef) then
  188. hd1:=penumdef(def_from)^.basedef
  189. else
  190. hd1:=def_from;
  191. if assigned(penumdef(def_to)^.basedef) then
  192. hd2:=penumdef(def_to)^.basedef
  193. else
  194. hd2:=def_to;
  195. if (hd1=hd2) then
  196. b:=1;
  197. end;
  198. end;
  199. arraydef :
  200. begin
  201. { open array is also compatible with a single element of its base type }
  202. if is_open_array(def_to) and
  203. is_equal(parraydef(def_to)^.definition,def_from) then
  204. begin
  205. doconv:=tc_equal;
  206. b:=1;
  207. end
  208. else
  209. begin
  210. case def_from^.deftype of
  211. pointerdef : begin
  212. if (parraydef(def_to)^.lowrange=0) and
  213. is_equal(ppointerdef(def_from)^.definition,parraydef(def_to)^.definition) then
  214. begin
  215. doconv:=tc_pointer_2_array;
  216. b:=1;
  217. end;
  218. end;
  219. stringdef : begin
  220. { array of char to string }
  221. if is_equal(parraydef(def_to)^.definition,cchardef) then
  222. begin
  223. doconv:=tc_string_2_chararray;
  224. b:=1;
  225. end;
  226. end;
  227. end;
  228. end;
  229. end;
  230. pointerdef :
  231. begin
  232. case def_from^.deftype of
  233. stringdef : begin
  234. { string constant to zero terminated string constant }
  235. if (fromtreetype=stringconstn) and
  236. is_pchar(def_to) then
  237. begin
  238. doconv:=tc_cstring_2_pchar;
  239. b:=1;
  240. end;
  241. end;
  242. orddef : begin
  243. { char constant to zero terminated string constant }
  244. if (fromtreetype=ordconstn) and is_equal(def_from,cchardef) and
  245. is_pchar(def_to) then
  246. begin
  247. doconv:=tc_cchar_2_pchar;
  248. b:=1;
  249. end;
  250. end;
  251. arraydef : begin
  252. { chararray to pointer }
  253. if (parraydef(def_from)^.lowrange=0) and
  254. is_equal(parraydef(def_from)^.definition,ppointerdef(def_to)^.definition) then
  255. begin
  256. doconv:=tc_array_2_pointer;
  257. b:=1;
  258. end;
  259. end;
  260. pointerdef : begin
  261. { child class pointer can be assigned to anchestor pointers }
  262. if (
  263. (ppointerdef(def_from)^.definition^.deftype=objectdef) and
  264. (ppointerdef(def_to)^.definition^.deftype=objectdef) and
  265. pobjectdef(ppointerdef(def_from)^.definition)^.isrelated(
  266. pobjectdef(ppointerdef(def_to)^.definition))
  267. ) or
  268. { all pointers can be assigned to void-pointer }
  269. is_equal(ppointerdef(def_to)^.definition,voiddef) or
  270. { in my opnion, is this not clean pascal }
  271. { well, but it's handy to use, it isn't ? (FK) }
  272. is_equal(ppointerdef(def_from)^.definition,voiddef) then
  273. begin
  274. doconv:=tc_equal;
  275. b:=1;
  276. end;
  277. end;
  278. procvardef : begin
  279. { procedure variable can be assigned to an void pointer }
  280. { Not anymore. Use the @ operator now.}
  281. if not(m_tp_procvar in aktmodeswitches) and
  282. (ppointerdef(def_to)^.definition^.deftype=orddef) and
  283. (porddef(ppointerdef(def_to)^.definition)^.typ=uvoid) then
  284. begin
  285. doconv:=tc_equal;
  286. b:=1;
  287. end;
  288. end;
  289. classrefdef,
  290. objectdef : begin
  291. { class types and class reference type
  292. can be assigned to void pointers }
  293. if (
  294. ((def_from^.deftype=objectdef) and pobjectdef(def_from)^.isclass) or
  295. (def_from^.deftype=classrefdef)
  296. ) and
  297. (ppointerdef(def_to)^.definition^.deftype=orddef) and
  298. (porddef(ppointerdef(def_to)^.definition)^.typ=uvoid) then
  299. begin
  300. doconv:=tc_equal;
  301. b:=1;
  302. end;
  303. end;
  304. end;
  305. end;
  306. setdef :
  307. begin
  308. { automatic arrayconstructor -> set conversion }
  309. if (def_from^.deftype=arraydef) and (parraydef(def_from)^.IsConstructor) then
  310. begin
  311. doconv:=tc_arrayconstructor_2_set;
  312. b:=1;
  313. end;
  314. end;
  315. procvardef :
  316. begin
  317. { proc -> procvar }
  318. if (def_from^.deftype=procdef) then
  319. begin
  320. def_from^.deftype:=procvardef;
  321. doconv:=tc_proc_2_procvar;
  322. if is_equal(def_from,def_to) then
  323. b:=1;
  324. def_from^.deftype:=procdef;
  325. end
  326. else
  327. { for example delphi allows the assignement from pointers }
  328. { to procedure variables }
  329. if (m_pointer_2_procedure in aktmodeswitches) and
  330. (def_from^.deftype=pointerdef) and
  331. (ppointerdef(def_from)^.definition^.deftype=orddef) and
  332. (porddef(ppointerdef(def_from)^.definition)^.typ=uvoid) then
  333. begin
  334. doconv:=tc_equal;
  335. b:=1;
  336. end
  337. else
  338. { nil is compatible with procvars }
  339. if (fromtreetype=niln) then
  340. begin
  341. doconv:=tc_equal;
  342. b:=1;
  343. end;
  344. end;
  345. objectdef :
  346. begin
  347. { object pascal objects }
  348. if (def_from^.deftype=objectdef) {and
  349. pobjectdef(def_from)^.isclass and pobjectdef(def_to)^.isclass }then
  350. begin
  351. doconv:=tc_equal;
  352. if pobjectdef(def_from)^.isrelated(pobjectdef(def_to)) then
  353. b:=1;
  354. end
  355. else
  356. { nil is compatible with class instances }
  357. if (fromtreetype=niln) and (pobjectdef(def_to)^.isclass) then
  358. begin
  359. doconv:=tc_equal;
  360. b:=1;
  361. end;
  362. end;
  363. classrefdef :
  364. begin
  365. { class reference types }
  366. if (def_from^.deftype=classrefdef) then
  367. begin
  368. doconv:=tc_equal;
  369. if pobjectdef(pclassrefdef(def_from)^.definition)^.isrelated(
  370. pobjectdef(pclassrefdef(def_to)^.definition)) then
  371. b:=1;
  372. end
  373. else
  374. { nil is compatible with class references }
  375. if (fromtreetype=niln) then
  376. begin
  377. doconv:=tc_equal;
  378. b:=1;
  379. end;
  380. end;
  381. filedef :
  382. begin
  383. { typed files are all equal to the abstract file type
  384. name TYPEDFILE in system.pp in is_equal in types.pas
  385. the problem is that it sholud be also compatible to FILE
  386. but this would leed to a problem for ASSIGN RESET and REWRITE
  387. when trying to find the good overloaded function !!
  388. so all file function are doubled in system.pp
  389. this is not very beautiful !!}
  390. if (def_from^.deftype=filedef) and
  391. (
  392. (
  393. (pfiledef(def_from)^.filetype = ft_typed) and
  394. (pfiledef(def_to)^.filetype = ft_typed) and
  395. (
  396. (pfiledef(def_from)^.typed_as = pdef(voiddef)) or
  397. (pfiledef(def_to)^.typed_as = pdef(voiddef))
  398. )
  399. ) or
  400. (
  401. (
  402. (pfiledef(def_from)^.filetype = ft_untyped) and
  403. (pfiledef(def_to)^.filetype = ft_typed)
  404. ) or
  405. (
  406. (pfiledef(def_from)^.filetype = ft_typed) and
  407. (pfiledef(def_to)^.filetype = ft_untyped)
  408. )
  409. )
  410. ) then
  411. begin
  412. doconv:=tc_equal;
  413. b:=1;
  414. end
  415. end;
  416. else
  417. begin
  418. { assignment overwritten ?? }
  419. if is_assignment_overloaded(def_from,def_to) then
  420. b:=2;
  421. end;
  422. end;
  423. isconvertable:=b;
  424. end;
  425. {****************************************************************************
  426. Register Calculation
  427. ****************************************************************************}
  428. { marks an lvalue as "unregable" }
  429. procedure make_not_regable(p : ptree);
  430. begin
  431. case p^.treetype of
  432. typeconvn :
  433. make_not_regable(p^.left);
  434. loadn :
  435. if p^.symtableentry^.typ=varsym then
  436. pvarsym(p^.symtableentry)^.var_options :=
  437. pvarsym(p^.symtableentry)^.var_options and not vo_regable;
  438. end;
  439. end;
  440. procedure left_right_max(p : ptree);
  441. begin
  442. if assigned(p^.left) then
  443. begin
  444. if assigned(p^.right) then
  445. begin
  446. p^.registers32:=max(p^.left^.registers32,p^.right^.registers32);
  447. p^.registersfpu:=max(p^.left^.registersfpu,p^.right^.registersfpu);
  448. {$ifdef SUPPORT_MMX}
  449. p^.registersmmx:=max(p^.left^.registersmmx,p^.right^.registersmmx);
  450. {$endif SUPPORT_MMX}
  451. end
  452. else
  453. begin
  454. p^.registers32:=p^.left^.registers32;
  455. p^.registersfpu:=p^.left^.registersfpu;
  456. {$ifdef SUPPORT_MMX}
  457. p^.registersmmx:=p^.left^.registersmmx;
  458. {$endif SUPPORT_MMX}
  459. end;
  460. end;
  461. end;
  462. { calculates the needed registers for a binary operator }
  463. procedure calcregisters(p : ptree;r32,fpu,mmx : word);
  464. begin
  465. left_right_max(p);
  466. { Only when the difference between the left and right registers < the
  467. wanted registers allocate the amount of registers }
  468. if assigned(p^.left) then
  469. begin
  470. if assigned(p^.right) then
  471. begin
  472. if (abs(p^.left^.registers32-p^.right^.registers32)<r32) then
  473. inc(p^.registers32,r32);
  474. if (abs(p^.left^.registersfpu-p^.right^.registersfpu)<fpu) then
  475. inc(p^.registersfpu,fpu);
  476. {$ifdef SUPPORT_MMX}
  477. if (abs(p^.left^.registersmmx-p^.right^.registersmmx)<mmx) then
  478. inc(p^.registersmmx,mmx);
  479. {$endif SUPPORT_MMX}
  480. end
  481. else
  482. begin
  483. if (p^.left^.registers32<r32) then
  484. inc(p^.registers32,r32);
  485. if (p^.left^.registersfpu<fpu) then
  486. inc(p^.registersfpu,fpu);
  487. {$ifdef SUPPORT_MMX}
  488. if (p^.left^.registersmmx<mmx) then
  489. inc(p^.registersmmx,mmx);
  490. {$endif SUPPORT_MMX}
  491. end;
  492. end;
  493. { error CGMessage, if more than 8 floating point }
  494. { registers are needed }
  495. if p^.registersfpu>8 then
  496. CGMessage(cg_e_too_complex_expr);
  497. end;
  498. {****************************************************************************
  499. Subroutine Handling
  500. ****************************************************************************}
  501. { protected field handling
  502. protected field can not appear in
  503. var parameters of function !!
  504. this can only be done after we have determined the
  505. overloaded function
  506. this is the reason why it is not in the parser, PM }
  507. procedure test_protected_sym(sym : psym);
  508. begin
  509. if ((sym^.properties and sp_protected)<>0) and
  510. ((sym^.owner^.symtabletype=unitsymtable) or
  511. ((sym^.owner^.symtabletype=objectsymtable) and
  512. (pobjectdef(sym^.owner^.defowner)^.owner^.symtabletype=unitsymtable))) then
  513. CGMessage(parser_e_cant_access_protected_member);
  514. end;
  515. procedure test_protected(p : ptree);
  516. begin
  517. case p^.treetype of
  518. loadn : test_protected_sym(p^.symtableentry);
  519. typeconvn : test_protected(p^.left);
  520. derefn : test_protected(p^.left);
  521. subscriptn : begin
  522. { test_protected(p^.left);
  523. Is a field of a protected var
  524. also protected ??? PM }
  525. test_protected_sym(p^.vs);
  526. end;
  527. end;
  528. end;
  529. function valid_for_formal_var(p : ptree) : boolean;
  530. var
  531. v : boolean;
  532. begin
  533. case p^.treetype of
  534. loadn : v:=(p^.symtableentry^.typ in [typedconstsym,varsym]);
  535. typeconvn : v:=valid_for_formal_var(p^.left);
  536. typen : v:=false;
  537. derefn,subscriptn,vecn,
  538. funcretn,selfn : v:=true;
  539. { procvars are callnodes first }
  540. calln : v:=assigned(p^.right) and not assigned(p^.left);
  541. { should this depend on mode ? }
  542. addrn : v:=true;
  543. { no other node accepted (PM) }
  544. else v:=false;
  545. end;
  546. valid_for_formal_var:=v;
  547. end;
  548. function valid_for_formal_const(p : ptree) : boolean;
  549. var
  550. v : boolean;
  551. begin
  552. { p must have been firstpass'd before }
  553. { accept about anything but not a statement ! }
  554. v:=true;
  555. if (p^.treetype in [calln,statementn]) then
  556. { if not assigned(p^.resulttype) or (p^.resulttype=pdef(voiddef)) then }
  557. v:=false;
  558. valid_for_formal_const:=v;
  559. end;
  560. function is_procsym_load(p:Ptree):boolean;
  561. begin
  562. is_procsym_load:=((p^.treetype=loadn) and (p^.symtableentry^.typ=procsym)) or
  563. ((p^.treetype=addrn) and (p^.left^.treetype=loadn)
  564. and (p^.left^.symtableentry^.typ=procsym)) ;
  565. end;
  566. { change a proc call to a procload for assignment to a procvar }
  567. { this can only happen for proc/function without arguments }
  568. function is_procsym_call(p:Ptree):boolean;
  569. begin
  570. is_procsym_call:=(p^.treetype=calln) and (p^.left=nil) and
  571. (((p^.symtableprocentry^.typ=procsym) and (p^.right=nil)) or
  572. ((p^.right<>nil) and (p^.right^.symtableprocentry^.typ=varsym)));
  573. end;
  574. function is_assignment_overloaded(from_def,to_def : pdef) : boolean;
  575. var
  576. passproc : pprocdef;
  577. convtyp : tconverttype;
  578. begin
  579. is_assignment_overloaded:=false;
  580. if assigned(overloaded_operators[assignment]) then
  581. passproc:=overloaded_operators[assignment]^.definition
  582. else
  583. exit;
  584. while passproc<>nil do
  585. begin
  586. if is_equal(passproc^.retdef,to_def) and
  587. (isconvertable(from_def,passproc^.para1^.data,convtyp,ordconstn,false)=1) then
  588. begin
  589. is_assignment_overloaded:=true;
  590. break;
  591. end;
  592. passproc:=passproc^.nextoverloaded;
  593. end;
  594. end;
  595. end.
  596. {
  597. $Log$
  598. Revision 1.24 1999-05-06 10:10:02 peter
  599. * overloaded conversion has lower priority
  600. Revision 1.23 1999/04/26 09:30:47 peter
  601. * small tp7 fix
  602. * fix void pointer with formaldef
  603. Revision 1.22 1999/04/21 22:00:01 pierre
  604. + valid_for_formal_var and valid_for_formal_const added
  605. Revision 1.21 1999/04/21 16:31:40 pierre
  606. ra386att.pas : problem with commit -m !
  607. Revision 1.20 1999/04/15 08:56:27 peter
  608. * fixed bool-bool conversion
  609. Revision 1.19 1999/03/24 23:17:02 peter
  610. * fixed bugs 212,222,225,227,229,231,233
  611. Revision 1.18 1999/03/06 17:25:19 peter
  612. * moved comp<->real warning so it doesn't occure everytime that
  613. isconvertable is called with
  614. Revision 1.17 1999/03/02 18:24:20 peter
  615. * fixed overloading of array of char
  616. Revision 1.16 1999/01/27 13:53:27 pierre
  617. htypechk.pas
  618. Revision 1.15 1999/01/27 13:12:10 pierre
  619. * bool to int must be explicit
  620. Revision 1.14 1999/01/19 15:55:32 pierre
  621. * fix for boolean to comp conversion (now disabled)
  622. Revision 1.13 1998/12/15 17:11:37 peter
  623. * string:=pchar not allowed in tp mode
  624. Revision 1.12 1998/12/11 00:03:18 peter
  625. + globtype,tokens,version unit splitted from globals
  626. Revision 1.11 1998/12/10 09:47:21 florian
  627. + basic operations with int64/qord (compiler with -dint64)
  628. + rtti of enumerations extended: names are now written
  629. Revision 1.10 1998/11/29 12:40:23 peter
  630. * newcnv -> not oldcnv
  631. Revision 1.9 1998/11/26 13:10:42 peter
  632. * new int - int conversion -dNEWCNV
  633. * some function renamings
  634. Revision 1.8 1998/11/17 00:36:42 peter
  635. * more ansistring fixes
  636. Revision 1.7 1998/10/14 13:33:24 peter
  637. * fixed small typo
  638. Revision 1.6 1998/10/14 12:53:38 peter
  639. * fixed small tp7 things
  640. * boolean:=longbool and longbool fixed
  641. Revision 1.5 1998/10/12 09:49:58 florian
  642. + support of <procedure var type>:=<pointer> in delphi mode added
  643. Revision 1.4 1998/09/30 16:42:52 peter
  644. * fixed bool-bool cnv
  645. Revision 1.3 1998/09/24 23:49:05 peter
  646. + aktmodeswitches
  647. Revision 1.2 1998/09/24 09:02:14 peter
  648. * rewritten isconvertable to use case
  649. * array of .. and single variable are compatible
  650. Revision 1.1 1998/09/23 20:42:22 peter
  651. * splitted pass_1
  652. }