Sven/Sarah Barth
2ed2c21313
+ add support for parsing function references
2022-05-26 21:42:59 +02:00
Sven/Sarah Barth
7f3a5eb9ab
* extend tabstractprocdef.getcopyas by a parameter to control whether the copy should be registered or not
2022-05-26 21:42:59 +02:00
Sven/Sarah Barth
90eabdd6b4
* ensure insert_self_and_vmt_para can deal with a preexisting self symbol as long as it has the expected type
2022-05-26 21:42:58 +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
a20bfc0753
+ add utility function to check whether an invokable can be invoked without explicit parameters
2022-05-26 21:42:57 +02:00
Sven/Sarah Barth
22bbcf4b27
+ add utility function to retrieve the invoke procdef of a function reference interface
2022-05-26 21:42:57 +02:00
Sven/Sarah Barth
833a971877
+ add utility function to check whether an objectdef is an invokable one
2022-05-26 21:42:57 +02:00
Sven/Sarah Barth
f0748ad59b
+ add flag to denote that an objectdef is invokable, thus can be used like a function variable
2022-05-26 21:42:57 +02:00
Sven/Sarah Barth
122c6c92cb
+ add function to check whether a def is an invokable function reference
2022-05-26 21:42:57 +02:00
Sven/Sarah Barth
b28495a423
+ add flag to denote an object def as a function reference
2022-05-26 21:42:56 +02:00
Sven/Sarah Barth
ec02d0abb0
+ add constants for the Invoke symbol of a function reference interface (both for declaring and finding it)
2022-05-26 21:42:56 +02:00
Sven/Sarah Barth
2912e38e91
+ add modeswitch for anonymous function and function references
2022-05-26 21:42:56 +02:00
Sven/Sarah Barth
5e148c1dca
+ add a new tproccopytyp pc_normal_no_paras to copy an abstractprocdef without its parameters (useful if the parameters themselves will be reused and the original def otherwise deleted)
2022-05-26 21:42:56 +02:00
Sven/Sarah Barth
6a9b4a1b13
+ apply patch by Blaise.ru: allow initialisation of method pointers with class methods (when class types are
...
known at compile time)
* adjust error message when a method pointer isn't suitable
+ add tests
2022-05-26 21:42:55 +02:00
Sven/Sarah Barth
bc4eb00a7a
* apply patch by Blaise.ru: proper code generation for assigning class non-static methods, accessed via a class reference type, to method pointers
...
+ added test
2022-05-26 21:42:55 +02:00
Sven/Sarah Barth
6e7a82440e
* apply patch by Blaise.ru: avoid internal error when assigning class methods, accessed via a class reference type, to incompatible procvars
...
+ added tests
2022-05-26 21:42:55 +02:00
Sven/Sarah Barth
a8cf67d73b
* apply patch by Blaise.ru: reject assignments of instance methods, accessed via a type, to method pointers
...
+ add tests
2022-05-26 21:42:54 +02:00
Sven/Sarah Barth
acee4eb27a
- apply patch by Blaise.ru: pdflags are no longer required in generate_specialization_phase2() after parse_proc_directives() was done, so remove its unused modification after that call
2022-05-26 21:42:54 +02:00
Sven/Sarah Barth
e5df46722e
* apply part of patch by Blaise.ru: reduce code duplication when parsing anonymous procvar types
2022-05-26 21:42:54 +02:00
Sven/Sarah Barth
bd226c00f1
* apply part of patch by Blaise.ru: check only once whether writable consts are enabled or not by determining the type of the assembly list earlier (it's only not needed in an error case anyway)
2022-05-26 21:42:54 +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
ee187f78f4
* have read_body return the created procdef
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
934e3bba63
* set proctypeoption for procvars
2022-05-26 21:42:52 +02:00
Sven/Sarah Barth
4bc957a1aa
* extend procvar_dec so that procvars don't have to be registered
2022-05-26 21:42:52 +02:00
Sven/Sarah Barth
3aebcccdf2
* allow procvars to not be registered right away
2022-05-26 21:42:52 +02:00
Sven/Sarah Barth
a764c035b2
* if the symbol belongs to the current def also consider it a specialization if it's a nameless type symbol from an implicit function specialization as their owner gets changed to the function itself
2022-05-26 21:42:52 +02:00
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
Sven/Sarah Barth
8bef91d1de
* declare the type symbol of an internal def as sp_internal
2022-05-26 21:42:52 +02:00
Sven/Sarah Barth
30a7199165
* make the VMT symbol and type def of the corresponding class or object instead of having them be global
...
* bump PPU version to avoid potential compilation errors due to this
Based on code by Blaise.ru
2022-05-26 21:42:51 +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
Sven/Sarah Barth
3ca3c7a606
- remove duplicate paraprintnodetree to ensure that there the right paraprintnodetree is used (namely the one from globals)
2022-05-26 21:42:51 +02:00
Nikolay Nikolov
6ee4ee960e
+ added "(experimental)" to the compiler help screen for the WebAssembly compiler options that are still unstable/experimental
2022-05-26 18:20:07 +03:00
Nikolay Nikolov
66b471e516
+ support different versions of llvm-mc (version 10 seems to be the earliest that works)
2022-05-26 15:06:35 +03:00
Nikolay Nikolov
3994626cb1
* fixed the message in the previous commit
2022-05-26 14:14:46 +03:00
Nikolay Nikolov
0c6287894b
* the WebAssembly internal assembler renamed WASM (previously it was OMF, which was the ID of the MS-DOS .obj writer, which I forgot to rename)
2022-05-26 14:12:10 +03:00
Pierre Muller
7c21b37105
Avoid some range check error and convert internalerror into error messages
2022-05-26 00:28:47 +02:00
Pierre Muller
e0de75224b
Add help for -Aomf option for wasm32 CPU and new message for ogwasm binary writer
2022-05-26 00:28:47 +02:00
Nikolay Nikolov
16f5863847
+ added WebAssembly atomic store intrinsics
2022-05-25 19:22:45 +03:00
Nikolay Nikolov
0103964250
+ implemented WebAssembly atomic load intrinsics
2022-05-25 18:55:41 +03:00
Nikolay Nikolov
9274f17c52
+ reserved inline numbers for the WebAssembly atomic loads and stores
2022-05-24 16:06:05 +03:00
Nikolay Nikolov
8c562995d7
* regenerate makefiles with latest fpcmake
2022-05-24 14:01:59 +03:00
Nikolay Nikolov
e74797d411
* replaced several internal errors, related to the WebAssembly labels
...
resolution with more meaningful error messages, in order to ease the
debugging of the compiler. Based on patch by Pierre.
2022-05-24 11:44:15 +03:00
Nikolay Nikolov
6e4e3b8580
* fixed WebAssembly code generation in thlcgwasm.g_overflowCheck_loc (patch by Pierre)
2022-05-24 11:06:59 +03:00