Commit Graph

4161 Commits

Author SHA1 Message Date
Jonas Maebe
26cc281390 * fixed real48 to double conversion for 0.0 (patch by "jeng", mantis #16863)
git-svn-id: trunk@15543 -
2010-07-10 12:15:13 +00:00
Jonas Maebe
5ce9bf7e39 * ifdef i386 -> ifdef cpui386 (fixes i386 compilation)
git-svn-id: trunk@15540 -
2010-07-10 09:17:56 +00:00
Jonas Maebe
d3976c858b * fixed 64 bit check for "movd xmmreg, mem" and "movd mem, xmmreg" (patch by
Jasper Neumann, mantis #13294)
  * moved "reg64, xmmreg" and "xmmreg, reg64" combo's from movd to movq
    (movd is always 32 bit)

git-svn-id: trunk@15538 -
2010-07-09 21:16:48 +00:00
Jonas Maebe
229cbca086 * propagate pi_has_assembler_block and pi_uses_exceptions flags from inlined
routines to their host, as in this case the stack frame cannot be omitted
    (mantis #16874)

git-svn-id: trunk@15535 -
2010-07-08 20:34:17 +00:00
Jonas Maebe
c6d00a2b1f * correct the register size holding a smallset < 4 bytes when using "bt"
on it (mantis #16861)
  * fixed some indentation

git-svn-id: trunk@15531 -
2010-07-07 18:45:57 +00:00
Jonas Maebe
0def7f801e * mark used registers in assembler block so the compiler saves/restores
them if necessary

git-svn-id: trunk@15530 -
2010-07-07 18:42:24 +00:00
Jonas Maebe
7d27f4c21d * also support variants for %s in sysutils.format (mantis #16787)
git-svn-id: trunk@15509 -
2010-07-02 19:59:58 +00:00
Jonas Maebe
58362db962 * use the correct procdef when taking the address of an overloaded function
in a typed constant (mantis #16820)

git-svn-id: trunk@15508 -
2010-07-02 19:30:20 +00:00
Jonas Maebe
60041ebf8b * allow exit(value) in exception blocks. Forbidding this dates back to
when this construct was still handled by custom code (mantis #16803)

git-svn-id: trunk@15492 -
2010-06-29 16:56:59 +00:00
Jonas Maebe
9dfa4c55ce - removed unnecessary usage of MacOSAll and CocoaAll
git-svn-id: trunk@15481 -
2010-06-26 10:34:45 +00:00
Jonas Maebe
7321f9a87a * fixed register allocation info when initialising parameters, both in
case they are refcounted out-parameters and when using -gt (mantis #16757)

git-svn-id: trunk@15479 -
2010-06-26 09:59:04 +00:00
Jonas Maebe
62d677eb92 + support for formally declared objcclasses ("type x=objcclass;external;")
+ tests

git-svn-id: trunk@15476 -
2010-06-25 15:08:37 +00:00
Jonas Maebe
e36857742f * allow taking the address of an indexed array function result
(mantis #16772)

git-svn-id: trunk@15475 -
2010-06-25 12:42:27 +00:00
Jonas Maebe
04a63ea278 * fixed range/overflow checking for succ/pred (mantis #16770)
git-svn-id: trunk@15474 -
2010-06-22 19:15:08 +00:00
Jonas Maebe
267cb54cd6 + some extra (already working) tests for class references
git-svn-id: trunk@15467 -
2010-06-21 15:19:02 +00:00
Jonas Maebe
e26cf54cc0 - removed svn:executable property
git-svn-id: trunk@15466 -
2010-06-21 15:11:40 +00:00
Jonas Maebe
bcc836f1b0 * put the RTTI for optional protocol methods in the correct section for
fragile ABI platforms

git-svn-id: trunk@15465 -
2010-06-21 15:07:29 +00:00
Jonas Maebe
1474e7191f * moved tests to correct directory (they depend on the CocoaAll unit)
git-svn-id: trunk@15463 -
2010-06-21 09:26:51 +00:00
Jonas Maebe
835899524b + support for Objective-Pascal for-in loops ("fast enumerations")
+ {$modeswitch objectivec2}, which is required before you can use
    Objective-C 2.0 features (such as the above). It automatically
    also implies {$modeswitch objectivec1}
  + genloadfield() helper to load a field of a node representing
    a record/object/class

git-svn-id: trunk@15460 -
2010-06-20 12:38:45 +00:00
Tomas Hajny
7d5b63042b * add test for web bug #16651
git-svn-id: trunk@15456 -
2010-06-19 16:27:03 +00:00
Jonas Maebe
790c7954b7 * fixed assigning "id" to a protocol instance and using protocol instances
to call methods + test

git-svn-id: trunk@15453 -
2010-06-19 16:19:13 +00:00
ivost
46a44702dc * added test for new IS operator
git-svn-id: trunk@15435 -
2010-06-13 22:05:02 +00:00
Jonas Maebe
935cd9eb8c - reverted r15430, it was wrong (variadic parameters don't require an extra
colon in the selector)

git-svn-id: trunk@15432 -
2010-06-13 19:45:45 +00:00
Jonas Maebe
8c1a63fb80 * take "varags" into account when checking for the correct number of
formal parameters of an Objective-C method

git-svn-id: trunk@15430 -
2010-06-13 19:35:41 +00:00
Jonas Maebe
ea4bb9d752 * don't treat variant records with one element as "records with one element"
(the ABIs that prescribe special treatment for aggregates with one
     scalar element don't either, since a "union containing a single scalar"
     is not the same as a scalar)
  * fixed passing record with a single float field on PowerPC/AIX abi's
  * several changes to cgobj and ncgutil to correctly deal with transfering
    such records between integer and floating point registers

git-svn-id: trunk@15416 -
2010-06-13 09:57:58 +00:00
Jonas Maebe
6d6892bec6 * fixed "byte/word/... ptr []" and "byte/word/..([])" typecasted expressions
in case the memory expression contains a record subscription (mantis
    #16700)

git-svn-id: trunk@15408 -
2010-06-11 14:51:58 +00:00
Jonas Maebe
af15fa4ec4 * fixed test for 64 bit platforms
git-svn-id: trunk@15402 -
2010-06-10 12:00:03 +00:00
Jonas Maebe
7c372ede44 * fixed initialising 32 resp. 64 bit regvars with -g-t if the compiler is
an i386 resp. x86-64 binary (mantis #16668)

git-svn-id: trunk@15398 -
2010-06-09 15:58:39 +00:00
Jonas Maebe
b19f29597c * recompiled versions from the latest source
git-svn-id: trunk@15386 -
2010-06-04 22:50:06 +00:00
Jonas Maebe
3c8b23cda4 * fixed cg.a_loadmm_reg_ref() and cg.a_loadfpu_reg_ref() in case they are
used to store a record function result in an MM/FPUREGISTER to memory
    (the register size will be OS_F32/OS_F64, while the memory size will
     be OS_32/OS_64 -> convert the latter to the former)
  * extended tcalext6 to also test this scenario

git-svn-id: trunk@15385 -
2010-06-04 22:31:35 +00:00
Jonas Maebe
3da24294da * hopefully final fixes to this test...
git-svn-id: trunk@15383 -
2010-06-04 22:27:15 +00:00
Jonas Maebe
7ba46589e7 * recompiled from new version of tcext6.c
git-svn-id: trunk@15382 -
2010-06-04 17:58:09 +00:00
Jonas Maebe
6b5db62a5a * adjusted tcalext6 and tcext6.c so libgcc is no longer required on most
non-x86 architectures

git-svn-id: trunk@15377 -
2010-06-04 15:30:18 +00:00
Jonas Maebe
ad99d968f7 * enabled for all cpu architectures
git-svn-id: trunk@15376 -
2010-06-04 15:27:24 +00:00
Jonas Maebe
62b1698912 + added
git-svn-id: trunk@15372 -
2010-06-03 21:49:47 +00:00
Jonas Maebe
42eefb0e0c + added
git-svn-id: trunk@15371 -
2010-06-03 21:44:14 +00:00
Jonas Maebe
429a9cdba0 + added
git-svn-id: trunk@15369 -
2010-06-03 21:20:14 +00:00
Jonas Maebe
15e9c54b44 * fixed ABI compliance for parameter passing and function returning on all
x86-64 platforms (except for win64, which uses another ABI and which
    already complied to it) + test
  * fixed returning records containing 1 single or double field on darwin/i386,
    these have to be returned via ST0 instead of as a regular record
  * added support for LOC_FPUREGISTER and LOC_MMREGISTER in several places
    where they can now occur due to the previous two changes
  * made a few internalerrors unique

git-svn-id: trunk@15368 -
2010-06-03 20:08:50 +00:00
Jonas Maebe
2a752f2c49 - removed, because C "long double" compatibility has been fixed (via
the "cextended" type) and testing this functionality has been
    enabled in tcalext a while back already

git-svn-id: trunk@15359 -
2010-06-02 21:23:19 +00:00
Jonas Maebe
d167f338a7 + test for mantis #16357 fixed in r15350
git-svn-id: trunk@15357 -
2010-05-31 18:11:46 +00:00
Jonas Maebe
00f6eb870e + test file
git-svn-id: trunk@15302 -
2010-05-21 14:13:38 +00:00
marco
39f4fd49df * Mantis 16504 tar line in tests dir changed to have "f" as last opt.
git-svn-id: trunk@15294 -
2010-05-19 07:22:18 +00:00
Jonas Maebe
4d4f369bf8 * also copy cpptcl2.o (r15239)
git-svn-id: trunk@15244 -
2010-05-09 17:18:42 +00:00
Jonas Maebe
d9c64ed3c1 + (interactive) test for mantis #8076
git-svn-id: trunk@15242 -
2010-05-08 11:31:00 +00:00
Jonas Maebe
45c813929a * update the coordinates properly if a string is written that exactly fills
a line (mantis #15599)

git-svn-id: trunk@15241 -
2010-05-08 11:29:25 +00:00
Jonas Maebe
cddb2ffcae * give a compile-time error when trying to define a short/ansistring typed constant
containing unicode strings instead of producing unpredictable behaviour
    (mantis #16219)

git-svn-id: trunk@15240 -
2010-05-08 10:57:39 +00:00
Jonas Maebe
43033bacae o partially applied patches from mantis #16248 by Sven Barth:
+ test cpp class renaming (compiled for linux/i386 and all darwin platforms)
   * changed compilation instructions for obj/cpptcl1.cpp

git-svn-id: trunk@15239 -
2010-05-08 09:59:08 +00:00
florian
e01e4e5719 * optimized copy(<dyn. array> ...) by checking if the elements are really ref. counted
git-svn-id: trunk@15228 -
2010-05-05 13:49:06 +00:00
Jonas Maebe
700aa3cf11 * GetEnumNameCount also counted the unit name after r14511 (mantis #16402)
git-svn-id: trunk@15225 -
2010-05-04 17:59:58 +00:00
Jonas Maebe
c60bcf8699 * fixed changing the visibility of a property with a fixed index in a child
class (mantis #15610)

git-svn-id: trunk@15223 -
2010-05-04 14:41:22 +00:00
Jonas Maebe
3f280c34cb * don't generate range checking code for pointers-indexed-as-arrays when
using non-constant indices (mantis #16377)

git-svn-id: trunk@15221 -
2010-05-04 10:39:01 +00:00
Jonas Maebe
2911435c5a * do replace one temp with another while inlining in case the former can
be a regvar while the latter cannot be (mantis #16018)

git-svn-id: trunk@15218 -
2010-05-03 16:29:03 +00:00
florian
f3c572edc5 * handle multiple string labels in one case branch correctly, resolves #16130
git-svn-id: trunk@15212 -
2010-05-02 21:44:24 +00:00
Jonas Maebe
0b44f8db1f * don't give an internal error when creating a dynamic array or a
record that requires init/finalisation with an objcclass
    (mantis #16366)

git-svn-id: trunk@15202 -
2010-05-02 13:42:03 +00:00
Jonas Maebe
c67712f81f + tthread.start method, simply calls tthread.resume for now (mantis #16326)
git-svn-id: trunk@15165 -
2010-04-24 14:52:08 +00:00
Jonas Maebe
0dcedf3799 * do not crash but give a fatal error when using Objective-Pascal code
without {$modeswitch objectivec1}

git-svn-id: trunk@15163 -
2010-04-24 12:49:16 +00:00
Jonas Maebe
2eddd5e704 * don't try to bitpack types > 32 bit on 32 bit cpus (mantis #16328)
git-svn-id: trunk@15162 -
2010-04-24 12:46:02 +00:00
florian
62c630abce * handle usage of generics type as class type correctly, resolves #16065
git-svn-id: trunk@15157 -
2010-04-21 20:19:18 +00:00
Jonas Maebe
f2e1819bae * put the call to afterconstructor inside the implicit try/catch block
block of the constructor, so that exceptions thrown there also
    properly abort construction (mantis #16311)

git-svn-id: trunk@15156 -
2010-04-21 20:06:54 +00:00
paul
f982d041e5 tests: fix test for powerpc
git-svn-id: trunk@15151 -
2010-04-18 09:50:32 +00:00
Jonas Maebe
72758864e4 * only allow field names in record/object typed constant declarations (mantis #16234)
* improved error recovery after encountering invalid field name in record/object typed constant
    declaration

git-svn-id: trunk@15150 -
2010-04-18 07:55:42 +00:00
paul
be1ba05a4c tests: fix compilation for platforms without activeX
git-svn-id: trunk@15141 -
2010-04-12 06:29:01 +00:00
paul
a1d94c6829 rtl: implement TStreamAdapter.CopyTo, .SetSize, return proper error value for Clone instead of raising exception (#0016161) + test
git-svn-id: trunk@15138 -
2010-04-11 12:52:31 +00:00
paul
36125b623a tests: fix test for locales with DecimalSeparator <> '.'
git-svn-id: trunk@15123 -
2010-04-09 17:12:20 +00:00
paul
c62c487b24 compiler: fix nested type typecast (issue #0016222)
git-svn-id: trunk@15122 -
2010-04-09 17:10:52 +00:00
Jonas Maebe
a18f2594e2 * fixed FloatToStr for ffGeneral when dealing with numbers whose number of
significant digits before the decimal points matches the precision
    parameter exactly (mantis #16188)
  * round instead of cut off digits in FloatToStr with ffGeneral
  * take into account the minus sign when determining whether a number needs
    to be represented using ffExponent instead of ffGeneral because it has
    too many digits

git-svn-id: trunk@15114 -
2010-04-05 14:54:24 +00:00
paul
8a0028a62e compiler: support *sealed* and *abstract* for objects (issue #0016174)
git-svn-id: trunk@15105 -
2010-04-01 14:36:33 +00:00
Jonas Maebe
4833867826 * moved most handling of records that fit in a register but that cannot be
treated as a regvar from pass_1 to the code generator, because this
    can always occur with a function result from a called function (in
    case the ABI prescribes returning certain records in registers)
    (mantis #16163)

git-svn-id: trunk@15101 -
2010-03-31 20:19:42 +00:00
Jonas Maebe
3cff8df175 * added -Cg- parameter for targets on which -Cg is default
git-svn-id: trunk@15100 -
2010-03-31 20:00:56 +00:00
Jonas Maebe
60f8b7fcb1 + int64 version of randomrange() (mantis #16108)
git-svn-id: trunk@15097 -
2010-03-30 20:04:19 +00:00
Jonas Maebe
734f9de2a0 + support for array of widechar typed constants (based on patch by
Blaise Thorn, mantis #16004)

git-svn-id: trunk@15096 -
2010-03-30 19:45:50 +00:00
marco
67b7762c34 * Patch from Oliver that corrects some % directives in the testsuite. Mantis 16134
git-svn-id: trunk@15095 -
2010-03-30 09:58:25 +00:00
paul
c879230f08 compiler: fix parsing and handling of typed constants declared inside classes/objects + tests
git-svn-id: trunk@15094 -
2010-03-30 07:09:44 +00:00
paul
973d947d6c compiler: allow const, type, var and class var sections for objects + test
git-svn-id: trunk@15092 -
2010-03-30 04:22:19 +00:00
paul
2a7636580e tests: fix test name
git-svn-id: trunk@15091 -
2010-03-30 02:55:07 +00:00
Jonas Maebe
864ca60adb * fixed compilation on 64 bit platforms
git-svn-id: trunk@15083 -
2010-03-28 10:44:34 +00:00
ivost
31067c290e * tiny change: nil i1,i2 by hand so that everything is freed before the "ok".
git-svn-id: trunk@15082 -
2010-03-28 10:10:33 +00:00
ivost
d7e149805b * added new testset for interfaces and delegation, also GetInterface, GetInterfaceWeak, GetInterfaceByStr, AS and IS is tested
git-svn-id: trunk@15081 -
2010-03-28 00:44:20 +00:00
paul
1be92bc750 compiler: allow inline static methods + test (moreover static inline was supported)
git-svn-id: trunk@15076 -
2010-03-27 13:40:36 +00:00
Jonas Maebe
a48a37d38b * fixed extended syntax checking {$x-} by moving it from the typecheck pass
to the parser, so that it only looks at what the programmer wrote rather
    than at all statements that the compiler may generate internally
    (mantis #11619)
  + several tests for {$x-} mode
  * modified tenumerators1 so it compiles without extended syntax enabled
    (to check for..in with {$x-})

git-svn-id: trunk@15075 -
2010-03-27 12:51:27 +00:00
Jonas Maebe
d8a902b4c4 * fixed internalerror in case the from-value of a for-loop has loc_jump
(mantis #15750)

git-svn-id: trunk@15071 -
2010-03-26 22:26:25 +00:00
Jonas Maebe
f0298ad2f5 + test for mantis #15363 fixed in r15066
git-svn-id: trunk@15070 -
2010-03-26 22:12:31 +00:00
ivost
f0ce69b264 * added testcase for right behavior of AS and SUPPORTS so that QueryInterface is called before GetInterface
git-svn-id: trunk@15067 -
2010-03-26 00:43:53 +00:00
Jonas Maebe
35941dcae9 * added missing -CO option
git-svn-id: trunk@15056 -
2010-03-25 09:10:41 +00:00
paul
1b614b526a compiler:
- add own symbol table for enumeration to store enumeration elements
  - reimplement enumeration member traverse using symbol table instead of firstenum/nextenum - that members are removed
  - implement TEnum.Element access syntax - element is searched in the enumeration symtable in this case instead of global/local symtables
  - implement {$SCOPEDENUM ON/OFF} local switch
  + tests

git-svn-id: trunk@15051 -
2010-03-25 05:46:53 +00:00
Jonas Maebe
4d8f578e4c * when typecasting the result of pthread_self, always call it using
pthread_self(), because it's a procvar under Linux and hence otherwise
    the value of the procvar instead of the function result will be
    taken (mantis #15821)

git-svn-id: trunk@15049 -
2010-03-24 21:51:07 +00:00
Jonas Maebe
653974f679 * also give a "potential range error" hint with -CO in case the sizes
match but the source range does not fit in the dest range
    (related to mantis #16023)
  * don't give a "potential range error" when converting between
    s80real and sc80real, since even though the size may differ,
    the represented range does not

git-svn-id: trunk@15044 -
2010-03-24 21:21:19 +00:00
Jonas Maebe
8542632ebe * fixed evaluating constant expressions consisting of more than one term and
that start with a minus in the intel assembler reader (mantis #15843)

git-svn-id: trunk@15041 -
2010-03-24 20:52:31 +00:00
paul
57b67087a8 tests: halt with different error codes for different errors
git-svn-id: trunk@15039 -
2010-03-24 10:36:59 +00:00
Jonas Maebe
531efc5a69 * round(x) -> trunc(x+0.5) in Julian date conversion to prevent the current
rounding mode from influencing the result

git-svn-id: trunk@15037 -
2010-03-23 10:34:43 +00:00
paul
1768810783 compiler: allow to derive classes from a nested class type (issue #0016083)
git-svn-id: trunk@15036 -
2010-03-23 05:36:11 +00:00
Jonas Maebe
82ff623390 + fixed Julian date helpers (based on patch by Bernd Engelhardt, mantis
#16040)
  * finished remaining unimplemented Julian date helpers

git-svn-id: trunk@15032 -
2010-03-22 21:01:46 +00:00
Jonas Maebe
87c9773ac0 + also support & to escape identifiers (and for octal notation) in Delplhi
mode (patch by Blaise Thorn, mantis #15930)

git-svn-id: trunk@15031 -
2010-03-21 23:33:44 +00:00
Jonas Maebe
6db635210a * don't give an internalerror when passing a constant string to an
openstring parameter (mantis #16022)

git-svn-id: trunk@15030 -
2010-03-21 14:51:12 +00:00
paul
49d94c5a16 compiler: implement {$VARPROPSETTER ON/OFF} support which is required for COM (D7 compatibility):
- add an option to skip varspez during parameters comparison
  - skip varspez comparison when searching a property reader candidate if $VARPROPSETTER is ON

git-svn-id: trunk@15020 -
2010-03-17 09:56:50 +00:00
Jonas Maebe
45d25bbe77 * fixed storing/loading widestring constant nodes into/from ppu files
(mantis #15909)
  * fixed storing/loading widestring constants into/from token streams
  * made storing/loading widestring constant nodes into/from ppu files
    endian safe

git-svn-id: trunk@15017 -
2010-03-14 13:27:00 +00:00
Jonas Maebe
171c0289b0 + tests from mantis #15777
git-svn-id: trunk@15013 -
2010-03-14 11:03:09 +00:00
Jonas Maebe
0cfc6e1cac + support for "univ" in macpas mode: a parameter modifier that allows
passing any value to that parameter which has the same size as the
    parameter (it basically acts as if there is an explicit type conversion
    to the parameter type around the value at the caller side). If a procvar
    has an univ parameter, all procvars whose corresponding parameter
    has the same size as that univ parameter are similarly compatible.

    This transparent compatibility can however cause crashes in case of
    of the procvars when one of the types is passed on the stack and the
    other isn't (because then the called routine will a) load the parameter
    from a wrong location and b) pop the wrong amount off of the stack at
    then end). Therefore FPC will warn in most cases where this can happen.
    (mantis #15777)

git-svn-id: trunk@15010 -
2010-03-13 22:13:20 +00:00
Jonas Maebe
88f5addd1c * do not typecheck statements before checking whether they are valid,
because the associated simplifications can turn invalid statements
    into valid statements (based on patch by Aleksa Todorovic, mantis
    #15594)

git-svn-id: trunk@14998 -
2010-03-09 21:13:22 +00:00
paul
8d7312f87b rtl: use CreateVCLComObject routing to create VCLComObject in case it is not assigned + test
git-svn-id: trunk@14948 -
2010-02-27 08:49:50 +00:00
paul
fcaac0ebe1 compiler,rtl - safecall handling:
- pass address to SafeCallException  method(rtl needed a modification)
  - improve code generation for regular safecall routines (not methods)
  - improve test - check that passed exception and address are valid

git-svn-id: trunk@14946 -
2010-02-27 04:41:52 +00:00
pierre
a0ad752e16 * fix tw8730 tests for windows
git-svn-id: trunk@14945 -
2010-02-26 16:33:14 +00:00
paul
f607b7bdd5 tests: add SafeCallException test
git-svn-id: trunk@14941 -
2010-02-26 10:28:19 +00:00
Jonas Maebe
fe5d0b0ef4 * fixed internalerror in case of dereferencing a loc_(c)subsetreg/ref
(mantis #15812)

git-svn-id: trunk@14925 -
2010-02-19 16:26:36 +00:00
Jonas Maebe
78b9820e11 * support record fields separated by commas instead of semicolons in typed
constant record definitions in MacPas mode (patch by Adriaan van Os,
    mantis #15764)

git-svn-id: trunk@14915 -
2010-02-14 14:33:30 +00:00
Jonas Maebe
025ec34e4d + "CExtended" type that is the same as "extended", but conforming to the
properties/behaviour of the equivalent of Extended in C (i.e., to
    "long double" on i386 and x86_64 platforms that support a 10 byte
    long double, and to "double" elsewhere)

git-svn-id: trunk@14912 -
2010-02-14 13:45:58 +00:00
Jonas Maebe
674cdaf3fc * handle fields with the same name as a type also correctly in case of
nested records (mantis #15592)

git-svn-id: trunk@14910 -
2010-02-13 20:51:19 +00:00
Jonas Maebe
85984c2d8f * insert proper type conversions when optimising logical operations and
compares by avoiding unnecessary sign extensions (fixes bug reported in
    http://lists.freepascal.org/lists/fpc-pascal/2010-January/023907.html )
  * never throw away int2int type conversions on bitpacked loads, because
    in these cases the proper bits still need to be selected

git-svn-id: trunk@14892 -
2010-02-12 18:13:08 +00:00
florian
092153e7ad * handle unrolling of for ... downto ... correctly, resolves #15668
git-svn-id: trunk@14884 -
2010-02-10 21:08:54 +00:00
Jonas Maebe
6b0a0c149b * don't perform a range check in Delphi mode when passing a cardinal as
vtInteger to an array-of-const parameter (mantis #15727)

git-svn-id: trunk@14882 -
2010-02-10 16:35:37 +00:00
Jonas Maebe
d60e1f674c * automatically try to call procvars that are subscripted or used in a
with-statement, both in FPC and TP/Delphi modes (mantis #15728)

git-svn-id: trunk@14881 -
2010-02-10 16:12:18 +00:00
Jonas Maebe
1b58fcc877 * set moduleislib to true for libraries. Differences with islibrary:
a) is also set to true for packages (when packages will beimplemented)
     b) exists for each package/library/application separately, instead of
        being stored in the package containing the system unit (when packages
        will be implemented)
    (mantis #15701)

git-svn-id: trunk@14880 -
2010-02-10 16:10:23 +00:00
florian
0c153a46df * math.power/intpower(0,0) return 1, this is as recommended in IEEE 754
as well as compatible with other programming languages and delphi

git-svn-id: trunk@14873 -
2010-02-06 23:10:03 +00:00
Jonas Maebe
89110baab8 * don't modify the flags while simplifying PIC memory references
(mantis #15694)

git-svn-id: trunk@14871 -
2010-02-06 20:18:36 +00:00
Jonas Maebe
b1d2ab5450 * tobject.inheritsfrom(nil) has to return false (mantis #15690)
git-svn-id: trunk@14870 -
2010-02-06 18:14:26 +00:00
Jonas Maebe
870edaf916 * tobject.unitname and tobject.tostring have to return an ansistring instead
of a shortstring (mantis #15693)
  * changed tobject5 so it checks whether the return values are correct

git-svn-id: trunk@14869 -
2010-02-06 17:53:49 +00:00
pierre
3f30dded7f * avoid problems if two svnversion executable are in SEARCHPATH
git-svn-id: trunk@14868 -
2010-02-06 17:33:47 +00:00
florian
f8bf268406 * handle sarX(<const>,<var>) properly. resolves #15653
git-svn-id: trunk@14866 -
2010-02-04 21:30:25 +00:00
marco
706f0b7975 * New more delphi compat intstrtotime by Bart Broersma #15505 + test
git-svn-id: trunk@14854 -
2010-02-03 15:10:14 +00:00
pierre
0cfcd70ad0 * ignore case of drive letter
git-svn-id: trunk@14841 -
2010-02-01 16:52:19 +00:00
Jonas Maebe
caca6cea37 * allow any kind of fields in Object Pascal classes that are passed to
Objective-C methods or which are fields of Objective-C classes (since they
    are basically opaque to the Objective-C runtime) + fixed tobjc11 so it
    expects classes to be encoded as opaque types
  * give a proper error message when using illegal field/parameter types in
    Objective-C classes/methods instead of an internal error (only checked
    during rtti generation rather than during parsing, because during parsing
    some types may still be forwarddefs)
  * split objcutil in objcdef and objcutil, with objcdef depending only on
    the symtable so it can be used in symdef

git-svn-id: trunk@14838 -
2010-01-31 21:13:41 +00:00
florian
dfc2652062 + support of compiler intrinsic sar* using a patch by Benjamin Rosseaux, resolves #15606
git-svn-id: trunk@14834 -
2010-01-31 16:47:01 +00:00
Jonas Maebe
13e8b3f23e * don't give a "NoThreadError" for any default rtl/basicevent* routines,
so the TMultiReadExclusiveWriteSynchronizer routines can be safely
    executed even with the default thread manager -> removed ismultithread
    checks, so that it keeps working even if ismultithread is set to true
    between acquiring and freeing a lock (mantis #15619)

git-svn-id: trunk@14830 -
2010-01-29 21:01:11 +00:00
Jonas Maebe
d03d2ed27d - disabled pic (fixes test on darwin/i386, where pic is on by default)
git-svn-id: trunk@14829 -
2010-01-29 20:56:41 +00:00
Jonas Maebe
3bfa9ea3ec * only for Darwin platforms
git-svn-id: trunk@14827 -
2010-01-29 17:49:43 +00:00
Jonas Maebe
2be600afff * support objc.id.<anyobjcmethod> in Delphi mode (mantis #15607)
git-svn-id: trunk@14822 -
2010-01-28 16:14:42 +00:00
pierre
2646db8036 * Add is_new boolean arg to AddTestResult, to e able to know
if the call really added a new result.

git-svn-id: trunk@14807 -
2010-01-26 12:54:48 +00:00
pierre
85fef0d52d * Improve test result insertion into database
git-svn-id: trunk@14804 -
2010-01-25 16:51:50 +00:00
pierre
fb1cf4fc8f + Use TEST_DATETIME in dbdigest.cfg file
git-svn-id: trunk@14802 -
2010-01-25 12:36:42 +00:00
pierre
b2c04a2a57 + Add compiler and svn revision information
git-svn-id: trunk@14800 -
2010-01-25 10:50:16 +00:00
pierre
95b04cea9d * fix two string errors
git-svn-id: trunk@14799 -
2010-01-25 10:46:29 +00:00
florian
5b1e713e5b * fixed tests
git-svn-id: trunk@14794 -
2010-01-24 15:00:49 +00:00
paul
d898c8d836 tests: fix test crash
git-svn-id: trunk@14793 -
2010-01-24 13:15:35 +00:00
florian
fc148f4aec * read/write new cstringpattern correctly from/to ppu files
+ test

git-svn-id: trunk@14791 -
2010-01-24 12:34:00 +00:00
paul
ba3744b38e compiler: translate_disp_call:
- fix arguments description if the first argument is empty
  - fix restype field value (describes result value type in variant types)

git-svn-id: trunk@14790 -
2010-01-24 12:06:52 +00:00
florian
c6ffbe9eda * support string constants > 255 chars
* don't cut off anymore string constants silently at 255 chars

git-svn-id: trunk@14789 -
2010-01-24 09:28:46 +00:00
marco
690b6e89ea * strutils rtl unit dir + test of posex. (related to bug #15357)
git-svn-id: trunk@14785 -
2010-01-23 22:02:44 +00:00
paul
d08508419d tests: test arguments passing for dispinterfaces
git-svn-id: trunk@14784 -
2010-01-23 19:46:11 +00:00
Jonas Maebe
f967d995ac * moved mode switch to correct location
git-svn-id: trunk@14779 -
2010-01-23 10:30:30 +00:00
pierre
5fa9463074 * remove two warnings
git-svn-id: trunk@14778 -
2010-01-22 23:32:51 +00:00
pierre
def7ffbea5 * Add some additional fields to testrun table
git-svn-id: trunk@14777 -
2010-01-22 23:09:02 +00:00
pierre
be36d13e73 + Update for correct cleaning of dbdigest executable
git-svn-id: trunk@14774 -
2010-01-22 16:03:40 +00:00
pierre
d5f0cc1f7d + Add explicit Port for mysql connection
git-svn-id: trunk@14771 -
2010-01-22 15:33:34 +00:00
pierre
9c487c236a * more updates for test history
git-svn-id: trunk@14769 -
2010-01-22 10:17:32 +00:00
paul
25298fbcd9 compiler: allow hint modifier for 'unit' keyword (reason - delphi compatibility) + test
git-svn-id: trunk@14767 -
2010-01-22 07:15:09 +00:00
paul
bd6f1d7447 compiler: auto generate method/property dispid if it is not set explicitly
git-svn-id: trunk@14766 -
2010-01-22 02:46:03 +00:00
paul
cc23c7c744 test: extend dispinterface test for win64 and wince (2 of 3)
git-svn-id: trunk@14753 -
2010-01-20 07:26:40 +00:00
paul
6bc01f8c7e tests: add 2 fail dispinterface test
git-svn-id: trunk@14749 -
2010-01-19 13:39:52 +00:00
paul
0d7391baff tests: restore nil check in the dispinterface test
git-svn-id: trunk@14748 -
2010-01-19 13:35:23 +00:00
paul
1ae0cebc1a compiler: implement dispinterface properties + modified test
git-svn-id: trunk@14747 -
2010-01-19 09:58:08 +00:00
florian
988b94e578 * store array results returned in registers on x86_64-win64 in a memory location if needed, resolves #14388
git-svn-id: trunk@14736 -
2010-01-17 21:07:59 +00:00
florian
20de72b703 * allow writeln/readln on generic type parameters
git-svn-id: trunk@14721 -
2010-01-17 15:58:46 +00:00
micha
e66b0b1f37 * tests: add test for issue #15500
git-svn-id: trunk@14720 -
2010-01-17 15:57:05 +00:00
florian
3747454aeb * patch by Olivier Coursiere to enable winlike resources on haiku, resolves #15539
git-svn-id: trunk@14716 -
2010-01-17 15:10:47 +00:00
florian
cf5c42b596 * give a better error message and do better error recovery if too few typed constant array elements are provided
git-svn-id: trunk@14708 -
2010-01-17 13:04:17 +00:00
paul
74cc1e0bab compiler: allow 'as' for dispinterface, allow comparisons of dispinterface and pointers (issue #0015530, issue #0015529)
git-svn-id: trunk@14663 -
2010-01-16 11:37:25 +00:00
Jonas Maebe
3cc11800e9 * guarantee at least one sleep operation in every thread
* write error code to output

git-svn-id: trunk@14641 -
2010-01-14 15:25:01 +00:00
paul
9513b50d26 compiler: don't allow to publish class properties + test
git-svn-id: trunk@14640 -
2010-01-14 15:21:13 +00:00
paul
09fd52791a tests: add fail test for class properties
git-svn-id: trunk@14639 -
2010-01-14 15:04:45 +00:00
Jonas Maebe
08a4ede9c4 * added str(enum,charray) and export str(enum,ansistr/widestr/unicodestr)
(mantis #15504)
  * fixed result parameter of str(enum,ansistr) helper (was shortstring)

git-svn-id: trunk@14629 -
2010-01-12 20:19:52 +00:00
pierre
134331f129 * more updates for test history
git-svn-id: trunk@14627 -
2010-01-12 17:32:39 +00:00
marco
0b7e3d14e4 * cleanup of redir. I hope this solves win32 lfn problems, while preserving execinheritshandles functionality.
* removed TP/1.0 
    * switched windows to sysutils.executeprocess using new execinheritshandles 
    * new execinherits executeprocess implementation local for 2.4.0 (and 2.4.1, though that is no longer necessary   after merge)  
  

git-svn-id: trunk@14618 -
2010-01-11 19:45:24 +00:00
paul
6b087799ef compiler: nested class types:
- fix is_visible_for_object to work correctly if symbol is in the objectsymtable but no current_objectdef present
  - fix ClassName for nested classes
  + test
  

git-svn-id: trunk@14617 -
2010-01-11 19:44:02 +00:00
pierre
c39c87096a * more updates
git-svn-id: trunk@14614 -
2010-01-11 15:01:10 +00:00
paul
86d8b09077 fixed test
git-svn-id: trunk@14613 -
2010-01-11 11:39:25 +00:00
paul
4afb3ca971 compiler: fix internal class symbol search for function result + test
git-svn-id: trunk@14612 -
2010-01-11 11:09:12 +00:00
paul
67ce65eb35 tests: more tests for classes
git-svn-id: trunk@14611 -
2010-01-11 10:07:14 +00:00
paul
fd6e2cc86e compiler: fix internal class symbol search for method arguments
git-svn-id: trunk@14610 -
2010-01-11 09:55:53 +00:00
paul
166f8a63a2 compiler: implement class constants + tests
git-svn-id: trunk@14609 -
2010-01-11 08:43:10 +00:00
paul
91ed1c6e6f compiler: types in classes:
- fix type visibility (was always public)
  - fix parsing of class sections after the type declaration
  - allow nested classes declarations
  + tests

git-svn-id: trunk@14607 -
2010-01-11 06:22:57 +00:00
paul
cb54b3e7a9 compiler: allow class to have local type sections + tests
git-svn-id: trunk@14605 -
2010-01-11 02:35:10 +00:00
Jonas Maebe
a1bcc1c8d2 * turn openstring value parameters into regular shortstring parameters
(mantis #14940 and #14941)
  * only turn var/our shortstring parameters with a length of 255 into
    openstring parameters with {$p+} (new tbf/tb0217.pp)

git-svn-id: trunk@14602 -
2010-01-10 15:36:23 +00:00
paul
4b53a54b51 compiler: implement 'var' and 'class var' sections for classes + tests
git-svn-id: trunk@14598 -
2010-01-10 13:48:43 +00:00
florian
6b63837ae7 * rewrote node cse, needs still testing and bug fixing
git-svn-id: trunk@14597 -
2010-01-10 13:38:58 +00:00
Jonas Maebe
49f01e7b64 * replaced writelock of TMultiReadExclusiveWriteSynchronizer with a
critical section, so that it can be entered recursively just like
    the one from TSimpleRWSync + test
  - reverted r14593, since the reason for using TRWSync instead of
    TMultiReadExclusiveWriteSynchronizer was because the former
    supported recursive write locks

git-svn-id: trunk@14594 -
2010-01-10 12:14:21 +00:00
Jonas Maebe
f52e88dfe8 * added watcher thread that will force quite the test if it isn't finished
after 15 seconds

git-svn-id: trunk@14589 -
2010-01-09 23:26:34 +00:00
Jonas Maebe
8da0a031bf * fixed memory leak in new TMultiReadExclusiveWriteSynchronizer
(fwaitingwriterlock was not freed)
  * fixed typo in comment
  * free all memory in trwsync.pp test

git-svn-id: trunk@14588 -
2010-01-09 23:14:53 +00:00
Jonas Maebe
106baa8b2f * optimized version of TMultiReadExclusiveWriteSynchronizer that allows
concurrent readers (mantis #14451)

git-svn-id: trunk@14587 -
2010-01-09 23:00:45 +00:00
paul
3ed4c58502 compiler:
- implement class properties: properties which can access only static fields and static class methods
  - tests
  - fix a possibility to call an instance method from the class method

git-svn-id: trunk@14585 -
2010-01-09 18:37:54 +00:00
Jonas Maebe
77fd8bacc7 * fixed compiler crash when using nested procedures in Objective-C methods
git-svn-id: trunk@14583 -
2010-01-09 15:05:24 +00:00
Jonas Maebe
b4058a57ad * maxcrecordalign for darwin/ppc64 is 4 instead of 8 (at least for the types
that we support), fixes webtbs/tw15061a.pp on darwin/ppc64
  * webtbs/tw15061a.pp is only for darwin/ppc and darwin/ppc64

git-svn-id: trunk@14582 -
2010-01-09 11:22:33 +00:00
paul
00624ad7a3 tests: remove {$STATIC ON} directive since it is not available anymore
git-svn-id: trunk@14580 -
2010-01-08 18:01:28 +00:00
paul
58c71c3c59 compiler: allow to skip the 'static' modifier in the method implementation + modified test
git-svn-id: trunk@14578 -
2010-01-08 16:32:55 +00:00
Jonas Maebe
9cc211e88e * changed {$align mac68k} from an alias for {$packrecords 2} to a proper
implementation for mac68k alignment (mantis #15061)
  * changed {$align power} from an alias for {$packrecords 4} to an alias for
    {$packrecords c}, as Power alignment is the default C alignment for
    PowerPC under Mac OS X (it's close to {$packrecords 4}, but not identical)

git-svn-id: trunk@14577 -
2010-01-08 15:36:22 +00:00
paul
ea88883915 compiler: fix access to static class fields from the static class methods + extended test
git-svn-id: trunk@14574 -
2010-01-08 10:54:35 +00:00
paul
67ae263dd9 compiler: load methodpointer for static class methods - fixes internal error 200305061 when some class member is called inside the class static method + test
git-svn-id: trunk@14571 -
2010-01-07 20:35:23 +00:00
paul
8166148a37 compiler: 'static' keyword:
- deprecate -St compiler switch
  - remove $STATIC directive
  - unconditionally enable 'static' keyword usage
  - adopt tests, samplecfg, fpc.cft, error messages

git-svn-id: trunk@14569 -
2010-01-07 19:02:09 +00:00
Jonas Maebe
0c1247ba7d * removed extra space character when generating the maximal number of
significant digits and frac(value)+roundcorr overflows to 1
    (mantis #15308, fix by Dariusz Mazur)

git-svn-id: trunk@14563 -
2010-01-07 15:26:30 +00:00
pierre
d4e57bcfa9 * Update testsuite web interface
git-svn-id: trunk@14562 -
2010-01-07 15:22:18 +00:00
florian
e6648da567 * make heaptrc aware of the fact that multi threading could be initialized before heaptrc itself is initialized, this is currently the case for windows dlls
git-svn-id: trunk@14560 -
2010-01-07 13:41:43 +00:00
florian
4ddebcbf1c * handle subrange enumeration types in GetEnumValue correctly, resolves #15467
git-svn-id: trunk@14544 -
2010-01-05 16:10:13 +00:00
Jonas Maebe
83c3e7a94b * fixed pred/succ for integer constants that equal the low/high bound of a
built-in integer type (reported by Stefan Kisdaroczi) 

git-svn-id: trunk@14537 -
2010-01-04 15:12:27 +00:00
florian
40cea8d4d5 * handle mm register properly when used as top_local, resolves #14566
git-svn-id: trunk@14535 -
2010-01-03 20:33:01 +00:00
Jonas Maebe
6399bcd4e3 * improve precision of values specified with a decimal point and an exponent
(based on report/hints by Dariusz Mazur)

git-svn-id: trunk@14533 -
2010-01-03 15:56:06 +00:00
florian
31e2f16484 resolves #15453:
* fixes i386 DivMod with negative numbers with a patch from Jonas
* fixes generic DivMod with negative numbers
* test updated

git-svn-id: trunk@14532 -
2010-01-03 14:59:01 +00:00
Jonas Maebe
b4c572483b * always call procvars inside varargs in TP/Delphi mode (mantis #15446)
git-svn-id: trunk@14527 -
2010-01-02 21:43:19 +00:00
Jonas Maebe
04606982ac * fixed evaluation of "mod" operator for tconstexprint with signed operands
(part of mantis #15453)

git-svn-id: trunk@14516 -
2010-01-01 22:50:35 +00:00
florian
81f34dd4bb * avoid too long prefixes of manglednames by using a CRC like for long parameter name lists, resolves #15203
git-svn-id: trunk@14515 -
2010-01-01 21:56:55 +00:00
Jonas Maebe
dd94f5cf2b * no longer allow typed files of reference counted data (mantis #15447)
git-svn-id: trunk@14509 -
2010-01-01 14:56:33 +00:00
Jonas Maebe
1743c6f1a8 * also recompile a unit if class/object definitions in indirectly used
units have changed, because these can influence the code of the
    current unit in case method signatures changed (mantis #13840)
    + manual test
  * fixed some recompilation crashes related to WPO info
  * clarified the unit_u_add_depend_to message

git-svn-id: trunk@14503 -
2009-12-30 14:03:31 +00:00