pinline.pas 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711
  1. {
  2. $Id$
  3. Copyright (c) 1998-2002 by Florian Klaempfl
  4. Generates nodes for routines that need compiler support
  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 pinline;
  19. {$i fpcdefs.inc}
  20. interface
  21. uses
  22. symtype,
  23. node,
  24. globals,
  25. cpuinfo;
  26. function new_dispose_statement(is_new:boolean) : tnode;
  27. function new_function : tnode;
  28. function inline_setlength : tnode;
  29. function inline_finalize : tnode;
  30. function inline_copy : tnode;
  31. implementation
  32. uses
  33. {$ifdef delphi}
  34. SysUtils,
  35. {$endif}
  36. { common }
  37. cutils,
  38. { global }
  39. globtype,tokens,verbose,
  40. systems,
  41. { symtable }
  42. symconst,symdef,symsym,symtable,defutil,
  43. { pass 1 }
  44. pass_1,htypechk,
  45. nmat,nadd,ncal,nmem,nset,ncnv,ninl,ncon,nld,nflw,nbas,
  46. { parser }
  47. scanner,
  48. pbase,pexpr,
  49. { codegen }
  50. cgbase
  51. ;
  52. function new_dispose_statement(is_new:boolean) : tnode;
  53. var
  54. newstatement : tstatementnode;
  55. temp : ttempcreatenode;
  56. para : tcallparanode;
  57. p,p2 : tnode;
  58. again : boolean; { dummy for do_proc_call }
  59. destructorname : stringid;
  60. sym : tsym;
  61. classh : tobjectdef;
  62. destructorpos,
  63. storepos : tfileposinfo;
  64. begin
  65. consume(_LKLAMMER);
  66. p:=comp_expr(true);
  67. { calc return type }
  68. set_varstate(p,(not is_new));
  69. { constructor,destructor specified }
  70. if try_to_consume(_COMMA) then
  71. begin
  72. { extended syntax of new and dispose }
  73. { function styled new is handled in factor }
  74. { destructors have no parameters }
  75. destructorname:=pattern;
  76. destructorpos:=akttokenpos;
  77. consume(_ID);
  78. if (p.resulttype.def.deftype<>pointerdef) then
  79. begin
  80. Message1(type_e_pointer_type_expected,p.resulttype.def.typename);
  81. p.free;
  82. p:=factor(false);
  83. p.free;
  84. consume(_RKLAMMER);
  85. new_dispose_statement:=cerrornode.create;
  86. exit;
  87. end;
  88. { first parameter must be an object or class }
  89. if tpointerdef(p.resulttype.def).pointertype.def.deftype<>objectdef then
  90. begin
  91. Message(parser_e_pointer_to_class_expected);
  92. p.free;
  93. new_dispose_statement:=factor(false);
  94. consume_all_until(_RKLAMMER);
  95. consume(_RKLAMMER);
  96. exit;
  97. end;
  98. { check, if the first parameter is a pointer to a _class_ }
  99. classh:=tobjectdef(tpointerdef(p.resulttype.def).pointertype.def);
  100. if is_class(classh) then
  101. begin
  102. Message(parser_e_no_new_or_dispose_for_classes);
  103. new_dispose_statement:=factor(false);
  104. consume_all_until(_RKLAMMER);
  105. consume(_RKLAMMER);
  106. exit;
  107. end;
  108. { search cons-/destructor, also in parent classes }
  109. storepos:=akttokenpos;
  110. akttokenpos:=destructorpos;
  111. sym:=search_class_member(classh,destructorname);
  112. akttokenpos:=storepos;
  113. { the second parameter of new/dispose must be a call }
  114. { to a cons-/destructor }
  115. if (not assigned(sym)) or (sym.typ<>procsym) then
  116. begin
  117. if is_new then
  118. Message(parser_e_expr_have_to_be_constructor_call)
  119. else
  120. Message(parser_e_expr_have_to_be_destructor_call);
  121. p.free;
  122. new_dispose_statement:=cerrornode.create;
  123. end
  124. else
  125. begin
  126. if is_new then
  127. p2:=chnewnode.create(tpointerdef(p.resulttype.def).pointertype)
  128. else
  129. p2:=chdisposenode.create(p);
  130. do_resulttypepass(p2);
  131. if is_new then
  132. do_member_read(false,sym,p2,again)
  133. else
  134. begin
  135. if not(m_fpc in aktmodeswitches) then
  136. do_member_read(false,sym,p2,again)
  137. else
  138. begin
  139. p2:=ccallnode.create(nil,tprocsym(sym),sym.owner,p2);
  140. { support dispose(p,done()); }
  141. if try_to_consume(_LKLAMMER) then
  142. begin
  143. if not try_to_consume(_RKLAMMER) then
  144. begin
  145. Message(parser_e_no_paras_for_destructor);
  146. consume_all_until(_RKLAMMER);
  147. consume(_RKLAMMER);
  148. end;
  149. end;
  150. end;
  151. end;
  152. { we need the real called method }
  153. { rg.cleartempgen;}
  154. do_resulttypepass(p2);
  155. if p2.nodetype<>calln then
  156. begin
  157. if is_new then
  158. CGMessage(parser_e_expr_have_to_be_constructor_call)
  159. else
  160. CGMessage(parser_e_expr_have_to_be_destructor_call);
  161. end;
  162. if not codegenerror then
  163. begin
  164. if is_new then
  165. begin
  166. if (tcallnode(p2).procdefinition.proctypeoption<>potype_constructor) then
  167. Message(parser_e_expr_have_to_be_constructor_call);
  168. p2.resulttype:=p.resulttype;
  169. p2:=cassignmentnode.create(p,p2);
  170. end
  171. else
  172. begin
  173. if (tcallnode(p2).procdefinition.proctypeoption<>potype_destructor) then
  174. Message(parser_e_expr_have_to_be_destructor_call);
  175. end;
  176. end;
  177. new_dispose_statement:=p2;
  178. end;
  179. end
  180. else
  181. begin
  182. if (p.resulttype.def.deftype<>pointerdef) then
  183. Begin
  184. Message1(type_e_pointer_type_expected,p.resulttype.def.typename);
  185. new_dispose_statement:=cerrornode.create;
  186. end
  187. else
  188. begin
  189. if (tpointerdef(p.resulttype.def).pointertype.def.deftype=objectdef) and
  190. (oo_has_vmt in tobjectdef(tpointerdef(p.resulttype.def).pointertype.def).objectoptions) then
  191. Message(parser_w_use_extended_syntax_for_objects);
  192. if (tpointerdef(p.resulttype.def).pointertype.def.deftype=orddef) and
  193. (torddef(tpointerdef(p.resulttype.def).pointertype.def).typ=uvoid) then
  194. begin
  195. if (m_tp7 in aktmodeswitches) or
  196. (m_delphi in aktmodeswitches) then
  197. Message(parser_w_no_new_dispose_on_void_pointers)
  198. else
  199. Message(parser_e_no_new_dispose_on_void_pointers);
  200. end;
  201. { create statements with call to getmem+initialize or
  202. finalize+freemem }
  203. new_dispose_statement:=internalstatements(newstatement);
  204. if is_new then
  205. begin
  206. { create temp for result }
  207. temp := ctempcreatenode.create(p.resulttype,p.resulttype.def.size,true);
  208. addstatement(newstatement,temp);
  209. { create call to fpc_getmem }
  210. para := ccallparanode.create(cordconstnode.create
  211. (tpointerdef(p.resulttype.def).pointertype.def.size,s32bittype,true),nil);
  212. addstatement(newstatement,cassignmentnode.create(
  213. ctemprefnode.create(temp),
  214. ccallnode.createintern('fpc_getmem',para)));
  215. { create call to fpc_initialize }
  216. if tpointerdef(p.resulttype.def).pointertype.def.needs_inittable then
  217. begin
  218. para := ccallparanode.create(caddrnode.create(crttinode.create(
  219. tstoreddef(tpointerdef(p.resulttype.def).pointertype.def),initrtti)),
  220. ccallparanode.create(ctemprefnode.create
  221. (temp),nil));
  222. addstatement(newstatement,ccallnode.createintern('fpc_initialize',para));
  223. end;
  224. { copy the temp to the destination }
  225. addstatement(newstatement,cassignmentnode.create(
  226. p,
  227. ctemprefnode.create(temp)));
  228. { release temp }
  229. addstatement(newstatement,ctempdeletenode.create(temp));
  230. end
  231. else
  232. begin
  233. { create call to fpc_finalize }
  234. if tpointerdef(p.resulttype.def).pointertype.def.needs_inittable then
  235. begin
  236. { we need to use a copy of p here }
  237. para := ccallparanode.create(caddrnode.create(crttinode.create
  238. (tstoreddef(tpointerdef(p.resulttype.def).pointertype.def),initrtti)),
  239. ccallparanode.create(p.getcopy,nil));
  240. addstatement(newstatement,ccallnode.createintern('fpc_finalize',para));
  241. end;
  242. { create call to fpc_freemem }
  243. para := ccallparanode.create(p,nil);
  244. addstatement(newstatement,ccallnode.createintern('fpc_freemem',para));
  245. end;
  246. end;
  247. end;
  248. consume(_RKLAMMER);
  249. end;
  250. function new_function : tnode;
  251. var
  252. newstatement : tstatementnode;
  253. newblock : tblocknode;
  254. temp : ttempcreatenode;
  255. para : tcallparanode;
  256. p1,p2 : tnode;
  257. classh : tobjectdef;
  258. sym : tsym;
  259. again : boolean; { dummy for do_proc_call }
  260. begin
  261. consume(_LKLAMMER);
  262. p1:=factor(false);
  263. if p1.nodetype<>typen then
  264. begin
  265. Message(type_e_type_id_expected);
  266. p1.destroy;
  267. p1:=cerrornode.create;
  268. do_resulttypepass(p1);
  269. end;
  270. if (p1.resulttype.def.deftype<>pointerdef) then
  271. Message1(type_e_pointer_type_expected,p1.resulttype.def.typename)
  272. else
  273. if token=_RKLAMMER then
  274. begin
  275. if (tpointerdef(p1.resulttype.def).pointertype.def.deftype=objectdef) and
  276. (oo_has_vmt in tobjectdef(tpointerdef(p1.resulttype.def).pointertype.def).objectoptions) then
  277. Message(parser_w_use_extended_syntax_for_objects);
  278. { create statements with call to getmem+initialize }
  279. newblock:=internalstatements(newstatement);
  280. { create temp for result }
  281. temp := ctempcreatenode.create(p1.resulttype,p1.resulttype.def.size,true);
  282. addstatement(newstatement,temp);
  283. { create call to fpc_getmem }
  284. para := ccallparanode.create(cordconstnode.create
  285. (tpointerdef(p1.resulttype.def).pointertype.def.size,s32bittype,true),nil);
  286. addstatement(newstatement,cassignmentnode.create(
  287. ctemprefnode.create(temp),
  288. ccallnode.createintern('fpc_getmem',para)));
  289. { create call to fpc_initialize }
  290. if tpointerdef(p1.resulttype.def).pointertype.def.needs_inittable then
  291. begin
  292. para := ccallparanode.create(caddrnode.create(crttinode.create
  293. (tstoreddef(tpointerdef(p1.resulttype.def).pointertype.def),initrtti)),
  294. ccallparanode.create(ctemprefnode.create
  295. (temp),nil));
  296. addstatement(newstatement,ccallnode.createintern('fpc_initialize',para));
  297. end;
  298. { the last statement should return the value as
  299. location and type, this is done be referencing the
  300. temp and converting it first from a persistent temp to
  301. normal temp }
  302. addstatement(newstatement,ctempdeletenode.create_normal_temp(temp));
  303. addstatement(newstatement,ctemprefnode.create(temp));
  304. p1.destroy;
  305. p1:=newblock;
  306. consume(_RKLAMMER);
  307. end
  308. else
  309. begin
  310. p2:=chnewnode.create(tpointerdef(p1.resulttype.def).pointertype);
  311. do_resulttypepass(p2);
  312. consume(_COMMA);
  313. afterassignment:=false;
  314. { determines the current object defintion }
  315. classh:=tobjectdef(p2.resulttype.def);
  316. if classh.deftype=objectdef then
  317. begin
  318. { check for an abstract class }
  319. if (oo_has_abstract in classh.objectoptions) then
  320. Message(sym_e_no_instance_of_abstract_object);
  321. { search the constructor also in the symbol tables of
  322. the parents }
  323. sym:=searchsym_in_class(classh,pattern);
  324. consume(_ID);
  325. do_member_read(false,sym,p2,again);
  326. { we need to know which procedure is called }
  327. do_resulttypepass(p2);
  328. if (p2.nodetype<>calln) or
  329. (assigned(tcallnode(p2).procdefinition) and
  330. (tcallnode(p2).procdefinition.proctypeoption<>potype_constructor)) then
  331. Message(parser_e_expr_have_to_be_constructor_call);
  332. end
  333. else
  334. Message(parser_e_pointer_to_class_expected);
  335. { constructors return boolean, update resulttype to return
  336. the pointer to the object }
  337. p2.resulttype:=p1.resulttype;
  338. p1.destroy;
  339. p1:=p2;
  340. consume(_RKLAMMER);
  341. end;
  342. new_function:=p1;
  343. end;
  344. function inline_setlength : tnode;
  345. var
  346. paras : tnode;
  347. npara,
  348. ppn : tcallparanode;
  349. counter : integer;
  350. isarray : boolean;
  351. def : tdef;
  352. destppn : tnode;
  353. newstatement : tstatementnode;
  354. temp : ttempcreatenode;
  355. newblock : tnode;
  356. begin
  357. { for easy exiting if something goes wrong }
  358. result := cerrornode.create;
  359. consume(_LKLAMMER);
  360. paras:=parse_paras(false,false);
  361. consume(_RKLAMMER);
  362. if not assigned(paras) then
  363. begin
  364. CGMessage(parser_e_wrong_parameter_size);
  365. exit;
  366. end;
  367. counter:=0;
  368. if assigned(paras) then
  369. begin
  370. { check type of lengths }
  371. ppn:=tcallparanode(paras);
  372. while assigned(ppn.right) do
  373. begin
  374. set_varstate(ppn.left,true);
  375. inserttypeconv(ppn.left,s32bittype);
  376. inc(counter);
  377. ppn:=tcallparanode(ppn.right);
  378. end;
  379. end;
  380. if counter=0 then
  381. begin
  382. CGMessage(parser_e_wrong_parameter_size);
  383. paras.free;
  384. exit;
  385. end;
  386. { last param must be var }
  387. destppn:=ppn.left;
  388. inc(parsing_para_level);
  389. valid_for_var(destppn);
  390. set_varstate(destppn,false);
  391. dec(parsing_para_level);
  392. { first param must be a string or dynamic array ...}
  393. isarray:=is_dynamic_array(destppn.resulttype.def);
  394. if not((destppn.resulttype.def.deftype=stringdef) or
  395. isarray) then
  396. begin
  397. CGMessage(type_e_mismatch);
  398. paras.free;
  399. exit;
  400. end;
  401. { only dynamic arrays accept more dimensions }
  402. if (counter>1) then
  403. begin
  404. if (not isarray) then
  405. CGMessage(type_e_mismatch)
  406. else
  407. begin
  408. { check if the amount of dimensions is valid }
  409. def := tarraydef(destppn.resulttype.def).elementtype.def;
  410. while counter > 1 do
  411. begin
  412. if not(is_dynamic_array(def)) then
  413. begin
  414. CGMessage(parser_e_wrong_parameter_size);
  415. break;
  416. end;
  417. dec(counter);
  418. def := tarraydef(def).elementtype.def;
  419. end;
  420. end;
  421. end;
  422. if isarray then
  423. begin
  424. { create statements with call initialize the arguments and
  425. call fpc_dynarr_setlength }
  426. newblock:=internalstatements(newstatement);
  427. { get temp for array of lengths }
  428. temp := ctempcreatenode.create(s32bittype,counter*s32bittype.def.size,true);
  429. addstatement(newstatement,temp);
  430. { load array of lengths }
  431. ppn:=tcallparanode(paras);
  432. counter:=0;
  433. while assigned(ppn.right) do
  434. begin
  435. addstatement(newstatement,cassignmentnode.create(
  436. ctemprefnode.create_offset(temp,counter*s32bittype.def.size),
  437. ppn.left));
  438. ppn.left:=nil;
  439. inc(counter);
  440. ppn:=tcallparanode(ppn.right);
  441. end;
  442. { destppn is also reused }
  443. ppn.left:=nil;
  444. { create call to fpc_dynarr_setlength }
  445. npara:=ccallparanode.create(caddrnode.create
  446. (ctemprefnode.create(temp)),
  447. ccallparanode.create(cordconstnode.create
  448. (counter,s32bittype,true),
  449. ccallparanode.create(caddrnode.create
  450. (crttinode.create(tstoreddef(destppn.resulttype.def),initrtti)),
  451. ccallparanode.create(ctypeconvnode.create_explicit(destppn,voidpointertype),nil))));
  452. addstatement(newstatement,ccallnode.createintern('fpc_dynarray_setlength',npara));
  453. addstatement(newstatement,ctempdeletenode.create(temp));
  454. { we don't need original the callparanodes tree }
  455. paras.free;
  456. end
  457. else
  458. begin
  459. { we can reuse the supplied parameters }
  460. newblock:=ccallnode.createintern(
  461. 'fpc_'+tstringdef(destppn.resulttype.def).stringtypname+'_setlength',paras);
  462. end;
  463. result.free;
  464. result:=newblock;
  465. end;
  466. function inline_finalize : tnode;
  467. var
  468. newblock,
  469. paras : tnode;
  470. npara,
  471. destppn,
  472. ppn : tcallparanode;
  473. begin
  474. { for easy exiting if something goes wrong }
  475. result := cerrornode.create;
  476. consume(_LKLAMMER);
  477. paras:=parse_paras(false,false);
  478. consume(_RKLAMMER);
  479. if not assigned(paras) then
  480. begin
  481. CGMessage(parser_e_wrong_parameter_size);
  482. exit;
  483. end;
  484. ppn:=tcallparanode(paras);
  485. { 2 arguments? }
  486. if assigned(ppn.right) then
  487. begin
  488. destppn:=tcallparanode(ppn.right);
  489. { 3 arguments is invalid }
  490. if assigned(destppn.right) then
  491. begin
  492. CGMessage(parser_e_wrong_parameter_size);
  493. paras.free;
  494. exit;
  495. end;
  496. { create call to fpc_finalize_array }
  497. npara:=ccallparanode.create(cordconstnode.create
  498. (destppn.left.resulttype.def.size,s32bittype,true),
  499. ccallparanode.create(ctypeconvnode.create
  500. (ppn.left,s32bittype),
  501. ccallparanode.create(caddrnode.create
  502. (crttinode.create(tstoreddef(destppn.left.resulttype.def),initrtti)),
  503. ccallparanode.create(caddrnode.create
  504. (destppn.left),nil))));
  505. newblock:=ccallnode.createintern('fpc_finalize_array',npara);
  506. destppn.left:=nil;
  507. ppn.left:=nil;
  508. end
  509. else
  510. begin
  511. { create call to fpc_finalize }
  512. npara:=ccallparanode.create(caddrnode.create
  513. (crttinode.create(tstoreddef(ppn.left.resulttype.def),initrtti)),
  514. ccallparanode.create(caddrnode.create
  515. (ppn.left),nil));
  516. newblock:=ccallnode.createintern('fpc_finalize',npara);
  517. ppn.left:=nil;
  518. end;
  519. paras.free;
  520. result.free;
  521. result:=newblock;
  522. end;
  523. function inline_copy : tnode;
  524. var
  525. copynode,
  526. npara,
  527. paras : tnode;
  528. temp : ttempcreatenode;
  529. ppn : tcallparanode;
  530. paradef : tdef;
  531. newstatement : tstatementnode;
  532. begin
  533. { for easy exiting if something goes wrong }
  534. result := cerrornode.create;
  535. consume(_LKLAMMER);
  536. paras:=parse_paras(false,false);
  537. consume(_RKLAMMER);
  538. if not assigned(paras) then
  539. begin
  540. CGMessage(parser_e_wrong_parameter_size);
  541. exit;
  542. end;
  543. { determine copy function to use based on the first argument }
  544. ppn:=tcallparanode(paras);
  545. while assigned(ppn.right) do
  546. ppn:=tcallparanode(ppn.right);
  547. paradef:=ppn.left.resulttype.def;
  548. if is_ansistring(paradef) then
  549. copynode:=ccallnode.createintern('fpc_ansistr_copy',paras)
  550. else
  551. if is_widestring(paradef) then
  552. copynode:=ccallnode.createintern('fpc_widestr_copy',paras)
  553. else
  554. if is_char(paradef) then
  555. copynode:=ccallnode.createintern('fpc_char_copy',paras)
  556. else
  557. if is_dynamic_array(paradef) then
  558. begin
  559. { Copy(dynarr) has only 1 argument }
  560. if assigned(tcallparanode(paras).right) then
  561. begin
  562. CGMessage(parser_e_wrong_parameter_size);
  563. exit;
  564. end;
  565. { create statements with call }
  566. copynode:=internalstatements(newstatement);
  567. { create temp for result, we've to use a temp because a dynarray
  568. type is handled differently from a pointer so we can't
  569. use createinternres() and a function }
  570. temp := ctempcreatenode.create(voidpointertype,voidpointertype.def.size,true);
  571. addstatement(newstatement,temp);
  572. { create call to fpc_dynarray_copy }
  573. npara:=ccallparanode.create(caddrnode.create
  574. (crttinode.create(tstoreddef(ppn.left.resulttype.def),initrtti)),
  575. ccallparanode.create
  576. (ctypeconvnode.create_explicit(ppn.left,voidpointertype),
  577. ccallparanode.create
  578. (ctemprefnode.create(temp),nil)));
  579. addstatement(newstatement,ccallnode.createintern('fpc_dynarray_copy',npara));
  580. { return the reference to the created temp, and
  581. convert the type of the temp to the dynarray type }
  582. addstatement(newstatement,ctypeconvnode.create_explicit(ctemprefnode.create(temp),ppn.left.resulttype));
  583. ppn.left:=nil;
  584. paras.free;
  585. end
  586. else
  587. begin
  588. { generic fallback that will give an error if a wrong
  589. type is passed }
  590. copynode:=ccallnode.createintern('fpc_shortstr_copy',paras)
  591. end;
  592. result.free;
  593. result:=copynode;
  594. end;
  595. end.
  596. {
  597. $Log$
  598. Revision 1.10 2002-11-25 17:43:22 peter
  599. * splitted defbase in defutil,symutil,defcmp
  600. * merged isconvertable and is_equal into compare_defs(_ext)
  601. * made operator search faster by walking the list only once
  602. Revision 1.9 2002/10/29 10:01:22 pierre
  603. * fix crash report as webbug 2174
  604. Revision 1.8 2002/10/02 18:20:52 peter
  605. * Copy() is now internal syssym that calls compilerprocs
  606. Revision 1.7 2002/09/07 12:16:03 carl
  607. * second part bug report 1996 fix, testrange in cordconstnode
  608. only called if option is set (also make parsing a tiny faster)
  609. Revision 1.6 2002/07/20 11:57:56 florian
  610. * types.pas renamed to defbase.pas because D6 contains a types
  611. unit so this would conflicts if D6 programms are compiled
  612. + Willamette/SSE2 instructions to assembler added
  613. Revision 1.5 2002/05/18 13:34:12 peter
  614. * readded missing revisions
  615. Revision 1.4 2002/05/16 19:46:43 carl
  616. + defines.inc -> fpcdefs.inc to avoid conflicts if compiling by hand
  617. + try to fix temp allocation (still in ifdef)
  618. + generic constructor calls
  619. + start of tassembler / tmodulebase class cleanup
  620. Revision 1.2 2002/05/12 16:53:09 peter
  621. * moved entry and exitcode to ncgutil and cgobj
  622. * foreach gets extra argument for passing local data to the
  623. iterator function
  624. * -CR checks also class typecasts at runtime by changing them
  625. into as
  626. * fixed compiler to cycle with the -CR option
  627. * fixed stabs with elf writer, finally the global variables can
  628. be watched
  629. * removed a lot of routines from cga unit and replaced them by
  630. calls to cgobj
  631. * u32bit-s32bit updates for and,or,xor nodes. When one element is
  632. u32bit then the other is typecasted also to u32bit without giving
  633. a rangecheck warning/error.
  634. * fixed pascal calling method with reversing also the high tree in
  635. the parast, detected by tcalcst3 test
  636. Revision 1.1 2002/04/23 19:16:35 peter
  637. * add pinline unit that inserts compiler supported functions using
  638. one or more statements
  639. * moved finalize and setlength from ninl to pinline
  640. }