Commit Graph

323 Commits

Author SHA1 Message Date
peter
beb01e6e79 * give warning for disabling inline if assembler
is detected

git-svn-id: trunk@10473 -
2008-03-11 17:57:24 +00:00
florian
d8d96f14e6 + experimental directive, resolves #10833
git-svn-id: trunk@10331 -
2008-02-15 19:29:34 +00:00
Jonas Maebe
f36e5411af * split cpu64bit compiler define into
a) cpu64bitaddr, which means that we are generating a compiler which
       will generate code for targets with a 64 bit address space/abi
    b) cpu64bitalu, which means that we are generating a compiler which
       will generate code for a cpu with support for 64 bit integer
       operations (possibly running in a 32 bit address space, depending
       on the cpu64bitaddr define)
   All cpus which had cpu64bit set now have both the above defines set,
   and none of the 32 bit cpus have cpu64bitalu set (and none will
   compile with it currently)
  + pint and puint types, similar to aint/aword (not pword because that
    that conflicts with pword=^word)
  * several changes from aint/aword to pint/pword
  * some changes of tcgsize2size[OS_INT] to sizeof(pint)

git-svn-id: trunk@10320 -
2008-02-13 20:44:00 +00:00
Jonas Maebe
8349cde7db * changed byte/word/longbool to be Delphi-compatible (+ similar changes
for qwordbool) + test:
    o assigning true to such a variable now sets them to $ff/$ffff/$ffffffff
    o these types are now all signed
    o converting an integer type to a byte/word/long/qwordbool using an
      explicit type cast keeps the integer's original value stored in the
      bool, instead of forcing it to ord(true)/ord(false)
    (mantis #10233 and #10613, implemented for all architectures, testsuite
     tested for ppc32, sparc and x86)
  * fixed some places where the rtl depended on longbool(true) having the
    value 1
  * extended several boolean tests (and adapted some to no longer assume
    that byte/word/long/qwordbool(true)=1)
  + support for converting to qwordbool in second_int_to_bool for x86, ppc
    and sparc

git-svn-id: trunk@9898 -
2008-01-24 21:30:55 +00:00
Jonas Maebe
719c29cf86 + new cpo_openequalisexact parameter comparison option which
treats equal open arrays, open strings and arrays of const
    (implicitly also open) as exactly matching (since you
     cannot declare such types on their own, so they will
     never match exactly)
  * require that forward declared procedures match the
    implementation exactly for both the parameters (with
    the above modification) and result type (mantis
    #10425 and the related webtbf/tw10425a.pp)

git-svn-id: trunk@9484 -
2007-12-16 22:22:11 +00:00
peter
1e123d66ba * improved generics
git-svn-id: trunk@8838 -
2007-10-18 00:24:05 +00:00
peter
6b8aed593f * remove registers{int/mmx/fpu} from firstpass
* small cleanups of unused variables in firstpass
  * node_resources_fpu() created to get an approximation of the
    required fpu registers
  * for the moment use node_complexity in the CG until the
    node_resource_int() is created

git-svn-id: trunk@8655 -
2007-09-26 21:12:01 +00:00
peter
68245771cc * fix invalid typecast
git-svn-id: trunk@8432 -
2007-09-11 22:13:31 +00:00
Jonas Maebe
91629f810f * better error messages for non-overloadable operators:
* only suggest = if the user tried to overload <>
    * suggest ** if the user tried to overload ^ (mantis #9606)
    * no suggestion otherwise
   (instead of always suggesting '=')

git-svn-id: trunk@8402 -
2007-09-08 10:49:16 +00:00
peter
0fc65c5eec * for tp mode don't allow unitname reuse
git-svn-id: trunk@8158 -
2007-07-23 20:38:05 +00:00
Jonas Maebe
28bab3fb4f - removed some unused variables
* fixed some (harmless) ptrint warnings
  - removed some commented code in agppcmpw
  * added one missing field in a typed constant in cp1251

git-svn-id: trunk@8081 -
2007-07-17 13:57:15 +00:00
yury
84306f80e9 * fixed tw8391.pp for i386.
git-svn-id: trunk@7768 -
2007-06-21 23:22:48 +00:00
daniel
9adb202a92 * Rework the constexprint to allow operations from low(int64) to high(qword).
+ Some initial work on a formaldef which also carries the typinfo of a parameter.

git-svn-id: trunk@7639 -
2007-06-13 07:41:18 +00:00
florian
36471608c1 * fixed regression caused by r7180
git-svn-id: trunk@7555 -
2007-06-02 20:35:17 +00:00
peter
e7ead9fc9f * nested procedures are not supported in generic methods
git-svn-id: trunk@7368 -
2007-05-16 20:56:00 +00:00
peter
c831b2fb00 * set symoptions for all implicit created parameters
git-svn-id: trunk@7321 -
2007-05-12 22:16:06 +00:00
florian
2eb40fc025 * forbid file types as function results
git-svn-id: trunk@7180 -
2007-04-28 18:32:03 +00:00
florian
8800db8fa0 * allow external in cppclasses
* don't insert vmt pointer for C++ constructor/destructor calls

git-svn-id: trunk@7156 -
2007-04-22 19:55:05 +00:00
Tomas Hajny
30b78920cd * OS/2 compilation fixes (not completely finished yet)
git-svn-id: trunk@6937 -
2007-03-20 00:49:20 +00:00
peter
6db1d803fa * removed invalid code from proc_get_importname where the result could be empty
git-svn-id: trunk@6926 -
2007-03-18 21:35:42 +00:00
yury
7547f3a0c0 * Allow @ and ? characters in imported function name when AS is used. It fixes bug #8391.
+ test.

git-svn-id: trunk@6669 -
2007-02-26 17:51:38 +00:00
pierre
7e62e2cfc1 * correct debug info for parentfp hidden parameter,
this is a vs_value parameter, not a vs_var.
    This allows to get higher local variables in IDE
    to work again (see ide/test.pas)

git-svn-id: trunk@5984 -
2007-01-15 05:13:53 +00:00
peter
91dbd27a42 * cleanup deleting of defs
git-svn-id: trunk@5902 -
2007-01-11 20:46: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
475664acf5 * fixed local check, fixes #7242
git-svn-id: trunk@5760 -
2006-12-30 23:47:21 +00:00
Jonas Maebe
f308bfb45c * fixed mantis 6686 ("function a;" without prior definition of "a"
accepted in Delphi mode + extra test case where something similar
    has to succeed)

git-svn-id: trunk@5698 -
2006-12-24 10:48:49 +00:00
Jonas Maebe
9d28af4269 * removed po_function and instead check proctypeoption (more
comprehensive too)

git-svn-id: trunk@5693 -
2006-12-23 21:04:30 +00:00
Jonas Maebe
a63ed25f74 * fixed support for repeating constructor without parameters in Delphi
mode + test

git-svn-id: trunk@5692 -
2006-12-23 20:53:47 +00:00
Jonas Maebe
e5a1d628eb * fixed one regression in r5682: implementation declarations with a
calling convention that has different hidden parameters than the
    interface declaration no longer compiled in Delphi mode (e.g.
    webtbs/tw7329.pp on i386)
  * fixed remaining declaration parsing incompatibilities in TP/Delphi
    modes (other modes already gave errors for the things below):
    * give an error for "function a: byte;" in interface followed by
      "procedure a;" in implementation ("function a;" in implementation
      still allowed as in TP/Delphi)
    * give an error for "function a(b: byte):byte" in interface
      followed by "function a: byte;" in implementation (if one parameter
      or return type is specified in implementation, everything must
      be repeated -- "function a;" still allowed)
  * copied webtbs/tw0890.pp to webtbf/tw0890a.pp since it now correctly
    fails, and modified webtbs/tw0890.pp so it doesn't fail with the
    new code

git-svn-id: trunk@5688 -
2006-12-23 11:17:21 +00:00
Jonas Maebe
f3f8a76559 * fixed mantis 7173 (properly check parameters in unit
implementation in Delphi/TP mode if they are repeated)

git-svn-id: trunk@5682 -
2006-12-22 17:48:28 +00:00
florian
534048e286 * fixed parameter name change message
git-svn-id: trunk@5334 -
2006-11-11 18:06:11 +00:00
peter
13f359aa80 * resultname changed to pshortstring
git-svn-id: trunk@5295 -
2006-11-09 07:43:13 +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
0c8796c210 * fix hiding of symbols
git-svn-id: trunk@5272 -
2006-11-07 08:53:15 +00:00
peter
35c21515a9 * fixed adding of .dll extension
git-svn-id: trunk@5243 -
2006-11-05 13:05:21 +00:00
peter
86f1fe11d6 * fix generics parsing for new symtable
git-svn-id: trunk@5220 -
2006-11-04 12:13:06 +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
peter
136d3e8d46 * refactor implemented interfaces
git-svn-id: trunk@5134 -
2006-10-31 22:38:49 +00:00
peter
cb246eb781 * Remove dos,strings units, use SysUtils instead
* replace split* functions with Extract* functions
  * Add Directory caching

git-svn-id: trunk@5102 -
2006-10-30 23:29:35 +00:00
florian
bce905b106 * give correct error locations for errors when specializing templates
* removed more germanisms
* better dumping of tokenbuf in ppudump

git-svn-id: trunk@5101 -
2006-10-30 23:28:06 +00:00
florian
ef7bd58c54 * germanism removed (aktfilepos -> current_filepos)
git-svn-id: trunk@5099 -
2006-10-30 22:37:31 +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
peter
0f6355e805 * fix property overriding
git-svn-id: trunk@5045 -
2006-10-28 20:35:53 +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
593f74d155 + full support for varargs-related functionality for "mwpascal; external;"
functions

git-svn-id: trunk@4910 -
2006-10-14 17:56:42 +00:00
florian
948ec12140 * use oldfpccall for interrupts
git-svn-id: trunk@4837 -
2006-10-08 18:20:13 +00:00
peter
506f44dc7a * only compare non-hidden parameters when searching for an implementation. The location
of hidden parameters can be different between calling conventions and cause problems
    with delphi mode where the implementation calling convention can be skipped

git-svn-id: trunk@4741 -
2006-09-27 20:53:24 +00:00
peter
d0156354a6 * inline directive enabled by default for fpc,objfpc,delphi modes
* -Si and $inline directive control are now local switches and 
    have finer control on whether a function will really inlined or not

git-svn-id: trunk@4553 -
2006-09-04 19:54:21 +00:00