Commit Graph

2246 Commits

Author SHA1 Message Date
Jonas Maebe
6308630e3e * rtl changes part of r15460
git-svn-id: trunk@15462 -
2010-06-21 09:26:08 +00:00
Tomas Hajny
a2af005101 * fix for web bug #16651
git-svn-id: trunk@15452 -
2010-06-19 16:15:40 +00:00
ivost
8a25a5fbc7 * removed writeln call
* added some more comments

git-svn-id: trunk@15296 -
2010-05-19 11:26:09 +00:00
marco
20499117de * reenabled ttime and tdate in system.
git-svn-id: trunk@15295 -
2010-05-19 08:23:44 +00:00
marco
9b6b88b100 * deprecated some 1.0.x stuff.
git-svn-id: trunk@15281 -
2010-05-16 11:46:30 +00:00
ivost
5604937bd4 * fixed #0016261
git-svn-id: trunk@15262 -
2010-05-12 20:41:00 +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
marco
845125c2e7 * video unit maxwidth increased to 240 (FV editor
only good to 255, a small safety margin)

git-svn-id: trunk@15195 -
2010-04-28 07:46:30 +00:00
marco
0ba6c22b28 * fix for Mantis 16195, Delphi compatibility resource handle types were not 64-bit proof.
git-svn-id: trunk@15117 -
2010-04-08 09:03:50 +00:00
ivost
a6022f5df2 * removed IImplementorGetter interface and replaced it by the guid IObjectReference.
* GetInterface and GetInterfaceWeak is modified so that when querying for IObjectReference not an interface is returned but the object pointer

git-svn-id: trunk@15087 -
2010-03-28 12:35:50 +00:00
ivost
561997e8ef * added fpc_class_is_corbaintf and fpc_class_cast_corbaintf compiler helper functions
git-svn-id: trunk@15085 -
2010-03-28 11:31:50 +00:00
ivost
d9a6e63ef0 * prepeared compiler functions for IS and cast operators
* IS: fpc_intf_is, fpc_intf_is_class, fpc_class_is_intf
* AS: fpc_intf_cast, fpc_intf_cast_class, fpc_class_cast_intf

git-svn-id: trunk@15084 -
2010-03-28 11:19:56 +00:00
ivost
dc785f6f68 * implemented intf as object. When doing IInterface as TObject the compiler calls fpc_intf_as_class to query for the IImplementorGetter interface and then invokes GetObject to get the
objects reference.
* by default the TInterfacedObject is supporting now IImplementorGetter

git-svn-id: trunk@15080 -
2010-03-28 00:17:20 +00:00
ivost
6560ed87e9 * removed a debug writeln, unfortunately commited by r15077
git-svn-id: trunk@15079 -
2010-03-27 17:06:02 +00:00
ivost
3b5826059d * Added GetInterfaceWeak to TObject. It's equal to GetInterface but the returned interface is not referenced. This way it's possible to query interfaces of unreferenced objects.
* Changed fpc_class_as_intf so that it uses GetInterfaceWeak instead of GetInterface. This way it's prevented that the AS operator is increasing the refcounter of an unreferenced object from 0 to 1 temporarily and then by decreasing from 1 to 0 the object is freed.

git-svn-id: trunk@15077 -
2010-03-27 17:00:52 +00:00
ivost
3f2d66b188 * when calling GetInterfaceByStr on COM Objects, the refcounter was not increased
* this bugfix fixes bugreport #0012778

git-svn-id: trunk@15073 -
2010-03-27 11:12:46 +00:00
marco
8cce3d3f91 * closethread thread manager field/function. Mantis 13160
git-svn-id: trunk@15072 -
2010-03-26 23:31:52 +00:00
ivost
c47c125ec0 * changed 0 to S_OK as return value of QueryInterface (niceness)
* bugfix: initialized temp variables that are going to keep an interface by nil (segfaults)
* bugfix: AS operator has to call QueryInterface before GetInterface (related to revision r15066)

git-svn-id: trunk@15068 -
2010-03-26 00:48:28 +00:00
marco
c477df5046 * TCriticalSection.Tryenter support (Mantis 15928) + short test/demo
tested on FreeBSD (general Unix) and Windows. Note that Haiku seems 
    to have a native threadmgr rather than the Unix one. Will notify 
    maintainer (Olivier)

git-svn-id: trunk@15026 -
2010-03-21 11:34:05 +00:00
pierre
cee190b1f8 * shift128right last parameter should also by var type
git-svn-id: trunk@14993 -
2010-03-08 08:00:56 +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
paul
cf0a1b1af9 compiler: safecall exception handling:
- move safecall exception handling from codegenerator to generate_except_block method (which generates nodes)
  - call SafeCallException for safecall methods which raises an exception

git-svn-id: trunk@14940 -
2010-02-26 10:17:24 +00:00
paul
ea8bf4f2fd rtl: TObject.SafeCallException and TComponent.SafeCallException has HResult return value. Fix default return value to catastrophic failure error code.
git-svn-id: trunk@14936 -
2010-02-25 04:13:52 +00:00
paul
bfb7d91b74 rtl: fix typos
git-svn-id: trunk@14935 -
2010-02-25 04:09: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
Tomas Hajny
5c31042f6a * SharedSuffix moved to include files to reduce number of ifdefs
git-svn-id: trunk@14902 -
2010-02-13 15:44:12 +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
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
florian
34f976afea * enabled internal sar support for sparc and mips as well
git-svn-id: trunk@14867 -
2010-02-04 22:04:19 +00:00
pierre
e716c54523 * fix double to clongdouble conversions for 128 bits C long double
git-svn-id: trunk@14849 -
2010-02-02 23:36:46 +00:00
pierre
a989b6c1e6 * avoid problems for windows if case of drive letter is different
git-svn-id: trunk@14840 -
2010-02-01 15:47:22 +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
pierre
23e171d396 * Fix alignment problem for sparc arch.
git-svn-id: trunk@14833 -
2010-01-30 22:19:14 +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
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
Jonas Maebe
356845ba1e * set function results for unimplemented generic thread manager routines
(to remove warnings)
  * don't give a thread error for basicevent and threadevent routines if
    isMultiThreaded is false, except for the waiting routines (the new
    TMultiReadExclusiveWriteSynchronizer creates/sets such events in the
    constructor, which caused thread manager errors in case cthreads was
    not used under unix)
  * don't perform any actual locking in TMultiReadExclusiveWriteSynchronizer
    routines if isMultiThreaded is false (in order to avoid the errors
    described above)
  + added generic RTLeventResetEvent stub

git-svn-id: trunk@14592 -
2010-01-10 11:04:05 +00:00
florian
775f532c95 * disabled TTime and TDate for now till a solution for the conflicts on unix is found
git-svn-id: trunk@14581 -
2010-01-08 21:22:25 +00:00
florian
06e604cffd + patch by Sven Barth to add TDate and TTime to the system unit, resolves #15474
git-svn-id: trunk@14573 -
2010-01-08 09:56: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
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
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
paul
c025471433 rtl: fix SetPropValue/GetPropValue:
- raise a ERangeError in SetPropValue when passed value is out of property range
  - handle QWord values both in SetPropValue and GetPropValue

git-svn-id: trunk@14500 -
2009-12-30 00:41:44 +00:00
florian
4faf2e9f0f * cleaned up redundant declarations of types like PP(P)Char/Byte and moved them to the system unit
git-svn-id: trunk@14481 -
2009-12-26 20:47:24 +00:00
Jonas Maebe
2d2465aac4 * disabled the use of samevalue() when comparing float variants, because
a) it's Delphi-incompatible
     b) when a tdatetime property is obtained via GetPropValue(), then
        it will be a varfloat rather than a vardate, and there full
        precision certainly is required (mantis #15296)
  - since DoVarCmpFloat() is now identical to DoVarCmpDate(), removed
    DoVarCmpFloat

git-svn-id: trunk@14472 -
2009-12-23 21:30:58 +00:00
florian
dab642986e * patch by Sergei Gorelkin, fixes several issues with implements, resolves #15209
git-svn-id: trunk@14466 -
2009-12-23 16:23:19 +00:00
florian
d3cd6132f2 * handle rounding of currency values correctly, resolves #12207
git-svn-id: trunk@14438 -
2009-12-13 16:19:56 +00:00
florian
7a82669942 * forgotten part of r14432
git-svn-id: trunk@14433 -
2009-12-13 11:18:49 +00:00
micha
347d71db10 * rtl/heap: optimization, while looking for a big enough block, also use blocks that are exactly large enough
git-svn-id: trunk@14420 -
2009-12-12 09:37:36 +00:00
micha
a6e6e9d453 * rtl/heap: fix SysReallocMem corruption in multi-thread use (thanks to Burkhard Carstens, #15323)
git-svn-id: trunk@14419 -
2009-12-12 09:28:41 +00:00