Commit Graph

186 Commits

Author SHA1 Message Date
florian
8ecdbbc515 * fix intf assignment
git-svn-id: trunk@6007 -
2007-01-16 22:42:21 +00:00
Jonas Maebe
c0eb91ffc8 * fixed error message for trying to assign to formal parameters and
to open arrays (mantis #8111)

git-svn-id: trunk@5950 -
2007-01-13 18:20:06 +00:00
peter
0557ddc342 * removed typed const, it is now handled by staticvarsym
* globalvarsym renamed to staticvarsym
  * fixed invalid regvar use in init when the finalize also uses the var

git-svn-id: trunk@5290 -
2006-11-08 21:04:22 +00:00
peter
f2a25e845d * refactor gen_alloc_symtable so it depends on varsym type and not
on symtabletype

git-svn-id: trunk@5259 -
2006-11-05 21:53:40 +00:00
peter
e17b424e28 * refactor procsym procdef list
git-svn-id: trunk@5210 -
2006-11-03 18:44:46 +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
florian
85d63d9fa9 * settings refactored
git-svn-id: trunk@5094 -
2006-10-30 18:02:58 +00:00
peter
dc29821e8c * ttypenode.dogetcopy added
git-svn-id: trunk@5080 -
2006-10-29 23:35:23 +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
peter
2f0ce31751 * string concat changed from function to procedure to
allow runtime optimization if the destination is the
    same as a source parameter
  * tassignmentnode now sets aktassignmentnode global that can be used
    to use the left node as a destination parameter and
    skip the assignment
  * disabled all cpu specific shortstr concat/append

git-svn-id: trunk@4770 -
2006-10-02 20:00:06 +00:00
peter
75dee03578 * fix type determining of array of integer constructors
git-svn-id: trunk@4736 -
2006-09-26 20:11:15 +00:00
Jonas Maebe
e9580628d3 * make temps which are passed as the location for the function
result of functions which return their result in a temp not
    regable

git-svn-id: trunk@4662 -
2006-09-20 09:09:35 +00:00
Jonas Maebe
733f559267 * also perform C varargs type conversions for cdecl procedures declared
as "varargs" instead of using an array of const parameter

git-svn-id: trunk@4572 -
2006-09-08 16:04:15 +00:00
chrivers
f0a62b1e47 Changed implicit type conversion helper for interface assignments. This is needed for _IMPLEMENTS. Will be optimized to be more optimal for non-implements interfaces
git-svn-id: trunk@4363 -
2006-08-06 01:11:32 +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
570c1bc3a5 * widestrings aren't ref. counted anymore on windows
git-svn-id: trunk@3466 -
2006-05-09 20:54:26 +00:00
florian
23f1f83835 + is_automatable
git-svn-id: trunk@3410 -
2006-05-01 19:55:25 +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
b2cdab26af * automatically convert (wide)chararrays to p(wide)chars for C varargs
git-svn-id: trunk@2951 -
2006-03-18 09:20:18 +00:00
Jonas Maebe
4db6e1ddb8 * moved type conversion of C varargs from tcallnode to
tarrayconstructornode.inset_typeconvs() and fixed them:
    * integers < 32 bit are converted to 32 bit (this was previously
      done in the code generator for some targets, and not for others)
    * currency is also converted to double for targets where currency = int64
    * single is converted to double, except for x86_64 (is at least
      necessary on darwin/ppc, darwin/i386 and linux/i386)
    * enums are converted to 32 bit ints
    * procvars are converted to pointers
    * proper errors are given for various unsupported types
   NOTE: in C, floating point constants are by default double, while in
    FPC they are of type extended. On platforms where extended <> double,
    such constants when passed to C varargs are automatically converted
    to double by default (gives warning). If you want to pass them as
    single or extended or get rid of the warning, use an explicit typecast
  * increased ppu version because of introduction of new node flag
    (nf_cvarargs for tarrayconstructornode)
  * fixed tests/test/cg/tprintf
  * changed tests/test/cg/cdecl/taoc5 to use explicit typecasts for
    floating point constants passed to C varargs functions.

git-svn-id: trunk@2949 -
2006-03-17 22:26:48 +00:00
peter
b6e35a200e * rewrite of optimizer options
git-svn-id: trunk@2901 -
2006-03-13 09:05:50 +00:00
florian
bbd3e2e391 * string constants passed to array of const should be passed as ansistrings
git-svn-id: trunk@2523 -
2006-02-11 22:25:14 +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
6d3ae16267 * fixed web bug #4647 (untyped elements in array constructors) + test
git-svn-id: trunk@2110 -
2006-01-01 20:43:28 +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
peter
95879fe8a7 * basic support for generic classes
git-svn-id: trunk@2020 -
2005-12-21 10:11:15 +00:00
peter
24d972c012 * append optimization also for constant strings
git-svn-id: trunk@1950 -
2005-12-14 17:23:50 +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
77cc54351c * procedures containing nested procedures accessing their data can't be inlined, fixes ie in tcalfun8.pp
git-svn-id: trunk@1274 -
2005-10-03 20:25:28 +00:00
Jonas Maebe
6171499d15 * fixed creating shared libraries under Darwin/Mac OS X
git-svn-id: trunk@727 -
2005-07-22 10:09:52 +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
florian
a39fd9d2ea * array of const for classes fixed, was broken by r10
* test adapted

git-svn-id: trunk@154 -
2005-05-30 18:44:42 +00:00
fpc
790a4fe2d3 * log and id tags removed
git-svn-id: trunk@42 -
2005-05-21 09:42:41 +00:00
fpc
aabbd3c7df * property svn:eol-style: native set
git-svn-id: trunk@16 -
2005-05-18 16:16:11 +00:00
florian
d4194bce53 * array of const for currency, classes and interfaces fixed
git-svn-id: trunk@11 -
2005-05-17 21:17:35 +00:00
fpc
50778076c3 initial import
git-svn-id: trunk@1 -
2005-05-16 18:37:41 +00:00
florian
a680ccb389 + variants are now assigned using fpc_variant_copy 2005-03-28 13:36:15 +00:00
peter
3f9d6ab32f * add hint when passing an uninitialized variable to a var parameter 2005-03-25 22:20:18 +00:00
peter
ae0eb8d607 don't check size differences for booleans 2005-03-18 16:41:27 +00:00
peter
e417e34496 * truncate log 2005-02-14 17:13:06 +00:00
peter
d4be793575 * fix IE with array of const in array of conts 2005-02-11 16:25:26 +00:00
florian
00324d38bf + optimized code generation on sparc
+ some stuff for pic code on sparc added
2005-01-23 17:14:21 +00:00
peter
a1c525a3e6 * resourcestring does not need exception frame 2004-12-26 16:21:39 +00:00
michael
44bf61f445 * Convert array of widechar to pwidechar instead of pchar 2004-12-07 13:52:54 +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
6458bd0ce1 * tvarsym splitted 2004-11-08 22:09:58 +00:00
peter
2e161c5e9e * nf_internal flag for internal inserted typeconvs. This will
supress the generation of warning/hints
2004-11-02 12:55:16 +00:00
peter
f02ebed09e * support @labelsym 2004-11-01 15:32:12 +00:00