symcpu.pas 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694
  1. {
  2. Copyright (c) 2014 by Florian Klaempfl
  3. Symbol table overrides for WebAssembly
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 2 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; if not, write to the Free Software
  14. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  15. ****************************************************************************
  16. }
  17. unit symcpu;
  18. {$i fpcdefs.inc}
  19. interface
  20. uses
  21. globtype,
  22. aasmdata,
  23. symtype,
  24. symdef,symsym;
  25. type
  26. { defs }
  27. tcpufiledef = class(tfiledef)
  28. end;
  29. tcpufiledefclass = class of tcpufiledef;
  30. tcpuvariantdef = class(tvariantdef)
  31. end;
  32. tcpuvariantdefclass = class of tcpuvariantdef;
  33. tcpuformaldef = class(tformaldef)
  34. end;
  35. tcpuformaldefclass = class of tcpuformaldef;
  36. tcpuforwarddef = class(tforwarddef)
  37. end;
  38. tcpuforwarddefclass = class of tcpuforwarddef;
  39. tcpuundefineddef = class(tundefineddef)
  40. end;
  41. tcpuundefineddefclass = class of tcpuundefineddef;
  42. tcpuerrordef = class(terrordef)
  43. end;
  44. tcpuerrordefclass = class of tcpuerrordef;
  45. tcpupointerdef = class(tpointerdef)
  46. end;
  47. tcpupointerdefclass = class of tcpupointerdef;
  48. tcpurecorddef = class(trecorddef)
  49. end;
  50. tcpurecorddefclass = class of tcpurecorddef;
  51. tcpuimplementedinterface = class(timplementedinterface)
  52. end;
  53. tcpuimplementedinterfaceclass = class of tcpuimplementedinterface;
  54. tcpuobjectdef = class(tobjectdef)
  55. end;
  56. tcpuobjectdefclass = class of tcpuobjectdef;
  57. tcpuclassrefdef = class(tclassrefdef)
  58. end;
  59. tcpuclassrefdefclass = class of tcpuclassrefdef;
  60. tcpuarraydef = class(tarraydef)
  61. end;
  62. tcpuarraydefclass = class of tcpuarraydef;
  63. tcpuorddef = class(torddef)
  64. end;
  65. tcpuorddefclass = class of tcpuorddef;
  66. tcpufloatdef = class(tfloatdef)
  67. end;
  68. tcpufloatdefclass = class of tcpufloatdef;
  69. { tcpuprocvardef }
  70. tcpuprocvardef = class(tprocvardef)
  71. end;
  72. tcpuprocvardefclass = class of tcpuprocvardef;
  73. { tcpuprocdef }
  74. tcpuprocdef = class(tprocdef)
  75. { generated assembler code; used by WebAssembly backend so it can afterwards
  76. easily write out all methods grouped per class }
  77. exprasmlist : TAsmList;
  78. destructor destroy; override;
  79. end;
  80. tcpuprocdefclass = class of tcpuprocdef;
  81. tcpustringdef = class(tstringdef)
  82. end;
  83. tcpustringdefclass = class of tcpustringdef;
  84. tcpuenumdef = class(tenumdef)
  85. protected
  86. procedure ppuload_platform(ppufile: tcompilerppufile); override;
  87. procedure ppuwrite_platform(ppufile: tcompilerppufile); override;
  88. public
  89. { class representing this enum on the Java side }
  90. classdef : tobjectdef;
  91. classdefderef : tderef;
  92. function getcopy: tstoreddef; override;
  93. procedure buildderef; override;
  94. procedure deref; override;
  95. end;
  96. tcpuenumdefclass = class of tcpuenumdef;
  97. tcpusetdef = class(tsetdef)
  98. end;
  99. tcpusetdefclass = class of tcpusetdef;
  100. { syms }
  101. tcpulabelsym = class(tlabelsym)
  102. end;
  103. tcpulabelsymclass = class of tcpulabelsym;
  104. tcpuunitsym = class(tunitsym)
  105. end;
  106. tcpuunitsymclass = class of tcpuunitsym;
  107. tcpuprogramparasym = class(tprogramparasym)
  108. end;
  109. tcpuprogramparasymclass = class(tprogramparasym);
  110. tcpunamespacesym = class(tnamespacesym)
  111. end;
  112. tcpunamespacesymclass = class of tcpunamespacesym;
  113. { tcpuprocsym }
  114. tcpuprocsym = class(tprocsym)
  115. end;
  116. tcpuprocsymclass = class of tcpuprocsym;
  117. tcputypesym = class(ttypesym)
  118. end;
  119. tcpuypesymclass = class of tcputypesym;
  120. tcpufieldvarsym = class(tfieldvarsym)
  121. end;
  122. tcpufieldvarsymclass = class of tcpufieldvarsym;
  123. tcpulocalvarsym = class(tlocalvarsym)
  124. end;
  125. tcpulocalvarsymclass = class of tcpulocalvarsym;
  126. tcpuparavarsym = class(tparavarsym)
  127. end;
  128. tcpuparavarsymclass = class of tcpuparavarsym;
  129. tcpustaticvarsym = class(tstaticvarsym)
  130. end;
  131. tcpustaticvarsymclass = class of tcpustaticvarsym;
  132. tcpuabsolutevarsym = class(tabsolutevarsym)
  133. end;
  134. tcpuabsolutevarsymclass = class of tcpuabsolutevarsym;
  135. tcpupropertysym = class(tpropertysym)
  136. protected
  137. { when a private/protected field is exposed via a property with a higher
  138. visibility, then we have to create a getter and/or setter with that same
  139. higher visibility to make sure that using the property does not result
  140. in JVM verification errors }
  141. procedure create_getter_or_setter_for_property(orgaccesspd: tprocdef; getter: boolean);
  142. procedure finalize_getter_or_setter_for_sym(getset: tpropaccesslisttypes; sym: tsym; fielddef: tdef; accessordef: tprocdef); override;
  143. procedure maybe_create_overridden_getter_or_setter(getset: tpropaccesslisttypes);
  144. public
  145. procedure inherit_accessor(getset: tpropaccesslisttypes); override;
  146. end;
  147. tcpupropertysymclass = class of tcpupropertysym;
  148. tcpuconstsym = class(tconstsym)
  149. end;
  150. tcpuconstsymclass = class of tcpuconstsym;
  151. tcpuenumsym = class(tenumsym)
  152. end;
  153. tcpuenumsymclass = class of tcpuenumsym;
  154. tcpusyssym = class(tsyssym)
  155. end;
  156. tcpusyssymclass = class of tcpusyssym;
  157. const
  158. pbestrealtype : ^tdef = @s64floattype;
  159. implementation
  160. uses
  161. verbose,cutils,cclasses,globals,
  162. symconst,symbase,symtable,symcreat,wasmdef,
  163. pdecsub,pparautl,paramgr,
  164. // high-level code generator is needed to get access to type index for ncall
  165. hlcgobj,hlcgcpu
  166. ;
  167. {****************************************************************************
  168. tcpuproptertysym
  169. ****************************************************************************}
  170. procedure tcpupropertysym.create_getter_or_setter_for_property(orgaccesspd: tprocdef; getter: boolean);
  171. var
  172. obj: tabstractrecorddef;
  173. ps: tprocsym;
  174. pvs: tparavarsym;
  175. sym: tsym;
  176. pd, parentpd, accessorparapd: tprocdef;
  177. tmpaccesslist: tpropaccesslist;
  178. callthroughpropname,
  179. accessorname: string;
  180. callthroughprop: tpropertysym;
  181. accesstyp: tpropaccesslisttypes;
  182. accessortyp: tprocoption;
  183. procoptions: tprocoptions;
  184. paranr: word;
  185. explicitwrapper: boolean;
  186. begin
  187. obj:=current_structdef;
  188. { if someone gets the idea to add a property to an external class
  189. definition, don't try to wrap it since we cannot add methods to
  190. external classes }
  191. if oo_is_external in obj.objectoptions then
  192. exit;
  193. symtablestack.push(obj.symtable);
  194. try
  195. if getter then
  196. accesstyp:=palt_read
  197. else
  198. accesstyp:=palt_write;
  199. { we can't use str_parse_method_dec here because the type of the field
  200. may not be visible at the Pascal level }
  201. explicitwrapper:=
  202. { private methods are not visibile outside the current class, so
  203. no use in making life harder for us by introducing potential
  204. (future or current) naming conflicts }
  205. (visibility<>vis_private) and
  206. (getter and
  207. (prop_auto_getter_prefix<>'')) or
  208. (not getter and
  209. (prop_auto_setter_prefix<>''));
  210. sym:=nil;
  211. if getter then
  212. accessortyp:=po_is_auto_getter
  213. else
  214. accessortyp:=po_is_auto_setter;
  215. procoptions:=[accessortyp];
  216. if explicitwrapper then
  217. begin
  218. if getter then
  219. accessorname:=prop_auto_getter_prefix+realname
  220. else
  221. accessorname:=prop_auto_setter_prefix+realname;
  222. sym:=search_struct_member_no_helper(obj,upper(accessorname));
  223. if assigned(sym) then
  224. begin
  225. if ((sym.typ<>procsym) or
  226. (tprocsym(sym).procdeflist.count<>1) or
  227. not(accessortyp in tprocdef(tprocsym(sym).procdeflist[0]).procoptions)) and
  228. (not assigned(orgaccesspd) or
  229. (sym<>orgaccesspd.procsym)) then
  230. begin
  231. MessagePos2(fileinfo,parser_e_cannot_generate_property_getter_setter,accessorname,FullTypeName(tdef(sym.owner.defowner),nil)+'.'+accessorname);
  232. exit;
  233. end
  234. else
  235. begin
  236. if accessorname<>sym.realname then
  237. MessagePos2(fileinfo,parser_w_case_difference_auto_property_getter_setter_prefix,sym.realname,accessorname);
  238. { is the specified getter/setter defined in the current
  239. struct and was it originally specified as the getter/
  240. setter for this property? If so, simply adjust its
  241. visibility if necessary.
  242. }
  243. if assigned(orgaccesspd) then
  244. parentpd:=orgaccesspd
  245. else
  246. parentpd:=tprocdef(tprocsym(sym).procdeflist[0]);
  247. if parentpd.owner.defowner=owner.defowner then
  248. begin
  249. if parentpd.visibility<visibility then
  250. begin
  251. parentpd.visibility:=visibility;
  252. include(parentpd.procoptions,po_auto_raised_visibility);
  253. end;
  254. { we are done, no need to create a wrapper }
  255. exit
  256. end
  257. { a parent already included this getter/setter -> try to
  258. override it }
  259. else if parentpd.visibility<>vis_private then
  260. begin
  261. if po_virtualmethod in parentpd.procoptions then
  262. begin
  263. procoptions:=procoptions+[po_virtualmethod,po_overridingmethod];
  264. if not(parentpd.synthetickind in [tsk_field_getter,tsk_field_setter]) then
  265. Message2(parser_w_overriding_property_getter_setter,accessorname,FullTypeName(tdef(parentpd.owner.defowner),nil));
  266. end;
  267. { otherwise we can't do anything, and
  268. proc_add_definition will give an error }
  269. end;
  270. { add method with the correct visibility }
  271. pd:=tprocdef(parentpd.getcopyas(procdef,pc_normal_no_hidden,''));
  272. { get rid of the import accessorname for inherited virtual class methods,
  273. it has to be regenerated rather than amended }
  274. if [po_classmethod,po_virtualmethod]<=pd.procoptions then
  275. begin
  276. stringdispose(pd.import_name);
  277. exclude(pd.procoptions,po_has_importname);
  278. end;
  279. pd.visibility:=visibility;
  280. pd.procoptions:=pd.procoptions+procoptions;
  281. { ignore this artificially added procdef when looking for overloads }
  282. include(pd.procoptions,po_ignore_for_overload_resolution);
  283. finish_copied_procdef(pd,parentpd.procsym.realname,obj.symtable,obj);
  284. exclude(pd.procoptions,po_external);
  285. pd.synthetickind:=tsk_anon_inherited;
  286. { set the accessor in the property }
  287. propaccesslist[accesstyp].clear;
  288. propaccesslist[accesstyp].addsym(sl_call,pd.procsym);
  289. propaccesslist[accesstyp].procdef:=pd;
  290. exit;
  291. end;
  292. end;
  293. { make the artificial getter/setter virtual so we can override it in
  294. children if necessary }
  295. if not(sp_static in symoptions) and
  296. (obj.typ=objectdef) then
  297. include(procoptions,po_virtualmethod);
  298. { prevent problems in Delphi mode }
  299. include(procoptions,po_overload);
  300. end
  301. else
  302. begin
  303. { construct procsym accessorname (unique for this access; reusing the same
  304. helper for multiple accesses to the same field is hard because the
  305. propacesslist can contain subscript nodes etc) }
  306. accessorname:=visibilityName[visibility];
  307. replace(accessorname,' ','_');
  308. if getter then
  309. accessorname:=accessorname+'$getter'
  310. else
  311. accessorname:=accessorname+'$setter';
  312. end;
  313. { create procdef }
  314. if not assigned(orgaccesspd) then
  315. begin
  316. pd:=cprocdef.create(normal_function_level,true);
  317. if df_generic in obj.defoptions then
  318. include(pd.defoptions,df_generic);
  319. { method of this objectdef }
  320. pd.struct:=obj;
  321. { can only construct the artificial accessorname now, because it requires
  322. pd.unique_id_str }
  323. if not explicitwrapper then
  324. accessorname:='$'+obj.symtable.realname^+'$'+realname+'$'+accessorname+'$'+pd.unique_id_str;
  325. end
  326. else
  327. begin
  328. { getter/setter could have parameters in case of indexed access
  329. -> copy original procdef }
  330. pd:=tprocdef(orgaccesspd.getcopyas(procdef,pc_normal_no_hidden,''));
  331. exclude(pd.procoptions,po_abstractmethod);
  332. exclude(pd.procoptions,po_overridingmethod);
  333. { can only construct the artificial accessorname now, because it requires
  334. pd.unique_id_str }
  335. if not explicitwrapper then
  336. accessorname:='$'+obj.symtable.realname^+'$'+realname+'$'+accessorname+'$'+pd.unique_id_str;
  337. finish_copied_procdef(pd,accessorname,obj.symtable,obj);
  338. sym:=pd.procsym;
  339. end;
  340. { add previously collected procoptions }
  341. pd.procoptions:=pd.procoptions+procoptions;
  342. { visibility }
  343. pd.visibility:=visibility;
  344. { new procsym? }
  345. if not assigned(sym) or
  346. (sym.owner<>owner) then
  347. begin
  348. ps:=cprocsym.create(accessorname);
  349. obj.symtable.insert(ps);
  350. end
  351. else
  352. ps:=tprocsym(sym);
  353. { associate procsym with procdef}
  354. pd.procsym:=ps;
  355. { function/procedure }
  356. accessorparapd:=nil;
  357. if getter then
  358. begin
  359. pd.proctypeoption:=potype_function;
  360. pd.synthetickind:=tsk_field_getter;
  361. { result type }
  362. pd.returndef:=propdef;
  363. if (ppo_hasparameters in propoptions) and
  364. not assigned(orgaccesspd) then
  365. accessorparapd:=pd;
  366. end
  367. else
  368. begin
  369. pd.proctypeoption:=potype_procedure;
  370. pd.synthetickind:=tsk_field_setter;
  371. pd.returndef:=voidtype;
  372. if not assigned(orgaccesspd) then
  373. begin
  374. { parameter with value to set }
  375. pvs:=cparavarsym.create('__fpc_newval__',10,vs_const,propdef,[]);
  376. pd.parast.insert(pvs);
  377. end;
  378. if (ppo_hasparameters in propoptions) and
  379. not assigned(orgaccesspd) then
  380. accessorparapd:=pd;
  381. end;
  382. { create a property for the old symaccesslist with a new accessorname, so that
  383. we can reuse it in the implementation (rather than having to
  384. translate the symaccesslist back to Pascal code) }
  385. callthroughpropname:='__fpc__'+realname;
  386. if getter then
  387. callthroughpropname:=callthroughpropname+'__getter_wrapper'
  388. else
  389. callthroughpropname:=callthroughpropname+'__setter_wrapper';
  390. callthroughprop:=cpropertysym.create(callthroughpropname);
  391. callthroughprop.visibility:=visibility;
  392. if getter then
  393. makeduplicate(callthroughprop,accessorparapd,nil,paranr)
  394. else
  395. makeduplicate(callthroughprop,nil,accessorparapd,paranr);
  396. callthroughprop.default:=longint($80000000);
  397. callthroughprop.default:=0;
  398. callthroughprop.propoptions:=callthroughprop.propoptions-[ppo_stored,ppo_enumerator_current,ppo_overrides,ppo_defaultproperty];
  399. if sp_static in symoptions then
  400. include(callthroughprop.symoptions, sp_static);
  401. { copy original property target to callthrough property (and replace
  402. original one with the new empty list; will be filled in later) }
  403. tmpaccesslist:=callthroughprop.propaccesslist[accesstyp];
  404. callthroughprop.propaccesslist[accesstyp]:=propaccesslist[accesstyp];
  405. propaccesslist[accesstyp]:=tmpaccesslist;
  406. owner.insert(callthroughprop);
  407. pd.skpara:=callthroughprop;
  408. { needs to be exported }
  409. include(pd.procoptions,po_global);
  410. { class property -> static class method }
  411. if sp_static in symoptions then
  412. pd.procoptions:=pd.procoptions+[po_classmethod,po_staticmethod];
  413. { in case we made a copy of the original accessor, this has all been
  414. done already }
  415. if not assigned(orgaccesspd) then
  416. begin
  417. { calling convention }
  418. handle_calling_convention(pd,hcc_default_actions_intf_struct);
  419. { register forward declaration with procsym }
  420. proc_add_definition(pd);
  421. end;
  422. { make the property call this new function }
  423. propaccesslist[accesstyp].addsym(sl_call,ps);
  424. propaccesslist[accesstyp].procdef:=pd;
  425. finally
  426. symtablestack.pop(obj.symtable);
  427. end;
  428. end;
  429. procedure tcpupropertysym.finalize_getter_or_setter_for_sym(getset: tpropaccesslisttypes; sym: tsym; fielddef: tdef; accessordef: tprocdef);
  430. var
  431. orgaccesspd: tprocdef;
  432. pprefix: pshortstring;
  433. wrongvisibility: boolean;
  434. begin
  435. inherited;
  436. if getset=palt_read then
  437. pprefix:=@prop_auto_getter_prefix
  438. else
  439. pprefix:=@prop_auto_setter_prefix;
  440. case sym.typ of
  441. procsym:
  442. begin
  443. orgaccesspd:=tprocdef(propaccesslist[getset].procdef);
  444. wrongvisibility:=tprocdef(propaccesslist[getset].procdef).visibility<visibility;
  445. { if the visibility of the accessor is lower than
  446. the visibility of the property, wrap it so that
  447. we can call it from all contexts in which the
  448. property is visible }
  449. if wrongvisibility or
  450. ((pprefix^<>'') and
  451. (sym.RealName<>pprefix^+RealName)) then
  452. create_getter_or_setter_for_property(orgaccesspd,getset=palt_read)
  453. end;
  454. fieldvarsym:
  455. begin
  456. { if the visibility of the field is lower than the
  457. visibility of the property, wrap it in a getter
  458. so that we can access it from all contexts in
  459. which the property is visibile }
  460. if (pprefix^<>'') or
  461. (tfieldvarsym(sym).visibility<visibility) then
  462. create_getter_or_setter_for_property(nil,getset=palt_read);
  463. end;
  464. else
  465. internalerror(2014061101);
  466. end;
  467. end;
  468. procedure tcpupropertysym.maybe_create_overridden_getter_or_setter(getset: tpropaccesslisttypes);
  469. var
  470. sym: tsym;
  471. accessordef: tprocdef;
  472. psym: tpropertysym;
  473. begin
  474. { find the last defined getter/setter/field accessed by an inherited
  475. property }
  476. psym:=overriddenpropsym;
  477. while not assigned(psym.propaccesslist[getset].firstsym) do
  478. begin
  479. psym:=psym.overriddenpropsym;
  480. { if there is simply no getter/setter for this property, we're done }
  481. if not assigned(psym) then
  482. exit;
  483. end;
  484. sym:=psym.propaccesslist[getset].firstsym^.sym;
  485. case sym.typ of
  486. procsym:
  487. begin
  488. accessordef:=tprocdef(psym.propaccesslist[getset].procdef);
  489. if accessordef.visibility>=visibility then
  490. exit;
  491. end;
  492. fieldvarsym:
  493. begin
  494. if sym.visibility>=visibility then
  495. exit;
  496. accessordef:=nil;
  497. end;
  498. else
  499. internalerror(2014061102);
  500. end;
  501. propaccesslist[getset]:=psym.propaccesslist[getset].getcopy;
  502. finalize_getter_or_setter_for_sym(getset,sym,propdef,accessordef);
  503. end;
  504. procedure tcpupropertysym.inherit_accessor(getset: tpropaccesslisttypes);
  505. begin
  506. inherited;
  507. { new property has higher visibility than previous one -> maybe override
  508. the getters/setters }
  509. if assigned(overriddenpropsym) and
  510. (overriddenpropsym.visibility<visibility) then
  511. maybe_create_overridden_getter_or_setter(getset);
  512. end;
  513. {****************************************************************************
  514. tcpuenumdef
  515. ****************************************************************************}
  516. procedure tcpuenumdef.ppuload_platform(ppufile: tcompilerppufile);
  517. begin
  518. inherited;
  519. ppufile.getderef(classdefderef);
  520. end;
  521. procedure tcpuenumdef.ppuwrite_platform(ppufile: tcompilerppufile);
  522. begin
  523. inherited;
  524. ppufile.putderef(classdefderef);
  525. end;
  526. function tcpuenumdef.getcopy: tstoreddef;
  527. begin
  528. result:=inherited;
  529. tcpuenumdef(result).classdef:=classdef;
  530. end;
  531. procedure tcpuenumdef.buildderef;
  532. begin
  533. inherited;
  534. classdefderef.build(classdef);
  535. end;
  536. procedure tcpuenumdef.deref;
  537. begin
  538. inherited;
  539. classdef:=tobjectdef(classdefderef.resolve);
  540. end;
  541. {****************************************************************************
  542. tcpuprocdef
  543. ****************************************************************************}
  544. destructor tcpuprocdef.destroy;
  545. begin
  546. exprasmlist.free;
  547. inherited destroy;
  548. end;
  549. {****************************************************************************
  550. tcpuprocvardef
  551. ****************************************************************************}
  552. {****************************************************************************
  553. tcpuprocsym
  554. ****************************************************************************}
  555. {****************************************************************************
  556. tcpustaticvarsym
  557. ****************************************************************************}
  558. {****************************************************************************
  559. tcpufieldvarsym
  560. ****************************************************************************}
  561. initialization
  562. { used tdef classes }
  563. cfiledef:=tcpufiledef;
  564. cvariantdef:=tcpuvariantdef;
  565. cformaldef:=tcpuformaldef;
  566. cforwarddef:=tcpuforwarddef;
  567. cundefineddef:=tcpuundefineddef;
  568. cerrordef:=tcpuerrordef;
  569. cpointerdef:=tcpupointerdef;
  570. crecorddef:=tcpurecorddef;
  571. cimplementedinterface:=tcpuimplementedinterface;
  572. cobjectdef:=tcpuobjectdef;
  573. cclassrefdef:=tcpuclassrefdef;
  574. carraydef:=tcpuarraydef;
  575. corddef:=tcpuorddef;
  576. cfloatdef:=tcpufloatdef;
  577. cprocvardef:=tcpuprocvardef;
  578. cprocdef:=tcpuprocdef;
  579. cstringdef:=tcpustringdef;
  580. cenumdef:=tcpuenumdef;
  581. csetdef:=tcpusetdef;
  582. { used tsym classes }
  583. clabelsym:=tcpulabelsym;
  584. cunitsym:=tcpuunitsym;
  585. cprogramparasym:=tcpuprogramparasym;
  586. cnamespacesym:=tcpunamespacesym;
  587. cprocsym:=tcpuprocsym;
  588. ctypesym:=tcputypesym;
  589. cfieldvarsym:=tcpufieldvarsym;
  590. clocalvarsym:=tcpulocalvarsym;
  591. cparavarsym:=tcpuparavarsym;
  592. cstaticvarsym:=tcpustaticvarsym;
  593. cabsolutevarsym:=tcpuabsolutevarsym;
  594. cpropertysym:=tcpupropertysym;
  595. cconstsym:=tcpuconstsym;
  596. cenumsym:=tcpuenumsym;
  597. csyssym:=tcpusyssym;
  598. end.