tccal.pas 55 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349
  1. {
  2. $Id$
  3. Copyright (c) 1993-98 by Florian Klaempfl
  4. Type checking and register allocation for call 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 tccal;
  19. interface
  20. uses
  21. symtable,tree;
  22. procedure gen_high_tree(p:ptree;openstring:boolean);
  23. procedure firstcallparan(var p : ptree;defcoll : pdefcoll);
  24. procedure firstcalln(var p : ptree);
  25. procedure firstprocinline(var p : ptree);
  26. implementation
  27. uses
  28. globtype,systems,
  29. cobjects,verbose,globals,
  30. aasm,types,
  31. hcodegen,htypechk,pass_1
  32. {$ifdef i386}
  33. ,i386base,tgeni386
  34. {$endif}
  35. {$ifdef m68k}
  36. ,m68k,tgen68k
  37. {$endif}
  38. ;
  39. {*****************************************************************************
  40. FirstCallParaN
  41. *****************************************************************************}
  42. procedure gen_high_tree(p:ptree;openstring:boolean);
  43. var
  44. len : longint;
  45. st : psymtable;
  46. begin
  47. if assigned(p^.hightree) then
  48. exit;
  49. len:=-1;
  50. case p^.left^.resulttype^.deftype of
  51. arraydef :
  52. begin
  53. if is_open_array(p^.left^.resulttype) or
  54. is_array_of_const(p^.left^.resulttype) then
  55. begin
  56. st:=p^.left^.symtable;
  57. getsymonlyin(st,'high'+pvarsym(p^.left^.symtableentry)^.name);
  58. p^.hightree:=genloadnode(pvarsym(srsym),st);
  59. end
  60. else
  61. begin
  62. { this is an empty constructor
  63. if (parraydef(p^.left^.resulttype)^.highrange=-1)
  64. and (parraydef(p^.left^.resulttype)^.lowrange=0) then
  65. len:=0
  66. else
  67. }
  68. len:=parraydef(p^.left^.resulttype)^.highrange-
  69. parraydef(p^.left^.resulttype)^.lowrange;
  70. end;
  71. end;
  72. stringdef :
  73. begin
  74. if openstring then
  75. begin
  76. if is_open_string(p^.left^.resulttype) then
  77. begin
  78. st:=p^.left^.symtable;
  79. getsymonlyin(st,'high'+pvarsym(p^.left^.symtableentry)^.name);
  80. p^.hightree:=genloadnode(pvarsym(srsym),st);
  81. end
  82. else
  83. len:=pstringdef(p^.left^.resulttype)^.len;
  84. end
  85. else
  86. { passing a string to an array of char }
  87. begin
  88. if (p^.left^.treetype=stringconstn) then
  89. begin
  90. len:=str_length(p^.left);
  91. if len>0 then
  92. dec(len);
  93. end
  94. else
  95. begin
  96. p^.hightree:=gennode(subn,geninlinenode(in_length_string,false,getcopy(p^.left)),
  97. genordinalconstnode(1,s32bitdef));
  98. firstpass(p^.hightree);
  99. p^.hightree:=gentypeconvnode(p^.hightree,s32bitdef);
  100. end;
  101. end;
  102. end;
  103. else
  104. len:=0;
  105. end;
  106. { if len>=0 then }
  107. p^.hightree:=genordinalconstnode(len,s32bitdef);
  108. firstpass(p^.hightree);
  109. end;
  110. procedure firstcallparan(var p : ptree;defcoll : pdefcoll);
  111. var
  112. old_get_para_resulttype : boolean;
  113. old_array_constructor : boolean;
  114. store_valid : boolean;
  115. oldtype : pdef;
  116. {convtyp : tconverttype;}
  117. begin
  118. inc(parsing_para_level);
  119. if assigned(p^.right) then
  120. begin
  121. if defcoll=nil then
  122. firstcallparan(p^.right,nil)
  123. else
  124. firstcallparan(p^.right,defcoll^.next);
  125. p^.registers32:=p^.right^.registers32;
  126. p^.registersfpu:=p^.right^.registersfpu;
  127. {$ifdef SUPPORT_MMX}
  128. p^.registersmmx:=p^.right^.registersmmx;
  129. {$endif}
  130. end;
  131. if defcoll=nil then
  132. begin
  133. old_array_constructor:=allow_array_constructor;
  134. old_get_para_resulttype:=get_para_resulttype;
  135. get_para_resulttype:=true;
  136. allow_array_constructor:=true;
  137. if not(assigned(p^.resulttype)) or
  138. (p^.left^.treetype=typeconvn) then
  139. firstpass(p^.left);
  140. get_para_resulttype:=old_get_para_resulttype;
  141. allow_array_constructor:=old_array_constructor;
  142. if codegenerror then
  143. begin
  144. dec(parsing_para_level);
  145. exit;
  146. end;
  147. p^.resulttype:=p^.left^.resulttype;
  148. end
  149. { if we know the routine which is called, then the type }
  150. { conversions are inserted }
  151. else
  152. begin
  153. { Do we need arrayconstructor -> set conversion, then insert
  154. it here before the arrayconstructor node breaks the tree
  155. with its conversions of enum->ord }
  156. if (p^.left^.treetype=arrayconstructn) and
  157. (defcoll^.data^.deftype=setdef) then
  158. p^.left:=gentypeconvnode(p^.left,defcoll^.data);
  159. if count_ref then
  160. begin
  161. { not completly proper, but avoids some warnings }
  162. if (p^.left^.treetype=funcretn) and (defcoll^.paratyp=vs_var) then
  163. procinfo.funcret_is_valid:=true;
  164. store_valid:=must_be_valid;
  165. { protected has nothing to do with read/write
  166. if (defcoll^.paratyp=vs_var) then
  167. test_protected(p^.left);
  168. }
  169. must_be_valid:=(defcoll^.paratyp<>vs_var);
  170. { only process typeconvn and arrayconstructn, else it will
  171. break other trees }
  172. old_array_constructor:=allow_array_constructor;
  173. old_get_para_resulttype:=get_para_resulttype;
  174. allow_array_constructor:=true;
  175. get_para_resulttype:=false;
  176. if (p^.left^.treetype in [arrayconstructn,typeconvn]) then
  177. firstpass(p^.left);
  178. get_para_resulttype:=old_get_para_resulttype;
  179. allow_array_constructor:=old_array_constructor;
  180. must_be_valid:=store_valid;
  181. end;
  182. { generate the high() value tree }
  183. if push_high_param(defcoll^.data) then
  184. gen_high_tree(p,is_open_string(defcoll^.data));
  185. if not(is_shortstring(p^.left^.resulttype) and
  186. is_shortstring(defcoll^.data)) and
  187. (defcoll^.data^.deftype<>formaldef) then
  188. begin
  189. if (defcoll^.paratyp=vs_var) and
  190. { allows conversion from word to integer and
  191. byte to shortint }
  192. (not(
  193. (p^.left^.resulttype^.deftype=orddef) and
  194. (defcoll^.data^.deftype=orddef) and
  195. (p^.left^.resulttype^.size=defcoll^.data^.size)
  196. ) and
  197. { an implicit pointer conversion is allowed }
  198. not(
  199. (p^.left^.resulttype^.deftype=pointerdef) and
  200. (defcoll^.data^.deftype=pointerdef)
  201. ) and
  202. { child classes can be also passed }
  203. not(
  204. (p^.left^.resulttype^.deftype=objectdef) and
  205. (defcoll^.data^.deftype=objectdef) and
  206. pobjectdef(p^.left^.resulttype)^.isrelated(pobjectdef(defcoll^.data))
  207. ) and
  208. { passing a single element to a openarray of the same type }
  209. not(
  210. (is_open_array(defcoll^.data) and
  211. is_equal(parraydef(defcoll^.data)^.definition,p^.left^.resulttype))
  212. ) and
  213. { an implicit file conversion is also allowed }
  214. { from a typed file to an untyped one }
  215. not(
  216. (p^.left^.resulttype^.deftype=filedef) and
  217. (defcoll^.data^.deftype=filedef) and
  218. (pfiledef(defcoll^.data)^.filetype = ft_untyped) and
  219. (pfiledef(p^.left^.resulttype)^.filetype = ft_typed)
  220. ) and
  221. not(is_equal(p^.left^.resulttype,defcoll^.data))) then
  222. CGMessage(parser_e_call_by_ref_without_typeconv);
  223. { process cargs arrayconstructor }
  224. if is_array_constructor(p^.left^.resulttype) and
  225. assigned(aktcallprocsym) and
  226. (aktcallprocsym^.definition^.options and pocdecl<>0) and
  227. (aktcallprocsym^.definition^.options and poexternal<>0) then
  228. begin
  229. p^.left^.cargs:=true;
  230. old_array_constructor:=allow_array_constructor;
  231. allow_array_constructor:=true;
  232. firstpass(p^.left);
  233. allow_array_constructor:=old_array_constructor;
  234. end;
  235. { process open parameters }
  236. if push_high_param(defcoll^.data) then
  237. begin
  238. { insert type conv but hold the ranges of the array }
  239. oldtype:=p^.left^.resulttype;
  240. p^.left:=gentypeconvnode(p^.left,defcoll^.data);
  241. firstpass(p^.left);
  242. p^.left^.resulttype:=oldtype;
  243. end
  244. else
  245. begin
  246. p^.left:=gentypeconvnode(p^.left,defcoll^.data);
  247. firstpass(p^.left);
  248. end;
  249. if codegenerror then
  250. begin
  251. dec(parsing_para_level);
  252. exit;
  253. end;
  254. end;
  255. { check var strings }
  256. if (cs_strict_var_strings in aktlocalswitches) and
  257. is_shortstring(p^.left^.resulttype) and
  258. is_shortstring(defcoll^.data) and
  259. (defcoll^.paratyp=vs_var) and
  260. not(is_open_string(defcoll^.data)) and
  261. not(is_equal(p^.left^.resulttype,defcoll^.data)) then
  262. CGMessage(type_e_strict_var_string_violation);
  263. { Variablen for call by reference may not be copied }
  264. { into a register }
  265. { is this usefull here ? }
  266. { this was missing in formal parameter list }
  267. if (defcoll^.data=pdef(cformaldef)) then
  268. begin
  269. if defcoll^.paratyp=vs_var then
  270. if not valid_for_formal_var(p^.left) then
  271. CGMessage(parser_e_illegal_parameter_list);
  272. if defcoll^.paratyp=vs_const then
  273. if not valid_for_formal_const(p^.left) then
  274. CGMessage(parser_e_illegal_parameter_list);
  275. end;
  276. if defcoll^.paratyp=vs_var then
  277. begin
  278. set_unique(p^.left);
  279. make_not_regable(p^.left);
  280. end;
  281. p^.resulttype:=defcoll^.data;
  282. end;
  283. if p^.left^.registers32>p^.registers32 then
  284. p^.registers32:=p^.left^.registers32;
  285. if p^.left^.registersfpu>p^.registersfpu then
  286. p^.registersfpu:=p^.left^.registersfpu;
  287. {$ifdef SUPPORT_MMX}
  288. if p^.left^.registersmmx>p^.registersmmx then
  289. p^.registersmmx:=p^.left^.registersmmx;
  290. {$endif SUPPORT_MMX}
  291. dec(parsing_para_level);
  292. end;
  293. {*****************************************************************************
  294. FirstCallN
  295. *****************************************************************************}
  296. procedure firstcalln(var p : ptree);
  297. type
  298. pprocdefcoll = ^tprocdefcoll;
  299. tprocdefcoll = record
  300. data : pprocdef;
  301. nextpara : pdefcoll;
  302. firstpara : pdefcoll;
  303. next : pprocdefcoll;
  304. end;
  305. var
  306. hp,procs,hp2 : pprocdefcoll;
  307. pd : pprocdef;
  308. oldcallprocsym : pprocsym;
  309. nextprocsym : pprocsym;
  310. def_from,def_to,conv_to : pdef;
  311. pt,inlinecode : ptree;
  312. exactmatch,inlined : boolean;
  313. paralength,l,lastpara : longint;
  314. lastparatype : pdef;
  315. pdc : pdefcoll;
  316. {$ifdef TEST_PROCSYMS}
  317. symt : psymtable;
  318. {$endif TEST_PROCSYMS}
  319. { only Dummy }
  320. hcvt : tconverttype;
  321. regi : tregister;
  322. store_valid, old_count_ref : boolean;
  323. label
  324. errorexit;
  325. { check if the resulttype from tree p is equal with def, needed
  326. for stringconstn and formaldef }
  327. function is_equal(p:ptree;def:pdef) : boolean;
  328. begin
  329. { safety check }
  330. if not (assigned(def) or assigned(p^.resulttype)) then
  331. begin
  332. is_equal:=false;
  333. exit;
  334. end;
  335. { all types can be passed to a formaldef }
  336. is_equal:=(def^.deftype=formaldef) or
  337. (types.is_equal(p^.resulttype,def))
  338. { to support ansi/long/wide strings in a proper way }
  339. { string and string[10] are assumed as equal }
  340. { when searching the correct overloaded procedure }
  341. or
  342. (
  343. (def^.deftype=stringdef) and (p^.resulttype^.deftype=stringdef) and
  344. (pstringdef(def)^.string_typ=pstringdef(p^.resulttype)^.string_typ)
  345. )
  346. or
  347. (
  348. (p^.left^.treetype=stringconstn) and
  349. (is_ansistring(p^.resulttype) and is_pchar(def))
  350. )
  351. or
  352. (
  353. (p^.left^.treetype=ordconstn) and
  354. (is_char(p^.resulttype) and (is_shortstring(def) or is_ansistring(def)))
  355. )
  356. { set can also be a not yet converted array constructor }
  357. or
  358. (
  359. (def^.deftype=setdef) and (p^.resulttype^.deftype=arraydef) and
  360. (parraydef(p^.resulttype)^.IsConstructor) and not(parraydef(p^.resulttype)^.IsVariant)
  361. )
  362. { in tp7 mode proc -> procvar is allowed }
  363. or
  364. (
  365. (m_tp_procvar in aktmodeswitches) and
  366. (def^.deftype=procvardef) and (p^.left^.treetype=calln) and
  367. (proc_to_procvar_equal(p^.left^.procdefinition,pprocvardef(def)))
  368. )
  369. ;
  370. end;
  371. function is_in_limit(def_from,def_to : pdef) : boolean;
  372. begin
  373. is_in_limit:=(def_from^.deftype = orddef) and
  374. (def_to^.deftype = orddef) and
  375. (porddef(def_from)^.low>porddef(def_to)^.low) and
  376. (porddef(def_from)^.high<porddef(def_to)^.high);
  377. end;
  378. var
  379. is_const : boolean;
  380. begin
  381. { release registers! }
  382. { if procdefinition<>nil then we called firstpass already }
  383. { it seems to be bad because of the registers }
  384. { at least we can avoid the overloaded search !! }
  385. procs:=nil;
  386. { made this global for disposing !! }
  387. store_valid:=must_be_valid;
  388. must_be_valid:=false;
  389. oldcallprocsym:=aktcallprocsym;
  390. aktcallprocsym:=nil;
  391. inlined:=false;
  392. if assigned(p^.procdefinition) and
  393. ((p^.procdefinition^.options and poinline)<>0) then
  394. begin
  395. inlinecode:=p^.right;
  396. if assigned(inlinecode) then
  397. begin
  398. inlined:=true;
  399. p^.procdefinition^.options:=p^.procdefinition^.options and (not poinline);
  400. end;
  401. p^.right:=nil;
  402. end;
  403. if assigned(p^.procdefinition) and
  404. ((p^.procdefinition^.options and pocontainsself)<>0) then
  405. message(cg_e_cannot_call_message_direct);
  406. { procedure variable ? }
  407. if assigned(p^.right) then
  408. begin
  409. { procedure does a call }
  410. procinfo.flags:=procinfo.flags or pi_do_call;
  411. { calc the correture value for the register }
  412. {$ifdef i386}
  413. for regi:=R_EAX to R_EDI do
  414. inc(reg_pushes[regi],t_times*2);
  415. {$endif}
  416. {$ifdef m68k}
  417. for regi:=R_D0 to R_A6 do
  418. inc(reg_pushes[regi],t_times*2);
  419. {$endif}
  420. { calculate the type of the parameters }
  421. if assigned(p^.left) then
  422. begin
  423. old_count_ref:=count_ref;
  424. count_ref:=false;
  425. firstcallparan(p^.left,nil);
  426. count_ref:=old_count_ref;
  427. if codegenerror then
  428. goto errorexit;
  429. end;
  430. firstpass(p^.right);
  431. { check the parameters }
  432. pdc:=pprocvardef(p^.right^.resulttype)^.para1;
  433. pt:=p^.left;
  434. while assigned(pdc) and assigned(pt) do
  435. begin
  436. pt:=pt^.right;
  437. pdc:=pdc^.next;
  438. end;
  439. if assigned(pt) or assigned(pdc) then
  440. CGMessage(parser_e_illegal_parameter_list);
  441. { insert type conversions }
  442. if assigned(p^.left) then
  443. begin
  444. old_count_ref:=count_ref;
  445. count_ref:=true;
  446. firstcallparan(p^.left,pprocvardef(p^.right^.resulttype)^.para1);
  447. count_ref:=old_count_ref;
  448. if codegenerror then
  449. goto errorexit;
  450. end;
  451. p^.resulttype:=pprocvardef(p^.right^.resulttype)^.retdef;
  452. { this was missing, leads to a bug below if
  453. the procvar is a function }
  454. p^.procdefinition:=pabstractprocdef(p^.right^.resulttype);
  455. end
  456. else
  457. { not a procedure variable }
  458. begin
  459. { determine the type of the parameters }
  460. if assigned(p^.left) then
  461. begin
  462. old_count_ref:=count_ref;
  463. count_ref:=false;
  464. store_valid:=must_be_valid;
  465. must_be_valid:=false;
  466. firstcallparan(p^.left,nil);
  467. count_ref:=old_count_ref;
  468. must_be_valid:=store_valid;
  469. if codegenerror then
  470. goto errorexit;
  471. end;
  472. aktcallprocsym:=pprocsym(p^.symtableprocentry);
  473. { do we know the procedure to call ? }
  474. if not(assigned(p^.procdefinition)) then
  475. begin
  476. {$ifdef TEST_PROCSYMS}
  477. if (p^.unit_specific) or
  478. assigned(p^.methodpointer) then
  479. nextprocsym:=nil
  480. else while not assigned(procs) do
  481. begin
  482. symt:=p^.symtableproc;
  483. srsym:=nil;
  484. while assigned(symt^.next) and not assigned(srsym) do
  485. begin
  486. symt:=symt^.next;
  487. getsymonlyin(symt,actprocsym^.name);
  488. if assigned(srsym) then
  489. if srsym^.typ<>procsym then
  490. begin
  491. { reject all that is not a procedure }
  492. srsym:=nil;
  493. { don't search elsewhere }
  494. while assigned(symt^.next) do
  495. symt:=symt^.next;
  496. end;
  497. end;
  498. nextprocsym:=srsym;
  499. end;
  500. {$else TEST_PROCSYMS}
  501. nextprocsym:=nil;
  502. {$endif TEST_PROCSYMS}
  503. { determine length of parameter list }
  504. pt:=p^.left;
  505. paralength:=0;
  506. while assigned(pt) do
  507. begin
  508. inc(paralength);
  509. pt:=pt^.right;
  510. end;
  511. { link all procedures which have the same # of parameters }
  512. pd:=aktcallprocsym^.definition;
  513. while assigned(pd) do
  514. begin
  515. pdc:=pd^.para1;
  516. l:=0;
  517. while assigned(pdc) do
  518. begin
  519. inc(l);
  520. pdc:=pdc^.next;
  521. end;
  522. { only when the # of parameter are equal }
  523. if (l=paralength) then
  524. begin
  525. new(hp);
  526. hp^.data:=pd;
  527. hp^.next:=procs;
  528. hp^.nextpara:=pd^.para1;
  529. hp^.firstpara:=pd^.para1;
  530. procs:=hp;
  531. end;
  532. pd:=pd^.nextoverloaded;
  533. end;
  534. { no procedures found? then there is something wrong
  535. with the parameter size }
  536. if not assigned(procs) and
  537. ((parsing_para_level=0) or assigned(p^.left)) and
  538. (nextprocsym=nil) then
  539. begin
  540. CGMessage(parser_e_wrong_parameter_size);
  541. aktcallprocsym^.write_parameter_lists;
  542. goto errorexit;
  543. end;
  544. { now we can compare parameter after parameter }
  545. pt:=p^.left;
  546. { we start with the last parameter }
  547. lastpara:=paralength+1;
  548. lastparatype:=nil;
  549. while assigned(pt) do
  550. begin
  551. dec(lastpara);
  552. { walk all procedures and determine how this parameter matches and set:
  553. 1. pt^.exact_match_found if one parameter has an exact match
  554. 2. exactmatch if an equal or exact match is found
  555. 3. para^.argconvtyp to exact,equal or convertable
  556. (when convertable then also convertlevel is set)
  557. 4. pt^.convlevel1found if there is a convertlevel=1
  558. 5. pt^.convlevel2found if there is a convertlevel=2
  559. }
  560. exactmatch:=false;
  561. hp:=procs;
  562. while assigned(hp) do
  563. begin
  564. if is_equal(pt,hp^.nextpara^.data) then
  565. begin
  566. if hp^.nextpara^.data=pt^.resulttype then
  567. begin
  568. pt^.exact_match_found:=true;
  569. hp^.nextpara^.argconvtyp:=act_exact;
  570. end
  571. else
  572. hp^.nextpara^.argconvtyp:=act_equal;
  573. exactmatch:=true;
  574. end
  575. else
  576. begin
  577. hp^.nextpara^.argconvtyp:=act_convertable;
  578. hp^.nextpara^.convertlevel:=isconvertable(pt^.resulttype,hp^.nextpara^.data,
  579. hcvt,pt^.left^.treetype,false);
  580. case hp^.nextpara^.convertlevel of
  581. 1 : pt^.convlevel1found:=true;
  582. 2 : pt^.convlevel2found:=true;
  583. end;
  584. end;
  585. hp:=hp^.next;
  586. end;
  587. { If there was an exactmatch then delete all convertables }
  588. if exactmatch then
  589. begin
  590. hp:=procs;
  591. procs:=nil;
  592. while assigned(hp) do
  593. begin
  594. hp2:=hp^.next;
  595. { keep if not convertable }
  596. if (hp^.nextpara^.argconvtyp<>act_convertable) then
  597. begin
  598. hp^.next:=procs;
  599. procs:=hp;
  600. end
  601. else
  602. dispose(hp);
  603. hp:=hp2;
  604. end;
  605. end
  606. else
  607. { No exact match was found, remove all procedures that are
  608. not convertable (convertlevel=0) }
  609. begin
  610. hp:=procs;
  611. procs:=nil;
  612. while assigned(hp) do
  613. begin
  614. hp2:=hp^.next;
  615. { keep if not convertable }
  616. if (hp^.nextpara^.convertlevel<>0) then
  617. begin
  618. hp^.next:=procs;
  619. procs:=hp;
  620. end
  621. else
  622. begin
  623. { save the type for nice error message }
  624. lastparatype:=hp^.nextpara^.data;
  625. dispose(hp);
  626. end;
  627. hp:=hp2;
  628. end;
  629. end;
  630. { update nextpara for all procedures }
  631. hp:=procs;
  632. while assigned(hp) do
  633. begin
  634. hp^.nextpara:=hp^.nextpara^.next;
  635. hp:=hp^.next;
  636. end;
  637. { load next parameter or quit loop if no procs left }
  638. if assigned(procs) then
  639. pt:=pt^.right
  640. else
  641. break;
  642. end;
  643. { All parameters are checked, check if there are any
  644. procedures left }
  645. if not assigned(procs) then
  646. begin
  647. { there is an error, must be wrong type, because
  648. wrong size is already checked (PFV) }
  649. if ((parsing_para_level=0) or (p^.left<>nil)) and
  650. (nextprocsym=nil) then
  651. begin
  652. if (not assigned(lastparatype)) and (not assigned(pt^.resulttype)) then
  653. internalerror(39393)
  654. else
  655. CGMessage3(type_e_wrong_parameter_type,tostr(lastpara),
  656. pt^.resulttype^.typename,lastparatype^.typename);
  657. aktcallprocsym^.write_parameter_lists;
  658. goto errorexit;
  659. end
  660. else
  661. begin
  662. { try to convert to procvar }
  663. p^.treetype:=loadn;
  664. p^.resulttype:=pprocsym(p^.symtableprocentry)^.definition;
  665. p^.symtableentry:=p^.symtableprocentry;
  666. p^.is_first:=false;
  667. p^.disposetyp:=dt_nothing;
  668. firstpass(p);
  669. goto errorexit;
  670. end;
  671. end;
  672. { if there are several choices left then for orddef }
  673. { if a type is totally included in the other }
  674. { we don't fear an overflow , }
  675. { so we can do as if it is an exact match }
  676. { this will convert integer to longint }
  677. { rather than to words }
  678. { conversion of byte to integer or longint }
  679. {would still not be solved }
  680. if assigned(procs) and assigned(procs^.next) then
  681. begin
  682. hp:=procs;
  683. while assigned(hp) do
  684. begin
  685. hp^.nextpara:=hp^.firstpara;
  686. hp:=hp^.next;
  687. end;
  688. pt:=p^.left;
  689. while assigned(pt) do
  690. begin
  691. { matches a parameter of one procedure exact ? }
  692. exactmatch:=false;
  693. def_from:=pt^.resulttype;
  694. hp:=procs;
  695. while assigned(hp) do
  696. begin
  697. if not is_equal(pt,hp^.nextpara^.data) then
  698. begin
  699. def_to:=hp^.nextpara^.data;
  700. if ((def_from^.deftype=orddef) and (def_to^.deftype=orddef)) and
  701. (is_in_limit(def_from,def_to) or
  702. ((hp^.nextpara^.paratyp=vs_var) and
  703. (def_from^.size=def_to^.size))) then
  704. begin
  705. exactmatch:=true;
  706. conv_to:=def_to;
  707. end;
  708. end;
  709. hp:=hp^.next;
  710. end;
  711. { .... if yes, del all the other procedures }
  712. if exactmatch then
  713. begin
  714. { the first .... }
  715. while (assigned(procs)) and not(is_in_limit(def_from,procs^.nextpara^.data)) do
  716. begin
  717. hp:=procs^.next;
  718. dispose(procs);
  719. procs:=hp;
  720. end;
  721. { and the others }
  722. hp:=procs;
  723. while (assigned(hp)) and assigned(hp^.next) do
  724. begin
  725. if not(is_in_limit(def_from,hp^.next^.nextpara^.data)) then
  726. begin
  727. hp2:=hp^.next^.next;
  728. dispose(hp^.next);
  729. hp^.next:=hp2;
  730. end
  731. else
  732. begin
  733. def_to:=hp^.next^.nextpara^.data;
  734. if (conv_to^.size>def_to^.size) or
  735. ((porddef(conv_to)^.low<porddef(def_to)^.low) and
  736. (porddef(conv_to)^.high>porddef(def_to)^.high)) then
  737. begin
  738. hp2:=procs;
  739. procs:=hp;
  740. conv_to:=def_to;
  741. dispose(hp2);
  742. end
  743. else
  744. hp:=hp^.next;
  745. end;
  746. end;
  747. end;
  748. { update nextpara for all procedures }
  749. hp:=procs;
  750. while assigned(hp) do
  751. begin
  752. hp^.nextpara:=hp^.nextpara^.next;
  753. hp:=hp^.next;
  754. end;
  755. pt:=pt^.right;
  756. end;
  757. end;
  758. { let's try to eliminate equal if there is an exact match
  759. is there }
  760. if assigned(procs) and assigned(procs^.next) then
  761. begin
  762. { reset nextpara for all procs left }
  763. hp:=procs;
  764. while assigned(hp) do
  765. begin
  766. hp^.nextpara:=hp^.firstpara;
  767. hp:=hp^.next;
  768. end;
  769. pt:=p^.left;
  770. while assigned(pt) do
  771. begin
  772. if pt^.exact_match_found then
  773. begin
  774. hp:=procs;
  775. procs:=nil;
  776. while assigned(hp) do
  777. begin
  778. hp2:=hp^.next;
  779. { keep the exact matches, dispose the others }
  780. if (hp^.nextpara^.argconvtyp=act_exact) then
  781. begin
  782. hp^.next:=procs;
  783. procs:=hp;
  784. end
  785. else
  786. dispose(hp);
  787. hp:=hp2;
  788. end;
  789. end;
  790. { update nextpara for all procedures }
  791. hp:=procs;
  792. while assigned(hp) do
  793. begin
  794. hp^.nextpara:=hp^.nextpara^.next;
  795. hp:=hp^.next;
  796. end;
  797. pt:=pt^.right;
  798. end;
  799. end;
  800. { Check if there are convertlevel 1 and 2 differences
  801. left for the parameters, then discard all convertlevel
  802. 2 procedures. The value of convlevelXfound can still
  803. be used, because all convertables are still here or
  804. not }
  805. if assigned(procs) and assigned(procs^.next) then
  806. begin
  807. { reset nextpara for all procs left }
  808. hp:=procs;
  809. while assigned(hp) do
  810. begin
  811. hp^.nextpara:=hp^.firstpara;
  812. hp:=hp^.next;
  813. end;
  814. pt:=p^.left;
  815. while assigned(pt) do
  816. begin
  817. if pt^.convlevel1found and pt^.convlevel2found then
  818. begin
  819. hp:=procs;
  820. procs:=nil;
  821. while assigned(hp) do
  822. begin
  823. hp2:=hp^.next;
  824. { keep all not act_convertable and all convertlevels=1 }
  825. if (hp^.nextpara^.argconvtyp<>act_convertable) or
  826. (hp^.nextpara^.convertlevel=1) then
  827. begin
  828. hp^.next:=procs;
  829. procs:=hp;
  830. end
  831. else
  832. dispose(hp);
  833. hp:=hp2;
  834. end;
  835. end;
  836. { update nextpara for all procedures }
  837. hp:=procs;
  838. while assigned(hp) do
  839. begin
  840. hp^.nextpara:=hp^.nextpara^.next;
  841. hp:=hp^.next;
  842. end;
  843. pt:=pt^.right;
  844. end;
  845. end;
  846. if not(assigned(procs)) or assigned(procs^.next) then
  847. begin
  848. CGMessage(cg_e_cant_choose_overload_function);
  849. aktcallprocsym^.write_parameter_lists;
  850. goto errorexit;
  851. end;
  852. {$ifdef TEST_PROCSYMS}
  853. if (procs=nil) and assigned(nextprocsym) then
  854. begin
  855. p^.symtableprocentry:=nextprocsym;
  856. p^.symtableproc:=symt;
  857. end;
  858. end ; { of while assigned(p^.symtableprocentry) do }
  859. {$endif TEST_PROCSYMS}
  860. if make_ref then
  861. begin
  862. procs^.data^.lastref:=new(pref,init(procs^.data^.lastref,@p^.fileinfo));
  863. inc(procs^.data^.refcount);
  864. if procs^.data^.defref=nil then
  865. procs^.data^.defref:=procs^.data^.lastref;
  866. end;
  867. p^.procdefinition:=procs^.data;
  868. p^.resulttype:=procs^.data^.retdef;
  869. { big error for with statements
  870. p^.symtableproc:=p^.procdefinition^.owner;
  871. but neede for overloaded operators !! }
  872. if p^.symtableproc=nil then
  873. p^.symtableproc:=p^.procdefinition^.owner;
  874. p^.location.loc:=LOC_MEM;
  875. {$ifdef CHAINPROCSYMS}
  876. { object with method read;
  877. call to read(x) will be a usual procedure call }
  878. if assigned(p^.methodpointer) and
  879. (p^.procdefinition^._class=nil) then
  880. begin
  881. { not ok for extended }
  882. case p^.methodpointer^.treetype of
  883. typen,hnewn : fatalerror(no_para_match);
  884. end;
  885. disposetree(p^.methodpointer);
  886. p^.methodpointer:=nil;
  887. end;
  888. {$endif CHAINPROCSYMS}
  889. end; { end of procedure to call determination }
  890. is_const:=((p^.procdefinition^.options and pointernconst)<>0) and
  891. ((block_type=bt_const) or
  892. (assigned(p^.left) and (p^.left^.left^.treetype in [realconstn,ordconstn])));
  893. { handle predefined procedures }
  894. if ((p^.procdefinition^.options and pointernproc)<>0) or is_const then
  895. begin
  896. if assigned(p^.left) then
  897. begin
  898. { settextbuf needs two args }
  899. if assigned(p^.left^.right) then
  900. pt:=geninlinenode(pprocdef(p^.procdefinition)^.extnumber,is_const,p^.left)
  901. else
  902. begin
  903. pt:=geninlinenode(pprocdef(p^.procdefinition)^.extnumber,is_const,p^.left^.left);
  904. putnode(p^.left);
  905. end;
  906. end
  907. else
  908. begin
  909. pt:=geninlinenode(pprocdef(p^.procdefinition)^.extnumber,is_const,nil);
  910. end;
  911. putnode(p);
  912. firstpass(pt);
  913. p:=pt;
  914. goto errorexit;
  915. end
  916. else
  917. { no intern procedure => we do a call }
  918. { calc the correture value for the register }
  919. { handle predefined procedures }
  920. if (p^.procdefinition^.options and poinline)<>0 then
  921. begin
  922. if assigned(p^.methodpointer) then
  923. CGMessage(cg_e_unable_inline_object_methods);
  924. if assigned(p^.right) and (p^.right^.treetype<>procinlinen) then
  925. CGMessage(cg_e_unable_inline_procvar);
  926. { p^.treetype:=procinlinen; }
  927. if not assigned(p^.right) then
  928. begin
  929. if assigned(pprocdef(p^.procdefinition)^.code) then
  930. inlinecode:=genprocinlinenode(p,ptree(pprocdef(p^.procdefinition)^.code))
  931. else
  932. CGMessage(cg_e_no_code_for_inline_stored);
  933. if assigned(inlinecode) then
  934. begin
  935. { consider it has not inlined if called
  936. again inside the args }
  937. p^.procdefinition^.options:=p^.procdefinition^.options and (not poinline);
  938. firstpass(inlinecode);
  939. inlined:=true;
  940. end;
  941. end;
  942. end
  943. else
  944. procinfo.flags:=procinfo.flags or pi_do_call;
  945. { work trough all parameters to insert the type conversions }
  946. { !!! done now after internproc !! (PM) }
  947. if assigned(p^.left) then
  948. begin
  949. old_count_ref:=count_ref;
  950. count_ref:=true;
  951. firstcallparan(p^.left,p^.procdefinition^.para1);
  952. count_ref:=old_count_ref;
  953. end;
  954. {$ifdef i386}
  955. for regi:=R_EAX to R_EDI do
  956. begin
  957. if (pprocdef(p^.procdefinition)^.usedregisters and ($80 shr word(regi)))<>0 then
  958. inc(reg_pushes[regi],t_times*2);
  959. end;
  960. {$endif}
  961. {$ifdef m68k}
  962. for regi:=R_D0 to R_A6 do
  963. begin
  964. if (pprocdef(p^.procdefinition)^.usedregisters and ($800 shr word(regi)))<>0 then
  965. inc(reg_pushes[regi],t_times*2);
  966. end;
  967. {$endif}
  968. end;
  969. { ensure that the result type is set }
  970. p^.resulttype:=p^.procdefinition^.retdef;
  971. { get a register for the return value }
  972. if (p^.resulttype<>pdef(voiddef)) then
  973. begin
  974. if (p^.procdefinition^.options and poconstructor)<>0 then
  975. begin
  976. { extra handling of classes }
  977. { p^.methodpointer should be assigned! }
  978. if assigned(p^.methodpointer) and assigned(p^.methodpointer^.resulttype) and
  979. (p^.methodpointer^.resulttype^.deftype=classrefdef) then
  980. begin
  981. p^.location.loc:=LOC_REGISTER;
  982. p^.registers32:=1;
  983. { the result type depends on the classref }
  984. p^.resulttype:=pclassrefdef(p^.methodpointer^.resulttype)^.definition;
  985. end
  986. { a object constructor returns the result with the flags }
  987. else
  988. p^.location.loc:=LOC_FLAGS;
  989. end
  990. else
  991. begin
  992. {$ifdef SUPPORT_MMX}
  993. if (cs_mmx in aktlocalswitches) and
  994. is_mmx_able_array(p^.resulttype) then
  995. begin
  996. p^.location.loc:=LOC_MMXREGISTER;
  997. p^.registersmmx:=1;
  998. end
  999. else
  1000. {$endif SUPPORT_MMX}
  1001. if ret_in_acc(p^.resulttype) then
  1002. begin
  1003. p^.location.loc:=LOC_REGISTER;
  1004. if is_64bitint(p^.resulttype) then
  1005. p^.registers32:=2
  1006. else
  1007. p^.registers32:=1;
  1008. { wide- and ansistrings are returned in EAX }
  1009. { but they are imm. moved to a memory location }
  1010. if is_widestring(p^.resulttype) or
  1011. is_ansistring(p^.resulttype) then
  1012. begin
  1013. p^.location.loc:=LOC_MEM;
  1014. p^.registers32:=0;
  1015. end;
  1016. end
  1017. else if (p^.resulttype^.deftype=floatdef) then
  1018. begin
  1019. p^.location.loc:=LOC_FPU;
  1020. p^.registersfpu:=1;
  1021. end
  1022. end;
  1023. end;
  1024. { a fpu can be used in any procedure !! }
  1025. p^.registersfpu:=p^.procdefinition^.fpu_used;
  1026. { if this is a call to a method calc the registers }
  1027. if (p^.methodpointer<>nil) then
  1028. begin
  1029. case p^.methodpointer^.treetype of
  1030. { but only, if this is not a supporting node }
  1031. typen,hnewn : ;
  1032. else
  1033. begin
  1034. if ((p^.procdefinition^.options and (poconstructor or podestructor)) <> 0) and
  1035. assigned(p^.symtable) and (p^.symtable^.symtabletype=withsymtable) and
  1036. not pwithsymtable(p^.symtable)^.direct_with then
  1037. begin
  1038. CGmessage(cg_e_cannot_call_cons_dest_inside_with);
  1039. end; { Is accepted by Delphi !! }
  1040. { this is not a good reason to accept it in FPC if we produce
  1041. wrong code for it !!! (PM) }
  1042. { R.Assign is not a constructor !!! }
  1043. { but for R^.Assign, R must be valid !! }
  1044. if ((p^.procdefinition^.options and poconstructor) <> 0) or
  1045. ((p^.methodpointer^.treetype=loadn) and
  1046. ((pobjectdef(p^.methodpointer^.resulttype)^.options and oo_hasvirtual) = 0)) then
  1047. must_be_valid:=false
  1048. else
  1049. must_be_valid:=true;
  1050. firstpass(p^.methodpointer);
  1051. p^.registersfpu:=max(p^.methodpointer^.registersfpu,p^.registersfpu);
  1052. p^.registers32:=max(p^.methodpointer^.registers32,p^.registers32);
  1053. {$ifdef SUPPORT_MMX}
  1054. p^.registersmmx:=max(p^.methodpointer^.registersmmx,p^.registersmmx);
  1055. {$endif SUPPORT_MMX}
  1056. end;
  1057. end;
  1058. end;
  1059. if inlined then
  1060. p^.right:=inlinecode;
  1061. { determine the registers of the procedure variable }
  1062. { is this OK for inlined procs also ?? (PM) }
  1063. if assigned(p^.right) then
  1064. begin
  1065. p^.registersfpu:=max(p^.right^.registersfpu,p^.registersfpu);
  1066. p^.registers32:=max(p^.right^.registers32,p^.registers32);
  1067. {$ifdef SUPPORT_MMX}
  1068. p^.registersmmx:=max(p^.right^.registersmmx,p^.registersmmx);
  1069. {$endif SUPPORT_MMX}
  1070. end;
  1071. { determine the registers of the procedure }
  1072. if assigned(p^.left) then
  1073. begin
  1074. p^.registersfpu:=max(p^.left^.registersfpu,p^.registersfpu);
  1075. p^.registers32:=max(p^.left^.registers32,p^.registers32);
  1076. {$ifdef SUPPORT_MMX}
  1077. p^.registersmmx:=max(p^.left^.registersmmx,p^.registersmmx);
  1078. {$endif SUPPORT_MMX}
  1079. end;
  1080. errorexit:
  1081. { Reset some settings back }
  1082. if assigned(procs) then
  1083. dispose(procs);
  1084. if inlined then
  1085. p^.procdefinition^.options:=p^.procdefinition^.options or poinline;
  1086. aktcallprocsym:=oldcallprocsym;
  1087. must_be_valid:=store_valid;
  1088. end;
  1089. {*****************************************************************************
  1090. FirstProcInlineN
  1091. *****************************************************************************}
  1092. procedure firstprocinline(var p : ptree);
  1093. begin
  1094. { left contains the code in tree form }
  1095. { but it has already been firstpassed }
  1096. { so firstpass(p^.left); does not seem required }
  1097. { might be required later if we change the arg handling !! }
  1098. end;
  1099. end.
  1100. {
  1101. $Log$
  1102. Revision 1.48 1999-05-27 19:45:13 peter
  1103. * removed oldasm
  1104. * plabel -> pasmlabel
  1105. * -a switches to source writing automaticly
  1106. * assembler readers OOPed
  1107. * asmsymbol automaticly external
  1108. * jumptables and other label fixes for asm readers
  1109. Revision 1.47 1999/05/23 18:42:19 florian
  1110. * better error recovering in typed constants
  1111. * some problems with arrays of const fixed, some problems
  1112. due my previous
  1113. - the location type of array constructor is now LOC_MEM
  1114. - the pushing of high fixed
  1115. - parameter copying fixed
  1116. - zero temp. allocation removed
  1117. * small problem in the assembler writers fixed:
  1118. ref to nil wasn't written correctly
  1119. Revision 1.46 1999/05/20 14:58:27 peter
  1120. * fixed arrayconstruct->set conversion which didn't work for enum sets
  1121. Revision 1.45 1999/05/19 10:31:54 florian
  1122. * two bugs reported by Romio (bugs 13) are fixed:
  1123. - empty array constructors are now handled correctly (e.g. for sysutils.format)
  1124. - comparsion of ansistrings was sometimes coded wrong
  1125. Revision 1.44 1999/05/18 21:58:33 florian
  1126. * fixed some bugs related to temp. ansistrings and functions results
  1127. which return records/objects/arrays which need init/final.
  1128. Revision 1.43 1999/05/18 14:15:58 peter
  1129. * containsself fixes
  1130. * checktypes()
  1131. Revision 1.42 1999/05/17 23:51:43 peter
  1132. * with temp vars now use a reference with a persistant temp instead
  1133. of setting datasize
  1134. Revision 1.41 1999/05/13 21:59:50 peter
  1135. * removed oldppu code
  1136. * warning if objpas is loaded from uses
  1137. * first things for new deref writing
  1138. Revision 1.40 1999/05/10 09:01:45 peter
  1139. * small message fixes
  1140. Revision 1.39 1999/05/02 09:35:46 florian
  1141. + method message handlers which contain an explicit self can't be called
  1142. directly anymore
  1143. + self is now loaded at the start of the an message handler with an explicit
  1144. self
  1145. + $useoverlay fixed: i386 was renamed to i386base
  1146. Revision 1.38 1999/05/01 13:24:47 peter
  1147. * merged nasm compiler
  1148. * old asm moved to oldasm/
  1149. Revision 1.37 1999/04/26 13:31:57 peter
  1150. * release storenumber,double_checksum
  1151. Revision 1.36 1999/04/26 09:30:46 peter
  1152. * small tp7 fix
  1153. * fix void pointer with formaldef
  1154. Revision 1.35 1999/04/21 21:49:18 pierre
  1155. * previous log corrected
  1156. Revision 1.34 1999/04/21 16:31:46 pierre
  1157. * checks for untyped var or const args
  1158. (refuse procsyms as var, types or voiddef as const)
  1159. Revision 1.33 1999/04/21 09:44:00 peter
  1160. * storenumber works
  1161. * fixed some typos in double_checksum
  1162. + incompatible types type1 and type2 message (with storenumber)
  1163. Revision 1.32 1999/04/14 09:11:22 peter
  1164. * fixed tp proc -> procvar
  1165. Revision 1.31 1999/04/01 21:59:56 peter
  1166. * type error for array constructor with array,record as argument
  1167. Revision 1.30 1999/03/31 13:55:27 peter
  1168. * assembler inlining working for ag386bin
  1169. Revision 1.29 1999/03/24 23:17:34 peter
  1170. * fixed bugs 212,222,225,227,229,231,233
  1171. Revision 1.28 1999/03/23 14:43:03 peter
  1172. * fixed crash with array of const in procvar
  1173. Revision 1.27 1999/03/19 17:31:54 pierre
  1174. * lost reference because refcount not increased fixed
  1175. Revision 1.26 1999/03/02 18:24:22 peter
  1176. * fixed overloading of array of char
  1177. Revision 1.25 1999/02/22 15:09:44 florian
  1178. * behaviaor of PROTECTED and PRIVATE fixed, works now like TP/Delphi
  1179. Revision 1.24 1999/02/22 02:15:45 peter
  1180. * updates for ag386bin
  1181. Revision 1.23 1999/02/09 17:15:52 florian
  1182. * some false warnings "function result doesn't seems to be set" are
  1183. avoided
  1184. Revision 1.22 1999/01/29 11:34:55 pierre
  1185. + better info for impossible type conversion in calln
  1186. Revision 1.21 1999/01/21 22:10:49 peter
  1187. * fixed array of const
  1188. * generic platform independent high() support
  1189. Revision 1.20 1999/01/21 16:41:06 pierre
  1190. * fix for constructor inside with statements
  1191. Revision 1.19 1999/01/19 14:20:16 peter
  1192. * fixed [char] crash
  1193. Revision 1.18 1999/01/12 14:25:40 peter
  1194. + BrowserLog for browser.log generation
  1195. + BrowserCol for browser info in TCollections
  1196. * released all other UseBrowser
  1197. Revision 1.17 1998/12/11 00:03:52 peter
  1198. + globtype,tokens,version unit splitted from globals
  1199. Revision 1.16 1998/12/10 14:57:52 pierre
  1200. * fix for operators
  1201. Revision 1.15 1998/12/10 09:47:32 florian
  1202. + basic operations with int64/qord (compiler with -dint64)
  1203. + rtti of enumerations extended: names are now written
  1204. Revision 1.14 1998/11/27 14:50:52 peter
  1205. + open strings, $P switch support
  1206. Revision 1.13 1998/11/24 17:03:51 peter
  1207. * fixed exactmatch removings
  1208. Revision 1.12 1998/11/16 10:18:10 peter
  1209. * fixes for ansistrings
  1210. Revision 1.11 1998/11/10 10:09:17 peter
  1211. * va_list -> array of const
  1212. Revision 1.10 1998/11/09 11:44:41 peter
  1213. + va_list for printf support
  1214. Revision 1.9 1998/10/28 18:26:22 pierre
  1215. * removed some erros after other errors (introduced by useexcept)
  1216. * stabs works again correctly (for how long !)
  1217. Revision 1.8 1998/10/09 16:36:09 pierre
  1218. * some memory leaks specific to usebrowser define fixed
  1219. * removed tmodule.implsymtable (was like tmodule.localsymtable)
  1220. Revision 1.7 1998/10/06 20:49:09 peter
  1221. * m68k compiler compiles again
  1222. Revision 1.6 1998/10/02 09:24:22 peter
  1223. * more constant expression evaluators
  1224. Revision 1.5 1998/09/28 11:22:17 pierre
  1225. * did not compile for browser
  1226. * merge from fixes
  1227. Revision 1.4 1998/09/27 10:16:24 florian
  1228. * type casts pchar<->ansistring fixed
  1229. * ansistring[..] calls does now an unique call
  1230. Revision 1.3 1998/09/24 14:27:40 peter
  1231. * some better support for openarray
  1232. Revision 1.2 1998/09/24 09:02:16 peter
  1233. * rewritten isconvertable to use case
  1234. * array of .. and single variable are compatible
  1235. Revision 1.1 1998/09/23 20:42:24 peter
  1236. * splitted pass_1
  1237. }