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
svenbarth
43ba5b69d2
* ensure that the dummy symbol is registered if it's added due to a routine
...
git-svn-id: trunk@47997 -
2021-01-02 23:23:16 +00:00
svenbarth
2a897f5b6b
* apply slightly adjusted patch by Blaise.ru which moves parsing of result types to a separate functions thus ensuring that File types can't be used for procedure variables (just like they already couldn't be used as a result type for normal functions)
...
+ added test
git-svn-id: trunk@47810 -
2020-12-18 13:50:39 +00:00
florian
f0298f63d0
* allow absolute variables with an address to be used as syscall base
...
git-svn-id: trunk@47757 -
2020-12-11 17:32:41 +00:00
svenbarth
3d2ee097b5
* fix for Mantis #38083 : ensure that the sp_generic_dummy flag is set correctly on the new procsym when replacing a dummy sym
...
+ added test
git-svn-id: trunk@47424 -
2020-11-15 16:27:26 +00:00
Jonas Maebe
1c61c30cd2
* added "const" to some string parameters
...
git-svn-id: trunk@47299 -
2020-11-03 21:34:15 +00:00
florian
637976e83f
* patch by Marģers to unify internal error numbers, resolves #37888
...
git-svn-id: trunk@47103 -
2020-10-13 19:59:01 +00:00
yury
721e89fafd
* msdos: Force names of external routines to be all uppercase only in TP mode.
...
git-svn-id: trunk@46455 -
2020-08-16 10:45:45 +00:00
yury
9d3b105fab
* msdos: By default external routine names with the pascal calling convention must be all upper case. This is TP and TASM compatible.
...
git-svn-id: trunk@46432 -
2020-08-14 16:21:12 +00:00
svenbarth
56fdba2c9b
* partial fix for Mantis #37253 : po_hascallingconvention needs to be set as well when setting tprocdef.proccalloption
...
git-svn-id: trunk@45692 -
2020-06-25 20:42:28 +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
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