Commit Graph

638 Commits

Author SHA1 Message Date
florian
8023fffd3c * cosmetics 2024-12-21 19:48:33 +01:00
florian
f32eaa1564 * skeleton to unify the RiscV paramgr
* first routines unified
2024-12-15 15:29:05 +01:00
Rika Ichinose
2596af84fa Optimize {$DEFINE x := y} and refactor tmacro.buftext. 2024-11-03 17:33:44 +00:00
Rika Ichinose
8784dbc095 Outline freeing TFPList with disposing its items into TFPList.FreeAndNilDisposing. 2024-10-27 16:45:35 +00:00
Margers
8c73d0a0e2 Fix 2nd compilation in Textmode IDE 2024-09-24 16:28:07 +00:00
Alligator-1
9caabdc4e7 Immediately set the capacity 2024-07-08 20:17:11 +00:00
florian
abcced55af * (lsighly, added safety check) patch by Евгений Савин, resolves #40784 2024-06-23 22:07:51 +02:00
Sven/Sarah Barth
eaf24269bc * check that the corresponding genericdef of the adjusted def is indeed valid 2024-04-12 17:34:58 +02:00
Michaël Van Canneyt
325d29307f * Indentation and casing changes 2024-03-05 07:56:14 +00:00
Michaël Van Canneyt
881eb0fab5 * Check whether call to deref(impl) is needed during re-resolve (indexes may be -1 if not yet built) 2024-03-05 07:56:14 +00:00
Sven/Sarah Barth
ea102d792f * fix #40634 the 2nd: a (strict) protected symbol in a parent class of the owner is supposed to be visible
+ added test
2024-02-18 19:35:24 +01:00
Sven/Sarah Barth
1dbde8a79d - remove no longer required check as that is now handled by check_strict_private (not to mention that the check had been placed incorrectly anyway...) 2024-02-18 19:35:24 +01:00
Sven/Sarah Barth
11200cfaf6 * use check_strict_private and check_strict_protected in their respective non-strict checks to avoid code duplication 2024-02-18 19:35:23 +01:00
Sven/Sarah Barth
852aee489c * move the checks for strict private and protected into their own nested functions 2024-02-18 19:35:23 +01:00
Sven/Sarah Barth
d9903e6e16 * fix #40634: correctly check visibility for child classes in case of a mixture of specializations and non-specializations
+ added test
2024-02-16 16:54:23 +01:00
Sven/Sarah Barth
43721f21c4 * fix #40621: when checking for visibility of members then always use the genericdefs for specializations for correct scoping
+ added test
2024-02-09 17:24:39 +01:00
Sven/Sarah Barth
ed8a05d697 * use iscurrentunit only when there isn't a suitable def that the moduleid of the symtables can be compared to 2024-02-09 17:22:46 +01:00
Michael VAN CANNEYT
a74a35a16e * Check that system unit is actually loaded before using it to search for system symbols
(cherry picked from commit 9e5ee68887)
2023-06-19 15:33:15 +02:00
Michael VAN CANNEYT
5adde504a9 * Do not crash when module pointer is nil
(cherry picked from commit e6f71b6acc)
2023-06-19 15:22:42 +02:00
Jinyang He
8fac3d62ce add has_double_field 2023-02-05 19:18:48 +00:00
Sven/Sarah Barth
4b659175d9 - remove no longer required readonly functionality from tparasymtable 2022-12-30 23:32:00 +01:00
Jonas Maebe
c5f4a6acd0 LLVM: fix variant records when alignment of first part is not the highest
Resolves #40015
2022-12-01 22:43:40 +01:00
Sven/Sarah Barth
9e3483fbeb * fix #39977: allow a capturer to access any method independant of visibility as the visibility checks are supposed to have been done before the captured symbol was converted
+ added test
2022-11-06 22:01:49 +01:00
florian
0eee70ac81 * fix FindUnitSymtable for exception symtables, resolves #24801 and #39974
* more consistent naming of exceptsymtable enumeration symbol
2022-10-31 20:19:10 +01:00
Jonas Maebe
b0e1867b4c symcreat: support for scanner/parser escape sequences
Support escape sequences when parsing internally generated code. Used for now
to force interpreting certain identifiers as unit/namespace identifiers.
2022-09-16 11:21:05 +02:00
Sven/Sarah Barth
3eac88eeaf * protected symbols are visible for defs declared in a local symtable as well 2022-05-26 21:43:40 +02:00
Sven/Sarah Barth
ac4df2b066 * don't check for a duplicate internal symbol in inherited symtables 2022-05-26 21:42:51 +02:00
Jonas Maebe
3d3c904ac5 TSymStr: more consistent usage 2022-05-08 15:03:44 +02:00
Pierre Muller
5acd7a7b83 Rename tsymtable.insert and delete methods to insertsym ands deletesym 2022-05-03 23:00:28 +02:00
Sven/Sarah Barth
90844c2027 * fix #35261: apply slightly adjusted changes by Ryan Joseph to implement support for implicit generic function specializations
The main adjustments were as follows:
  - fixing coding style and identation
  - fixing some typos
  - using a better name for the property in tcallcandidates which holds the symbols created for anonymous parameter values
2022-04-20 18:59:31 +02:00
florian
e4ee8fa6a2 * patch by Rika to pass some strings by reference, resolves #39338 2021-11-09 22:41:52 +01:00
Sven Barth
3ce6cae11d * fix for #39310 by fixing various small issues in tabstractrecordsymtable.has_single_field:
- initialize the returned def to a safe default
  - correctly reset the found symbol for each loop
  - reset the result when descending into a record
+ added test
2021-09-01 09:31:15 +02:00
svenbarth
7343e9c4a2 * correctly handle the case should the generic dummy symbol be a procsym instead of a typesym
git-svn-id: trunk@48001 -
2021-01-02 23:23:34 +00:00
Jonas Maebe
c0c0acbcb9 * fixed llvm shadow symtable construction in case fields are reordered
(-Ooorderfields) and hence their offsets are no longer monotonically rising
  * also fixed padding for variant bitpacked records in llvm shadow symtable

git-svn-id: trunk@47853 -
2020-12-27 13:18:44 +00:00
svenbarth
3597696e98 * fix for Mantis #38145: allow overloading of assignment operators that return ShortStrings with a specific size
+ added tests

The following rules for using these operator overloads as *implicit* overloads apply (Delphi compatible):
  - if a found assignment operator returns a default ShortString then that is used
  - if only one assignment operator to a String[x] is found then that is used
  - otherwise the assignment is not possible
The explicit assignment checks for an exact match (and falls back for an implicit assignment). This is not entirely Delphi compatible as Delphi seems to favor the first found symbol in that case, but sometimes also not... :/

git-svn-id: trunk@47634 -
2020-11-29 15:47:52 +00:00
Jonas Maebe
cc315e0ac7 * fix tw3930 after r37927
o "unique" class (and interface) type aliases should actually not exist at
     all except for overload resolution. All the rest (VMT, UUID, RTTI, ...)
     should be taken from the aliased class/interface
   o there is one Delphi-incompatibily left after this change, but it shouldn't
     matter: tw8180 does not compile if you change the declaration to
     "tcl=class(TInterfacedObject,XStr,iinterface)", while Kylix does compile
     that. It doesn't really matter though, because in Kylix this actually
     adds iinterface twice as implemented interface, so there is no point
     in accepting this.

git-svn-id: trunk@46773 -
2020-09-05 12:25:09 +00:00
florian
392d66a9ce * variables can have the same name as the main program in iso mode, resolves #37322
git-svn-id: trunk@45757 -
2020-07-10 21:05:59 +00:00
florian
84a1f614d9 * fix several double ;
git-svn-id: trunk@45488 -
2020-05-24 17:52:09 +00:00
Jonas Maebe
a2174753c1 - removed tabstractrecorddef.get_unit_symtable, which did not always return the unit
symtable (when you had a local recorddef in a procdef)
  * modified tdef.get_top_level_symtable() so you can specify whether you want to
    skip procdefs or not
  * changed tobjectdef.vmt_def() to no longer require a typesym for the tobjectdef
    (based on patch by Blaise)

git-svn-id: trunk@45361 -
2020-05-13 21:46:29 +00:00
yury
1b3a3a7983 * Removed lot of unused local vars. It is useful to turn on the notes in options. :)
git-svn-id: trunk@44053 -
2020-01-28 18:45:33 +00:00
florian
d87a5cc9fb * take care of m_duplicate_names when checking for duplicate locals, resolves #33221
git-svn-id: trunk@44028 -
2020-01-23 21:32:09 +00:00
Jonas Maebe
1a9e246c29 * added is_normal_fieldvarsym() helper and use it
o fixes several places where there was a check whether something is a
     fieldvarsym, but not whether it's an instance rather than a class field

git-svn-id: trunk@43786 -
2019-12-24 22:12:44 +00:00
svenbarth
1779011ab4 * fix typo in comment
git-svn-id: trunk@43703 -
2019-12-20 16:44:52 +00:00
svenbarth
927c91e093 * fix for Mantis #36388: correctly handle generic constraints when looking for helpers
git-svn-id: trunk@43629 -
2019-12-02 22:29:34 +00:00
svenbarth
0a915e883e * keep track of static symbols that a global function references, as those must now be exported from a dynamic package as well if the function can potentially be inlined
git-svn-id: trunk@43544 -
2019-11-21 21:44:53 +00:00
Jonas Maebe
ac1e0f96bd * replaced tentryfile.get/putsmall/normalset() with a common tget/putset
that expects an open array of byte, and use it for all sets
   o since all sets need to be typecasted to an array type of the appropriate
     size, we'll get a compilation error in case this needs to be done and
     that also tells us at the same time that the ppu version will need to
     be increased
  * enabled {$packset 1} for the compiler, as this is now safe with the above
    changes

git-svn-id: trunk@43407 -
2019-11-06 21:50:19 +00:00
svenbarth
fdeaacac21 * fix for Mantis #36223: when parsing a helper type its extendeddef might be Nil
+ added test

git-svn-id: trunk@43346 -
2019-11-01 15:02:31 +00:00
pierre
d29a6de437 Avoid possible warning about uninitialized srsym variable
git-svn-id: trunk@42857 -
2019-08-27 12:15:03 +00:00
Jonas Maebe
bc7b90185f * when searching for a procsym in an Objective-C category for an objcclass,
try to find the procsym in the category of the objcclass that is closest
    related to the original objcclass (e.g.
     NSMutableDictionary.dictionaryWithContentsOfFile() -> prefer the
     dictionaryWithContentsOfFile() from NSMutableDictionaryCreation to the
     one from NSDictionaryCreation (part of mantis #35994)

git-svn-id: trunk@42815 -
2019-08-25 15:23:48 +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