Commit Graph

124 Commits

Author SHA1 Message Date
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
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
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
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
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
marco
4104d9f481 * More pluggability of the RTL. Mantis 15124
git-svn-id: trunk@14212 -
2009-11-18 21:16:12 +00:00
paul
dfef902c53 rtl: introduce new TObject methods: UnitName, GetHashCode, Equals, ToString added for compatibility with delphi 2009.
+ changes in compiler, utils, packages to resolve identifier conflicts with the new TObject methods (like changing of UnitName arguments to AUnitName, adding Classes. before the toString, etc). (issue #0014931)

git-svn-id: trunk@14005 -
2009-11-01 16:22:47 +00:00
florian
e8dff46f8e * several small bugs in the handling of implements fixed, resolves #14418
git-svn-id: trunk@13615 -
2009-08-30 08:01:10 +00:00
ivost
0438667eed * fixed bug #5800
* const s: string = icorbainterface; is possible now
* as operator is working now with corba interfaces
* supports helper function is working now with corba interfaces

git-svn-id: trunk@12729 -
2009-02-09 00:35:09 +00:00
ivost
0f519439b5 * reverted r12690 and r12691
* but extended ptconst so that a com interface maybe assigned to a TGuid const

git-svn-id: trunk@12692 -
2009-02-06 02:56:13 +00:00
ivost
7f2c77a407 * temporarly disabled GetInterface(iidstr: .... to keep fpc compiling
git-svn-id: trunk@12691 -
2009-02-06 01:37:52 +00:00
yury
15d0521f39 * Inlining is not supported for formal parameters. Disable inlining to prevent warning.
git-svn-id: trunk@11579 -
2008-08-14 14:56:28 +00:00
florian
1fa70f7a0a * proper support for tobject.getinterface with raw/corba interfaces, resolves #6798 and #6036
git-svn-id: trunk@11497 -
2008-08-01 15:27:58 +00:00
florian
d672700a59 * some avr fixes
+ cpu16 type defines

git-svn-id: trunk@11380 -
2008-07-13 18:16:24 +00:00
florian
d79851dc1b * patch by Sergei Gorelkin to improve class creation speed and make objpas.inc more readable
git-svn-id: trunk@11036 -
2008-05-22 11:49:40 +00:00
marco
eb2a80d272 * TContainedObject 10496. First implementation copied from TInterfacedObject
git-svn-id: trunk@9569 -
2007-12-29 15:30:57 +00:00
peter
6ed3d91989 * CompareText for shortstrings added
* optimize CompareText
  * use CompareText for case-insenstive compares in the RTL
  patches from Sergei Gorelkin

git-svn-id: trunk@9384 -
2007-12-02 18:36:20 +00:00
peter
e8322a83e4 * optimized generic implementations to use pointers instead of
array accesses. This also allows better register variable
    optimizations

git-svn-id: trunk@8742 -
2007-10-07 18:36:18 +00:00
Jonas Maebe
5cffd5d22b * marked TObject.InitInstance as inline
git-svn-id: trunk@8400 -
2007-09-08 09:19:13 +00:00
daniel
ea47fcfc97 * ptrint -> ptruint
git-svn-id: trunk@7892 -
2007-07-01 10:14:19 +00:00
ivost
1a7f06aa7d * added the new CLONE_* constants from syscall clone
git-svn-id: trunk@6686 -
2007-02-28 22:26:42 +00:00
ivost
c0e9be49b8 * fixed bug related to IMPLEMENTS keyword. The interface type was stored inside the interface defintion what was wrong! now it's set per TImplementedInterface$
* merged IOffset and EntryOffset of TInterfaceEntry. The meaning of IOffset depends now on IType
    * to optimize: IOffset and FieldOffset of TImplementedInterface can be merged also! fpc still generate an interfacetable entry even for interfaces that aren't implemented in the current class (redirected by IMPLEMENTS keyword)

git-svn-id: trunk@6206 -
2007-01-26 20:58:46 +00:00
Jonas Maebe
3eb4823209 * made return value of TInterfacedObject._AddRef and
TInterfacedObject._Release thread safe

git-svn-id: trunk@6130 -
2007-01-22 15:39:55 +00:00
florian
49796e5151 + TAggregatedObject, fixes #8149
git-svn-id: trunk@6089 -
2007-01-20 20:28:29 +00:00
florian
8e8c0832c6 * fixed previous commit
git-svn-id: trunk@5843 -
2007-01-07 18:20:58 +00:00
florian
4c7c5e5adf * hopefully fpc_intf_assign_by_iid improved
git-svn-id: trunk@5842 -
2007-01-07 17:59:46 +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
21955282d0 + infrastructure for DispInterface call dispatching
git-svn-id: trunk@5793 -
2007-01-02 23:06:17 +00:00
florian
fd2032dab2 + start of embedded rtl
+ feature support in the compiler

git-svn-id: trunk@5628 -
2006-12-17 18:40:36 +00:00
ivost
7e2f18ea7e * removed debug output (sorry, forgot the remove it, my bad)
git-svn-id: trunk@5560 -
2006-12-08 18:14:29 +00:00
ivost
73713d14e3 * improved getinterfaceentry and getinterfaceentrybystr
* fixed InitInterfacePointers (just etStandard interface pointers need to be initialized!)
    * to fix: EntryOffset and IOffset should be merged (compiler thing)
    * to fix: Interface pointer allocation in TClass for not etStandard interfaces is not necessary! (also compiler thing)

git-svn-id: trunk@5559 -
2006-12-08 17:59:31 +00:00
chrivers
4bb1d117d6 Use symbolic const E_NOINTERFACE instead of raw value $80004002
git-svn-id: trunk@4934 -
2006-10-15 19:51:40 +00:00
florian
557afed6f3 * missing space added
git-svn-id: trunk@4923 -
2006-10-15 14:06:53 +00:00
micha
d704af7216 fix compilation for {$T+} linux/win
git-svn-id: trunk@4794 -
2006-10-04 20:43:55 +00:00
peter
367958e154 * fpc_intf_assign_by_iid does not call Addref anymore, the QueryInterface call will increase the refcount
git-svn-id: trunk@4744 -
2006-09-28 06:32:20 +00:00
chrivers
dceda55abf Implemented _IMPLEMENTS. Changed GetInterfaceByStr() and GetInterface() accordingly. Also introduced new compilerproc: fpc_intf_assign_by_iid to allow := with _IMPLEMENTS-support
git-svn-id: trunk@4362 -
2006-08-06 01:09:20 +00:00
florian
849878b472 * fixed memory leak with the as operator, fixes #7174
git-svn-id: trunk@4355 -
2006-08-05 21:53:38 +00:00
tom_at_work
f86ee115d8 * more fixes for 64 bit compilation after Peter's changes
* updated and added a warning notice about changing structures in this file to objpash.inc

git-svn-id: trunk@2547 -
2006-02-12 20:33:33 +00:00
florian
e9b718a0a2 * cleanup
git-svn-id: trunk@2282 -
2006-01-14 12:55:26 +00:00
Jonas Maebe
640ddd2e26 - removed unused local conflicting type definition
git-svn-id: trunk@2056 -
2005-12-26 16:01:13 +00:00
tom_at_work
0b34b01a6d * fixed class messages for PowerPC64, due to a wrong typecast
git-svn-id: trunk@1363 -
2005-10-12 22:28:51 +00:00
florian
0b3094fdde * from Thomas Schatzl: changed result type of InstanceSize to PtrInt
* simplified some code
* small methods of tobject are now inlined

git-svn-id: trunk@1170 -
2005-09-24 08:35:43 +00:00
michael
5cafc069b5 + Removed NOSAVEREGISTERS define
git-svn-id: trunk@307 -
2005-06-09 17:58:20 +00:00