Sven/Sarah Barth
6a6a17717a
+ add a new symoption for symbols created for nameless types during implicit function specialization so that they can be recognized
2022-05-26 21:42:52 +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
22a4cc66ec
* fix #39675 : consider the symbols for unnamed parameters as used so that there won't be unnecessary hints about them
...
+ added test
2022-04-22 10:40:58 +02:00
Sven/Sarah Barth
76753438ed
* fix #39681 : also handle the result type of a specialized procvar when checking for a possible implicit specialization
...
+ added test
2022-04-22 10:40:58 +02:00
Sven/Sarah Barth
c0fa45dc92
* a function can't be used to implicitely specialize a specialized procedure variable parameter and vice versa
...
+ added test
2022-04-22 10:40:58 +02:00
Sven/Sarah Barth
a5f3040da5
* the index of the generic type parameter is not the same index of the paras list
...
+ added test
2022-04-22 10:40:58 +02:00
Sven/Sarah Barth
66bac7c415
* fix #39679 and fix #39680 : for implicit specializations a parameter used in a call might also inherit in some depth from a specialization used as parameter type
...
+ added tests
2022-04-22 10:40:58 +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
Sven/Sarah Barth
2a5023508a
+ add support for forward declarations of generic classes and interfaces (any implicit pointer type really); fixes #34128
2022-02-18 17:54:23 +01:00
Sven/Sarah Barth
7f1e420bb0
* move determine_generic_def out from pdecl.types_dec to pgenutil
2022-02-18 17:53:35 +01:00
florian
e4ee8fa6a2
* patch by Rika to pass some strings by reference, resolves #39338
2021-11-09 22:41:52 +01:00
florian
a4672fbd1c
o based on a patch by Rika, resolves #39401 :
...
* use Base64 (62=_, 63=$) encoded FNV hash (instead of CR-32) to shorted identifiers
* renamed fpccrc to fpchash
+ test
2021-10-10 10:09:22 +02:00
florian
51326e94f3
* allow char constant to be used for const string parameters in generic specializations, resolves #39030
...
git-svn-id: trunk@49569 -
2021-06-28 20:35:33 +00:00
pierre
e6045673ee
Handle NIL entries in deflist after commit 48986
...
git-svn-id: trunk@49230 -
2021-04-18 15:44:07 +00:00
yury
75491ae21c
* Removed/ifdefed the assigned and unused variables.
...
git-svn-id: trunk@48391 -
2021-01-24 13:58:17 +00:00
yury
9c265d71f0
* Fixed a wrong code caused by a typo. It has been revealed by a note about an unused var.
...
git-svn-id: trunk@48387 -
2021-01-24 13:08:54 +00:00
svenbarth
e4eed4e259
* when only a symbol name is provided to generate_specialization_phase1 allow a symbol table to be provided as well
...
git-svn-id: trunk@48000 -
2021-01-02 23:23:29 +00:00
svenbarth
9179f9d43b
* always add a generic dummy if it is a procsym
...
git-svn-id: trunk@47996 -
2021-01-02 23:23:12 +00:00
florian
ff295bf349
* delay setting of pd_body and pd_implement till the header of a generic
...
procedure is parsed, resolves #37261
git-svn-id: trunk@45717 -
2020-06-30 20:36:51 +00:00
florian
e7f7927ca9
+ initialize variables, so compilation with -O3 works
...
git-svn-id: trunk@45141 -
2020-04-27 19:19:54 +00:00
svenbarth
04554d7505
* use a more detailed error message if a type is not allowed for a generic constant parameter
...
git-svn-id: trunk@45092 -
2020-04-26 11:46:24 +00:00
svenbarth
a467332187
* fix for Mantis #36975 : arraydefs are not allowed for generic types (this is only used for type declarations; for specializing constant strings which are char arrays are still allowed)
...
+ added test
git-svn-id: trunk@45089 -
2020-04-26 11:46:10 +00:00
svenbarth
60345366f2
* fix for Mantis #35140 : apply patch by Ryan Joseph together with some further changes by me to add support for constant parameters in generics
...
+ added tests
git-svn-id: trunk@45080 -
2020-04-25 22:12:35 +00:00
svenbarth
41a6957f7d
* keep track of the fileposinfo for generic constraints
...
git-svn-id: trunk@44188 -
2020-02-16 09:53:32 +00:00
florian
b7afb2431c
* do not allow constraints in headers of procedure implementations in delphi mode, resolves #36584
...
* better error message if a constraint is found at a wrong location
git-svn-id: trunk@44174 -
2020-02-14 20:56:55 +00:00
svenbarth
c6a4d10f61
* for deciding whether to swap a generic's buffer use the module's flag instead of the def's
...
git-svn-id: trunk@44073 -
2020-01-30 21:49:07 +00:00
pierre
d1e4066477
Hopefully fix problems related to loading of ppufile generated with other endianess for generics
...
git-svn-id: trunk@44056 -
2020-01-28 23:43:56 +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
svenbarth
3e7dc25667
* fix for Mantis #36496 : correctly handle the function result alias variable inside generic functions
...
+ added tests
git-svn-id: trunk@43823 -
2019-12-30 21:35:26 +00:00
svenbarth
bf5d75e594
* move the common sequence to build a VMT for an objectdef into a separate procedure (based on a patch by Blaise.ru)
...
git-svn-id: trunk@43674 -
2019-12-11 22:42:53 +00:00
svenbarth
97eefb6ac3
- the error recovery handling is no longer required
...
git-svn-id: trunk@43588 -
2019-11-25 20:28:29 +00:00
svenbarth
5b71ba2a9b
* treat a missing genericdef with no symname set as an internal error
...
git-svn-id: trunk@43587 -
2019-11-25 20:28:26 +00:00
svenbarth
ef6c9e930b
* correctly handle the genericdef being a procdef, otherwise no code will be generated (and no error either :/ )
...
+ added test
git-svn-id: trunk@43586 -
2019-11-25 20:28:23 +00:00
svenbarth
1abc9c1fe7
* when specializing a routine all nested specializations must go to the para- or localsymtable as otherwise the symbol can't be found to be registered
...
git-svn-id: trunk@43568 -
2019-11-24 00:04:31 +00:00
svenbarth
d79e2ee9da
* also store, reset and restore the current module's procinfo
...
git-svn-id: trunk@43566 -
2019-11-24 00:04:23 +00:00
Jonas Maebe
a051b8d225
- remmoved doregister parameter from t*sym constructors, as the registration
...
is handled automatically nowadays
git-svn-id: trunk@42998 -
2019-09-14 17:30:45 +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
Jonas Maebe
281b3ad276
* fix case completeness and unreachable code warnings in compiler that would
...
be introduced by the next commit
git-svn-id: trunk@42046 -
2019-05-12 14:29:03 +00:00
Jonas Maebe
e008785152
* insert the hidden parameters for objectdef methods after resolving
...
overrides but before generating the VMT, so that these hidden parameters
are part of the procdefs stored in the VMT (fixes some LLVM type errors
after r41716)
git-svn-id: trunk@41884 -
2019-04-16 16:11:50 +00:00
Jonas Maebe
ed2ae508d0
* only add hidden parameters for objectdef methods after generating the vmt,
...
so that they take into account inherited calling conventions (mantis #35233 )
o don't needlessly calculate the paraloc info when generating a JVM mangled
name
git-svn-id: trunk@41716 -
2019-03-16 19:14:14 +00:00
Jonas Maebe
91d5457b38
* moved around/replaced the following procedures to stop nflw from depending
...
on pdecsub (node units should not depend on parser units):
o maybe_add_public_default_java_constructor()
o handle_calling_convention()
o create_finalizer_procdef() (replaced with create_outline_procdef())
o insert_record_hidden_paras()
o handle_calling_convention()
o proc_add_definition()
o build_parentfpstruct()
o maybe_guarantee_record_typesym()
o get_first_proc_str()
* factored out the creation of a procinfo for a nested procdef based on a
subnodetree of the current procdef into tprocinfo.create_for_outlining()
git-svn-id: trunk@40773 -
2019-01-05 16:26:33 +00:00
Jonas Maebe
28df55fe08
* moved handle_calling_convention() to pparautl
...
git-svn-id: trunk@40772 -
2019-01-05 16:26:29 +00:00
svenbarth
598ac21791
* if the generic dummy symbol is a procsym (with procdefs added) then this is the symbol that should be resolved to
...
git-svn-id: trunk@39232 -
2018-06-15 13:49:21 +00:00
svenbarth
06d7e26df0
* move code to add a symbol to the current module's generic dummy symbols into a new function pgenutil.add_generic_dummysym()
...
git-svn-id: trunk@36466 -
2017-06-09 14:30:23 +00:00
florian
b1dff29cbf
* removed unused units
...
git-svn-id: trunk@36165 -
2017-05-09 19:53:14 +00:00
svenbarth
8024fcd7ec
* if an operator overload in a structured type is invalid print an error only for the declaration and not the implementation as well
...
This fixes Mantis #31634 as far as I see it useful to; anything further would probably require extension of the message generation system by a context or such so that the compiler could write "Error in TFoo<Integer>: ..." instead of merely "Error: ..." or something like that.
No test added due to the nature of the bug.
git-svn-id: trunk@35748 -
2017-04-07 13:24:58 +00:00
maciej-izak
e4565378db
* Allow for "record constraint" in Delphi mode more types like: ordinal, float, classical objects, enumerations (instead of just record). Delphi compatibility. Fix for mantis #24073 .
...
git-svn-id: trunk@35739 -
2017-04-05 13:12:30 +00:00
svenbarth
d34acf3bc7
* fix for Mantis #31120 : check current_genericdef only if the current_procinfo isn't used
...
+ added test
Note: the test is added to webtbs although it's right now still failing, cause I'll remove the restriction for nested procedures since the compiler now supports them correctly. Due to the way we handle generics we don't have problems with them unlike Delphi.
git-svn-id: trunk@35147 -
2016-12-17 21:20:44 +00:00
svenbarth
6ba85c2a70
* second fix for Mantis #30626 : also search in parent classes for a suitable pre-existing specialization
...
+ added test
git-svn-id: trunk@35014 -
2016-11-29 17:04:07 +00:00
svenbarth
0a1e080089
* only create a new procsym for a specialization if it's indeed needed
...
git-svn-id: trunk@35013 -
2016-11-29 14:13:06 +00:00