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
752ff32333
* fix WinAPI directive: the purpose is to present the OS' default calling convention which for Windows means stdcall (at least on those platforms that support stdcall) on other platforms it is cdecl (for now)
...
git-svn-id: trunk@44887 -
2020-04-20 18:29:28 +00:00
svenbarth
2ad3c6dd97
* fix global generic functions with constraints in mode Delphi by handling implementations with defines outside of parse_generic_parameters
...
+ added tests
git-svn-id: trunk@44189 -
2020-02-16 09:53:37 +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
8111e92e1f
* rework syntax for cblocks: now a cblock directive is required
...
* additionally implicit calling conventions of cdecl or mwpascal now work as well
* adjusted tests
+ added tests
Note: the generator for packages/univint needs to be fixed, until then building on macOS will be broken
git-svn-id: trunk@43684 -
2019-12-14 16:45:38 +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
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
2e4d8e36a5
* fix for Mantis #35670 : when a unused dummy symbol is found for a non-generic procedure/function, hide that dummy symbol and create a new symbol for the procedure/function
...
+ added tests
git-svn-id: trunk@42329 -
2019-07-05 14:12:16 +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
Jeppe Johansen
12879adc2f
- Adds intrinsics to save/restore SREG when disabling interrupts.
...
- Adds nostackframe to stack frame investigation stubs.
git-svn-id: trunk@41898 -
2019-04-18 18:26:51 +00:00
Jonas Maebe
0b61b5d4cf
* added extra header to ppu inside a subsection, so we won't run into
...
trouble when the ppu version hits 255
* also moved several ppu flags to a set inside that section
git-svn-id: trunk@41846 -
2019-04-06 21:28:43 +00:00
Károly Balogh
5358851f84
* clean up some things regarding explicit paraloc handling. this should fix m68k-amiga and powerpc-morphos builds after r41716
...
git-svn-id: trunk@41730 -
2019-03-18 01:19:18 +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
8b9e90dc7a
* keep track of whether a routine has a C-style variadic parameter in the
...
procoptions even when it's through an array-of-const parameter
* always call create_varargs_paraloc_info() instead of create_paraloc_info()
in the former case, even when no varargs parameters are specified (because
on some platforms even some non-variadic parameters need to be passed
differently, such as on ARM with gnueabihf)
git-svn-id: trunk@41420 -
2019-02-23 15:42:45 +00:00
Jonas Maebe
503ea604f3
+ nolinline modifier to specify that a routine must never be inlined
...
git-svn-id: trunk@41198 -
2019-02-03 21:00:17 +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
yury
4357caaad8
* Removed unused local vars.
...
git-svn-id: trunk@40183 -
2018-11-02 18:44:29 +00:00
florian
be1bd043a7
* only i386 uses oldfpccall for interrupts, all other architectures use now stdcall, resolves #34317
...
git-svn-id: trunk@39838 -
2018-09-27 21:00:35 +00:00
svenbarth
46ef16ac11
* generate an error if the type parameters of a generic routine's definition does not match with its interface or forward declaration
...
+ added tests
git-svn-id: trunk@39703 -
2018-09-02 16:20:29 +00:00
svenbarth
50323043c1
* generate an error if the type parameters of the record, object or class do not match with its declaration
...
+ added test
git-svn-id: trunk@39702 -
2018-09-02 16:20:25 +00:00
svenbarth
473a028523
- the freegenericparams variable is no longer required as it's always true whenever consume_proc_name is called anyway
...
git-svn-id: trunk@39562 -
2018-08-03 20:24:23 +00:00
svenbarth
32db846289
* free the list containing the generic parameters as after calling insert_generic_parameter_types() it's no longer required (though this means that the condition handling generictypelist instead needs to be adjusted)
...
git-svn-id: trunk@39561 -
2018-08-03 20:24:19 +00:00
florian
4f580f7878
+ add missing exit as mentioned by J. Gareth Moreton in #33754
...
git-svn-id: trunk@39408 -
2018-07-07 14:53:56 +00:00
florian
0eea2141f6
* patch by J. Gareth Moreton: clarity in directive conflict error messages, resolves #33754
...
git-svn-id: trunk@39407 -
2018-07-07 14:46:01 +00:00
svenbarth
5510b13975
* ensure that sto_has_generic is set when a generic routine has been parsed
...
git-svn-id: trunk@39230 -
2018-06-15 13:49:03 +00:00
florian
6d5ce55232
* unified def creation for open arrays
...
git-svn-id: trunk@38408 -
2018-03-04 17:59:05 +00:00
florian
31f78ea2b6
+ implementation of the vectorcall calling convention by J. Gareth Moreton
...
+ tests
git-svn-id: trunk@38206 -
2018-02-11 17:50:37 +00:00
florian
6d072872d0
* fix compilation with 3.0.x and -Oonodedfa enabled after r37887
...
git-svn-id: trunk@37919 -
2018-01-06 11:26:19 +00:00
Jonas Maebe
672afcdca2
* check for conflicts between procedure directives specified in the
...
implementation and "virtual" (if it's a virtual method), as "virtual"
does not get repeated in the implementation and hence no conflicts get
checked by default (mantis #32605 )
git-svn-id: trunk@37887 -
2018-01-01 16:54:04 +00:00
pierre
efcb10f537
Handle arm-palmos syscall modifier
...
git-svn-id: trunk@37223 -
2017-09-15 20:29:02 +00:00
Károly Balogh
addc3a2f94
m68k-palmos: fixed the syscall generation, and improved it to support the dispatch-selector-in-reg-D2 traps
...
git-svn-id: trunk@36892 -
2017-08-13 01:19:19 +00:00
Károly Balogh
8a71a70d3c
m68k-palmos: sketched up some entirely untested syscall support, but it's probably close to what we need
...
git-svn-id: trunk@36891 -
2017-08-12 21:45:01 +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
8391b73206
* Virtual methods cannot be declared as static (static virtual method has no sense).
...
+ added tests
git-svn-id: trunk@35724 -
2017-04-03 20:45:52 +00:00
Jonas Maebe
4c68ea1000
* use pocalls_cdecl and cstylearrayofconst more consistently instead of
...
ad hoc set constants containing varying number cdecl-like calling
conventions
o added pocall_sysv_abi_cdecl and pocall_ms_abi_cdecl to cstylearrayofconst
o also allow C-style blocks with mwpascal instead of cdecl (mwpascal = cdecl
with "const" = "constref" for record parameters)
o did not touch cases related to name mangling and import/export names,
because those are a real mess and easily break things left and right :/
git-svn-id: trunk@35479 -
2017-02-25 11:46:35 +00:00
maciej-izak
520bb31fa6
* Parse management operators. Each management operator is special kind of operator without result.
...
git-svn-id: trunk@35442 -
2017-02-18 19:12:48 +00:00
Jonas Maebe
265c8e7bbc
+ support for specifying ms_abi_default, ms_abi_cdelc, sysv_abi_default, and
...
sysv_abi_cdecl calling conventions on x86-64 to force using the SYSV/
Microsoft ABI on platforms that don't use it by default (mainly to ease
porting pure assembler routines)
git-svn-id: trunk@35425 -
2017-02-11 19:57:12 +00:00
svenbarth
d133f210ca
* correct comment, cause forward declarations for generic functions *do* indeed work (cause they use the same mechanism as forward definitions in the interface section)
...
git-svn-id: trunk@35093 -
2016-12-09 16:24:17 +00:00
svenbarth
52673d34f1
* fix for Mantis #31033 : don't check for is_specialization(), but for df_specialization (this way we also get pointers or nested types that aren't by themselves real specializations)
...
+ added test
git-svn-id: trunk@35092 -
2016-12-09 16:22:14 +00:00
svenbarth
d499163ef5
* provisional fix for Mantis #31076 : fail gracefully instead of with an internal error if a generic method is declared inside a generic class or record. This will change once we support nested generics however.
...
* adjusted error message to reflect that we're not only dealing with generic classes
+ added test; note: it's added in webtbs, cause the test will loose its %FAIL attribute in the future
git-svn-id: trunk@35079 -
2016-12-06 22:26:53 +00:00
Károly Balogh
0cb555c07c
syscalls: move the reference implementation of parseparaloc to paramgr. removes two identical copies from CPU specific code and enables basereg convention for AROS/x86_64. also, other minor fixes and cleanups in related code.
...
git-svn-id: trunk@35047 -
2016-12-03 19:00:41 +00:00
svenbarth
a535d54bcb
* fix for Mantis #30939 : Rework generation of the generic name to be less relying on the type hierarchy as a specialization inside the parameter declaration would want to have the full name of the procdef including its parameters, but those are still parsed at that stage (the pretty name is still a topic onto itself however...)
...
+ added tests (original test was only mode fpc, test for mode delphi is added as well)
git-svn-id: trunk@35010 -
2016-11-28 18:16:49 +00:00
svenbarth
3f77ce3b12
* leave parse_proc_head() (with some error recovery) if the interface could not be found instead of running straight into an access violation
...
+ added test
git-svn-id: trunk@35007 -
2016-11-28 17:54:48 +00:00
florian
5d8bcaeb4b
+ additional flag po_staticmethod for procoptions for class operator. Each class operator is also static, patch by Maciej Izak
...
git-svn-id: trunk@34998 -
2016-11-27 20:01:39 +00:00
Károly Balogh
657aa06360
arm: arm-aros syscall support
...
git-svn-id: trunk@34809 -
2016-11-06 14:31:42 +00:00
Károly Balogh
ce5ff8ecd5
forgotten file, this should have been part of the previous commit
...
git-svn-id: trunk@34807 -
2016-11-06 12:44:01 +00:00
svenbarth
254be82c43
* revert r34712: the behavior with the class constructors is indeed Delphi compatible. However only one class constructor/destructor per class is allowed no matter how it's named.
...
git-svn-id: trunk@34713 -
2016-10-13 20:11:35 +00:00
svenbarth
4e5ed5b0e2
Fix for Mantis #30729 : don't allow other names for class constructors or destructors than Create and Destroy respectively.
...
+ added tests
git-svn-id: trunk@34712 -
2016-10-13 19:24:07 +00:00