Commit Graph

672 Commits

Author SHA1 Message Date
Sven/Sarah Barth
485b31de21 * fix #40764: declare procsyms of a class/object also as sp_generic_dummysym if a symbol in a parent class has it set so that the parser will treat it as a potential generic
+ added test
2024-05-06 23:39:18 +02:00
florian
2d1fba1fa1 * disable (type ...), it did never work and there are not test, resolves #40562 2024-04-24 22:51:11 +02:00
Karoly Balogh
439faf0da8 m68k: basic DOS syscall generation for human68k 2023-11-30 23:43:27 +00:00
Sven/Sarah Barth
2df57e117b * fix #40381: also check for hints when parsing the parameters of a routine (including open array parameters) or the result type of a function
+ added tests
2023-09-08 15:54:08 +02:00
Michaël Van Canneyt
d3cc976551 * Mark method for invoke helper 2023-07-13 07:32:21 +00:00
Nikolay Nikolov
adf843196a Merge remote-tracking branch 'origin/main' into wasm_js_promise_integration 2023-06-24 15:08:18 +03:00
Sven/Sarah Barth
34f1a3ee28 * don't insert anonymous functions into a withsymtable
+ added test
2023-06-23 17:02:15 +02:00
Nikolay Nikolov
389646adee * fixed erroneously duplicated code from previous commit 2023-06-17 13:39:29 +03:00
Nikolay Nikolov
8acf2e3ff3 + print a proper error message if a suspending external is used on a non-WebAssembly platform 2023-06-17 12:46:44 +03:00
Nikolay Nikolov
553cee72eb * tsk_wasm_suspending renamed tsk_wasm_suspending_first 2023-06-17 12:28:12 +03:00
Nikolay Nikolov
4d62764fa3 + also allow declaring an external as 'suspending first' 2023-06-13 09:56:44 +03:00
Nikolay Nikolov
0f89852908 + support 'suspending last' externals as well 2023-06-13 09:34:54 +03:00
Nikolay Nikolov
b247302871 + initial attempt (not fully working, yet) at implementing WebAssembly suspending externals 2023-06-11 14:07:35 +03:00
Nikolay Nikolov
95d7bdc3da + added parser support for the 'suspending' directive 2023-06-11 11:57:33 +03:00
Nikolay Nikolov
f670ebbb28 * disallow WebAssembly reference types to be declared as var, constref or out parameters 2023-06-11 08:17:06 +03:00
Nikolay Nikolov
93438ef1a5 + added the wasmfuncref directive for procvars. Not actually implemented, just
parsed.
2023-06-05 01:29:22 +03:00
Sven/Sarah Barth
5d7e3ca240 * fix #40060: ensure that Self is not added for anonymous functions that are part of a static class method
+ added test
2022-12-30 23:32:00 +01:00
Sven/Sarah Barth
e050a019a2 * fix #29859: ensure that it's correctly passed down into generate_specialization whether a unit name was provided for the specialization and if so search the generic only in that unit
+ added tests
2022-10-28 17:40:53 +02:00
Sven/Sarah Barth
35a57bac94 * generate the generic name for a specialization of a generic interface alias in the same way as for specializations in general 2022-10-28 17:36:22 +02:00
Sven/Sarah Barth
399d82e1da - remove unused consume_generic_interface; it has been superseded by handle_generic_interface in 17a0ac7fc0 2022-10-28 13:57:02 +02:00
Sven/Sarah Barth
6cbbf9c52a * $P/$OpenStrings is supposed to be a local switch, so change that accordingly
+ added tests
2022-10-08 13:52:32 +02:00
florian
a401898139 * spelling fixes 2022-08-04 23:01:35 +02:00
florian
6c47f8f4d7 * do not warn on anonymous functions without captured variables about being not used, resolves #39853 2022-07-29 21:46:48 +02:00
Jonas Maebe
59f293711a function references: make names of interface methods valid Pascal identifiers
On high level targets, and on PowerPC/PowerPC64, interface method thunks are
implemented using internally-generated Pascal wrappers, so the method names
need to be valid Pascal identifiers.

Additionally, that wrapper code uses the procsym's realname, so also
update the realname field when changing the name of anonymous methods.
2022-05-29 23:07:13 +02:00
Sven/Sarah Barth
92082ab28f * correctly handle directives for anonymous functions 2022-05-26 21:43:37 +02:00
Sven/Sarah Barth
fd26453d5a * name of result variable of anonymous functions can be changed (and must be in modes without modeswitch Result) 2022-05-26 21:43:37 +02:00
Sven/Sarah Barth
4dbdb4f0f1 + initial support for anonymous functions, for now as essentially nested functions
Based on work by Blaise.ru
2022-05-26 21:43:00 +02:00
Sven/Sarah Barth
39f5534969 * adjust handle_calling_convention so that it can be used with both proc(var)defs and invokables 2022-05-26 21:42:58 +02:00
Sven/Sarah Barth
c92e290d67 * extend parse_proctype_directives to handle proc(var)defs as well as invokables 2022-05-26 21:42:58 +02:00
Sven/Sarah Barth
bb637fa389 * adjust parse_proctype_directives so that it can handle a function reference as well 2022-05-26 21:42:58 +02:00
Sven/Sarah Barth
e5ac99a4c9 * apply patch by Blaise.ru: parse_object_proc_directives() and parse_object_record_directives() should only be called with procdefs, so change the parameter from tabstractprocdef to tprocdef to make this explicit 2022-05-26 21:42:54 +02:00
Sven/Sarah Barth
9c9c6cc81b * apply patch by Blaise.ru:
- all call sites of parse_var_proc_directives() have the tprocvardef easily available, so use parse_proctype_directives() directly
  - remove the now no longer required parse_var_proc_directives()
2022-05-26 21:42:53 +02:00
Sven/Sarah Barth
0bbfad1add * apply patch by Blaise.ru:
- avoid creation of a dummy typesym just to call parse_var_proc_directives() by introducing a new parse_proctype_directives() that takes a tprocvardef instead of a symbol like the former does
  - have parse_var_proc_directives() call parse_proctype_directives() to avoid duplicated code
2022-05-26 21:42:53 +02:00
Sven/Sarah Barth
542c3f0c4c * use tproc_parse_flags in parse_proc_dec_finish as well 2022-05-26 21:42:53 +02:00
Sven/Sarah Barth
9664ad4138 * use tparse_proc_flags for parse_proc_head as well 2022-05-26 21:42:53 +02:00
Sven/Sarah Barth
f6a444c6fc * combine the Boolean parameters of read_proc and read_proc_dec into a set 2022-05-26 21:42:53 +02:00
Sven/Sarah Barth
3aebcccdf2 * allow procvars to not be registered right away 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
florian
4718029fe0 * do not throw an error if syscall is used with a syntax not applicable for the current
target, resolves #39640
2022-03-30 23:07:34 +02:00
florian
546455faca * throw error properly if a target does not support sections 2022-02-22 22:08:53 +01:00
ccrause
665c1b3966 Move member variable "section" to tprocdef. Type of "section" to agree with symansistr define. 2022-02-22 20:51:32 +00:00
ccrause
738a0a35de Add section directive for subroutines for embedded and freertos systems. 2022-02-22 20:51:32 +00: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
Karoly Balogh
568d4de77e * aros64: recent developments hanged the library call ABI, lets try to follow it (aros64 is experimental) 2022-02-06 16:30:04 +01:00
svenbarth
f9957f30a5 * fix for Mantis #38771: the owner of the procdef might be Nil in case of a specialization (that virtual can't be used on generics is caught later on)
+ added test

git-svn-id: trunk@49228 -
2021-04-18 14:01:09 +00:00
nickysn
9fa61a6c9f - removed the discardresult proc directive
git-svn-id: trunk@49017 -
2021-03-20 01:22:43 +00:00
nickysn
7e958e0a35 + introduced the discardresult directive and declared the UniqueString()
overloads, using this directive

git-svn-id: branches/wasm@48283 -
2021-01-21 21:42:07 +00:00
florian
7f775abb6d * throw a proper error if a contructur has a type parameter in delphi mode, resolves #37217
git-svn-id: trunk@48113 -
2021-01-08 14:19:19 +00:00
svenbarth
6160abe37e * have the generic dummy symbols for procsyms keep track of their overloaded generic procsyms so that they can be easily found (will be needed for implicit specializations)
git-svn-id: trunk@48096 -
2021-01-06 12:57:59 +00:00
svenbarth
c96029ebd5 * Delphi does not allow a generic method to be overloaded by a non generic type of the same name (unlike for generic types and non generic routines); this is probably done to simplify the implementation of implicit specializations of generic methods so we do this as well. For this we change the dummy symbol for generic routines from a typesym to a procsym
+ added tests

Note: what Delphi /does/ allow however is to overload a generic routine with a generic type... go figure. :/ We currently don't allow that

git-svn-id: trunk@48002 -
2021-01-02 23:23:39 +00:00