Commit Graph

245 Commits

Author SHA1 Message Date
florian
85d63d9fa9 * settings refactored
git-svn-id: trunk@5094 -
2006-10-30 18:02:58 +00:00
peter
3078a1927f * remove ttype
* rename old ttype variables *type to *def
  * rename resulttypepass to pass_typecheck
  * rename pass_2 to pass_generate_code

git-svn-id: trunk@5077 -
2006-10-29 22:19:39 +00:00
florian
9a1b9071a5 * implemented kylix like local directive, fixes #7242
git-svn-id: trunk@4982 -
2006-10-19 20:26:14 +00:00
Jonas Maebe
0a23786605 - reverted r4880 (wrong varargs reform) and r4838 (wrong removal of
varargs/array of const overloads)
  * arrayconstructor and array of const are no longer compatible with
    the extra varargs parameters (so overloaded varargs and array of
    const cdecl functions can be distinguished)
  * fixed tprintf2 for the correct varargs syntax

git-svn-id: trunk@4909 -
2006-10-14 17:39:00 +00:00
florian
02d0ac4c3e + only procedures doing recursive calls are checked for tail recursivity
+ parameters are tested if they are usable with tail recursion removal

git-svn-id: trunk@4853 -
2006-10-10 20:29:48 +00:00
florian
fb5e396881 + experimental -Sv option to support vector arithmetics
git-svn-id: trunk@4825 -
2006-10-07 21:39:48 +00:00
peter
1eeb78379f * with EXTDEBUG show non-hidden parameters
git-svn-id: trunk@4735 -
2006-09-26 20:06:35 +00:00
Jonas Maebe
e55d6d7145 * make_not_regable() now also works on temprefnodes
git-svn-id: trunk@4661 -
2006-09-20 09:07:45 +00:00
Jonas Maebe
3a54183ce8 * clarified errors regarding invalid uses of packed array/record fields
git-svn-id: trunk@4577 -
2006-09-09 08:17:37 +00:00
Jonas Maebe
758a1ab5b0 * allow taking the address of packed array elements if the element size
is a multiple of 8 bits

git-svn-id: trunk@4576 -
2006-09-09 07:49:43 +00:00
peter
d1e7a68289 * include para number in call by var error
git-svn-id: trunk@4557 -
2006-09-04 21:14:22 +00:00
Jonas Maebe
340e2257f3 * don't allow taking the address of packed record fields
* don't allow using packed record fields as loopvars

git-svn-id: trunk@4509 -
2006-08-27 11:08:39 +00:00
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
4506394cfa * pass contextobjdef for visibility of methods. There are different
requirements for normal searching and for overloaded searching.
    For overloaded searching we need to have the context of the
    object where the overload is defined and not the current
    module

git-svn-id: trunk@4391 -
2006-08-07 21:12:38 +00:00
peter
a704cbf048 * never prefer conversion to formaldef
git-svn-id: trunk@4387 -
2006-08-07 19:50:52 +00:00
Jonas Maebe
30ee3416e8 * fixed wrong "assigned but not used" note for class and interface
(the latter via a type cast) variables from which only fields are
    read

git-svn-id: trunk@4181 -
2006-07-14 17:06:31 +00:00
peter
5e5edcb520 * allow passing single element to open array bug6960
git-svn-id: trunk@3634 -
2006-05-23 07:23:45 +00:00
Jonas Maebe
e344ee3cd7 + support for register variables which contain records
git-svn-id: trunk@3580 -
2006-05-19 15:49:07 +00:00
Jonas Maebe
e0250bcdb4 * never remove regvar-ability of parameters passed by reference
(previously worked only for var/out, now also for const and
     is more generic)

git-svn-id: trunk@3554 -
2006-05-17 13:38:02 +00:00
florian
600af6c9d0 + support for unaligned as lvalue
git-svn-id: trunk@3352 -
2006-04-29 11:52:57 +00:00
Jonas Maebe
5e02b02d24 * properly count references to overloaded operators (tests/tbs/tb0500.pp)
git-svn-id: trunk@3204 -
2006-04-14 09:12:48 +00:00
peter
95be416b9d * don't allow stringconst+integer
* change booleans in arraydef to set
  * set option in arraydef to indicate a constant string so
    a nicer type can be shown instead of array[0..x] of char

git-svn-id: trunk@3051 -
2006-03-27 07:22:02 +00:00
peter
ae0010ad6c * support proc to procvar conversion for overloaded procdefs passed to parameters
git-svn-id: trunk@2997 -
2006-03-21 07:51:54 +00:00
Jonas Maebe
9dbd69c307 * don't give range check hints/warnings for conversions of
realconstnodes to types with less precision than the default (bug 4898)

git-svn-id: trunk@2957 -
2006-03-18 22:02:37 +00:00
Jonas Maebe
765fe2b2ab * fixed bug #4737 (check for potential range errors in for-loop
assignment, report correct column for potential range errors of
    call parameters)
  * refactored code to check potential range check errors (check_ranges
    in htypechk)

git-svn-id: trunk@2501 -
2006-02-09 17:39:22 +00:00
Jonas Maebe
7edc9d0e6a * also perform initialised checking for out-parameter, and set the
initialised state of value/const/var parameters to initialised

git-svn-id: trunk@2487 -
2006-02-08 20:33:15 +00:00
Jonas Maebe
c15b500e32 + warn if a static variable is read but not assigned (tw4781*)
git-svn-id: trunk@2472 -
2006-02-07 21:23:02 +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
Jonas Maebe
f6864a653f * don't warn about possible use of uninitialised function results of
parent procedures in nested procedures (bug 4675)

git-svn-id: trunk@2287 -
2006-01-14 15:34:38 +00:00
Jonas Maebe
9bb86eb411 * never make vs_var or vs_out variabled non-regable, unless it's an
access from a nested procedure. This allows keeping the address
    of large function results like shortstrings in a register,
    because they were always made non-regable by a typeconversionnode
    due to the fact that they are aliased by an absolute alias.

git-svn-id: trunk@2140 -
2006-01-03 15:37:49 +00:00
Jonas Maebe
021dabc37e * also honour vsf_use_hints for uninitialised warnings for the
function result variable

git-svn-id: trunk@2052 -
2005-12-26 14:44:03 +00:00
Jonas Maebe
857664a5d4 * fixed tw4554:
* proper uninitialized checking for arrays
    * first check uninitialized status of right side of assignment
      before setting the left side to "written" (-> catch "x:=x" if
      x is uninitialized)

git-svn-id: trunk@2038 -
2005-12-23 21:08:48 +00:00
Jonas Maebe
62cbd007f1 * indexes in vecn's are only read, not written
git-svn-id: trunk@1976 -
2005-12-17 15:20:33 +00:00
Jonas Maebe
42ec76598c * new categories for vs_*: vs_declared, vs_initialised, vs_read,
vs_written, vs_readwritten. vs_initialised is the old vs_assigned;
    vs_used has been replaced by vs_read, vs_written and vs_readwritten
  * the valid_for_*() routines in htypechk now get an extra parameter to
    decide whether or not errors should be reported

git-svn-id: trunk@1913 -
2005-12-10 16:51:26 +00:00
Jonas Maebe
7996bb3b06 * fixed showing of warnings for uninitialised function results
git-svn-id: trunk@1897 -
2005-12-07 16:12:01 +00:00
peter
f9db030350 * fix overload choosing if both normal proc and proc of object are available
git-svn-id: trunk@1496 -
2005-10-19 07:56:08 +00:00
peter
260861e184 * calculate distance between related objectdefs
git-svn-id: trunk@1492 -
2005-10-19 06:38:29 +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
62972054c4 * allow deref of loop variable
git-svn-id: trunk@981 -
2005-08-30 05:51:39 +00:00
Jonas Maebe
ac445c97c1 * fixed webtbf/tw4244
git-svn-id: trunk@779 -
2005-08-02 18:30:33 +00:00
peter
f3cefd7a07 * check precision of floats for determining overload to call,
patch by Gerhard Scholz

git-svn-id: trunk@536 -
2005-06-30 07:32:40 +00:00
peter
1abbfcc698 * don't allow assignments to properties that need a call
and generate a temp structure

git-svn-id: trunk@485 -
2005-06-24 07:34:12 +00:00
peter
393101a64d * allow passing read-only typedconsts to const parameters
git-svn-id: trunk@242 -
2005-06-07 20:42:41 +00:00
peter
4766e62dd2 * allow temp strings to be passed to consts in delphi mode
git-svn-id: trunk@233 -
2005-06-07 12:48:00 +00:00
florian
21038de78d + started with refactoring det_resulttype
+ dosimplify
* inlinenig makes use of dosimplify

git-svn-id: trunk@140 -
2005-05-29 15:15:38 +00:00
florian
ac880214fc * fixed passing function results to const formal defs, see tbs/tb0490.pp
git-svn-id: trunk@56 -
2005-05-21 20:44:04 +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