ptype.pas 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717
  1. {
  2. $Id$
  3. Copyright (c) 1998-2002 by Florian Klaempfl
  4. Does parsing types for Free Pascal
  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 ptype;
  19. {$i fpcdefs.inc}
  20. interface
  21. uses
  22. globtype,symtype;
  23. const
  24. { forward types should only be possible inside a TYPE statement }
  25. typecanbeforward : boolean = false;
  26. var
  27. { hack, which allows to use the current parsed }
  28. { object type as function argument type }
  29. testcurobject : byte;
  30. curobjectname : stringid;
  31. { reads a string, file type or a type id and returns a name and }
  32. { tdef }
  33. procedure single_type(var tt:ttype;var s : string;isforwarddef:boolean);
  34. procedure read_type(var tt:ttype;const name : stringid);
  35. { reads a type definition }
  36. { to a appropriating tdef, s gets the name of }
  37. { the type to allow name mangling }
  38. procedure id_type(var tt : ttype;var s : string;isforwarddef:boolean);
  39. implementation
  40. uses
  41. { common }
  42. cutils,
  43. { global }
  44. globals,tokens,verbose,
  45. systems,
  46. { symtable }
  47. symconst,symbase,symdef,symsym,symtable,
  48. defutil,defcmp,
  49. { pass 1 }
  50. node,
  51. nmat,nadd,ncal,nset,ncnv,ninl,ncon,nld,nflw,
  52. { parser }
  53. scanner,
  54. pbase,pexpr,pdecsub,pdecvar,pdecobj;
  55. procedure id_type(var tt : ttype;var s : string;isforwarddef:boolean);
  56. { reads a type definition }
  57. { to a appropriating tdef, s gets the name of }
  58. { the type to allow name mangling }
  59. var
  60. is_unit_specific : boolean;
  61. pos : tfileposinfo;
  62. srsym : tsym;
  63. srsymtable : tsymtable;
  64. sorg : stringid;
  65. begin
  66. s:=pattern;
  67. sorg:=orgpattern;
  68. pos:=akttokenpos;
  69. { classes can be used also in classes }
  70. if (curobjectname=pattern) and is_class_or_interface(aktobjectdef) then
  71. begin
  72. tt.setdef(aktobjectdef);
  73. consume(_ID);
  74. exit;
  75. end;
  76. { objects can be parameters }
  77. if (testcurobject=2) and (curobjectname=pattern) then
  78. begin
  79. tt.setdef(aktobjectdef);
  80. consume(_ID);
  81. exit;
  82. end;
  83. { try to load the symbol to see if it's a unitsym }
  84. is_unit_specific:=false;
  85. searchsym(s,srsym,srsymtable);
  86. consume(_ID);
  87. if assigned(srsym) and
  88. (srsym.typ=unitsym) then
  89. begin
  90. is_unit_specific:=true;
  91. consume(_POINT);
  92. if srsym.owner.unitid=0 then
  93. begin
  94. srsym:=searchsymonlyin(tunitsym(srsym).unitsymtable,pattern);
  95. pos:=akttokenpos;
  96. s:=pattern;
  97. end
  98. else
  99. srsym:=nil;
  100. consume(_ID);
  101. end;
  102. { Types are first defined with an error def before assigning
  103. the real type so check if it's an errordef. if so then
  104. give an error. Only check for typesyms in the current symbol
  105. table as forwarddef are not resolved directly }
  106. if assigned(srsym) and
  107. (srsym.typ=typesym) and
  108. (srsym.owner=symtablestack) and
  109. (ttypesym(srsym).restype.def.deftype=errordef) then
  110. begin
  111. Message1(type_e_type_is_not_completly_defined,ttypesym(srsym).realname);
  112. tt:=generrortype;
  113. exit;
  114. end;
  115. { are we parsing a possible forward def ? }
  116. if isforwarddef and
  117. not(is_unit_specific) then
  118. begin
  119. tt.setdef(tforwarddef.create(s,pos));
  120. exit;
  121. end;
  122. { unknown sym ? }
  123. if not assigned(srsym) then
  124. begin
  125. Message1(sym_e_id_not_found,sorg);
  126. tt:=generrortype;
  127. exit;
  128. end;
  129. { type sym ? }
  130. if (srsym.typ<>typesym) then
  131. begin
  132. Message(type_e_type_id_expected);
  133. tt:=generrortype;
  134. exit;
  135. end;
  136. { Give an error when referring to an errordef }
  137. if (ttypesym(srsym).restype.def.deftype=errordef) then
  138. begin
  139. Message(sym_e_error_in_type_def);
  140. tt:=generrortype;
  141. exit;
  142. end;
  143. { Use the definitions for current unit, because
  144. they can be refered from the parameters and symbols are not
  145. loaded at that time. Only write the definition when the
  146. symbol is the real owner of the definition (not a redefine) }
  147. if (ttypesym(srsym).owner.unitid=0) and
  148. ((ttypesym(srsym).restype.def.typesym=nil) or
  149. (srsym=ttypesym(srsym).restype.def.typesym)) then
  150. tt.setdef(ttypesym(srsym).restype.def)
  151. else
  152. tt.setsym(srsym);
  153. end;
  154. procedure single_type(var tt:ttype;var s : string;isforwarddef:boolean);
  155. { reads a string, file type or a type id and returns a name and }
  156. { tdef }
  157. var
  158. hs : string;
  159. t2 : ttype;
  160. begin
  161. case token of
  162. _STRING:
  163. begin
  164. string_dec(tt);
  165. s:='STRING';
  166. end;
  167. _FILE:
  168. begin
  169. consume(_FILE);
  170. if token=_OF then
  171. begin
  172. consume(_OF);
  173. single_type(t2,hs,false);
  174. tt.setdef(tfiledef.createtyped(t2));
  175. s:='FILE$OF$'+hs;
  176. end
  177. else
  178. begin
  179. tt:=cfiletype;
  180. s:='FILE';
  181. end;
  182. end;
  183. _ID:
  184. begin
  185. id_type(tt,s,isforwarddef);
  186. end;
  187. else
  188. begin
  189. message(type_e_type_id_expected);
  190. s:='<unknown>';
  191. tt:=generrortype;
  192. end;
  193. end;
  194. end;
  195. { reads a record declaration }
  196. function record_dec : tdef;
  197. var
  198. symtable : tsymtable;
  199. storetypecanbeforward : boolean;
  200. old_object_option : tsymoptions;
  201. begin
  202. { create recdef }
  203. symtable:=trecordsymtable.create;
  204. record_dec:=trecorddef.create(symtable);
  205. { update symtable stack }
  206. symtable.next:=symtablestack;
  207. symtablestack:=symtable;
  208. { parse record }
  209. consume(_RECORD);
  210. old_object_option:=current_object_option;
  211. current_object_option:=[sp_public];
  212. storetypecanbeforward:=typecanbeforward;
  213. { for tp7 don't allow forward types }
  214. if m_tp7 in aktmodeswitches then
  215. typecanbeforward:=false;
  216. read_var_decs(true,false,false);
  217. consume(_END);
  218. typecanbeforward:=storetypecanbeforward;
  219. current_object_option:=old_object_option;
  220. { may be scale record size to a size of n*4 ? }
  221. symtablestack.datasize:=align(symtablestack.datasize,symtablestack.dataalignment);
  222. { restore symtable stack }
  223. symtablestack:=symtable.next;
  224. end;
  225. { reads a type definition and returns a pointer to it }
  226. procedure read_type(var tt : ttype;const name : stringid);
  227. var
  228. pt : tnode;
  229. tt2 : ttype;
  230. aktenumdef : tenumdef;
  231. ap : tarraydef;
  232. s : stringid;
  233. l,v : TConstExprInt;
  234. oldaktpackrecords : longint;
  235. hs : string;
  236. defpos,storepos : tfileposinfo;
  237. procedure expr_type;
  238. var
  239. pt1,pt2 : tnode;
  240. lv,hv : TConstExprInt;
  241. begin
  242. { use of current parsed object ? }
  243. if (token=_ID) and (testcurobject=2) and (curobjectname=pattern) then
  244. begin
  245. consume(_ID);
  246. tt.setdef(aktobjectdef);
  247. exit;
  248. end;
  249. { classes can be used also in classes }
  250. if (curobjectname=pattern) and is_class_or_interface(aktobjectdef) then
  251. begin
  252. tt.setdef(aktobjectdef);
  253. consume(_ID);
  254. exit;
  255. end;
  256. { we can't accept a equal in type }
  257. pt1:=comp_expr(not(ignore_equal));
  258. if (token=_POINTPOINT) then
  259. begin
  260. consume(_POINTPOINT);
  261. { get high value of range }
  262. pt2:=comp_expr(not(ignore_equal));
  263. { make both the same type }
  264. inserttypeconv(pt1,pt2.resulttype);
  265. { both must be evaluated to constants now }
  266. if (pt1.nodetype=ordconstn) and
  267. (pt2.nodetype=ordconstn) then
  268. begin
  269. lv:=tordconstnode(pt1).value;
  270. hv:=tordconstnode(pt2).value;
  271. { Check bounds }
  272. if hv<lv then
  273. Message(cg_e_upper_lower_than_lower)
  274. else
  275. begin
  276. { All checks passed, create the new def }
  277. case pt1.resulttype.def.deftype of
  278. enumdef :
  279. tt.setdef(tenumdef.create_subrange(tenumdef(pt1.resulttype.def),lv,hv));
  280. orddef :
  281. begin
  282. if is_char(pt1.resulttype.def) then
  283. tt.setdef(torddef.create(uchar,lv,hv))
  284. else
  285. if is_boolean(pt1.resulttype.def) then
  286. tt.setdef(torddef.create(bool8bit,l,hv))
  287. else
  288. tt.setdef(torddef.create(range_to_basetype(lv,hv),lv,hv));
  289. end;
  290. end;
  291. end;
  292. end
  293. else
  294. Message(sym_e_error_in_type_def);
  295. pt2.free;
  296. end
  297. else
  298. begin
  299. { a simple type renaming }
  300. if (pt1.nodetype=typen) then
  301. tt:=ttypenode(pt1).resulttype
  302. else
  303. Message(sym_e_error_in_type_def);
  304. end;
  305. pt1.free;
  306. end;
  307. procedure array_dec;
  308. var
  309. lowval,
  310. highval : longint;
  311. arraytype : ttype;
  312. ht : ttype;
  313. procedure setdefdecl(const t:ttype);
  314. begin
  315. case t.def.deftype of
  316. enumdef :
  317. begin
  318. lowval:=tenumdef(t.def).min;
  319. highval:=tenumdef(t.def).max;
  320. if tenumdef(t.def).has_jumps then
  321. Message(type_e_array_index_enums_with_assign_not_possible);
  322. arraytype:=t;
  323. end;
  324. orddef :
  325. begin
  326. if torddef(t.def).typ in [uchar,
  327. u8bit,u16bit,
  328. s8bit,s16bit,s32bit,
  329. bool8bit,bool16bit,bool32bit,
  330. uwidechar] then
  331. begin
  332. lowval:=torddef(t.def).low;
  333. highval:=torddef(t.def).high;
  334. arraytype:=t;
  335. end
  336. else
  337. Message1(parser_e_type_cant_be_used_in_array_index,t.def.gettypename);
  338. end;
  339. else
  340. Message(sym_e_error_in_type_def);
  341. end;
  342. end;
  343. begin
  344. consume(_ARRAY);
  345. { open array? }
  346. if token=_LECKKLAMMER then
  347. begin
  348. consume(_LECKKLAMMER);
  349. { defaults }
  350. arraytype:=generrortype;
  351. lowval:=longint($80000000);
  352. highval:=$7fffffff;
  353. tt.reset;
  354. repeat
  355. { read the expression and check it, check apart if the
  356. declaration is an enum declaration because that needs to
  357. be parsed by readtype (PFV) }
  358. if token=_LKLAMMER then
  359. begin
  360. read_type(ht,'');
  361. setdefdecl(ht);
  362. end
  363. else
  364. begin
  365. pt:=expr;
  366. if pt.nodetype=typen then
  367. setdefdecl(pt.resulttype)
  368. else
  369. begin
  370. if (pt.nodetype=rangen) then
  371. begin
  372. if (trangenode(pt).left.nodetype=ordconstn) and
  373. (trangenode(pt).right.nodetype=ordconstn) then
  374. begin
  375. lowval:=tordconstnode(trangenode(pt).left).value;
  376. highval:=tordconstnode(trangenode(pt).right).value;
  377. if highval<lowval then
  378. begin
  379. Message(parser_e_array_lower_less_than_upper_bound);
  380. highval:=lowval;
  381. end;
  382. arraytype:=trangenode(pt).right.resulttype;
  383. end
  384. else
  385. Message(type_e_cant_eval_constant_expr);
  386. end
  387. else
  388. Message(sym_e_error_in_type_def)
  389. end;
  390. pt.free;
  391. end;
  392. { create arraydef }
  393. if not assigned(tt.def) then
  394. begin
  395. ap:=tarraydef.create(lowval,highval,arraytype);
  396. tt.setdef(ap);
  397. end
  398. else
  399. begin
  400. ap.elementtype.setdef(tarraydef.create(lowval,highval,arraytype));
  401. ap:=tarraydef(ap.elementtype.def);
  402. end;
  403. if token=_COMMA then
  404. consume(_COMMA)
  405. else
  406. break;
  407. until false;
  408. consume(_RECKKLAMMER);
  409. end
  410. else
  411. begin
  412. ap:=tarraydef.create(0,-1,s32bittype);
  413. ap.IsDynamicArray:=true;
  414. tt.setdef(ap);
  415. end;
  416. consume(_OF);
  417. read_type(tt2,'');
  418. { if no error, set element type }
  419. if assigned(ap) then
  420. ap.setelementtype(tt2);
  421. end;
  422. var
  423. p : tnode;
  424. enumdupmsg : boolean;
  425. begin
  426. tt.reset;
  427. case token of
  428. _STRING,_FILE:
  429. begin
  430. single_type(tt,hs,false);
  431. end;
  432. _LKLAMMER:
  433. begin
  434. consume(_LKLAMMER);
  435. { allow negativ value_str }
  436. l:=-1;
  437. enumdupmsg:=false;
  438. aktenumdef:=tenumdef.create;
  439. repeat
  440. s:=orgpattern;
  441. defpos:=akttokenpos;
  442. consume(_ID);
  443. { only allow assigning of specific numbers under fpc mode }
  444. if not(m_tp7 in aktmodeswitches) and
  445. (
  446. { in fpc mode also allow := to be compatible
  447. with previous 1.0.x versions }
  448. ((m_fpc in aktmodeswitches) and
  449. try_to_consume(_ASSIGNMENT)) or
  450. try_to_consume(_EQUAL)
  451. ) then
  452. begin
  453. p:=comp_expr(true);
  454. if (p.nodetype=ordconstn) then
  455. begin
  456. { we expect an integer or an enum of the
  457. same type }
  458. if is_integer(p.resulttype.def) or
  459. is_char(p.resulttype.def) or
  460. equal_defs(p.resulttype.def,aktenumdef) then
  461. v:=tordconstnode(p).value
  462. else
  463. Message2(type_e_incompatible_types,p.resulttype.def.typename,s32bittype.def.typename);
  464. end
  465. else
  466. Message(cg_e_illegal_expression);
  467. p.free;
  468. { please leave that a note, allows type save }
  469. { declarations in the win32 units ! }
  470. if (v<=l) and (not enumdupmsg) then
  471. begin
  472. Message(parser_n_duplicate_enum);
  473. enumdupmsg:=true;
  474. end;
  475. l:=v;
  476. end
  477. else
  478. inc(l);
  479. storepos:=akttokenpos;
  480. akttokenpos:=defpos;
  481. constsymtable.insert(tenumsym.create(s,aktenumdef,l));
  482. akttokenpos:=storepos;
  483. until not try_to_consume(_COMMA);
  484. tt.setdef(aktenumdef);
  485. consume(_RKLAMMER);
  486. end;
  487. _ARRAY:
  488. begin
  489. array_dec;
  490. end;
  491. _SET:
  492. begin
  493. consume(_SET);
  494. consume(_OF);
  495. read_type(tt2,'');
  496. if assigned(tt2.def) then
  497. begin
  498. case tt2.def.deftype of
  499. { don't forget that min can be negativ PM }
  500. enumdef :
  501. if tenumdef(tt2.def).min>=0 then
  502. tt.setdef(tsetdef.create(tt2,tenumdef(tt2.def).max))
  503. else
  504. Message(sym_e_ill_type_decl_set);
  505. orddef :
  506. begin
  507. case torddef(tt2.def).typ of
  508. uchar :
  509. tt.setdef(tsetdef.create(tt2,255));
  510. u8bit,u16bit,u32bit,
  511. s8bit,s16bit,s32bit :
  512. begin
  513. if (torddef(tt2.def).low>=0) then
  514. tt.setdef(tsetdef.create(tt2,torddef(tt2.def).high))
  515. else
  516. Message(sym_e_ill_type_decl_set);
  517. end;
  518. else
  519. Message(sym_e_ill_type_decl_set);
  520. end;
  521. end;
  522. else
  523. Message(sym_e_ill_type_decl_set);
  524. end;
  525. end
  526. else
  527. tt:=generrortype;
  528. end;
  529. _CARET:
  530. begin
  531. consume(_CARET);
  532. single_type(tt2,hs,typecanbeforward);
  533. tt.setdef(tpointerdef.create(tt2));
  534. end;
  535. _RECORD:
  536. begin
  537. tt.setdef(record_dec);
  538. end;
  539. _PACKED:
  540. begin
  541. consume(_PACKED);
  542. if token=_ARRAY then
  543. array_dec
  544. else
  545. begin
  546. oldaktpackrecords:=aktalignment.recordalignmax;
  547. aktalignment.recordalignmax:=1;
  548. if token in [_CLASS,_OBJECT] then
  549. tt.setdef(object_dec(name,nil))
  550. else
  551. tt.setdef(record_dec);
  552. aktalignment.recordalignmax:=oldaktpackrecords;
  553. end;
  554. end;
  555. _CLASS,
  556. _CPPCLASS,
  557. _INTERFACE,
  558. _OBJECT:
  559. begin
  560. tt.setdef(object_dec(name,nil));
  561. end;
  562. _PROCEDURE:
  563. begin
  564. consume(_PROCEDURE);
  565. tt.setdef(tprocvardef.create);
  566. if token=_LKLAMMER then
  567. parameter_dec(tprocvardef(tt.def));
  568. if token=_OF then
  569. begin
  570. consume(_OF);
  571. consume(_OBJECT);
  572. include(tprocvardef(tt.def).procoptions,po_methodpointer);
  573. check_self_para(tprocvardef(tt.def));
  574. end;
  575. end;
  576. _FUNCTION:
  577. begin
  578. consume(_FUNCTION);
  579. tt.def:=tprocvardef.create;
  580. if token=_LKLAMMER then
  581. parameter_dec(tprocvardef(tt.def));
  582. consume(_COLON);
  583. single_type(tprocvardef(tt.def).rettype,hs,false);
  584. if token=_OF then
  585. begin
  586. consume(_OF);
  587. consume(_OBJECT);
  588. include(tprocvardef(tt.def).procoptions,po_methodpointer);
  589. end;
  590. end;
  591. else
  592. expr_type;
  593. end;
  594. if tt.def=nil then
  595. tt:=generrortype;
  596. end;
  597. end.
  598. {
  599. $Log$
  600. Revision 1.50 2003-01-05 15:54:15 florian
  601. + added proper support of type = type <type>; for simple types
  602. Revision 1.49 2003/01/03 23:50:41 peter
  603. * also allow = in fpc mode to assign enums
  604. Revision 1.48 2003/01/02 19:49:00 peter
  605. * update self parameter only for methodpointer and methods
  606. Revision 1.47 2002/12/21 13:07:34 peter
  607. * type redefine fix for tb0437
  608. Revision 1.46 2002/11/25 17:43:23 peter
  609. * splitted defbase in defutil,symutil,defcmp
  610. * merged isconvertable and is_equal into compare_defs(_ext)
  611. * made operator search faster by walking the list only once
  612. Revision 1.45 2002/09/27 21:13:29 carl
  613. * low-highval always checked if limit ober 2GB is reached (to avoid overflow)
  614. Revision 1.44 2002/09/10 16:26:39 peter
  615. * safety check for typesym added for incomplete type def check
  616. Revision 1.43 2002/09/09 19:34:07 peter
  617. * check for incomplete types in the current symtable when parsing
  618. forwarddef. Maybe this shall be delphi/tp only
  619. Revision 1.42 2002/07/20 11:57:56 florian
  620. * types.pas renamed to defbase.pas because D6 contains a types
  621. unit so this would conflicts if D6 programms are compiled
  622. + Willamette/SSE2 instructions to assembler added
  623. Revision 1.41 2002/05/18 13:34:16 peter
  624. * readded missing revisions
  625. Revision 1.40 2002/05/16 19:46:44 carl
  626. + defines.inc -> fpcdefs.inc to avoid conflicts if compiling by hand
  627. + try to fix temp allocation (still in ifdef)
  628. + generic constructor calls
  629. + start of tassembler / tmodulebase class cleanup
  630. Revision 1.38 2002/05/12 16:53:10 peter
  631. * moved entry and exitcode to ncgutil and cgobj
  632. * foreach gets extra argument for passing local data to the
  633. iterator function
  634. * -CR checks also class typecasts at runtime by changing them
  635. into as
  636. * fixed compiler to cycle with the -CR option
  637. * fixed stabs with elf writer, finally the global variables can
  638. be watched
  639. * removed a lot of routines from cga unit and replaced them by
  640. calls to cgobj
  641. * u32bit-s32bit updates for and,or,xor nodes. When one element is
  642. u32bit then the other is typecasted also to u32bit without giving
  643. a rangecheck warning/error.
  644. * fixed pascal calling method with reversing also the high tree in
  645. the parast, detected by tcalcst3 test
  646. Revision 1.37 2002/04/19 15:46:03 peter
  647. * mangledname rewrite, tprocdef.mangledname is now created dynamicly
  648. in most cases and not written to the ppu
  649. * add mangeledname_prefix() routine to generate the prefix of
  650. manglednames depending on the current procedure, object and module
  651. * removed static procprefix since the mangledname is now build only
  652. on demand from tprocdef.mangledname
  653. Revision 1.36 2002/04/16 16:12:47 peter
  654. * give error when using enums with jumps as array index
  655. * allow char as enum value
  656. Revision 1.35 2002/04/04 19:06:04 peter
  657. * removed unused units
  658. * use tlocation.size in cg.a_*loc*() routines
  659. Revision 1.34 2002/01/24 18:25:49 peter
  660. * implicit result variable generation for assembler routines
  661. * removed m_tp modeswitch, use m_tp7 or not(m_fpc) instead
  662. Revision 1.33 2002/01/15 16:13:34 jonas
  663. * fixed web bugs 1758 and 1760
  664. Revision 1.32 2002/01/06 12:08:15 peter
  665. * removed uauto from orddef, use new range_to_basetype generating
  666. the correct ordinal type for a range
  667. }