Commit Graph

602 Commits

Author SHA1 Message Date
Jeppe Johansen
f5e34990ae - Adds intrinsics to save/restore SREG when disabling interrupts.
- Adds nostackframe to stack frame investigation stubs.

git-svn-id: trunk@41898 -
(cherry picked from commit 12879adc2f)
2021-10-24 12:40:36 +02:00
svenbarth
946d9ec715 Merged revision(s) 39838 from trunk:
* only i386 uses oldfpccall for interrupts, all other architectures use now stdcall, resolves #34317
........

git-svn-id: branches/fixes_3_2@49176 -
2021-04-10 22:25:40 +00:00
svenbarth
c6e377b4a9 --- Merging r45972 into '.':
U    compiler/defcmp.pas
--- Recording mergeinfo for merge of r45972 into '.':
 U   .
--- Merging r47101 into '.':
U    compiler/pexpr.pas
A    tests/webtbs/tw37844.pp
--- Recording mergeinfo for merge of r47101 into '.':
 G   .
--- Merging r47253 into '.':
G    compiler/defcmp.pas
A    tests/webtbs/tw38012.pp
--- Recording mergeinfo for merge of r47253 into '.':
 G   .
--- Merging r47424 into '.':
U    compiler/pdecsub.pas
A    tests/webtbs/tw38083.pp
--- Recording mergeinfo for merge of r47424 into '.':
 G   .
--- Merging r47425 into '.':
U    compiler/nflw.pas
A    tests/webtbs/tw38058.pp
--- Recording mergeinfo for merge of r47425 into '.':
 G   .
--- Merging r47686 into '.':
U    compiler/ncal.pas
A    tests/test/tgenfunc23.pp
--- Recording mergeinfo for merge of r47686 into '.':
 G   .

git-svn-id: branches/fixes_3_2@47803 -
2020-12-17 21:47:29 +00:00
svenbarth
a5f9ff9507 Merged revision(s) 45692-45694 from trunk:
* partial fix for Mantis #37253: po_hascallingconvention needs to be set as well when setting tprocdef.proccalloption
........
- partial fix for Mantis #37253: use SOCKADDR_STORAGE provided by the WinSock2 unit (which also has the correct size)
........
- remove FPC 3.0 compatibility IFDEF
........

git-svn-id: branches/fixes_3_2@45699 -
2020-06-26 21:15:22 +00:00
svenbarth
364db85ec9 Merged revision(s) 44887 from trunk:
* 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: branches/fixes_3_2@45070 -
2020-04-25 14:08:12 +00:00
Jonas Maebe
eeb8c747d5 --- Merging r42499 into '.':
U    packages/univint/fpmake.pp
...
--- Recording mergeinfo for merge of r42499 into '.':
 U   .
--- Merging r42500 into '.':
U    packages/cocoaint/fpmake.pp
...
--- Recording mergeinfo for merge of r42500 into '.':
 G   .
--- Merging r42548 into '.':
G    packages/univint/src/AUComponent.pas
G    packages/univint/src/AudioUnitProperties.pas
--- Recording mergeinfo for merge of r42548 into '.':
 G   .
--- Merging r43684 into '.':
U    compiler/msg/errore.msg
...
--- Recording mergeinfo for merge of r43684 into '.':
 G   .
--- Merging r43687 into '.':
G    packages/univint/src/AudioComponents.pas
U    packages/univint/src/AudioServices.pas
--- Recording mergeinfo for merge of r43687 into '.':
 G   .

git-svn-id: branches/fixes_3_2@44035 -
2020-01-26 12:48:42 +00:00
marco
d24f4b0926 --- Merging r42998 into '.':
U    compiler/blockutl.pas
U    compiler/jvm/njvmutil.pas
U    compiler/jvm/pjvm.pas
U    compiler/ncal.pas
U    compiler/ninl.pas
U    compiler/pdecl.pas
U    compiler/pdecsub.pas
U    compiler/pdecvar.pas
U    compiler/pexpr.pas
U    compiler/pgenutil.pas
U    compiler/pmodules.pas
U    compiler/pparautl.pas
U    compiler/pstatmnt.pas
U    compiler/psub.pas
U    compiler/psystem.pas
U    compiler/ptype.pas
U    compiler/symcreat.pas
U    compiler/symdef.pas
U    compiler/symsym.pas
U    compiler/symutil.pas
--- Recording mergeinfo for merge of r42998 into '.':
 U   .
--- Merging r43116 into '.':
G    compiler/symsym.pas
A    tests/webtbf/tw36114.pp
--- Recording mergeinfo for merge of r43116 into '.':
 G   .

# revisions: 42998,43116

git-svn-id: branches/fixes_3_2@43442 -
2019-11-10 16:12:48 +00:00
marco
c4b9529d6b # revisions: 42328,42329
git-svn-id: branches/fixes_3_2@43401 -
2019-11-05 16:22:23 +00:00
Jonas Maebe
3ac703506c * rest of the previous accidental partial commit
git-svn-id: branches/fixes_3_2@41250 -
2019-02-07 19:56:21 +00:00
marco
2b01261f36 --- Recording mergeinfo for merge of r39673 into '.':
U   .
--- Merging r39693 into '.':
A    tests/tbs/tb0650.pp
U    compiler/symtable.pas
--- Recording mergeinfo for merge of r39693 into '.':
 U   .
--- Merging r39700 into '.':
U    compiler/msg/errore.msg
--- Recording mergeinfo for merge of r39700 into '.':
 G   .
--- Merging r39701 into '.':
U    compiler/msgtxt.inc
U    compiler/msgidx.inc
--- Recording mergeinfo for merge of r39701 into '.':
 G   .
--- Merging r39702 into '.':
U    compiler/pdecsub.pas
A    tests/test/tgeneric105.pp
--- Recording mergeinfo for merge of r39702 into '.':
 G   .
--- Merging r39703 into '.':
A    tests/test/tgenfunc18.pp
A    tests/test/tgenfunc17.pp
G    compiler/pdecsub.pas
--- Recording mergeinfo for merge of r39703 into '.':
 G   .
--- Merging r39715 into '.':
U    packages/rtl-extra/src/inc/objects.pp
A    tests/webtbs/tw34239.pp
--- Recording mergeinfo for merge of r39715 into '.':
 G   .
--- Merging r39727 into '.':
G    packages/rtl-extra/src/inc/objects.pp
--- Recording mergeinfo for merge of r39727 into '.':
 G   .

# revisions: 39673,39693,39700,39701,39702,39703,39715,39727

git-svn-id: branches/fixes_3_2@39834 -
2018-09-27 12:36:19 +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
nickysn
657685a8b6 * use sizesinttype instead of ptrsinttype for the index and high parameter of
open arrays/dynarrays/string-like char arrays, etc.

git-svn-id: trunk@34665 -
2016-10-08 13:56:24 +00:00
Károly Balogh
5db02f4202 atari: initial support for TOS syscalls
git-svn-id: trunk@34610 -
2016-10-03 23:37:30 +00:00
Károly Balogh
464ecab542 huge syscall support refactor for Amiga-likes. removed large chunks of ancient duplicated code, and in general tried to make the entire thing more maintainable and cleaner. also added support for AROS EAXBase syscall convention
git-svn-id: trunk@34416 -
2016-09-03 07:57:23 +00:00
svenbarth
08cd62fc7e * rework parse_proc_dec_finish.read_returndef a bit so that specializations as result types of generic routines are handled correctly
git-svn-id: trunk@34410 -
2016-09-02 15:46:08 +00:00
svenbarth
a4a1e9db12 * allow equal result types instead of exactly the same result types for generic functions if both are specializations (otherwise they would be considered as different if they depend on the generic function's generic types)
git-svn-id: trunk@34409 -
2016-09-02 15:43:49 +00:00
svenbarth
8b853571c6 * don't generate a warning if a "generic" token follows while parsing procedure directives (let's hope we'll never have to add a "generic" directive :/ )
+ added test

git-svn-id: trunk@34343 -
2016-08-19 14:07:36 +00:00
svenbarth
bb72c1c4df * declare various assembler symbols (VMT, RTTI, threadvars) as public assembler symbols
* declare public function alias as public assembler symbols

git-svn-id: trunk@34175 -
2016-07-22 13:11:24 +00:00
svenbarth
88108bc4df Extend "compilerproc" with the optional ability to specify an index (same syntax as for "internproc") which allows to map the routine to a syssym.
git-svn-id: trunk@33890 -
2016-06-03 20:53:33 +00:00
svenbarth
f8def6dbc9 Store and use procedure directives of generic routines.
scanner.pas, tscannerfile:
  + new method is_recording_tokens to check whether token recording is already active
pdecsub.pas, parse_proc_directives:
  * record tokens into the declaration token buffer of a generic routine if necessary
pgenutil.pas, generate_specialization_phase2:
  * process the procedure directives that had been recorded with the generic routine

git-svn-id: trunk@33824 -
2016-05-26 18:35:08 +00:00
Jonas Maebe
08d63e3408 * allow default parameters for constref (mantis #29992)
git-svn-id: trunk@33480 -
2016-04-10 21:27:29 +00:00
florian
cb4773432b + hardfloat directive (arm only): use hard float calling conventions regardless of the abi, resolves #29715
git-svn-id: trunk@33196 -
2016-03-06 15:47:31 +00:00