Commit Graph

182 Commits

Author SHA1 Message Date
Michaël Van Canneyt
8b40033964 * Change argument name 2024-02-27 09:27:41 +01:00
Rika Ichinose
7589bb39b8 Set ‘TMonitorData’s without locking. 2024-02-27 07:54:31 +00:00
Michaël Van Canneyt
e1b2feac33 * Set monitor structures in place 2024-02-24 18:11:23 +01:00
Michaël Van Canneyt
30a20cc209 * Add operators to TMethod, for Delphi compatibility 2024-02-20 15:36:18 +01:00
Sven/Sarah Barth
4aeb1ee223 * fix implementation comment 2024-01-22 22:27:33 +01:00
Sven/Sarah Barth
dd4f7e9148 * fix #40592: make the Delphi-compatible attributes usable, but in a way that makes it clear to the user that they won't work
+ added test
2024-01-15 22:29:47 +01:00
Sven/Sarah Barth
170c05592b * ensure that the legacy method table has the correct alignment on platforms that require it (e.g. SPARC64) 2024-01-07 18:09:51 +01:00
Michaël Van Canneyt
c39e51485c * Avoid range error in comparisons 2024-01-02 07:09:20 +01:00
Sven/Sarah Barth
30bf8047aa * ensure that the field and method tables are always accessed with the default alignment 2024-01-02 07:09:20 +01:00
Michaël Van Canneyt
7e4aca384f * Some delphi compatibility issues solved (PtrToNil and TGUID operator) 2023-11-29 14:34:27 +01:00
Michaël Van Canneyt
6045b3a6bd * Add Delphi-compatible DisposeOf and friends. 2023-10-30 09:17:01 +01:00
Michaël Van Canneyt
defc7e99d1 * Fix compilation for avr-embedded (no unicode strings) 2023-07-24 14:54:30 +02:00
Michaël Van Canneyt
757d2b4f91 * Move TMarshal to system unit 2023-07-22 15:24:27 +02:00
Rika Ichinose
7f4420495b TMarshal & TMarshaller, strange things from Delphi. 2023-07-22 15:24:27 +02:00
Michael VAN CANNEYT
b69c78ccce * String -> ShortString/RTLString 2023-07-14 17:26:11 +02:00
Michaël Van Canneyt
517d1b017c * Interface thunk class must query owner object interface list 2023-07-11 17:47:03 +02:00
Michaël Van Canneyt
70282826ad * Parent class for hidden TVirtualInterface thunking class 2023-07-11 08:36:57 +00:00
Michaël Van Canneyt
96921aaba3 * Fix NilValue 2023-07-09 16:48:07 +02:00
Michaël Van Canneyt
b121045d4a * TPtrWrapper for Delphi compatibility 2023-07-09 15:05:53 +02:00
Michaël Van Canneyt
b8738944ed * Add TNoRefCountObject (delphi compatibility) 2023-06-05 11:43:07 +02:00
florian
c0979bbc0c * TObject.InitInstance got very big so inlining has no advantage anymore, resolves #39494 2021-12-25 19:09:22 +01:00
Nikolay Nikolov
5124ab2521 * cloned the WebAssembly native exceptions code generation and rtl support into
the branchful exceptions (which will be modified later, but we're using this
  as their starting point, because we can get a snapshot built, without compiler
  internal errors)
2021-10-05 00:37:20 +03:00
Nikolay Nikolov
91f0f1a86c * don't include except.inc if wasm32 native exception is turned on, instead
replace it with except_native.inc
2021-09-28 03:46:30 +03:00
michael
e6a593c5fa * Patch from Zeljko Avramovic to extend ordinal/float helpers
git-svn-id: trunk@49622 -
2021-07-21 11:36:05 +00:00
michael
82346563c1 * Add StoredAttribute class, bug ID #37602
git-svn-id: trunk@46506 -
2020-08-20 12:06:14 +00:00
pierre
3aa253c11d Allow system unit to be compiled without RTTI feature
git-svn-id: trunk@45351 -
2020-05-13 09:10:23 +00:00
ondrej
9a9cd15ec4 TInterfacedObject.Destroy: fix case for correct auto-completion
git-svn-id: trunk@43418 -
2019-11-08 21:29:26 +00:00
svenbarth
10af6fe2fb * fix for Mantis #35965: correct alignment also for the class info used to retrieve the unit name
+ added test

git-svn-id: trunk@42697 -
2019-08-15 13:29:19 +00:00
svenbarth
e97a2cb03e * tests with Delphi showed that an attribute class must explicitely declare a parameterless constructor if it should be used, cause TCustomAttribute.Create is private
Note: this also means that TCustomAttribute itself can not be used as an attribute
* adjusted existing tests
+ added test

git-svn-id: trunk@42471 -
2019-07-20 20:03:38 +00:00
svenbarth
3ad24c9db8 * as attributes can be part of any type they are best suited in a common part of TTypeData
git-svn-id: trunk@42375 -
2019-07-12 22:06:09 +00:00
svenbarth
e296b26e9e - remove unit info and related code again as that will be handled similar, but differently with dynamic packages
git-svn-id: trunk@42369 -
2019-07-12 22:05:47 +00:00
svenbarth
b2932393df Reintegration of Custom Attributes branch by Joost van der Sluis with patches reworked by Svetozar Belic [patch 1/3]
Implemented attributes for class types and properties (based on work by Joost van der Sluis). Added TCustomAttribute - a base class for attributes. Added TUnitInfo record to RTTI. It contains the unit name and unit options (for now only a flag which specifies if the unit contains attributes). Added several tests for attributes.

git-svn-id: trunk@42356 -
2019-07-12 22:04:48 +00:00
svenbarth
a076677336 * instead of a flags field generate a table with all Initialize operators of all fields (nested or not, parent class or not) for class types; objects and records don't use this (yet)
git-svn-id: trunk@39690 -
2018-08-29 19:21:35 +00:00
svenbarth
8536abce8a * as the management operator feature is not platform specific using a specific define for it aside from a
version check is unnecessary, thus remove the FPC_HAS_MANAGEMENT_OPERATOR define and instead check for VER3_0

git-svn-id: trunk@39257 -
2018-06-20 19:00:24 +00:00
svenbarth
4d0ab82ef7 * optimize class initialization by calling RTTIRecord() only when required for a non-trivial initialization
git-svn-id: trunk@39256 -
2018-06-20 19:00:21 +00:00
michael
3787d52dee * Fix bug ID #32353, reset ref count fields in destructor
git-svn-id: trunk@37112 -
2017-09-02 15:07:23 +00:00
michael
9878dc280b * Fix bug ID #32168
git-svn-id: trunk@36757 -
2017-07-21 16:08:01 +00:00
maciej-izak
5a7d4eb25f * Call management initialize operator for records inside classes (record with management operators as field) (rtl/inc/objpas.inc, TObject.InitInstance)
git-svn-id: trunk@35449 -
2017-02-19 12:17:20 +00:00
florian
0b82f71e8d * take care of the fact that there are 32 bit abis (e.g. ARMHF) which align qword on 8 byte boundaries, resolves issue #31132
git-svn-id: trunk@35218 -
2016-12-30 15:32:56 +00:00
florian
091b31fc76 * fix avr compilation after r34975 by more tests against feature defines, resolves #31036
git-svn-id: trunk@35015 -
2016-11-29 20:37:58 +00:00
florian
bcb7061314 * made TObject usable, even if no ansistring support is available
git-svn-id: trunk@34974 -
2016-11-26 19:33:31 +00:00
michael
784da563ef * Patch from Silvio Clecio to implement QualifiedClassName (bug ID 30985)
git-svn-id: trunk@34966 -
2016-11-26 13:53:27 +00:00
nickysn
7d15b688e8 * TInterfaceEntry changed to a variant record, that overlays a CodePointer on
top of the IOffset: SizeUInt field, because it is sometimes used as a
  CodePointer (for etStaticMethodResult and etStaticMethodClass) and sometimes
  as a SizeInt and these two types can be of different size in certain i8086
  memory models

git-svn-id: trunk@34645 -
2016-10-07 20:18:02 +00:00
nickysn
5e7ba4a893 * the type of FieldOffset in the TFieldInfo rtti structure changed to SizeUInt,
because it represents an offset _within_ a structure

git-svn-id: trunk@34627 -
2016-10-04 21:57:29 +00:00
svenbarth
fb6546972b * IID and IIDStr references of the VMT's interface table need to be indirect
git-svn-id: trunk@34338 -
2016-08-19 13:06:26 +00:00
svenbarth
685f820622 * switch class'/object's parent reference in the VMT to an indirect reference
(this also requires the adjustment of a test)

git-svn-id: trunk@34172 -
2016-07-22 12:53:51 +00:00
svenbarth
7a5bac9cd3 Rework the interface table of VMTs to get rid of FPC_EMPTYINTF.
Previously we had the following approach:
- classes that implemented interfaces had an interface table
- classes that didn't implement an interface, but inherited from a class that did had a Nil entry
- classes that didn't implement any interface (including their parents) had a reference to FPC_EMPTYINTF (this was to optimize lookups)

Now the approach is as follows:
- classes that implement an interface or have a parent that implements an interface have an interface table; if the class itself doesn't implement an interface then the count will be 0
- classes that don't implement an interface at all (neither them nor their parents) have a Nil interface table

This way FPC_EMPTYINTF can be removed without sacrificing at least the optimization for classes without any interface. For classes that have parents with interfaces there will be a small speed penalty due to an additional lookup for the counter.

git-svn-id: trunk@34087 -
2016-07-08 15:34:55 +00:00
nickysn
c1b0fb81f1 * updated all the RTL helper functions related to exceptions and stack traces to use codepointer instead of pointer
git-svn-id: trunk@25513 -
2013-09-17 21:25:26 +00:00
nickysn
ef2423128f * use CodePointer instead of Pointer in TObject.MethodName() and .MethodAddress() for i8086 medium memory model compatibility
git-svn-id: trunk@25152 -
2013-07-20 22:08:38 +00:00
nickysn
54c4c8155b + also added PCodePointer and PPCodePointer
git-svn-id: trunk@24841 -
2013-06-09 17:30:03 +00:00