Commit Graph

56478 Commits

Author SHA1 Message Date
svenbarth
176a63b67b * fix for Mantis #35862: free the list of functions added with AddTerminateProc to avoid memory leaks
+ added test

git-svn-id: trunk@42457 -
2019-07-19 15:55:21 +00:00
svenbarth
48d0ab1af9 * fix for Mantis #35744: applied patch by Anton Kavalenka to correctly implement FileGetSymLinkTarget
git-svn-id: trunk@42456 -
2019-07-19 15:55:15 +00:00
svenbarth
48b8110e38 * disable UCS4String if dynamic arrays are disabled
git-svn-id: trunk@42455 -
2019-07-19 11:52:51 +00:00
Mattias Gaertner
41fa84a355 pastojs: filer: TPasProcedure.NameParts
git-svn-id: trunk@42454 -
2019-07-18 09:57:29 +00:00
Mattias Gaertner
c6aaa3f1e6 pastojs: clean up
git-svn-id: trunk@42453 -
2019-07-18 09:57:06 +00:00
marco
6ca93e294f * SecsPerHour, delphi compatibility.
git-svn-id: trunk@42452 -
2019-07-17 21:15:17 +00:00
Mattias Gaertner
5d4ae23df8 fcl-passrc: store generic procedure templates
git-svn-id: trunk@42451 -
2019-07-17 16:35:30 +00:00
michael
3b1c2061f5 * Some small refactoring
git-svn-id: trunk@42450 -
2019-07-16 09:05:57 +00:00
florian
f04afdd5ea * compilation fixed
git-svn-id: trunk@42449 -
2019-07-14 21:40:29 +00:00
florian
3206ac3508 * properly align rtti for orddefs
git-svn-id: trunk@42448 -
2019-07-14 21:29:30 +00:00
Jonas Maebe
d8903ce6b3 - removed maxcrecordalign parameter/field from recordsymtables, as this value
cannot be modified in the settings (so we can directly use the one from
    current_settings)

git-svn-id: trunk@42447 -
2019-07-14 19:24:32 +00:00
florian
c932dfaf70 * first bunch of fixes for rtti for arm after attribute commits, fixes mostly alignment issues
git-svn-id: trunk@42446 -
2019-07-14 17:45:55 +00:00
Mattias Gaertner
3cd000b939 pastojs: optimized ord(const) to const
git-svn-id: trunk@42445 -
2019-07-14 11:22:40 +00:00
svenbarth
c0da39a35d * Tenum_typedata needs to include the Common record as well
git-svn-id: trunk@42438 -
2019-07-13 14:38:24 +00:00
svenbarth
55dfb59631 * TRttiDataCommon is required outside of the RTTI and DynArray include files as well
git-svn-id: trunk@42437 -
2019-07-13 14:38:20 +00:00
svenbarth
04a50733ad * get rid of the scanner message for attributes for real this time (sometimes I *really* hate Git -.-)
git-svn-id: trunk@42413 -
2019-07-13 09:37:44 +00:00
Károly Balogh
4d6b8a6c45 fixed the messy state of messages after recent custom attributes merge. fixed a typo, fixed double definition of message 3350, restored a message that was removed but still used, so the build passes at least.
git-svn-id: trunk@42412 -
2019-07-13 07:34:07 +00:00
svenbarth
6db674cd02 * regenerate msg*.inc files
git-svn-id: trunk@42411 -
2019-07-12 22:08:22 +00:00
svenbarth
b7a8dd9479 * adjust error message when attributes are unbound
git-svn-id: trunk@42410 -
2019-07-12 22:08:17 +00:00
svenbarth
87458a065c * allow use of multiple, comma separated attributes as Delphi allows that as well
+ added test

git-svn-id: trunk@42409 -
2019-07-12 22:08:14 +00:00
svenbarth
6d0c470a40 * check for unbound attributes inside classes (currently they are only allowed for published properties)
Note: no tests yet as sooner or later most will be dropped once extended RTTI is added

git-svn-id: trunk@42408 -
2019-07-12 22:08:10 +00:00
svenbarth
98b1b04951 * free unbound attributes
git-svn-id: trunk@42407 -
2019-07-12 22:08:07 +00:00
svenbarth
90bec938f6 * don't free the constructor call in trtti_attribute_list as that is already freed in the destructor of trtti_attribute
git-svn-id: trunk@42406 -
2019-07-12 22:08:04 +00:00
svenbarth
404b465c33 * allow custom attributes for all type declarations that are not a simple alias
+ added tests

git-svn-id: trunk@42405 -
2019-07-12 22:08:00 +00:00
svenbarth
80ebb98431 * correct identation (no code changes)
git-svn-id: trunk@42404 -
2019-07-12 22:07:57 +00:00
svenbarth
9dbd155131 * use two empty lines between method definitions (no code changes)
git-svn-id: trunk@42403 -
2019-07-12 22:07:54 +00:00
svenbarth
a72553eea2 * disable [...] syntax for procedure directives if modeswitch "prefixed attributes" is enabled; they conflict otherwise and it's not easily resolveable
+ added test

git-svn-id: trunk@42402 -
2019-07-12 22:07:50 +00:00
svenbarth
b945e66e28 * store attribute information in PPU; this is less important for the compiler, but more for e.g. Lazarus when dealing with binary only units
* increase ppu version
+ added test
* adjust ppudump to handle attributes as well
ToDo: output parameter nodes as well

git-svn-id: trunk@42401 -
2019-07-12 22:07:46 +00:00
svenbarth
8ce4f9606d * explicitely store the procdef of the picked constructor of the attribute
git-svn-id: trunk@42400 -
2019-07-12 22:07:41 +00:00
svenbarth
dfb9fffcf9 + add functions for syms and defs and write sub entries of the sym/def to PPU and loads them again
git-svn-id: trunk@42399 -
2019-07-12 22:07:38 +00:00
svenbarth
352ff5f82a - symbolname field is no longer required
git-svn-id: trunk@42398 -
2019-07-12 22:07:34 +00:00
svenbarth
3a02393584 - remove functionality to get the code block when parsing again (let's open this pandora's box only when really needed...)
git-svn-id: trunk@42397 -
2019-07-12 22:07:31 +00:00
svenbarth
a64a8f8deb - remove code to create an attribute using a synthetic function
git-svn-id: trunk@42396 -
2019-07-12 22:07:28 +00:00
svenbarth
402728239f * trtti_attribute_list.bind already checks whether the dangling attribute list is assigned or not
git-svn-id: trunk@42395 -
2019-07-12 22:07:24 +00:00
svenbarth
ced3885dbb * generate construction function for the attributes used in a unit using a more straight forward approach
ToDo: "collect" attributes of same type and same argument list and generate constructor only once for them

git-svn-id: trunk@42394 -
2019-07-12 22:07:20 +00:00
svenbarth
0b63e89ba2 * make the reference to the TCustomAttribute type global
git-svn-id: trunk@42393 -
2019-07-12 22:07:15 +00:00
svenbarth
d9d2515ada * move binding of a dangling attribute list to a sym's/def's attribute list to a class procedure of trtti_attribute_list
git-svn-id: trunk@42392 -
2019-07-12 22:07:11 +00:00
svenbarth
5cea374255 * add a remark that's going to be important once extended RTTI is supported (Delphi programs crash if an attribute's constructor is used that does not have any extended RTTI)
git-svn-id: trunk@42391 -
2019-07-12 22:07:08 +00:00
svenbarth
71fa4d1fe2 * the RTTI of an attribute not only consists of the creation function, but also of the attribute's type, a pointer to the constructor and a data blob containing the constant parameters
+ added test

git-svn-id: trunk@42390 -
2019-07-12 22:07:05 +00:00
svenbarth
55d5bdc98d + add methods for the const nodes to directly emit their constant data to a constant builder
Note: reduce code duplication, especially for the tsetconstnode (with its descendant tcgsetconstnode)

git-svn-id: trunk@42389 -
2019-07-12 22:07:01 +00:00
svenbarth
f9cda608fa * take a copy of the constructor assignment node (and free it together with the attribute)
git-svn-id: trunk@42388 -
2019-07-12 22:06:57 +00:00
svenbarth
d31dd4ac7b * better check for a valid call node
git-svn-id: trunk@42387 -
2019-07-12 22:06:52 +00:00
svenbarth
8cd1f1973b - remove unneeded local variable
git-svn-id: trunk@42386 -
2019-07-12 22:06:48 +00:00
svenbarth
affa9f9d9c * to be on the safe side: don't include AttributeTable fields when cycling
git-svn-id: trunk@42385 -
2019-07-12 22:06:44 +00:00
svenbarth
99914b4279 * instead of collecting the raw parameters we need to collect the parameters as passed to the call as there might be type conversions involved
git-svn-id: trunk@42384 -
2019-07-12 22:06:41 +00:00
svenbarth
b5e6c0b98d * ensure that any potentially created constructor call is freed if the attribute is not bound to a def or sym
git-svn-id: trunk@42383 -
2019-07-12 22:06:38 +00:00
svenbarth
0e04d9b4de * store the parameter nodes in the attribute object as well (we need to write them to the RTTI as well as store them in the PPU)
git-svn-id: trunk@42382 -
2019-07-12 22:06:34 +00:00
svenbarth
3a20178d96 * fix code formatting (no code changes)
git-svn-id: trunk@42381 -
2019-07-12 22:06:31 +00:00
svenbarth
c214648224 + add a test for overloaded attribute constructors
git-svn-id: trunk@42380 -
2019-07-12 22:06:28 +00:00
svenbarth
db37146f12 * rework code for parsing attributes to only allow constant expressions; Delphi only allows those as well and better we don't open *that* pandora's box just yet
git-svn-id: trunk@42379 -
2019-07-12 22:06:24 +00:00