Commit Graph

445 Commits

Author SHA1 Message Date
Jonas Maebe
eccbc78e04 + support for bitpacked arrays:
+ use {$bitpacking on/+} to change the meaning of "packed"
      into "bitpacked" for arrays. This is the default for MacPas.
      You can also define individual arrays as "bitpacked", but
      this is not encouraged since this keyword is not known by
      other compilers and therefore makes your code unportable.
    + pack(unpackedarray,index,packedarray) to pack
      length(packedarray) elements starting at
      unpackedarray[index] into packedarray.
    + unpack(packedarray,unpackedarray,index) to unpack
      packedarray into unpackedarray, with the first
      element being stored at unpackedarray[index]
  * todo:
    * "open packed arrays" and rtti for packed arrays are not
      yet supported
    * gdb does not properly support bitpacked arrays

git-svn-id: trunk@4449 -
2006-08-19 12:54:12 +00:00
peter
eb829ea21b * store procdef messageinf in the ppu
git-svn-id: trunk@4386 -
2006-08-07 19:39:32 +00:00
peter
22657a363b * pass context class to searchsym_in_class to fix the visibility
of protected members called from a named class in a child class
    that also has the visibility for those protected members

git-svn-id: trunk@4384 -
2006-08-07 19:10:11 +00:00
Jonas Maebe
03302dc7c4 * fixed support for macpas & and | operators: they only work on booleans
now, and always perform short circuit boolean evaluation (also in {$b+})

git-svn-id: trunk@3745 -
2006-05-30 13:02:36 +00:00
daniel
4d37c919cc * Internal implementations of get_frame, get_caller_frame and get_caller_addr.
Not yet activated.

git-svn-id: trunk@3517 -
2006-05-14 08:39:19 +00:00
florian
f7817b5669 + parsing of variant dispatching
git-svn-id: trunk@3387 -
2006-04-30 17:53:53 +00:00
florian
9e00f894a9 + support for unaligned function
git-svn-id: trunk@3350 -
2006-04-29 11:15:29 +00:00
Jonas Maebe
3bc040cc45 * count references to symbols accessed via properties (fixes bug #4826)
git-svn-id: trunk@2959 -
2006-03-18 22:53:27 +00:00
Jonas Maebe
791be20f28 * committed wrong file in r2614 (ncal.pas instead of pexpr.pas)
git-svn-id: trunk@2616 -
2006-02-17 09:05:03 +00:00
peter
b967ae8307 * support @inherited <method> to get the methodpointer
of <method> in a parent class

git-svn-id: trunk@2526 -
2006-02-11 22:49:00 +00:00
peter
232555904e * symtablestack cleanup and rewrite
git-svn-id: trunk@2448 -
2006-02-05 22:24:18 +00:00
peter
301042c824 * more check_hints fixes
git-svn-id: trunk@2445 -
2006-02-05 20:18:57 +00:00
Jonas Maebe
9fd4e98dad * fixed displaying of hints such for procedures and functions
(and moved check_hints from pbase to htypechk)

git-svn-id: trunk@2417 -
2006-02-03 18:14:13 +00:00
peter
45176ea2a8 * split tstringtype for stringdef and stringconstnode
to prevent wrong typecasts

git-svn-id: trunk@2276 -
2006-01-13 17:20:27 +00:00
Jonas Maebe
5ccbeea1d3 + support for "return x" as equivalent for "exit(x)" in macpas mode
git-svn-id: trunk@2042 -
2005-12-23 22:49:15 +00:00
peter
710ea0edf0 * fix enum support in vecn in symlists
git-svn-id: trunk@2035 -
2005-12-23 14:11:29 +00:00
peter
80fef1e8ad * fix parsing of typecasts in type declarations
git-svn-id: trunk@2026 -
2005-12-22 12:21:06 +00:00
peter
95879fe8a7 * basic support for generic classes
git-svn-id: trunk@2020 -
2005-12-21 10:11:15 +00:00
peter
739ea825d4 * fix sizeof(array of const)
git-svn-id: trunk@1954 -
2005-12-15 08:58:45 +00:00
florian
350c886460 + support exit();
git-svn-id: trunk@1802 -
2005-11-22 21:27:56 +00:00
peter
f1af7cfe8f * generate implicit 0+<x> for +<x> expressions
git-svn-id: trunk@1556 -
2005-10-21 07:46:14 +00:00
peter
38993ae7e8 * support procvar^, with procvar returning a procvardef in tp/mac modes
git-svn-id: trunk@1477 -
2005-10-18 12:33:27 +00:00
florian
71b90d4d00 + slice implemented
git-svn-id: trunk@1384 -
2005-10-15 16:48:27 +00:00
peter
d1d2b0e1a1 * function name doesn't call the function in macpas
git-svn-id: trunk@1376 -
2005-10-14 07:25:22 +00:00
peter
89297d2c39 * move all stabs ($ifdef gdb) code to dbgstabs
git-svn-id: trunk@1255 -
2005-10-02 11:17:05 +00:00
peter
edf553a223 * string constants are now array of char until
they are converted to a specific string type

git-svn-id: trunk@1254 -
2005-10-02 11:08:58 +00:00
peter
9cda65c4b0 * support for widestrings in tconstsym
* fix widestring writing for stringconstn

git-svn-id: trunk@646 -
2005-07-18 12:54:15 +00:00
florian
7cd67ea3f0 * node optimizer branch merged
* gotonode and gotolabel refactored
  * -Nu added to enable for loop unrolling

git-svn-id: trunk@446 -
2005-06-19 17:42:10 +00:00
fpc
790a4fe2d3 * log and id tags removed
git-svn-id: trunk@42 -
2005-05-21 09:42:41 +00:00
fpc
50778076c3 initial import
git-svn-id: trunk@1 -
2005-05-16 18:37:41 +00:00
michael
55e76063df * Fix methodpointer copy from callnode to loadnode 2005-04-06 11:49:37 +00:00
florian
10df6ea0a2 * fpc_variant_get call fixed 2005-03-28 14:14:52 +00:00
florian
252fa84c62 + compiler support for reading/writing of vararrays 2005-03-27 20:19:21 +00:00
peter
3f9d6ab32f * add hint when passing an uninitialized variable to a var parameter 2005-03-25 22:20:18 +00:00
florian
eeaded577a * fixed copy(dyn. array,...); 2005-03-05 16:37:28 +00:00
Jonas Maebe
d612918bb2 * fixed Lazarus compilation 2005-03-04 09:56:35 +00:00
Jonas Maebe
39a372756f * properties can also be inherited/overridden 2005-03-04 07:46:36 +00:00
Jonas Maebe
7fb6b96aed * fixed web bug #3738 2005-03-03 19:58:14 +00:00
peter
e417e34496 * truncate log 2005-02-14 17:13:06 +00:00
florian
acc34b08cd * fixed precedence of is-operator 2005-02-06 20:29:12 +00:00
peter
79c20ebf7d * use val() for decoding integers 2005-01-20 17:05:53 +00:00
peter
537dcdde20 * don't allow properties in C style operators 2005-01-04 16:38:07 +00:00
peter
ced6bf20cd * fix lineinfo for with blocks 2004-12-26 16:22:01 +00:00
peter
9c0be16488 implicit load of variants unit 2004-12-06 19:23:05 +00:00
peter
2b6456fe16 * procvar handling for tp procvar mode fixed
* proc to procvar moved from addrnode to typeconvnode
  * inlininginfo is now allocated only for inline routines that
    can be inlined, introduced a new flag po_has_inlining_info
2004-12-05 12:28:10 +00:00
peter
89b1b583c9 * ttempcreatenode.create_reg merged into .create with parameter
whether a register is allowed
  * funcret_paraloc renamed to funcretloc
2004-11-21 17:54:59 +00:00
peter
14d25d278b mangledname setting moved to place after the complete proc declaration is read
import generation moved to place where body is also parsed (still gives problems with win32)
2004-11-17 22:21:35 +00:00
peter
e740a66636 * tparaitem removed, use tparavarsym instead
* parameter order is now calculated from paranr value in tparavarsym
2004-11-15 23:35:30 +00:00
peter
6458bd0ce1 * tvarsym splitted 2004-11-08 22:09:58 +00:00
peter
d804452dcc added checking for token=_ID after _POINT is parsed 2004-11-04 17:57:58 +00:00
peter
f02ebed09e * support @labelsym 2004-11-01 15:32:12 +00:00
peter
916041c81c * symlist typeconv for absolute fixed 2004-11-01 10:33:01 +00:00
peter
e7459f5466 * heap and heapsize removed
* checkpointer fixes
2004-10-25 15:38:41 +00:00
mazen
581b52422c - remove $IFDEF DELPHI and related code
- remove $IFDEF FPCPROCVAR and related code
2004-10-15 09:14:16 +00:00
peter
1bb51a2667 * all checking for visibility is now done by is_visible_for_object 2004-10-12 19:51:13 +00:00
peter
4a7e02d817 * cstyle operators with calln in the tree now use a temp 2004-10-12 14:35:47 +00:00
peter
2c9a986fa3 * fix crash with calling method pointer from class procedure 2004-08-25 15:58:36 +00:00
olle
98df0978e1 + adding operators "|" and "&" for macpas 2004-07-05 23:25:34 +00:00
olle
ff36adb056 + macpas style: exit, cycle, leave
+ macpas compiler directive: PUSH POP
2004-07-05 21:49:43 +00:00
peter
2769c9048c * don't allow assigned(tobject) anymore, it is useless since it
is always true
2004-06-29 20:59:43 +00:00
michael
41655fe0ac + Patch from peter to fix typinfo for classes 2004-06-28 14:38:36 +00:00
florian
8a9758c5e2 * logs truncated 2004-06-20 08:55:28 +00:00
florian
588e2c38bf * dwarf branch merged 2004-06-16 20:07:06 +00:00
peter
b86f2c6a25 * methodpointer is loaded into a temp when it was a calln 2004-05-23 18:28:40 +00:00
florian
aa64bb4c2c + support for assigned(<dyn. array>) added 2004-05-16 15:03:48 +00:00
daniel
b721e5872c * Prepare compiler infrastructure for multiple ansistring types 2004-04-29 19:56:36 +00:00
florian
e678705648 * small x86_64 fixes 2004-04-12 18:59:32 +00:00
peter
8d078ada18 * variant array support 2004-03-29 14:42:52 +00:00
peter
e46cdcea48 * constants ordinals now always have a type assigned
* integer constants have the smallest type, unsigned prefered over
    signed
2004-03-23 22:34:49 +00:00
peter
c844c5a505 * procvar cleanup 2004-02-20 21:55:59 +00:00
peter
6faddb5e71 * constants are now parsed as 64bit for cpu64bit 2004-02-18 21:58:53 +00:00
daniel
b38d7f59f4 * Make better use of try_to_consume 2004-02-17 23:36:40 +00:00
peter
1e3875ad36 - fix rtti generation for properties containing sl_vec
- fix crash when overloaded operator is not available
- fix record alignment for C style variant records
2004-02-17 15:57:49 +00:00
peter
ecfbbeffc3 * renamed xNNbittype to xNNinttype
* renamed registers32 to registersint
  * replace some s32bit,u32bit with torddef([su]inttype).def.typ
2004-02-03 22:32:53 +00:00
Jonas Maebe
b46b7ff792 * integrated hack from 1.0.x so we can parse low(int64) as int64 instead
of as double (in 1.0.x, it was necessary for low(longint))
2003-12-29 17:19:35 +00:00
peter
1260eed8fd * again procvar fixes 2003-12-08 22:35:28 +00:00
peter
90a0c832e4 * Initialize() added 2003-11-29 16:19:54 +00:00
peter
2d08c072b5 * fix crash with exit() in a procedure 2003-11-29 14:49:46 +00:00
peter
353219a928 * typed address only used for @ and addr() that are parsed 2003-11-29 14:33:13 +00:00
peter
76f5fbd7db * check paralength instead of assigned(left) 2003-11-10 19:11:39 +00:00
florian
bbf7300a0c * Florian's culmutative nr. 1; contains:
- invalid calling conventions for a certain cpu are rejected
    - arm softfloat calling conventions
    - -Sp for cpu dependend code generation
    - several arm fixes
    - remaining code for value open array paras on heap
2003-11-07 15:58:32 +00:00
peter
25bf6452b4 * fixed calling classmethod for other object from classmethod 2003-11-06 15:54:32 +00:00
peter
1688a42f0d * assigned(proc()) does not change the calln to loadn 2003-11-04 16:42:13 +00:00
peter
079e489b08 * absolute to object field supported, fixes tb0458 2003-10-28 15:36:01 +00:00
peter
56ebcd1249 * self is not a token anymore. It is handled special when found
in a code block and when parsing an method
2003-10-09 15:20:56 +00:00
florian
8fcfcc6606 * fixed constructor call in class methods 2003-10-09 15:00:13 +00:00
peter
95f132db3d * set_varstate cleanup 2003-10-08 19:19:45 +00:00
peter
cedb10116c * fix assigned(property) 2003-10-05 12:56:04 +00:00
peter
00801693bb * protected visibility fixes 2003-10-02 21:13:46 +00:00
peter
70fe77ca7c * procinfo unit contains tprocinfo
* cginfo renamed to cgbase
  * moved cgmessage to verbose
  * fixed ppc and sparc compiles
2003-10-01 20:34:48 +00:00
peter
8af51ea6d3 * locals and paras are allocated in the code generation
* tvarsym.localloc contains the location of para/local when
    generating code for the current procedure
2003-09-23 17:56:05 +00:00
florian
f3e9e7a24f * fixed web bug #2669
* cosmetic fix in printnode
  * tobjectdef.gettypename implemented
2003-09-06 22:27:08 +00:00
florian
22f1ff8da4 * merged Wiktor's Watcom patches in 1.1 2003-09-05 17:41:12 +00:00
peter
cb16846e3b * fixed static class check for properties 2003-08-23 22:29:51 +00:00
peter
17d7fb5a03 * allow typeof(self) in class methods 2003-08-23 18:41:52 +00:00
peter
6731abb0db * fixed some reported bugs 2003-08-10 17:25:23 +00:00
peter
0dceec9a64 * current_procdef removed, use current_procinfo.procdef instead 2003-06-13 21:19:30 +00:00
peter
dc64b1b54f * don't set nf_member when loaded from with symtable
* allow static variables in class methods
2003-06-03 21:02:57 +00:00
peter
31286d02e6 * search defaulthandler only for message methods 2003-05-22 17:43:21 +00:00
peter
92ee1804b6 * removed selfpointer_offset, vmtpointer_offset
* tvarsym.adjusted_address
  * address in localsymtable is now in the real direction
  * removed some obsolete globals
2003-05-15 18:58:53 +00:00