Commit Graph

87 Commits

Author SHA1 Message Date
nickysn
54c4c8155b + also added PCodePointer and PPCodePointer
git-svn-id: trunk@24841 -
2013-06-09 17:30:03 +00:00
nickysn
9b59809ac3 * TMethod.Code changed to CodePointer
git-svn-id: trunk@24840 -
2013-06-09 17:24:38 +00:00
paul
e4a6221bf3 compiler, rtl: add vtUnicodeString (issue #0018560)
git-svn-id: trunk@16833 -
2011-01-29 09:18:53 +00:00
tom_at_work
8a2696eb24 * limit the number of string message methods per class to 2^31 independent of architecture width: this avoids lots of compiler changes when allowing 2^63 (for 64 bit targets)
* fix string message method handling data structures to reflect this change, and also use the correct types for accessing them (longint vs. dword)
* output proper alignment code for string message method data structures to avoid issues on big-endian 64 bit architectures or architectures requiring proper alignment
* same for integer message methods; also, like string message method data structures, do not use packed records for them when accessing
* extend the test case (tw14145) do do multiple message dispatches, both integer and string ones, to complete successfully

git-svn-id: trunk@16254 -
2010-10-29 13:26:50 +00:00
joost
07bf44517c * Merged XPCom branch into trunk, added support for constref and changed
the IInterface implementation to be XPCom-compatible
--- Merging r15997 through r16179 into '.':
U    rtl/inc/variants.pp
U    rtl/inc/objpash.inc
U    rtl/inc/objpas.inc
U    rtl/objpas/classes/persist.inc
U    rtl/objpas/classes/compon.inc
U    rtl/objpas/classes/classesh.inc
A    tests/test/tconstref1.pp
A    tests/test/tconstref2.pp
A    tests/test/tconstref3.pp
U    tests/test/tinterface4.pp
A    tests/test/tconstref4.pp
U    tests/webtbs/tw10897.pp
U    tests/webtbs/tw4086.pp
U    tests/webtbs/tw15363.pp
U    tests/webtbs/tw2177.pp
U    tests/webtbs/tw16592.pp
U    tests/tbs/tb0546.pp
U    compiler/sparc/cpupara.pas
U    compiler/i386/cpupara.pas
U    compiler/pdecsub.pas
U    compiler/symdef.pas
U    compiler/powerpc/cpupara.pas
U    compiler/avr/cpupara.pas
U    compiler/browcol.pas
U    compiler/defcmp.pas
U    compiler/powerpc64/cpupara.pas
U    compiler/ncgrtti.pas
U    compiler/x86_64/cpupara.pas
U    compiler/opttail.pas
U    compiler/htypechk.pas
U    compiler/tokens.pas
U    compiler/objcutil.pas
U    compiler/ncal.pas
U    compiler/symtable.pas
U    compiler/symsym.pas
U    compiler/m68k/cpupara.pas
U    compiler/regvars.pas
U    compiler/arm/cpupara.pas
U    compiler/symconst.pas
U    compiler/mips/cpupara.pas
U    compiler/paramgr.pas
U    compiler/psub.pas
U    compiler/pdecvar.pas
U    compiler/dbgstabs.pas
U    compiler/options.pas
U    packages/fcl-fpcunit/src/testutils.pp

git-svn-id: trunk@16180 -
2010-10-17 20:58:22 +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
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
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
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
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
paul
aa5a5e79ce merge revisions: 13909,13923,13924,13934,13935,13942,13943,13944,13946,13948,13950,13951,13952,13983,13994:
rtl: add enumerators to the basic classes
tests: add enumerators test which compiles and work both by fpc and dcc
compiler: 
  + start for-in loop implementation: implement for-in loop for types (enumerations and ranges), strings, arrays and sets. todo: perform type checking, optimize array and string loops - use temp for expression, implement for-in loop for classes
test:
  + add a simple test for the 'for-in' loop
compiler: fix string for-in loop. now it uses a temp variable to store string expression result
complier: fix for-in array loop. use a temp variable for the loop expression only if loop is not an open array loop
complier: continue enumerator implementation:
  + add operator enumerator which give an ability to add enumerator for an existent type (for example to override builtin string enumerator)
  + add class enumerator support via delphi compatible GetEnumerator method + enumerator class/object template (function MoveNext: Boolean; property Current)
  + tests
compiler: fix for-in loop for arrays. delphi does not copy arrays to a temp variable and it is possible to change array during loop. + test
compiler: add reference for the enumerator operator when it is used + another test for operator enumerator for a class
compiler: add reference for the enumerator operator when it is used + another test for operator enumerator for a class
compiler: enumerator directive support:
  + allow to mark methods and properties by 'enumerator MoveNext' and 'enumerator Current' modifiers. Parser checks return types and duplicates.
  + prefer *marked* by enumerator directive methods and properties than GetEnumerator and Current builtin symbols
  + increase ppu version
  + test
rtl: add IEnumerator and IEnumerable interfaces declarations
tests: for-in loop tests:
  + add small comment at the top of test program
compiler: allow 'enumerator MoveNext' for the interface function declaration + test
compiler: move all for-in loop helpers to the nflw unit
compiler: don't allow the compiler to choose the non-valid enumerator operator for the for-in loop

git-svn-id: trunk@14008 -
2009-11-02 03:24:48 +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
84c84b4964 + make TObject.Dispatch and DispatchStr virtual, patch by Paul Ishenin, resolves #14920
git-svn-id: trunk@13962 -
2009-10-28 19:22:29 +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
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
tom_at_work
94ead30261 * fix padding on 64 bit big endian CPUs in TInterfaceEntry: wrong offset of a member caused memory corruption and then access violations during object creation. Fixes timplements* tests.
git-svn-id: trunk@11031 -
2008-05-21 21:29:58 +00:00
micha
83b7f81f81 + add no-fpu support to compiler/rtl for powerpc-linux (-Cfnone)
git-svn-id: trunk@10422 -
2008-03-02 12:59:02 +00:00
florian
c46b44b797 resolves #10509
* fixed SetInterfaceProp
+ PInterface
* extended trtti1

git-svn-id: trunk@10334 -
2008-02-15 20:54:10 +00:00
marco
5e95516323 * ancestor of TContainedObject fixed
git-svn-id: trunk@9651 -
2008-01-06 15:16:56 +00:00
marco
eb2a80d272 * TContainedObject 10496. First implementation copied from TInterfacedObject
git-svn-id: trunk@9569 -
2007-12-29 15:30:57 +00:00
Jonas Maebe
5cffd5d22b * marked TObject.InitInstance as inline
git-svn-id: trunk@8400 -
2007-09-08 09:19:13 +00:00
daniel
6491a6e914 * Make vtype signed again to prevent unnecessary 64 bit promotions.
Should be okay as it isn't a pointer.

git-svn-id: trunk@7893 -
2007-07-01 10:25:10 +00:00
daniel
ea47fcfc97 * ptrint -> ptruint
git-svn-id: trunk@7892 -
2007-07-01 10:14:19 +00:00
Jonas Maebe
b52c4f821a * make sure the size of tinterfaceentry is correct, regardless of
the maxrecordalign setting of the target

git-svn-id: trunk@6591 -
2007-02-21 19:26:09 +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
florian
49796e5151 + TAggregatedObject, fixes #8149
git-svn-id: trunk@6089 -
2007-01-20 20:28:29 +00:00
florian
21955282d0 + infrastructure for DispInterface call dispatching
git-svn-id: trunk@5793 -
2007-01-02 23:06:17 +00:00
ivost
0a63d12099 * added RFC4122 fields to TGuid (those are used by uuid.pas, an implementation of RFC4122 functions)
git-svn-id: trunk@5609 -
2006-12-16 11:32:35 +00:00
chrivers
fca5f6fc5e Added EntryOffset field for _IMPLEMENTS
git-svn-id: trunk@4361 -
2006-08-06 01:02:32 +00:00
chrivers
3e1c0cc8a5 Added type TInterfaceEntryType, EntryType field in TInterfaceEntry. Used in "implements"-implementation
git-svn-id: trunk@4354 -
2006-08-05 20:08:19 +00:00
florian
5a29c69982 * fixed previously broken IDispatch declaration
git-svn-id: trunk@3385 -
2006-04-30 15:38:10 +00:00
florian
c4aed2c424 * result type of IDipatch methods is HResult
git-svn-id: trunk@3384 -
2006-04-30 14:49:34 +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
peter
d7692a588e * fix alignments in vmt, remove all explicit 16 and 32 bit values
git-svn-id: trunk@2521 -
2006-02-11 20:46:28 +00:00
peter
767291ca5f * refactor reading and setting of parent classes
git-svn-id: trunk@1992 -
2005-12-19 12:24:45 +00:00
tom_at_work
b2e1cf2610 * powerpc64 port now (manually) cycles, most test programs in tests/test are fine too
* fixed bug in ncal.pas which in some circumstances treated the hidden length parameter for open arrays as 32 bit integer

git-svn-id: trunk@1303 -
2005-10-05 21:55:25 +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
a775d3d487 + Removed HASCURRENCY VALUEGETMEM VALUEFREEMEM defines
git-svn-id: trunk@293 -
2005-06-09 17:33:22 +00:00
michael
21425e303c + Removed HASVARIANT define
git-svn-id: trunk@244 -
2005-06-07 20:48:31 +00:00
michael
23ad0ae1ec + Removed HASINTF and VER1_0 defines
git-svn-id: trunk@239 -
2005-06-07 20:30:03 +00:00
peter
4ace790492 * remove $Log
git-svn-id: trunk@231 -
2005-06-07 09:47:55 +00:00
fpc
790a4fe2d3 * log and id tags removed
git-svn-id: trunk@42 -
2005-05-21 09:42:41 +00:00
fpc
50778076c3 initial import
git-svn-id: trunk@1 -
2005-05-16 18:37:41 +00:00
peter
e417e34496 * truncate log 2005-02-14 17:13:06 +00:00
florian
da85b90f65 + tmethod 2005-02-01 19:32:14 +00:00