pinline.pas 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694
  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,defbase,
  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 not codegenerror then
  156. begin
  157. if is_new then
  158. begin
  159. if (tcallnode(p2).procdefinition.proctypeoption<>potype_constructor) then
  160. Message(parser_e_expr_have_to_be_constructor_call);
  161. p2.resulttype:=p.resulttype;
  162. p2:=cassignmentnode.create(p,p2);
  163. end
  164. else
  165. begin
  166. if (tcallnode(p2).procdefinition.proctypeoption<>potype_destructor) then
  167. Message(parser_e_expr_have_to_be_destructor_call);
  168. end;
  169. end;
  170. new_dispose_statement:=p2;
  171. end;
  172. end
  173. else
  174. begin
  175. if (p.resulttype.def.deftype<>pointerdef) then
  176. Begin
  177. Message1(type_e_pointer_type_expected,p.resulttype.def.typename);
  178. new_dispose_statement:=cerrornode.create;
  179. end
  180. else
  181. begin
  182. if (tpointerdef(p.resulttype.def).pointertype.def.deftype=objectdef) and
  183. (oo_has_vmt in tobjectdef(tpointerdef(p.resulttype.def).pointertype.def).objectoptions) then
  184. Message(parser_w_use_extended_syntax_for_objects);
  185. if (tpointerdef(p.resulttype.def).pointertype.def.deftype=orddef) and
  186. (torddef(tpointerdef(p.resulttype.def).pointertype.def).typ=uvoid) then
  187. begin
  188. if (m_tp7 in aktmodeswitches) or
  189. (m_delphi in aktmodeswitches) then
  190. Message(parser_w_no_new_dispose_on_void_pointers)
  191. else
  192. Message(parser_e_no_new_dispose_on_void_pointers);
  193. end;
  194. { create statements with call to getmem+initialize or
  195. finalize+freemem }
  196. new_dispose_statement:=internalstatements(newstatement);
  197. if is_new then
  198. begin
  199. { create temp for result }
  200. temp := ctempcreatenode.create(p.resulttype,p.resulttype.def.size,true);
  201. addstatement(newstatement,temp);
  202. { create call to fpc_getmem }
  203. para := ccallparanode.create(cordconstnode.create
  204. (tpointerdef(p.resulttype.def).pointertype.def.size,s32bittype,true),nil);
  205. addstatement(newstatement,cassignmentnode.create(
  206. ctemprefnode.create(temp),
  207. ccallnode.createintern('fpc_getmem',para)));
  208. { create call to fpc_initialize }
  209. if tpointerdef(p.resulttype.def).pointertype.def.needs_inittable then
  210. begin
  211. para := ccallparanode.create(caddrnode.create(crttinode.create(
  212. tstoreddef(tpointerdef(p.resulttype.def).pointertype.def),initrtti)),
  213. ccallparanode.create(ctemprefnode.create
  214. (temp),nil));
  215. addstatement(newstatement,ccallnode.createintern('fpc_initialize',para));
  216. end;
  217. { copy the temp to the destination }
  218. addstatement(newstatement,cassignmentnode.create(
  219. p,
  220. ctemprefnode.create(temp)));
  221. { release temp }
  222. addstatement(newstatement,ctempdeletenode.create(temp));
  223. end
  224. else
  225. begin
  226. { create call to fpc_finalize }
  227. if tpointerdef(p.resulttype.def).pointertype.def.needs_inittable then
  228. begin
  229. { we need to use a copy of p here }
  230. para := ccallparanode.create(caddrnode.create(crttinode.create
  231. (tstoreddef(tpointerdef(p.resulttype.def).pointertype.def),initrtti)),
  232. ccallparanode.create(p.getcopy,nil));
  233. addstatement(newstatement,ccallnode.createintern('fpc_finalize',para));
  234. end;
  235. { create call to fpc_freemem }
  236. para := ccallparanode.create(p,nil);
  237. addstatement(newstatement,ccallnode.createintern('fpc_freemem',para));
  238. end;
  239. end;
  240. end;
  241. consume(_RKLAMMER);
  242. end;
  243. function new_function : tnode;
  244. var
  245. newstatement : tstatementnode;
  246. newblock : tblocknode;
  247. temp : ttempcreatenode;
  248. para : tcallparanode;
  249. p1,p2 : tnode;
  250. classh : tobjectdef;
  251. sym : tsym;
  252. again : boolean; { dummy for do_proc_call }
  253. begin
  254. consume(_LKLAMMER);
  255. p1:=factor(false);
  256. if p1.nodetype<>typen then
  257. begin
  258. Message(type_e_type_id_expected);
  259. p1.destroy;
  260. p1:=cerrornode.create;
  261. do_resulttypepass(p1);
  262. end;
  263. if (p1.resulttype.def.deftype<>pointerdef) then
  264. Message1(type_e_pointer_type_expected,p1.resulttype.def.typename)
  265. else
  266. if token=_RKLAMMER then
  267. begin
  268. if (tpointerdef(p1.resulttype.def).pointertype.def.deftype=objectdef) and
  269. (oo_has_vmt in tobjectdef(tpointerdef(p1.resulttype.def).pointertype.def).objectoptions) then
  270. Message(parser_w_use_extended_syntax_for_objects);
  271. { create statements with call to getmem+initialize }
  272. newblock:=internalstatements(newstatement);
  273. { create temp for result }
  274. temp := ctempcreatenode.create(p1.resulttype,p1.resulttype.def.size,true);
  275. addstatement(newstatement,temp);
  276. { create call to fpc_getmem }
  277. para := ccallparanode.create(cordconstnode.create
  278. (tpointerdef(p1.resulttype.def).pointertype.def.size,s32bittype,true),nil);
  279. addstatement(newstatement,cassignmentnode.create(
  280. ctemprefnode.create(temp),
  281. ccallnode.createintern('fpc_getmem',para)));
  282. { create call to fpc_initialize }
  283. if tpointerdef(p1.resulttype.def).pointertype.def.needs_inittable then
  284. begin
  285. para := ccallparanode.create(caddrnode.create(crttinode.create
  286. (tstoreddef(tpointerdef(p1.resulttype.def).pointertype.def),initrtti)),
  287. ccallparanode.create(ctemprefnode.create
  288. (temp),nil));
  289. addstatement(newstatement,ccallnode.createintern('fpc_initialize',para));
  290. end;
  291. { the last statement should return the value as
  292. location and type, this is done be referencing the
  293. temp and converting it first from a persistent temp to
  294. normal temp }
  295. addstatement(newstatement,ctempdeletenode.create_normal_temp(temp));
  296. addstatement(newstatement,ctemprefnode.create(temp));
  297. p1.destroy;
  298. p1:=newblock;
  299. consume(_RKLAMMER);
  300. end
  301. else
  302. begin
  303. p2:=chnewnode.create(tpointerdef(p1.resulttype.def).pointertype);
  304. do_resulttypepass(p2);
  305. consume(_COMMA);
  306. afterassignment:=false;
  307. { determines the current object defintion }
  308. classh:=tobjectdef(p2.resulttype.def);
  309. if classh.deftype=objectdef then
  310. begin
  311. { check for an abstract class }
  312. if (oo_has_abstract in classh.objectoptions) then
  313. Message(sym_e_no_instance_of_abstract_object);
  314. { search the constructor also in the symbol tables of
  315. the parents }
  316. sym:=searchsym_in_class(classh,pattern);
  317. consume(_ID);
  318. do_member_read(false,sym,p2,again);
  319. { we need to know which procedure is called }
  320. do_resulttypepass(p2);
  321. if (p2.nodetype<>calln) or
  322. (assigned(tcallnode(p2).procdefinition) and
  323. (tcallnode(p2).procdefinition.proctypeoption<>potype_constructor)) then
  324. Message(parser_e_expr_have_to_be_constructor_call);
  325. end
  326. else
  327. Message(parser_e_pointer_to_class_expected);
  328. { constructors return boolean, update resulttype to return
  329. the pointer to the object }
  330. p2.resulttype:=p1.resulttype;
  331. p1.destroy;
  332. p1:=p2;
  333. consume(_RKLAMMER);
  334. end;
  335. new_function:=p1;
  336. end;
  337. function inline_setlength : tnode;
  338. var
  339. paras : tnode;
  340. npara,
  341. ppn : tcallparanode;
  342. counter : integer;
  343. isarray : boolean;
  344. def : tdef;
  345. destppn : tnode;
  346. newstatement : tstatementnode;
  347. temp : ttempcreatenode;
  348. newblock : tnode;
  349. begin
  350. { for easy exiting if something goes wrong }
  351. result := cerrornode.create;
  352. consume(_LKLAMMER);
  353. paras:=parse_paras(false,false);
  354. consume(_RKLAMMER);
  355. if not assigned(paras) then
  356. begin
  357. CGMessage(parser_e_wrong_parameter_size);
  358. exit;
  359. end;
  360. counter:=0;
  361. if assigned(paras) then
  362. begin
  363. { check type of lengths }
  364. ppn:=tcallparanode(paras);
  365. while assigned(ppn.right) do
  366. begin
  367. set_varstate(ppn.left,true);
  368. inserttypeconv(ppn.left,s32bittype);
  369. inc(counter);
  370. ppn:=tcallparanode(ppn.right);
  371. end;
  372. end;
  373. if counter=0 then
  374. begin
  375. CGMessage(parser_e_wrong_parameter_size);
  376. paras.free;
  377. exit;
  378. end;
  379. { last param must be var }
  380. destppn:=ppn.left;
  381. inc(parsing_para_level);
  382. valid_for_var(destppn);
  383. set_varstate(destppn,false);
  384. dec(parsing_para_level);
  385. { first param must be a string or dynamic array ...}
  386. isarray:=is_dynamic_array(destppn.resulttype.def);
  387. if not((destppn.resulttype.def.deftype=stringdef) or
  388. isarray) then
  389. begin
  390. CGMessage(type_e_mismatch);
  391. paras.free;
  392. exit;
  393. end;
  394. { only dynamic arrays accept more dimensions }
  395. if (counter>1) then
  396. begin
  397. if (not isarray) then
  398. CGMessage(type_e_mismatch)
  399. else
  400. begin
  401. { check if the amount of dimensions is valid }
  402. def := tarraydef(destppn.resulttype.def).elementtype.def;
  403. while counter > 1 do
  404. begin
  405. if not(is_dynamic_array(def)) then
  406. begin
  407. CGMessage(parser_e_wrong_parameter_size);
  408. break;
  409. end;
  410. dec(counter);
  411. def := tarraydef(def).elementtype.def;
  412. end;
  413. end;
  414. end;
  415. if isarray then
  416. begin
  417. { create statements with call initialize the arguments and
  418. call fpc_dynarr_setlength }
  419. newblock:=internalstatements(newstatement);
  420. { get temp for array of lengths }
  421. temp := ctempcreatenode.create(s32bittype,counter*s32bittype.def.size,true);
  422. addstatement(newstatement,temp);
  423. { load array of lengths }
  424. ppn:=tcallparanode(paras);
  425. counter:=0;
  426. while assigned(ppn.right) do
  427. begin
  428. addstatement(newstatement,cassignmentnode.create(
  429. ctemprefnode.create_offset(temp,counter*s32bittype.def.size),
  430. ppn.left));
  431. ppn.left:=nil;
  432. inc(counter);
  433. ppn:=tcallparanode(ppn.right);
  434. end;
  435. { destppn is also reused }
  436. ppn.left:=nil;
  437. { create call to fpc_dynarr_setlength }
  438. npara:=ccallparanode.create(caddrnode.create
  439. (ctemprefnode.create(temp)),
  440. ccallparanode.create(cordconstnode.create
  441. (counter,s32bittype,true),
  442. ccallparanode.create(caddrnode.create
  443. (crttinode.create(tstoreddef(destppn.resulttype.def),initrtti)),
  444. ccallparanode.create(ctypeconvnode.create_explicit(destppn,voidpointertype),nil))));
  445. addstatement(newstatement,ccallnode.createintern('fpc_dynarray_setlength',npara));
  446. addstatement(newstatement,ctempdeletenode.create(temp));
  447. { we don't need original the callparanodes tree }
  448. paras.free;
  449. end
  450. else
  451. begin
  452. { we can reuse the supplied parameters }
  453. newblock:=ccallnode.createintern(
  454. 'fpc_'+tstringdef(destppn.resulttype.def).stringtypname+'_setlength',paras);
  455. end;
  456. result.free;
  457. result:=newblock;
  458. end;
  459. function inline_finalize : tnode;
  460. var
  461. newblock,
  462. paras : tnode;
  463. npara,
  464. destppn,
  465. ppn : tcallparanode;
  466. begin
  467. { for easy exiting if something goes wrong }
  468. result := cerrornode.create;
  469. consume(_LKLAMMER);
  470. paras:=parse_paras(false,false);
  471. consume(_RKLAMMER);
  472. if not assigned(paras) then
  473. begin
  474. CGMessage(parser_e_wrong_parameter_size);
  475. exit;
  476. end;
  477. ppn:=tcallparanode(paras);
  478. { 2 arguments? }
  479. if assigned(ppn.right) then
  480. begin
  481. destppn:=tcallparanode(ppn.right);
  482. { 3 arguments is invalid }
  483. if assigned(destppn.right) then
  484. begin
  485. CGMessage(parser_e_wrong_parameter_size);
  486. paras.free;
  487. exit;
  488. end;
  489. { create call to fpc_finalize_array }
  490. npara:=ccallparanode.create(cordconstnode.create
  491. (destppn.left.resulttype.def.size,s32bittype,true),
  492. ccallparanode.create(ctypeconvnode.create
  493. (ppn.left,s32bittype),
  494. ccallparanode.create(caddrnode.create
  495. (crttinode.create(tstoreddef(destppn.left.resulttype.def),initrtti)),
  496. ccallparanode.create(caddrnode.create
  497. (destppn.left),nil))));
  498. newblock:=ccallnode.createintern('fpc_finalize_array',npara);
  499. destppn.left:=nil;
  500. ppn.left:=nil;
  501. end
  502. else
  503. begin
  504. { create call to fpc_finalize }
  505. npara:=ccallparanode.create(caddrnode.create
  506. (crttinode.create(tstoreddef(ppn.left.resulttype.def),initrtti)),
  507. ccallparanode.create(caddrnode.create
  508. (ppn.left),nil));
  509. newblock:=ccallnode.createintern('fpc_finalize',npara);
  510. ppn.left:=nil;
  511. end;
  512. paras.free;
  513. result.free;
  514. result:=newblock;
  515. end;
  516. function inline_copy : tnode;
  517. var
  518. copynode,
  519. npara,
  520. paras : tnode;
  521. temp : ttempcreatenode;
  522. ppn : tcallparanode;
  523. paradef : tdef;
  524. newstatement : tstatementnode;
  525. begin
  526. { for easy exiting if something goes wrong }
  527. result := cerrornode.create;
  528. consume(_LKLAMMER);
  529. paras:=parse_paras(false,false);
  530. consume(_RKLAMMER);
  531. if not assigned(paras) then
  532. begin
  533. CGMessage(parser_e_wrong_parameter_size);
  534. exit;
  535. end;
  536. { determine copy function to use based on the first argument }
  537. ppn:=tcallparanode(paras);
  538. while assigned(ppn.right) do
  539. ppn:=tcallparanode(ppn.right);
  540. paradef:=ppn.left.resulttype.def;
  541. if is_ansistring(paradef) then
  542. copynode:=ccallnode.createintern('fpc_ansistr_copy',paras)
  543. else
  544. if is_widestring(paradef) then
  545. copynode:=ccallnode.createintern('fpc_widestr_copy',paras)
  546. else
  547. if is_char(paradef) then
  548. copynode:=ccallnode.createintern('fpc_char_copy',paras)
  549. else
  550. if is_dynamic_array(paradef) then
  551. begin
  552. { Copy(dynarr) has only 1 argument }
  553. if assigned(tcallparanode(paras).right) then
  554. begin
  555. CGMessage(parser_e_wrong_parameter_size);
  556. exit;
  557. end;
  558. { create statements with call }
  559. copynode:=internalstatements(newstatement);
  560. { create temp for result, we've to use a temp because a dynarray
  561. type is handled differently from a pointer so we can't
  562. use createinternres() and a function }
  563. temp := ctempcreatenode.create(voidpointertype,voidpointertype.def.size,true);
  564. addstatement(newstatement,temp);
  565. { create call to fpc_dynarray_copy }
  566. npara:=ccallparanode.create(caddrnode.create
  567. (crttinode.create(tstoreddef(ppn.left.resulttype.def),initrtti)),
  568. ccallparanode.create
  569. (ctypeconvnode.create_explicit(ppn.left,voidpointertype),
  570. ccallparanode.create
  571. (ctemprefnode.create(temp),nil)));
  572. addstatement(newstatement,ccallnode.createintern('fpc_dynarray_copy',npara));
  573. { return the reference to the created temp, and
  574. convert the type of the temp to the dynarray type }
  575. addstatement(newstatement,ctypeconvnode.create_explicit(ctemprefnode.create(temp),ppn.left.resulttype));
  576. ppn.left:=nil;
  577. paras.free;
  578. end
  579. else
  580. begin
  581. { generic fallback that will give an error if a wrong
  582. type is passed }
  583. copynode:=ccallnode.createintern('fpc_shortstr_copy',paras)
  584. end;
  585. result.free;
  586. result:=copynode;
  587. end;
  588. end.
  589. {
  590. $Log$
  591. Revision 1.8 2002-10-02 18:20:52 peter
  592. * Copy() is now internal syssym that calls compilerprocs
  593. Revision 1.7 2002/09/07 12:16:03 carl
  594. * second part bug report 1996 fix, testrange in cordconstnode
  595. only called if option is set (also make parsing a tiny faster)
  596. Revision 1.6 2002/07/20 11:57:56 florian
  597. * types.pas renamed to defbase.pas because D6 contains a types
  598. unit so this would conflicts if D6 programms are compiled
  599. + Willamette/SSE2 instructions to assembler added
  600. Revision 1.5 2002/05/18 13:34:12 peter
  601. * readded missing revisions
  602. Revision 1.4 2002/05/16 19:46:43 carl
  603. + defines.inc -> fpcdefs.inc to avoid conflicts if compiling by hand
  604. + try to fix temp allocation (still in ifdef)
  605. + generic constructor calls
  606. + start of tassembler / tmodulebase class cleanup
  607. Revision 1.2 2002/05/12 16:53:09 peter
  608. * moved entry and exitcode to ncgutil and cgobj
  609. * foreach gets extra argument for passing local data to the
  610. iterator function
  611. * -CR checks also class typecasts at runtime by changing them
  612. into as
  613. * fixed compiler to cycle with the -CR option
  614. * fixed stabs with elf writer, finally the global variables can
  615. be watched
  616. * removed a lot of routines from cga unit and replaced them by
  617. calls to cgobj
  618. * u32bit-s32bit updates for and,or,xor nodes. When one element is
  619. u32bit then the other is typecasted also to u32bit without giving
  620. a rangecheck warning/error.
  621. * fixed pascal calling method with reversing also the high tree in
  622. the parast, detected by tcalcst3 test
  623. Revision 1.1 2002/04/23 19:16:35 peter
  624. * add pinline unit that inserts compiler supported functions using
  625. one or more statements
  626. * moved finalize and setlength from ninl to pinline
  627. }