Commit Graph

212 Commits

Author SHA1 Message Date
Jonas Maebe
a3f059bc29 * call the ansistring version of val for zero-based array-of-char
parameters (because they can be auto-converted to ansistring, but not
    to shortstring) (mantis #8148)

git-svn-id: trunk@6076 -
2007-01-19 18:22:03 +00:00
yury
b3c82a05c5 * Use fpc_Write_Text_Currency and fpc_Read_Text_Currency for currency.
git-svn-id: trunk@5875 -
2007-01-10 22:13:01 +00:00
yury
52b72564e9 * Str and Val for currency values are handled by fpc_xxx_Currency and fpc_Val_Currency_xxx.
git-svn-id: trunk@5866 -
2007-01-09 21:47:57 +00:00
florian
a2ec2e72b6 * better hint about abstract methods (fixes 5098)
+ code generation for invoking dispinterface methods
* small dispinterface problems fixed

git-svn-id: trunk@5798 -
2007-01-03 19:14:31 +00:00
florian
80d4887e67 * fixed warnings for length/high/low(<normal array>; <ord>; <enum>)
git-svn-id: trunk@5795 -
2007-01-03 09:51:24 +00:00
yury
8765e488ac * fixed compilation of tbs/tb0460.pp for targets where currency is stored as ordinal.
git-svn-id: trunk@5672 -
2006-12-22 00:48:17 +00:00
Jonas Maebe
991c7da136 * support inc(pointer) in TP mode with range/overflow checking on as well
git-svn-id: trunk@5605 -
2006-12-15 13:02:00 +00:00
Jonas Maebe
9e60d6791d * show name of procedure/function called with too few parameters
git-svn-id: trunk@5522 -
2006-12-01 20:15:57 +00:00
Jonas Maebe
1c8dc092b2 * create fpc_write* length/frac parameters as s32inttype to match the
declaration in the system unit for 64 OS'es

git-svn-id: trunk@5462 -
2006-11-23 16:40:20 +00:00
Jonas Maebe
b8c3fecd1d * fixed overflow checking for inc/dec on non-x86
+ test for the above

git-svn-id: trunk@5317 -
2006-11-10 21:14:11 +00:00
peter
658c46b903 * remove tdictionary and tindexarray
* symtables based on TFPHashObjectList and TFPObjectList
  * rename torddef.typ to torddef.ordtype
  * rename tfloatdef.typ to tfloatdef.floattype
  * rename tdef.deftype to tdef.typ
  * remove obsolete browser code, browcol is kept so the ide
    can still be compiled

git-svn-id: trunk@5192 -
2006-11-03 00:30:30 +00:00
Jonas Maebe
5acc8b44a8 * activated internal get_frame for x86
* turn off stackframe optimizations on x86 if get_frame is called
    in the current routine, or if the address of a nested function
    is taken in the current routine
  + test for the above
  * this fixes the IDE when compiled with stackframe optimizations
    on x86

git-svn-id: trunk@5146 -
2006-11-01 12:48:53 +00:00
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
bacded2cf8 * fixed expectloc of unaligned(...)
git-svn-id: trunk@4830 -
2006-10-08 15:47:01 +00:00
Jonas Maebe
b386335f27 * treat zero-based arrays of char also as pchar's when reading
(i.e., always zero-terminate) (bug 7567)

git-svn-id: trunk@4826 -
2006-10-08 09:22:30 +00:00
peter
d07f470b71 * remove ifdef fpc
git-svn-id: trunk@4819 -
2006-10-07 13:43:34 +00:00
florian
9e66674ff9 + first part of qwordbool implementation
git-svn-id: trunk@4462 -
2006-08-19 23:16:17 +00:00
Jonas Maebe
be39a88daa * slice() doesn't support packed arrays
git-svn-id: trunk@4454 -
2006-08-19 16:18:42 +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
Jonas Maebe
5bf38351e9 * fixed bug #7195: use regular type conversions for the results of
fpc_sqr(t)_real

git-svn-id: trunk@4290 -
2006-07-24 07:55:32 +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
9e00f894a9 + support for unaligned function
git-svn-id: trunk@3350 -
2006-04-29 11:15:29 +00:00
peter
ecdb5df2d6 * fix alignment of tdoublearray by using a variant record
git-svn-id: trunk@3071 -
2006-03-29 06:40:47 +00:00
Jonas Maebe
a15505521c * fixed handling of wrong invocations of slice + improved error reporting
git-svn-id: trunk@2614 -
2006-02-16 20:27:31 +00:00
Jonas Maebe
dc5c79194f * fixed SETTEXTBUF
git-svn-id: trunk@2566 -
2006-02-14 10:35:24 +00:00
Jonas Maebe
cd70b38e8b * kill warnings about non-longint code parameters with val()
which popped up again after yesterday's patches to the
    potential range error warnings

git-svn-id: trunk@2508 -
2006-02-10 10:08:07 +00:00
Jonas Maebe
5007ae7197 * fixed web bug #4724 (don't allow inc/dec(pointer,pointer)
* more accurate error postitions for inc/dec errors

git-svn-id: trunk@2502 -
2006-02-09 18:18:47 +00:00
Jonas Maebe
d11329f9cd * openstrings and openarrays don't have to by valid in order to use
high()/low() on them

git-svn-id: trunk@2484 -
2006-02-08 20:30:49 +00:00
peter
232555904e * symtablestack cleanup and rewrite
git-svn-id: trunk@2448 -
2006-02-05 22:24:18 +00:00
Jonas Maebe
58381ff7b6 * made chararray handling 98% TP-compatible, fixes web bugs 3012
and 4080. The compatibility differences are:
      a) writing a chararray which is zero-based but not zero-
         terminated does not cause a buffer overflow
      b) non-zero-based chararrays can also be read

    The difference was that previously, all chararrays were treated
    as pchars. In TP/Delphi (and now also in FPC), this is only done
    for zero-based chararrays. For non-zero-based ones, the entire
    contents of the array should always be used (including #0's).

    The default parameters in the system unit for the chararray
    helpers are to avoid having to use a define for bootstrapping.

git-svn-id: trunk@2152 -
2006-01-04 10:05:10 +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
florian
46ecdc8f94 * allow pred/succ on non continous enumerations in delphi mode
git-svn-id: trunk@1878 -
2005-12-04 18:35:19 +00:00
peter
5abb9d68f6 * prevent warning for val with second parameter not being a longint
git-svn-id: trunk@1463 -
2005-10-18 08:26:29 +00:00
florian
8af13ed6ae * fixed result type conversion for sqrt/sqr
git-svn-id: trunk@1425 -
2005-10-16 16:39:00 +00:00
florian
71b90d4d00 + slice implemented
git-svn-id: trunk@1384 -
2005-10-15 16:48:27 +00:00
florian
19e97e4da2 + use sse for sqrt if possible
* same optimization for sqrt as for sqr

git-svn-id: trunk@1266 -
2005-10-03 12:47:05 +00:00
florian
6371333361 + sqr uses sse on x86 if possible
* the result type of sqr is equal to the argument in case of usual floats

git-svn-id: trunk@1265 -
2005-10-03 12:31:31 +00:00
florian
77db0e5185 + length(<variant>);
git-svn-id: trunk@1154 -
2005-09-22 08:51:23 +00:00
florian
a53c9e2666 * fixed stupid copy/paste which turned softfloat always off
* fixed wince softfloat compiler proc. to be correctly named also when used outside the system unit

git-svn-id: trunk@966 -
2005-08-28 21:08:23 +00:00
florian
2f8fe7d2e6 - readln(<pchar>) forbidden, there is no way to prevent an buffer overflow, fixes 4227
git-svn-id: trunk@810 -
2005-08-07 09:18:21 +00:00
peter
f2f968f48a * fix overflow checking for inc(cardinal,x) and inc(pointer,x)
git-svn-id: trunk@593 -
2005-07-06 08:01:39 +00:00
peter
6846195a6c * insert explicit typecast to left type of inc(left,right) before
assigning the value after an addn
  * for inc(pointer,X) convert X to sinttype instead of ptrinttype
    to support also negative values of X

git-svn-id: trunk@587 -
2005-07-05 07:15:50 +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
peter
f67de71de2 * insert typeconv to ptrint for all inc(pointer) operations
git-svn-id: trunk@144 -
2005-05-29 19:17:31 +00:00
Jonas Maebe
0115a0a38e * convert inc/dec(pointertype) to add/sub if overflow checking is turned on
(fixes web bug #4004)

git-svn-id: trunk@136 -
2005-05-29 11:19:40 +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
peter
2d62e884c8 * only give warnings for uninitialized variables in low()/high()
if the value is calculated at runtime
2005-04-15 15:50:18 +00:00
peter
3f9d6ab32f * add hint when passing an uninitialized variable to a var parameter 2005-03-25 22:20:18 +00:00