ptconst.pas 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765
  1. {
  2. $Id$
  3. Copyright (c) 1998 by Florian Klaempfl
  4. Reads typed constants
  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 ptconst;
  19. interface
  20. uses symtable;
  21. { this procedure reads typed constants }
  22. { sym is only needed for ansi strings }
  23. { the assembler label is in the middle (PM) }
  24. procedure readtypedconst(def : pdef;sym : ptypedconstsym);
  25. implementation
  26. uses
  27. globtype,systems,tokens,
  28. cobjects,globals,scanner,aasm,tree,pass_1,
  29. hcodegen,types,verbose
  30. { parser specific stuff }
  31. ,pbase,pexpr
  32. { processor specific stuff }
  33. {$ifdef i386}
  34. ,i386
  35. {$endif}
  36. {$ifdef m68k}
  37. ,m68k
  38. {$endif}
  39. ;
  40. { this procedure reads typed constants }
  41. procedure readtypedconst(def : pdef;sym : ptypedconstsym);
  42. var
  43. {$ifdef m68k}
  44. j : longint;
  45. {$endif m68k}
  46. len : longint;
  47. p,hp : ptree;
  48. i,l,offset,
  49. strlength : longint;
  50. ll : plabel;
  51. s : string;
  52. ca : pchar;
  53. aktpos : longint;
  54. pd : pprocdef;
  55. obj : pobjectdef;
  56. symt : psymtable;
  57. hp1,hp2 : pdefcoll;
  58. value : bestreal;
  59. procedure check_range;
  60. begin
  61. if ((p^.value>porddef(def)^.high) or
  62. (p^.value<porddef(def)^.low)) then
  63. begin
  64. if (cs_check_range in aktlocalswitches) then
  65. Message(parser_e_range_check_error)
  66. else
  67. Message(parser_w_range_check_error);
  68. end;
  69. end;
  70. function is_po_equal(o1,o2:longint):boolean;
  71. begin
  72. { assembler does not affect }
  73. is_po_equal:=(o1 and not(poassembler))=
  74. (o2 and not(poassembler));
  75. end;
  76. {$R-} {Range check creates problem with init_8bit(-1) !!}
  77. begin
  78. case def^.deftype of
  79. orddef:
  80. begin
  81. p:=comp_expr(true);
  82. do_firstpass(p);
  83. case porddef(def)^.typ of
  84. s8bit,
  85. u8bit : begin
  86. if not is_constintnode(p) then
  87. { is't an int expected }
  88. Message(cg_e_illegal_expression)
  89. else
  90. begin
  91. datasegment^.concat(new(pai_const,init_8bit(p^.value)));
  92. check_range;
  93. end;
  94. end;
  95. s32bit : begin
  96. if not is_constintnode(p) then
  97. Message(cg_e_illegal_expression)
  98. else
  99. begin
  100. datasegment^.concat(new(pai_const,init_32bit(p^.value)));
  101. check_range;
  102. end;
  103. end;
  104. u32bit : begin
  105. if not is_constintnode(p) then
  106. Message(cg_e_illegal_expression)
  107. else
  108. datasegment^.concat(new(pai_const,init_32bit(p^.value)));
  109. end;
  110. bool8bit : begin
  111. if not is_constboolnode(p) then
  112. Message(cg_e_illegal_expression);
  113. datasegment^.concat(new(pai_const,init_8bit(p^.value)));
  114. end;
  115. uchar : begin
  116. if not is_constcharnode(p) then
  117. Message(cg_e_illegal_expression);
  118. datasegment^.concat(new(pai_const,init_8bit(p^.value)));
  119. end;
  120. u16bit,
  121. s16bit : begin
  122. if not is_constintnode(p) then
  123. Message(cg_e_illegal_expression);
  124. datasegment^.concat(new(pai_const,init_16bit(p^.value)));
  125. check_range;
  126. end;
  127. end;
  128. disposetree(p);
  129. end;
  130. floatdef:
  131. begin
  132. p:=comp_expr(true);
  133. do_firstpass(p);
  134. if is_constrealnode(p) then
  135. value:=p^.value_real
  136. else if is_constintnode(p) then
  137. value:=p^.value
  138. else
  139. Message(cg_e_illegal_expression);
  140. case pfloatdef(def)^.typ of
  141. s64real : datasegment^.concat(new(pai_double,init(value)));
  142. s32real : datasegment^.concat(new(pai_single,init(value)));
  143. s80real : datasegment^.concat(new(pai_extended,init(value)));
  144. s64bit : datasegment^.concat(new(pai_comp,init(value)));
  145. f32bit : datasegment^.concat(new(pai_const,init_32bit(trunc(value*65536))));
  146. else internalerror(18);
  147. end;
  148. disposetree(p);
  149. end;
  150. pointerdef:
  151. begin
  152. p:=comp_expr(true);
  153. do_firstpass(p);
  154. { allows horrible ofs(typeof(TButton)^) code !! }
  155. if (p^.treetype=addrn) and (p^.left^.treetype=derefn) then
  156. begin
  157. hp:=p^.left^.left;
  158. p^.left^.left:=nil;
  159. disposetree(p);
  160. p:=hp;
  161. end;
  162. { nil pointer ? }
  163. if p^.treetype=niln then
  164. datasegment^.concat(new(pai_const,init_32bit(0)))
  165. { maybe pchar ? }
  166. else
  167. if (ppointerdef(def)^.definition^.deftype=orddef) and
  168. (porddef(ppointerdef(def)^.definition)^.typ=uchar) then
  169. begin
  170. getdatalabel(ll);
  171. datasegment^.concat(new(pai_const,init_symbol(strpnew(lab2str(ll)))));
  172. consts^.concat(new(pai_label,init(ll)));
  173. if p^.treetype=stringconstn then
  174. begin
  175. getmem(ca,p^.length+2);
  176. move(p^.value_str^,ca^,p^.length+1);
  177. consts^.concat(new(pai_string,init_length_pchar(ca,p^.length+1)));
  178. end
  179. else
  180. if is_constcharnode(p) then
  181. consts^.concat(new(pai_string,init(char(byte(p^.value))+#0)))
  182. else
  183. Message(cg_e_illegal_expression);
  184. end
  185. else
  186. if p^.treetype=addrn then
  187. begin
  188. hp:=p^.left;
  189. while assigned(hp) and (hp^.treetype=subscriptn) do
  190. hp:=hp^.left;
  191. if (is_equal(ppointerdef(p^.resulttype)^.definition,ppointerdef(def)^.definition) or
  192. (is_equal(ppointerdef(p^.resulttype)^.definition,voiddef)) or
  193. (is_equal(ppointerdef(def)^.definition,voiddef))) and
  194. (hp^.treetype = loadn) then
  195. begin
  196. firstpass(p^.left);
  197. hp:=p^.left;
  198. offset:=0;
  199. while assigned(hp) and (hp^.treetype<>loadn) do
  200. begin
  201. if hp^.treetype=subscriptn then
  202. inc(offset,hp^.vs^.address)
  203. else
  204. Message(cg_e_illegal_expression);
  205. hp:=hp^.left;
  206. end;
  207. datasegment^.concat(new(pai_const_symbol_offset,init(
  208. strpnew(hp^.symtableentry^.mangledname),offset)));
  209. (*if token=POINT then
  210. begin
  211. offset:=0;
  212. while token=POINT do
  213. begin
  214. consume(POINT);
  215. lsym:=pvarsym(precdef(
  216. ppointerdef(p^.resulttype)^.definition)^.symtable^.search(pattern));
  217. if assigned(sym) then
  218. offset:=offset+lsym^.address
  219. else
  220. begin
  221. Message1(sym_e_illegal_field,pattern);
  222. end;
  223. consume(ID);
  224. end;
  225. datasegment^.concat(new(pai_const_symbol_offset,init(
  226. strpnew(p^.left^.symtableentry^.mangledname),offset)));
  227. end
  228. else
  229. begin
  230. datasegment^.concat(new(pai_const,init_symbol(
  231. strpnew(p^.left^.symtableentry^.mangledname))));
  232. end; *)
  233. maybe_concat_external(hp^.symtableentry^.owner,
  234. hp^.symtableentry^.mangledname);
  235. end
  236. else
  237. Message(cg_e_illegal_expression);
  238. end
  239. else
  240. { allow typeof(Object type)}
  241. if (p^.treetype=inlinen) and
  242. (p^.inlinenumber=in_typeof_x) then
  243. begin
  244. if (p^.left^.treetype=typen) then
  245. begin
  246. datasegment^.concat(new(pai_const,init_symbol(
  247. strpnew(pobjectdef(p^.left^.resulttype)^.vmt_mangledname))));
  248. if pobjectdef(p^.left^.resulttype)^.owner^.symtabletype=unitsymtable then
  249. concat_external(pobjectdef(p^.left^.resulttype)^.vmt_mangledname,EXT_NEAR);
  250. end
  251. else
  252. Message(cg_e_illegal_expression);
  253. end
  254. else
  255. Message(cg_e_illegal_expression);
  256. disposetree(p);
  257. end;
  258. setdef:
  259. begin
  260. p:=comp_expr(true);
  261. do_firstpass(p);
  262. if p^.treetype=setconstn then
  263. begin
  264. { we only allow const sets }
  265. if assigned(p^.left) then
  266. Message(cg_e_illegal_expression)
  267. else
  268. begin
  269. {$ifdef i386}
  270. for l:=0 to def^.savesize-1 do
  271. datasegment^.concat(new(pai_const,init_8bit(p^.value_set^[l])));
  272. {$endif}
  273. {$ifdef m68k}
  274. j:=0;
  275. for l:=0 to ((def^.savesize-1) div 4) do
  276. { HORRIBLE HACK because of endian }
  277. { now use intel endian for constant sets }
  278. begin
  279. datasegment^.concat(new(pai_const,init_8bit(p^.value_set^[j+3])));
  280. datasegment^.concat(new(pai_const,init_8bit(p^.value_set^[j+2])));
  281. datasegment^.concat(new(pai_const,init_8bit(p^.value_set^[j+1])));
  282. datasegment^.concat(new(pai_const,init_8bit(p^.value_set^[j])));
  283. Inc(j,4);
  284. end;
  285. {$endif}
  286. end;
  287. end
  288. else
  289. Message(cg_e_illegal_expression);
  290. disposetree(p);
  291. end;
  292. enumdef:
  293. begin
  294. p:=comp_expr(true);
  295. do_firstpass(p);
  296. if p^.treetype=ordconstn then
  297. begin
  298. if is_equal(p^.resulttype,def) then
  299. datasegment^.concat(new(pai_const,init_32bit(p^.value)))
  300. else
  301. Message(cg_e_illegal_expression);
  302. end
  303. else
  304. Message(cg_e_illegal_expression);
  305. disposetree(p);
  306. end;
  307. stringdef:
  308. begin
  309. p:=comp_expr(true);
  310. do_firstpass(p);
  311. { first take care of prefixes for long and ansi strings }
  312. case pstringdef(def)^.string_typ of
  313. st_shortstring:
  314. begin
  315. if p^.treetype=stringconstn then
  316. begin
  317. if p^.length>=def^.size then
  318. strlength:=def^.size-1
  319. else
  320. strlength:=p^.length;
  321. datasegment^.concat(new(pai_const,init_8bit(strlength)));
  322. { this can also handle longer strings }
  323. getmem(ca,strlength+1);
  324. move(p^.value_str^,ca^,strlength);
  325. ca[strlength]:=#0;
  326. datasegment^.concat(new(pai_string,init_length_pchar(ca,strlength)));
  327. end
  328. else if is_constcharnode(p) then
  329. begin
  330. datasegment^.concat(new(pai_string,init(#1+char(byte(p^.value)))));
  331. strlength:=1;
  332. end
  333. else Message(cg_e_illegal_expression);
  334. if def^.size>strlength then
  335. begin
  336. getmem(ca,def^.size-strlength);
  337. { def^.size contains also the leading length, so we }
  338. { we have to subtract one }
  339. fillchar(ca[0],def^.size-strlength-1,' ');
  340. ca[def^.size-strlength-1]:=#0;
  341. { this can also handle longer strings }
  342. datasegment^.concat(new(pai_string,init_length_pchar(ca,def^.size-strlength-1)));
  343. end;
  344. end;
  345. {$ifdef UseLongString}
  346. st_longstring:
  347. begin
  348. if is_constcharnode(p) then
  349. strlength:=1
  350. else
  351. strlength:=p^.length;
  352. { first write the maximum size }
  353. datasegment^.concat(new(pai_const,init_32bit(strlength)))));
  354. { fill byte }
  355. datasegment^.concat(new(pai_const,init_8bit(0)));
  356. if p^.treetype=stringconstn then
  357. begin
  358. getmem(ca,strlength+1);
  359. move(p^.value_str^,ca^,strlength);
  360. ca[strlength]:=#0;
  361. generate_pascii(consts,ca,strlength);
  362. end
  363. else if is_constcharnode(p) then
  364. begin
  365. consts^.concat(new(pai_const,init_8bit(p^.value)));
  366. end
  367. else Message(cg_e_illegal_expression);
  368. datasegment^.concat(new(pai_const,init_8bit(0)));
  369. end;
  370. {$endif UseLongString}
  371. st_ansistring:
  372. begin
  373. { an empty ansi string is nil! }
  374. if (p^.treetype=stringconstn) and (p^.length=0) then
  375. datasegment^.concat(new(pai_const,init_32bit(0)))
  376. else
  377. begin
  378. if is_constcharnode(p) then
  379. strlength:=1
  380. else
  381. strlength:=p^.length;
  382. getdatalabel(ll);
  383. datasegment^.concat(new(pai_const,init_symbol(strpnew(lab2str(ll)))));
  384. { first write the maximum size }
  385. consts^.concat(new(pai_const,init_32bit(strlength)));
  386. { second write the real length }
  387. consts^.concat(new(pai_const,init_32bit(strlength)));
  388. { redondent with maxlength but who knows ... (PM) }
  389. { third write use count (set to -1 for safety ) }
  390. consts^.concat(new(pai_const,init_32bit(-1)));
  391. consts^.concat(new(pai_label,init(ll)));
  392. if p^.treetype=stringconstn then
  393. begin
  394. getmem(ca,strlength+1);
  395. move(p^.value_str^,ca^,strlength);
  396. ca[strlength]:=#0;
  397. consts^.concat(new(pai_string,init_length_pchar(ca,strlength)));
  398. end
  399. else if is_constcharnode(p) then
  400. begin
  401. consts^.concat(new(pai_const,init_8bit(p^.value)));
  402. end
  403. else Message(cg_e_illegal_expression);
  404. consts^.concat(new(pai_const,init_8bit(0)));
  405. end;
  406. end;
  407. end;
  408. disposetree(p);
  409. end;
  410. arraydef:
  411. begin
  412. if token=LKLAMMER then
  413. begin
  414. consume(LKLAMMER);
  415. for l:=parraydef(def)^.lowrange to parraydef(def)^.highrange-1 do
  416. begin
  417. readtypedconst(parraydef(def)^.definition,nil);
  418. consume(COMMA);
  419. end;
  420. readtypedconst(parraydef(def)^.definition,nil);
  421. consume(RKLAMMER);
  422. end
  423. else
  424. begin
  425. p:=comp_expr(true);
  426. do_firstpass(p);
  427. if p^.treetype=stringconstn then
  428. begin
  429. if p^.length>255 then
  430. len:=255
  431. else
  432. len:=p^.length;
  433. {$ifndef TP}
  434. {$ifopt H+}
  435. setlength(s,len);
  436. {$else}
  437. s[0]:=chr(len);
  438. {$endif}
  439. {$else}
  440. s[0]:=chr(len);
  441. {$endif}
  442. move(p^.value_str^,s[1],len);
  443. end
  444. else
  445. if is_constcharnode(p) then
  446. s:=char(byte(p^.value))
  447. else
  448. Message(cg_e_illegal_expression);
  449. disposetree(p);
  450. l:=length(s);
  451. for i:=Parraydef(def)^.lowrange to Parraydef(def)^.highrange do
  452. begin
  453. if i+1-Parraydef(def)^.lowrange<=l then
  454. begin
  455. datasegment^.concat(new(pai_const,init_8bit(byte(s[1]))));
  456. delete(s,1,1);
  457. end
  458. else
  459. {Fill the remaining positions with #0.}
  460. datasegment^.concat(new(pai_const,init_8bit(0)));
  461. end;
  462. if length(s)>0 then
  463. Message(parser_e_invalid_string_size);
  464. end;
  465. end;
  466. procvardef:
  467. begin
  468. { Procvars and pointers are no longer compatible. }
  469. { under tp: =nil or =var under fpc: =nil or =@var }
  470. if token=_NIL then
  471. begin
  472. datasegment^.concat(new(pai_const,init_32bit(0)));
  473. consume(_NIL);
  474. exit;
  475. end
  476. else
  477. if not(m_tp_procvar in aktmodeswitches) then
  478. if token=KLAMMERAFFE then
  479. consume(KLAMMERAFFE);
  480. getsym(pattern,true);
  481. consume(ID);
  482. if srsym^.typ=unitsym then
  483. begin
  484. consume(POINT);
  485. getsymonlyin(punitsym(srsym)^.unitsymtable,pattern);
  486. consume(ID);
  487. end;
  488. if srsym^.typ<>procsym then
  489. Message(cg_e_illegal_expression)
  490. else
  491. begin
  492. pd:=pprocsym(srsym)^.definition;
  493. if assigned(pd^.nextoverloaded) then
  494. Message(parser_e_no_overloaded_procvars);
  495. if is_po_equal(pprocvardef(def)^.options,pd^.options) and
  496. is_equal(pprocvardef(def)^.retdef,pd^.retdef) then
  497. begin
  498. hp1:=pprocvardef(def)^.para1;
  499. hp2:=pd^.para1;
  500. while assigned(hp1) and assigned(hp2) do
  501. begin
  502. if not(is_equal(hp1^.data,hp2^.data)) or
  503. not(hp1^.paratyp=hp2^.paratyp) then
  504. begin
  505. Message(type_e_mismatch);
  506. break;
  507. end;
  508. hp1:=hp1^.next;
  509. hp2:=hp2^.next;
  510. end;
  511. if not((hp1=nil) and (hp2=nil)) then
  512. Message(type_e_mismatch);
  513. end
  514. else
  515. Message(type_e_mismatch);
  516. datasegment^.concat(new(pai_const,init_symbol(strpnew(pd^.mangledname))));
  517. if pd^.owner^.symtabletype=unitsymtable then
  518. concat_external(pd^.mangledname,EXT_NEAR);
  519. end;
  520. end;
  521. { reads a typed constant record }
  522. recorddef:
  523. begin
  524. consume(LKLAMMER);
  525. aktpos:=0;
  526. while token<>RKLAMMER do
  527. begin
  528. s:=pattern;
  529. consume(ID);
  530. consume(COLON);
  531. srsym:=precdef(def)^.symtable^.search(s);
  532. if srsym=nil then
  533. begin
  534. Message1(sym_e_id_not_found,s);
  535. consume_all_until(SEMICOLON);
  536. end
  537. else
  538. begin
  539. { check position }
  540. if pvarsym(srsym)^.address<aktpos then
  541. Message(parser_e_invalid_record_const);
  542. { if needed fill }
  543. if pvarsym(srsym)^.address>aktpos then
  544. for i:=1 to pvarsym(srsym)^.address-aktpos do
  545. datasegment^.concat(new(pai_const,init_8bit(0)));
  546. { new position }
  547. aktpos:=pvarsym(srsym)^.address+pvarsym(srsym)^.definition^.size;
  548. { read the data }
  549. readtypedconst(pvarsym(srsym)^.definition,nil);
  550. if token=SEMICOLON then
  551. consume(SEMICOLON)
  552. else break;
  553. end;
  554. end;
  555. for i:=1 to def^.size-aktpos do
  556. datasegment^.concat(new(pai_const,init_8bit(0)));
  557. consume(RKLAMMER);
  558. end;
  559. { reads a typed object }
  560. objectdef:
  561. begin
  562. if (pobjectdef(def)^.options and (oo_hasvmt or oo_is_class))<>0 then
  563. begin
  564. Message(parser_e_type_const_not_possible);
  565. consume_all_until(RKLAMMER);
  566. end
  567. else
  568. begin
  569. consume(LKLAMMER);
  570. aktpos:=0;
  571. while token<>RKLAMMER do
  572. begin
  573. s:=pattern;
  574. consume(ID);
  575. consume(COLON);
  576. srsym:=nil;
  577. obj:=pobjectdef(def);
  578. symt:=obj^.publicsyms;
  579. while (srsym=nil) and assigned(symt) do
  580. begin
  581. srsym:=symt^.search(s);
  582. if assigned(obj) then
  583. obj:=obj^.childof;
  584. if assigned(obj) then
  585. symt:=obj^.publicsyms
  586. else
  587. symt:=nil;
  588. end;
  589. if srsym=nil then
  590. begin
  591. Message1(sym_e_id_not_found,s);
  592. consume_all_until(SEMICOLON);
  593. end
  594. else
  595. begin
  596. { check position }
  597. if pvarsym(srsym)^.address<aktpos then
  598. Message(parser_e_invalid_record_const);
  599. { if needed fill }
  600. if pvarsym(srsym)^.address>aktpos then
  601. for i:=1 to pvarsym(srsym)^.address-aktpos do
  602. datasegment^.concat(new(pai_const,init_8bit(0)));
  603. { new position }
  604. aktpos:=pvarsym(srsym)^.address+pvarsym(srsym)^.definition^.size;
  605. { read the data }
  606. readtypedconst(pvarsym(srsym)^.definition,nil);
  607. if token=SEMICOLON then
  608. consume(SEMICOLON)
  609. else break;
  610. end;
  611. end;
  612. for i:=1 to def^.size-aktpos do
  613. datasegment^.concat(new(pai_const,init_8bit(0)));
  614. consume(RKLAMMER);
  615. end;
  616. end;
  617. else Message(parser_e_type_const_not_possible);
  618. end;
  619. end;
  620. end.
  621. {
  622. $Log$
  623. Revision 1.31 1998-12-11 00:03:41 peter
  624. + globtype,tokens,version unit splitted from globals
  625. Revision 1.30 1998/11/27 14:34:42 peter
  626. * give error when string[0] decl is found
  627. Revision 1.29 1998/11/23 18:26:44 pierre
  628. * fix for bug0182
  629. Revision 1.28 1998/11/17 10:40:16 peter
  630. * H+ fixes
  631. Revision 1.27 1998/11/16 12:12:23 peter
  632. - generate_pascii which is obsolete
  633. Revision 1.26 1998/11/10 17:53:06 peter
  634. * fixed const string
  635. Revision 1.25 1998/11/10 16:10:47 peter
  636. * fixed const pchar
  637. Revision 1.24 1998/11/05 12:02:55 peter
  638. * released useansistring
  639. * removed -Sv, its now available in fpc modes
  640. Revision 1.23 1998/11/04 10:11:45 peter
  641. * ansistring fixes
  642. Revision 1.22 1998/10/20 08:06:56 pierre
  643. * several memory corruptions due to double freemem solved
  644. => never use p^.loc.location:=p^.left^.loc.location;
  645. + finally I added now by default
  646. that ra386dir translates global and unit symbols
  647. + added a first field in tsymtable and
  648. a nextsym field in tsym
  649. (this allows to obtain ordered type info for
  650. records and objects in gdb !)
  651. Revision 1.21 1998/10/19 08:55:03 pierre
  652. * wrong stabs info corrected once again !!
  653. + variable vmt offset with vmt field only if required
  654. implemented now !!!
  655. Revision 1.20 1998/10/16 08:51:49 peter
  656. + target_os.stackalignment
  657. + stack can be aligned at 2 or 4 byte boundaries
  658. Revision 1.19 1998/10/12 12:20:58 pierre
  659. + added tai_const_symbol_offset
  660. for r : pointer = @var.field;
  661. * better message for different arg names on implementation
  662. of function
  663. Revision 1.18 1998/10/12 09:50:05 florian
  664. + support of <procedure var type>:=<pointer> in delphi mode added
  665. Revision 1.17 1998/10/09 08:56:29 pierre
  666. * several memory leaks fixed
  667. Revision 1.16 1998/09/24 23:49:18 peter
  668. + aktmodeswitches
  669. Revision 1.15 1998/09/07 18:46:11 peter
  670. * update smartlinking, uses getdatalabel
  671. * renamed ptree.value vars to value_str,value_real,value_set
  672. Revision 1.14 1998/09/04 08:42:07 peter
  673. * updated some error messages
  674. Revision 1.13 1998/09/01 09:05:36 peter
  675. * fixed string[4]='.library'
  676. Revision 1.12 1998/08/31 12:26:32 peter
  677. * m68k and palmos updates from surebugfixes
  678. Revision 1.11 1998/08/10 14:50:20 peter
  679. + localswitches, moduleswitches, globalswitches splitting
  680. Revision 1.10 1998/07/21 11:16:25 florian
  681. * bug0147 fixed
  682. Revision 1.9 1998/07/20 22:17:16 florian
  683. * hex constants in numeric char (#$54#$43 ...) are now allowed
  684. * there was a bug in record_var_dec which prevents the used
  685. of nested variant records (for example drivers.tevent of tv)
  686. Revision 1.8 1998/07/20 18:40:15 florian
  687. * handling of ansi string constants should now work
  688. Revision 1.7 1998/07/18 22:54:29 florian
  689. * some ansi/wide/longstring support fixed:
  690. o parameter passing
  691. o returning as result from functions
  692. Revision 1.6 1998/06/08 22:59:52 peter
  693. * smartlinking works for win32
  694. * some defines to exclude some compiler parts
  695. Revision 1.5 1998/06/03 22:49:01 peter
  696. + wordbool,longbool
  697. * rename bis,von -> high,low
  698. * moved some systemunit loading/creating to psystem.pas
  699. Revision 1.4 1998/05/05 12:05:42 florian
  700. * problems with properties fixed
  701. * crash fixed: i:=l when i and l are undefined, was a problem with
  702. implementation of private/protected
  703. Revision 1.3 1998/04/29 10:34:00 pierre
  704. + added some code for ansistring (not complete nor working yet)
  705. * corrected operator overloading
  706. * corrected nasm output
  707. + started inline procedures
  708. + added starstarn : use ** for exponentiation (^ gave problems)
  709. + started UseTokenInfo cond to get accurate positions
  710. }