svenbarth
1502a13e7c
* fix for Mantis #35028 : when the mainthread executes a queued ThreadMethod make sure that the queue entry is released even if an exception is raised
...
+ added test
git-svn-id: trunk@41280 -
2019-02-10 15:42:58 +00:00
svenbarth
b1ee29c836
* fix for Mantis #30205 : (adjusted) patch by Do-wan Kim to only use the default calling convention for exception handlers
...
+ added test
git-svn-id: trunk@41277 -
2019-02-10 11:26:46 +00:00
michael
3779d69075
* libmagic headers by Silvio Clecio
...
git-svn-id: trunk@41271 -
2019-02-09 19:57:11 +00:00
nickysn
8b17af1f89
+ added test for unit sortalgs, that tests the heapsort and randomized quicksort algorithms
...
git-svn-id: trunk@41247 -
2019-02-07 14:41:33 +00:00
nickysn
ec45f0069a
+ added unit SortAlgs to rtl-extra. It implements extra sorting algorithms
...
that can be used in place of the default QuickSort implementation from unit
SortBase. Currently, only HeapSort is implemented, but others will be added
in the future.
git-svn-id: trunk@41219 -
2019-02-04 14:34:13 +00:00
nickysn
5c4af27a7a
+ added test for the sortbase unit
...
git-svn-id: trunk@41195 -
2019-02-03 19:16:48 +00:00
nickysn
2a0eb54fd5
+ added a simple test that tests TList.Sort
...
git-svn-id: trunk@41181 -
2019-02-02 23:56:24 +00:00
nickysn
248fd313f8
+ introduced unit SortBase, which implements the foundation for pluggable
...
sorting algorithms. A default QuickSort implementation is provided by the
unit. Other units can be added, to provide other sorting algorithms (e.g.
HeapSort, MergeSort, IntroSort, etc.)
* TList and TFPList updated to use the current default sorting algorithm defined
in SortBase for their .Sort method.
git-svn-id: trunk@41167 -
2019-02-02 20:06:50 +00:00
Jonas Maebe
0db9ff5c39
* fixed packed bitsize calculation for types with a negative lower bound and
...
and upper bound just below the next power of two (mantis #34971 )
git-svn-id: trunk@41161 -
2019-02-01 17:31:53 +00:00
Károly Balogh
db055c8f0c
amicommon: moved MorphOS-specific lineinfo to amicommon, for upcoming AROS and OS4 support
...
git-svn-id: trunk@41091 -
2019-01-28 05:29:31 +00:00
florian
e24449bcfd
* if sub nodes of a commutative node contain conditionally executed nodes, these sub nodes might not be swapped
...
as this might result in some nodes not being executed, like temp. create nodes with init. code, see e.g. issue #34653 , resolves #34653
git-svn-id: trunk@40934 -
2019-01-20 12:55:20 +00:00
florian
925531b99c
* constrained generics are also compatible with formaldefs, resolves #34893
...
git-svn-id: trunk@40921 -
2019-01-19 21:23:36 +00:00
michael
57e7384a18
* Initial implementation of GNU TLS support for FPC SSL sockets
...
git-svn-id: trunk@40858 -
2019-01-14 10:26:22 +00:00
Károly Balogh
a527a40d12
morphos: add a custom lineinfo unit, prepared to parse stabs relocations in ELF relocatable objects, also featuring stronger address validation, and showing offsets in the executable instead of absolute addresses
...
git-svn-id: trunk@40854 -
2019-01-13 13:16:01 +00:00
florian
644c47e121
* when deciding about the case code generation in case of size optimization, the number of labels is relevant, not the covered range, resolves #34818
...
git-svn-id: trunk@40851 -
2019-01-13 10:32:00 +00:00
florian
dd072ce76b
+ seek for typefiles in iso mode, resolves #34848
...
git-svn-id: trunk@40850 -
2019-01-12 23:29:20 +00:00
Károly Balogh
a6aa3cc092
haiku: removed old i386 specific syscalls assembler code and no-libc startup code, copied from the BeOS port initially, and was never in use on Haiku. kept the libc-version of assembly startup code for now for reference.
...
git-svn-id: trunk@40831 -
2019-01-10 07:34:52 +00:00
Károly Balogh
9c2b113497
haiku: added cpu specific signal handler register contexts
...
git-svn-id: trunk@40827 -
2019-01-10 06:44:16 +00:00
Károly Balogh
93ee468fcb
haiku: zapped the old bethreads unit. it's apparently just an ancient version of cthreads, and haiku seems to use cthreads itself since day one.
...
git-svn-id: trunk@40826 -
2019-01-10 04:20:04 +00:00
Károly Balogh
c061f1480a
haiku: zapped syscalls support code, using the syscall interface directly on Haiku is discouraged, and it was never really supported with FPC
...
git-svn-id: trunk@40824 -
2019-01-10 03:53:44 +00:00
michael
efdabcd0cc
* Sample program from Silvio Clecio to generate server certificate
...
git-svn-id: trunk@40815 -
2019-01-09 10:26:55 +00:00
michael
e14c231d60
* Added makefiles for GnuTLS
...
git-svn-id: trunk@40813 -
2019-01-09 10:19:51 +00:00
michael
2ceb5c9683
* Add X509 functions and example from Silvio Clecio to generate private key
...
git-svn-id: trunk@40800 -
2019-01-07 19:59:22 +00:00
Károly Balogh
d6891557d3
haiku: add sighnd.inc for x86_64, the i386 version with minimal changes, probably needs to be better adapted for 64bit
...
git-svn-id: trunk@40793 -
2019-01-07 13:47:46 +00:00
Jonas Maebe
b2b34338e5
* give an error when trying to call an object instance method via a type node
...
(mantis #34821 )
git-svn-id: trunk@40785 -
2019-01-06 15:21:36 +00:00
michael
59cd593331
* Initial version of example
...
git-svn-id: trunk@40780 -
2019-01-06 11:39:20 +00:00
michael
f89431c4f7
* GNU TLS Library import
...
git-svn-id: trunk@40775 -
2019-01-05 18:21:49 +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
michael
b0c264948e
* Rework SSL handling to be pluggable, add HTTPS support to fphttpserver
...
git-svn-id: trunk@40769 -
2019-01-05 12:37:44 +00:00
Károly Balogh
efba70f82b
haiku: pascal sysinit code for haiku, will be needed for x86_64, nice to have for i386
...
git-svn-id: trunk@40754 -
2019-01-04 02:44:39 +00:00
svenbarth
04bbfd1746
* fix for Mantis #27378 : save and (more importantly) restore verbosity when switching a unit
...
+ added test
git-svn-id: trunk@40750 -
2019-01-03 20:31:34 +00:00
florian
22365a1f57
+ test for #27543 which is fixed meanwhile
...
git-svn-id: trunk@40731 -
2019-01-01 16:16:54 +00:00
florian
1641585655
* updated bcase.pp benchmark by Gareth Moreton, now used also as test
...
git-svn-id: trunk@40710 -
2018-12-30 22:21:03 +00:00
svenbarth
30b1a45704
+ add tests for TMethodImplementation for method and procedure variables
...
git-svn-id: trunk@40700 -
2018-12-29 19:21:20 +00:00
svenbarth
bef1b84d63
* move utility code to a separate unit
...
git-svn-id: trunk@40692 -
2018-12-29 19:20:51 +00:00
Jonas Maebe
7b313a2c15
* stop searching for methods to implement interfaces in parent classes after
...
encountering a method with the correct name that does not have the
"overload" directive (same logic as when looking for a call candidate,
to avoid errors when using a Pascal-level wrapper to call interface
methods, and Delphi-compatible since it always required "overload" for
overloaded methods)
o also catches calling convention mismatches like in webtbs/tw27349
git-svn-id: trunk@40683 -
2018-12-28 18:25:58 +00:00
florian
7f5c2fa3aa
* (modified) patch by Gareth Moreton: Speed improvement in case blocks, resolves #0034762
...
This patch improves the compiler where "case" statements are concerned, using jump tables more often and creating more efficient machine code in some situations:
* If a case block only contains one branch (not including the else block), the initial range check is removed, since this becomes wasted effort.
* If the else block is empty, the else label is set to the end label - though this doesn't decrease the code size, it takes a bit of strain off the peephole optimizer.
* On -O2 and above, some node analysis is now done on the branch labels. Most of the time this just redirects it to the end
label for empty blocks, but if the block contains a goto statement, it will redirect it to its destination instead,
thus increasing performance by not having multiple jumps (this won't get picked up by the peephole optimiser if the label addresses are in a jump table).
* Some checks now use what I call the 'true count' rather than the 'label count'. The true count includes each
individual value in a range - for example, 0..2 counts as 3. This increases the chance that a jump table will be
utilised in situations where it is more efficient than a linear list.
* For jump tables, if the case block almost covers the entire range (32 entries or fewer from full coverage),
the initial range check is removed and the gaps included in the jump table (pointing to the else label).
git-svn-id: trunk@40676 -
2018-12-27 18:31:55 +00:00
svenbarth
0f83458513
* previous Invoke() related commit also correctly fixed Mantis #34509
...
git-svn-id: trunk@40670 -
2018-12-26 22:59:48 +00:00
svenbarth
93e0cd9e1a
* fix for Mantis #34496 : correctly align stack so that SSE operations work correctly
...
git-svn-id: trunk@40666 -
2018-12-26 22:59:36 +00:00
svenbarth
e28dff523a
* with the change regarding property access lists this test is no longer considered correct
...
git-svn-id: trunk@40658 -
2018-12-26 11:26:08 +00:00
svenbarth
60adebfe28
* Mantis #34691 is fixed by previous change regarding property access list
...
git-svn-id: trunk@40657 -
2018-12-26 11:26:04 +00:00
svenbarth
539ed761ba
* a property access list must only consist of record or object fields; classes are not allowed
...
git-svn-id: trunk@40656 -
2018-12-26 11:26:01 +00:00
Jonas Maebe
acfa2088ef
+ test for previous commit
...
git-svn-id: trunk@40646 -
2018-12-25 17:52:56 +00:00
Jonas Maebe
70cadc7694
* fixed string constant length when going from utf-8 to single-byte code page
...
(mantis #33666 , patch by engkin)
git-svn-id: trunk@40637 -
2018-12-24 22:21:40 +00:00
michael
c0e680e277
* Load extension demo by Silvio Clecio
...
git-svn-id: trunk@40610 -
2018-12-21 23:09:40 +00:00
michael
51995c5cac
* Examples for extension
...
git-svn-id: trunk@40609 -
2018-12-21 23:08:00 +00:00
michael
f5a1fce16f
* Contribution by Silvio Clecio to make writing extensions possible
...
git-svn-id: trunk@40608 -
2018-12-21 23:06:14 +00:00
yury
21c867d3fc
* android: Use libc for sockets since the "accept" syscall is blocked by SECCOMP, but the "accept4" alternative is not available on old Android versions (2.3 and older).
...
git-svn-id: trunk@40532 -
2018-12-12 11:49:38 +00:00
nickysn
da5868b668
+ added method TBits.CopyBits for fast copying
...
git-svn-id: trunk@40524 -
2018-12-11 15:52:09 +00:00
pierre
e7aadde92f
Modify tbs/tb0588.pp to check that a warning is issued about non-initialized return value, moved to tbf directory
...
git-svn-id: trunk@40521 -
2018-12-11 08:47:59 +00:00
Jonas Maebe
52fec8a94a
* when optimising subsetreg moves for aarch64, take into account the fact
...
that the subsetreg itself can be 32 or 64 bit (mantis #33607 )
git-svn-id: trunk@40512 -
2018-12-09 14:46:52 +00:00
marcus
1bde958889
arosunits, morphunits, os4units: serial, CreateExtIO(), DeleteExtIO() for all amiga systems
...
git-svn-id: trunk@40497 -
2018-12-07 19:28:12 +00:00
michael
fd609fe19c
* Web browser compiler, initial implementation
...
git-svn-id: trunk@40471 -
2018-12-04 21:42:53 +00:00
florian
eeadf618b8
+ abi tag for i386
...
* arm abi tag moved into pascal file
git-svn-id: trunk@40454 -
2018-12-02 22:56:12 +00:00
michael
07f98847ca
* Refactored so compiler itself is filesystem agnostic
...
git-svn-id: trunk@40450 -
2018-12-02 18:41:38 +00:00
michael
aa956d2f70
* Refactor so PCU support is separated out
...
git-svn-id: trunk@40427 -
2018-12-01 19:03:41 +00:00
pierre
044fae62ea
Fix bug report 34605 and add corresponding test
...
git-svn-id: trunk@40377 -
2018-11-27 10:19:36 +00:00
Jonas Maebe
d1361ca6ed
* fixed adjustments of lower/upper bounds in range test optimization in case
...
of strictly smaller/greater comparisons (mantis #34385 )
git-svn-id: trunk@40344 -
2018-11-17 22:38:31 +00:00
svenbarth
251dfb6776
* don't allow constants of the record type that is currently being parsed; this would fail as soon as another field is added after the constant declaration
...
+ added tests
Note: unlike what bug report 27880 suggests Delphi also does *NOT* allow this (at least a current Delphi Tokyo) and fails with a "type is not completely defined" error, so this test belongs into the "failure" category
git-svn-id: trunk@40285 -
2018-11-11 22:08:29 +00:00
florian
9f16c34329
+ initial work for tls-based threadvar support on arm-linux
...
git-svn-id: trunk@40267 -
2018-11-07 22:02:58 +00:00
yury
4682ac269d
* Further improvement for r40180:
...
An uninitialized function Result of a managed type needs special handling.
When passing it as a var parameter a warning need to be emitted, since a user
may expect Result to be empty (nil) by default as it happens with local vars
of a managed type. But this is not true for Result and may lead to serious issues.
The only exception is SetLength(Result, ?) for a string Result. A user always
expects undefined contents of the string after calling SetLength(). In such
case a hint need to be emitted.
+ Tests for this.
git-svn-id: trunk@40216 -
2018-11-04 15:37:52 +00:00
florian
34d11046e0
* wrapcomplexinlinepara takes care of function results which need different temp. handling, resolves #34438
...
* tw34438 failed with -O3, fixes also dfa for inline functions returning results as "complex" parameter
git-svn-id: trunk@40202 -
2018-11-03 17:31:10 +00:00
Mattias Gaertner
a089496183
pas2js: logger adapted for pas2js
...
git-svn-id: trunk@40041 -
2018-10-25 19:43:08 +00:00
Mattias Gaertner
703f5ea97e
pas2js: started nodepas2js
...
git-svn-id: trunk@40037 -
2018-10-25 16:09:20 +00:00
Jonas Maebe
9bd931e931
* make "formal const/var" parameters the least preferred conversion
...
(mantis #32179 )
- removed code to handle conversion to formaldef parameters that are not by
reference (so the default conversion preference is kept)
git-svn-id: trunk@40012 -
2018-10-21 21:02:17 +00:00
Jonas Maebe
2a3eeab96d
* support for constant char/bool/enum indices in typed constant
...
index expressions (mantis #34055 )
* prevent all indirect structure indexing instead of only
ansi/wide/unicodestrings
git-svn-id: trunk@40010 -
2018-10-21 18:48:41 +00:00
Jonas Maebe
2c7c0d1144
* handle widechar constants directly in the scanner, instead of in the
...
overload selection (where you can't even know whether the string is
a valid widechar constant) (mantis #33875 )
git-svn-id: trunk@40009 -
2018-10-21 17:34:00 +00:00
Jonas Maebe
60277dda09
* fix crash when checking load nodes during inlining in case they don't
...
have a symtable set (happens for internally generated labels, like
$raiseaddr) (mantis #34442 )
git-svn-id: trunk@40008 -
2018-10-21 15:53:46 +00:00
michael
65433a005e
* Fix bug #0034429 , replace now can use escape sequences, and lineending can be set
...
git-svn-id: trunk@39993 -
2018-10-20 12:09:07 +00:00
pierre
92acd38f40
Fix for bug report #34380
...
git-svn-id: trunk@39986 -
2018-10-18 20:21:54 +00:00
yury
7b150102bf
+ Added test object files for x86_64-android.
...
git-svn-id: trunk@39964 -
2018-10-17 19:39:17 +00:00
yury
7ddf0a635c
+ Added the auto-generated list syscalls for mips64-android. It will be needed when mips64 is supported.
...
git-svn-id: trunk@39959 -
2018-10-17 17:16:05 +00:00
yury
e367577bf1
+ added support for x86_64-android target.
...
git-svn-id: trunk@39956 -
2018-10-17 16:56:27 +00:00
Jonas Maebe
0b246f3dbd
* converted Boolean8 to an internal type, and mapped Boolean to the
...
new internal pasbool1(type) (part of mantis #34411 )
o apply the _Bool x86-64 parameter passing rules only to pasbool1
git-svn-id: trunk@39949 -
2018-10-16 21:14:18 +00:00
florian
eea088c5f5
* allow nil to be assigned to generic types, resolves #34037
...
* niln is also a constant node
git-svn-id: trunk@39934 -
2018-10-14 07:38:13 +00:00
yury
9d7308df42
* Android: Reworked the startup code to use no assembly instructions. Generic assembler startup files contains only section data and are compiled for each CPU.
...
* Android: argc and argv are correct for shared libraries.
git-svn-id: trunk@39905 -
2018-10-08 16:48:41 +00:00
yury
da39d06d80
+ Added test object files for aarch64-android.
...
git-svn-id: trunk@39902 -
2018-10-08 08:29:23 +00:00
svenbarth
ea5f407c49
+ add a TFunctionCallManager that provides built in Invoke() support for x86_64-win64
...
git-svn-id: trunk@39894 -
2018-10-07 12:26:03 +00:00
svenbarth
a8b2ad31d1
* fix for Mantis #34355 : correctly check whether the array constructor is empty (aka []) or not
...
git-svn-id: trunk@39882 -
2018-10-07 12:25:24 +00:00
florian
5604e98b1c
+ lazarus project files for the avx assembler test generators
...
git-svn-id: trunk@39873 -
2018-10-07 10:10:16 +00:00
yury
8c59eb1ce5
* Regenerated makefiles to support aarch64-android.
...
git-svn-id: trunk@39863 -
2018-10-06 09:36:03 +00:00
yury
671d31df1d
+ Added support for the aarch64-android target.
...
git-svn-id: trunk@39862 -
2018-10-06 09:33:09 +00:00
michael
e6574526db
* Fix bug #34348
...
* Backport pas2js changes/bugfixes
* Split extjs dataset from json dataset
git-svn-id: trunk@39841 -
2018-09-30 08:15:18 +00:00
florian
352fb866ef
* is_range_test returns false if "lower" bound is greater than "upper" bound
...
git-svn-id: trunk@39837 -
2018-09-27 20:24:52 +00:00
florian
a34d4e715c
Merged riscv_new branch
...
git-svn-id: trunk@39813 -
2018-09-26 19:49:08 +00:00
svenbarth
bf91991bae
* fix for Mantis #34332 : allow 2 parameter form of Copy also for ShortString variables
...
+ added test
git-svn-id: trunk@39802 -
2018-09-25 19:10:06 +00:00
svenbarth
9a99ab9dda
* fix for Mantis #34287 : correctly handle "inherited method" calls if "method" is a generic (no matter if it's mode Delphi or not)
...
+ added test
git-svn-id: trunk@39787 -
2018-09-21 15:16:18 +00:00
svenbarth
06267006f3
* explicitely handle the boolean types to determine the bit size as all of them have the bit size 1
...
+ added test
git-svn-id: trunk@39786 -
2018-09-21 13:24:49 +00:00
marco
25369b556d
* set EOL properties on data2inc.exm since it is a textfile.
...
git-svn-id: trunk@39784 -
2018-09-21 08:28:46 +00:00
svenbarth
00663728b5
* fix for Mantis #34239 : the parent VMT is an indirect reference due to the changes for dynamic packages for quite some time already, so handle that accordingly
...
+ added test
git-svn-id: trunk@39715 -
2018-09-08 14:56:09 +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
072699d38a
* protect the destructors of tabstractrecordsymtable and twithsymtable against executing when called with a refcount > 1 (this fixes Mantis #34210 )
...
+ added simplified test
git-svn-id: trunk@39693 -
2018-08-31 19:16:45 +00:00
svenbarth
10886d8cef
* fix for Mantis #34206 : when specializing nested routines of a generic routine we don't need access to their genericdef (which isn't available anyway in other units when loading from PPU) as their definition is completely contained in the token stream
...
+ added simplified test for the problem
git-svn-id: trunk@39692 -
2018-08-31 16:11:05 +00:00
marco
315fe21718
* deprecations, remove oldlinux.
...
git-svn-id: trunk@39663 -
2018-08-23 07:57:56 +00:00
marco
9b969c6cca
* second part processunicode commit.
...
git-svn-id: trunk@39627 -
2018-08-18 13:56:21 +00:00
marco
b7e6492119
* Unicode version TProcess in two commits.
...
* first misc files & rename process.pp -> processbody.inc
Next commit will add new process.pp + update of processbody.inc to preserve history.
git-svn-id: trunk@39626 -
2018-08-18 13:55:11 +00:00
florian
a825a66d01
* IntPower inverts the base first for negative exponents and multiplies then, resolves #34124
...
git-svn-id: trunk@39621 -
2018-08-16 20:45:35 +00:00
michael
677cc1c930
* Type-safe dataset access implementation and code generator
...
git-svn-id: trunk@39617 -
2018-08-15 10:54:36 +00:00
pierre
76d3893d78
Changes for symbian target OS, adding most of standard units, as empty stubs
...
git-svn-id: trunk@39578 -
2018-08-06 15:16:55 +00:00