nickysn
748428b637
+ support the KOI8-R and KOI8-U Cyrillic encodings
...
git-svn-id: trunk@36445 -
2017-06-07 13:51:53 +00:00
nickysn
fce5fbd726
+ added cp3021 (Bulgarian MIK) code page support
...
git-svn-id: trunk@36444 -
2017-06-07 13:19:20 +00:00
florian
ea8774c18d
* split the sparc code generator into a generic base class and separate classes for sparc32 and sparc64
...
+ initial code for the sparc64 cg
git-svn-id: trunk@36440 -
2017-06-06 20:11:07 +00:00
maciej-izak
d3d29fa84c
Revert revisions 36133, 36128 from trunk.
...
git-svn-id: trunk@36436 -
2017-06-06 07:12:26 +00:00
nickysn
1e85730f67
+ created an unicode character map (.txt only for now) for the Bulgarian MIK
...
encoding. We're calling it cp3021, after the code page number, assigned to it
in Star printers (this number is unassigned by Microsoft and IBM).
git-svn-id: trunk@36435 -
2017-06-05 23:03:12 +00:00
florian
053124f78a
+ SPARC64 specific system unit code, derived from SPARC32, needs still to be adapted
...
git-svn-id: trunk@36433 -
2017-06-05 21:36:33 +00:00
florian
4036ecb5b5
+ stat record definition for SPARC64
...
git-svn-id: trunk@36432 -
2017-06-05 21:35:06 +00:00
nickysn
396eebbfb5
+ added support for iso8859-[3,4,6,7,8,9,10,11,13,14,15,16]
...
* charmap .txt files in rtl/ucmaps for iso8859-[1,2,5] also updated
git-svn-id: trunk@36425 -
2017-06-05 16:36:24 +00:00
florian
4be464231e
+ some SPARC64 specific files
...
git-svn-id: trunk@36424 -
2017-06-05 15:26:28 +00:00
nickysn
35be7348fb
+ added code pages 737, 775, 857, 860, 861, 862, 863, 864, 865 and 869
...
git-svn-id: trunk@36423 -
2017-06-05 14:25:15 +00:00
nickysn
4bbd405796
+ added .txt files in the ucmaps directory for code pages 437, 850 and 866
...
git-svn-id: trunk@36422 -
2017-06-05 12:59:07 +00:00
nickysn
28ce3e392c
* cp855.pp renamed cp855.pas for consistency with the other units in the same directory
...
git-svn-id: trunk@36420 -
2017-06-05 12:03:04 +00:00
florian
96f28cbb11
* move sysnr.inc to a rtl/linux/sparcgen dir
...
* adapt makefiles to reflect this
git-svn-id: trunk@36411 -
2017-06-03 20:52:41 +00:00
michael
01fc73b1ad
* Missing files added
...
git-svn-id: trunk@36409 -
2017-06-03 18:31:39 +00:00
nickysn
131c96d3e2
+ added x11 vendor specific keysym units: deckeysym, hpkeysym, sunkeysym and xf86keysym
...
git-svn-id: trunk@36408 -
2017-06-03 17:23:10 +00:00
michael
0fe12f2087
* Support unicode text drawing in freetype, canvas
...
git-svn-id: trunk@36402 -
2017-06-03 04:53:21 +00:00
michael
6a457fb06c
* Restore pattern demo, remove text writing.
...
git-svn-id: trunk@36400 -
2017-06-03 03:46:26 +00:00
florian
1f4432af6b
* sparc64 compiler can be build, not working yet
...
git-svn-id: trunk@36399 -
2017-06-02 20:13:30 +00:00
florian
832ad67d63
* more adaptions for SPARC64
...
git-svn-id: trunk@36381 -
2017-05-31 20:59:21 +00:00
florian
b59e4f5652
+ register .inc files for SPARC64
...
git-svn-id: trunk@36380 -
2017-05-31 20:58:30 +00:00
nickysn
4a39d4396e
+ support code page 855 (yet another cyrillic encoding)
...
git-svn-id: trunk@36378 -
2017-05-31 14:49:10 +00:00
florian
188ec0f0c7
+ basics for sparc64 support, we continue to use the name "sparc" for sparc32, both sparc are identified by sparcgen (dirs, defines etc.)
...
git-svn-id: trunk@36374 -
2017-05-30 21:17:17 +00:00
michael
9140d2a33f
* Patch from Graeme Geldenhuys to fix failing unit tests
...
git-svn-id: trunk@36355 -
2017-05-28 08:47:33 +00:00
Mattias Gaertner
dd48453c57
resolver: const evaluation: ranges, int+int
...
git-svn-id: trunk@36318 -
2017-05-25 10:47:48 +00:00
svenbarth
72c595eefe
+ implement support for Insert() for dynamic arrays; the parameter that is inserted can be a dynamic or static array of the same type, an array constructor or a single element of the arrays type; all that is determined based on the second type
...
+ added test
git-svn-id: trunk@36307 -
2017-05-23 19:11:49 +00:00
joost
408cae639f
* Moved all logic to determine in which repository to install a package into
...
one method.
* Re-designed the logic to determine where to install packages. Documented
the logic in repositorylogics.dia.
* Partly implemented this new logic.
* Added tests.
git-svn-id: trunk@36300 -
2017-05-22 21:20:22 +00:00
Jonas Maebe
744facb7fc
* properly support accepting register parameters of assembler routines in
...
the intel assembler reader: no longer parse them as register tokens,
but as local operands that are later converted into registers. This
ensures in particular that the type of the operand is set, which is
necessary in case this operand later subscripted (as in tasm10a)
git-svn-id: trunk@36288 -
2017-05-21 20:17:15 +00:00
svenbarth
d073e07244
+ add a test to ensure that array constructors correctly handle managed types (though there might be a temp floating around for longer than one might expect)
...
git-svn-id: trunk@36243 -
2017-05-18 20:04:29 +00:00
marcus
20a8228c9a
AmigaOS4: locale.library unit
...
git-svn-id: trunk@36204 -
2017-05-13 21:53:08 +00:00
joost
49d75902f6
* Cleanup build-files in case of an error + test
...
git-svn-id: trunk@36198 -
2017-05-12 20:50:05 +00:00
svenbarth
c90fbe1bf0
* fix for Mantis #31795 : append a $ to internal functions init, finalize, init_implicit and finalize_implicit as their section names otherwise look the same as those of user declared functions with the same name
...
+ added test
git-svn-id: trunk@36194 -
2017-05-12 13:32:37 +00:00
svenbarth
23ec3db057
+ added test for Mantis #30498 which is working now that array constructors are supported :)
...
git-svn-id: trunk@36193 -
2017-05-12 12:57:49 +00:00
svenbarth
5971e1327e
* fix for Mantis #31756 : have array constructors prefer open array parameters instead of dynamic array parameters for backwards compatibility
...
+ added test
git-svn-id: trunk@36175 -
2017-05-10 21:01:23 +00:00
nickysn
efc5e339d0
* use an enum instead of integer constants to represent inline numbers
...
* compinnr.inc include file converted to a unit
* inline number field size stored in ppu increased from byte to longint
* inlines in the parse tree (when written with the -vp option) now printed with
their enum name, instead of number
git-svn-id: trunk@36174 -
2017-05-10 14:41:43 +00:00
maciej-izak
6d1ad52dc5
* for symbols used in preprocessor expressions, we don't want to increase references count (for smaller final binaries). Partial fix for problem presented in mantis 31675. Preprocessor functions like declared() in uses section will work only for symbols declared in implicytly included modules (for example like for heaptrc by option -gh, see example/test tw31675.pp)
...
+ added tests
git-svn-id: trunk@36128 -
2017-05-05 22:27:07 +00:00
nickysn
c28d533bb0
+ support the cmpsd sse instruction in the at&t inline assembly reader
...
git-svn-id: trunk@36124 -
2017-05-05 15:46:47 +00:00
svenbarth
c552b2957a
* implement support for 4 Byte UTF-8 codepoints that result in a surrogate pair for UTF-16
...
git-svn-id: trunk@36116 -
2017-05-05 14:03:57 +00:00
svenbarth
52ddce608f
+ add test for enumerating a set without ranges
...
git-svn-id: trunk@36105 -
2017-05-04 22:00:29 +00:00
svenbarth
c349151504
+ add test for array constructors
...
git-svn-id: trunk@36104 -
2017-05-04 21:59:49 +00:00
joost
50fea20003
* Add FPMake-plugin dependencies to unit path + test
...
git-svn-id: trunk@36072 -
2017-05-03 20:34:55 +00:00
nickysn
881cb790a9
+ added tests that check side effect removal behaviour for the simplifications
...
added/changed today
git-svn-id: trunk@36053 -
2017-05-01 21:01:26 +00:00
nickysn
7821d729cd
+ a very basic test for correctness for the various simplifications, implemented
...
today. It does not check for side effects and thus it should work at any
optimization level, regardless of whether each optimization is done or not.
git-svn-id: trunk@36048 -
2017-05-01 20:17:07 +00:00
nickysn
012153201a
* moved the conversion of "x:=x op k" to inline nodes to a separate optimization
...
pass, so that it can be done after other optimizations, such as constant
propagation
git-svn-id: trunk@35961 -
2017-04-26 22:44:01 +00:00
nickysn
5393daa994
+ added compile time const evaluation for Bsf/Bsr(const) as well
...
git-svn-id: trunk@35941 -
2017-04-24 20:35:08 +00:00
nickysn
32395bbcbb
+ added compile time const evaluation optimization for PopCnt(const)
...
git-svn-id: trunk@35937 -
2017-04-24 16:11:43 +00:00
michael
22c496d055
* Boehm garbage collector memory manager
...
git-svn-id: trunk@35901 -
2017-04-22 13:01:33 +00:00
florian
50dba9ad66
* if both labels of a case label are equal, we still cannot skip the comparison in a jump tree, resolves #31589
...
git-svn-id: trunk@35880 -
2017-04-21 19:32:27 +00:00
michael
87b6646e02
* Demo for simple file server
...
git-svn-id: trunk@35822 -
2017-04-17 11:35:34 +00:00
joost
790c9995fe
* Added PackageVariant-test
...
git-svn-id: trunk@35807 -
2017-04-16 18:53:50 +00:00
joost
75e8cbd187
* Added ability to pass options to other packages + test
...
git-svn-id: trunk@35797 -
2017-04-14 23:00:52 +00:00
joost
13b73244b3
* Added tests for r35776 and r35777
...
git-svn-id: trunk@35778 -
2017-04-11 16:59:58 +00:00
joost
1119207fe3
* Added test-framework for fppkg
...
git-svn-id: trunk@35765 -
2017-04-10 15:47:30 +00:00
nickysn
256dc546ac
+ implemented the in_neg_assign_x and in_not_assign_x inline nodes, which will
...
be used (TBD in a future commit) for optimizing x:=-x and x:=not x on CPUs
that support performing these operations directly in memory (such as x86)
git-svn-id: trunk@35749 -
2017-04-07 16:02:40 +00:00
maciej-izak
ff28d5c85d
* Fix usage of class operators in generics types. If we have generic type declaration/implementation then constraint in comparison to not specialized generic is not "exact" nor "incompatible". Mantis #30534 .
...
git-svn-id: trunk@35740 -
2017-04-05 13:47:21 +00:00
maciej-izak
e4565378db
* Allow for "record constraint" in Delphi mode more types like: ordinal, float, classical objects, enumerations (instead of just record). Delphi compatibility. Fix for mantis #24073 .
...
git-svn-id: trunk@35739 -
2017-04-05 13:12:30 +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
sergei
8ae0864c9a
* x86 Intel asm reader: handle special variables "self" and "result" similar to regular ones in terms of subscripting. This makes fix from r34911 apply to these special variables. Resolves #31542 .
...
git-svn-id: trunk@35669 -
2017-03-27 19:58:55 +00:00
nickysn
fc59649a98
+ added inline nodes for handling and/or/xor in place (i.e. x:=x op y, where
...
op=and/or/xor). They generate more optimal code on certain architectures
(including x86). The new inline nodes aren't generated by the compiler yet,
but will be used in the future, at certain optimization levels, whenever the
pattern x:=x op y is detected by the compiler.
git-svn-id: trunk@35666 -
2017-03-26 23:16:53 +00:00
florian
0897bd154a
+ align(<int64>,<int64>) and align(<qword>,<qword>), resolves an issue reported on the mailing list with large records
...
+ tests
* trecordsymtable.insertunionst takes a asizeint parameter
* changed one aint into a asizeint
git-svn-id: trunk@35662 -
2017-03-26 09:35:56 +00:00
svenbarth
34327000d8
+ add test for Mantis #31521 which is already fixed, though I don't know which revision did it...
...
git-svn-id: trunk@35656 -
2017-03-25 13:41:27 +00:00
florian
0cf5ef459d
+ tcgtypeconvnode.second_class_to_intf supports LOC_CONSTANT as well, resolves #31596
...
git-svn-id: trunk@35655 -
2017-03-25 10:27:29 +00:00
florian
e8f7c9dfdd
+ test for large case statements
...
git-svn-id: trunk@35646 -
2017-03-23 17:57:31 +00:00
sergei
2357ca1fe6
* Fixed size suffix generated for CVTSI2SS, CVTSI2SD, VCVTSI2SS, VCVTSI2SD instructions. Mantis #31550 .
...
* tasm2.pp already detected this bug if run with -al option. Added a copy of tasm2.pp and configured it with -al, so it is run daily on all suitable machines.
git-svn-id: trunk@35626 -
2017-03-19 10:29:28 +00:00
michael
cd03ec93fe
* Patch from Karl-Michael Schindler (Bug ID 30402)
...
git-svn-id: trunk@35622 -
2017-03-18 18:11:18 +00:00
michael
b517ab7906
* Patch from Mattias Gaertner:
...
- ability to omit declarations
- removed obsolete code
+ Test unit for optimizations
git-svn-id: trunk@35615 -
2017-03-17 21:28:11 +00:00
michael
5ca540f3c7
* LibUSB headers from Anton Kavalenka (Bug ID 31095)
...
git-svn-id: trunk@35599 -
2017-03-15 18:38:45 +00:00
michael
7d92b0bd63
* unused Identifier analyser
...
git-svn-id: trunk@35586 -
2017-03-14 10:59:18 +00:00
florian
ad557a1da6
* allow call dword ptr eax in delphi, resolves #18225
...
git-svn-id: trunk@35572 -
2017-03-12 16:37:48 +00:00
michael
5de5fa9b7b
* Allow object generics, bug ID #31485
...
git-svn-id: trunk@35571 -
2017-03-12 12:11:12 +00:00
florian
bb8b8f2eae
* do not set IsMultithread on windows, if no second thread is started, resolves #30535
...
git-svn-id: trunk@35567 -
2017-03-11 21:35:48 +00:00
michael
9787c44c78
* Additional tests from Karl-Michael Schindler
...
git-svn-id: trunk@35521 -
2017-03-04 17:06:27 +00:00
svenbarth
7dc4f16db3
* fix for Mantis #31431 : allow specializations to allow private/protected variables that their generic could have accessed
...
git-svn-id: trunk@35510 -
2017-03-03 21:45:29 +00:00
svenbarth
ece13bcc5a
* fix for Mantis #31465 : only consider non-static fields when checking whether a record may be used with Default()
...
+ added test (Note: the test fails due to missing = operator, but without the fix there was a stack overflow)
git-svn-id: trunk@35508 -
2017-03-03 17:03:46 +00:00
Károly Balogh
14ba99ea09
netbsd: bits of the m68k support I started to hack together. non functional yet.
...
git-svn-id: trunk@35501 -
2017-03-01 17:26:23 +00:00
maciej-izak
16a11c8b7a
Bug fix for getting pointer to function result (mantis #10933 #19861 )
...
git-svn-id: trunk@35495 -
2017-03-01 13:23:02 +00:00
Jonas Maebe
1adde89621
* copy tcallnode.right after copying the callinitblock, as right can be a
...
temprefnode referring to a temp from the init block (mantis #31421 )
git-svn-id: trunk@35478 -
2017-02-24 19:57:40 +00:00
florian
b9dba41ad0
* intel assembler reader: scale factor in references can also be a constant symbol, resolves #31165
...
git-svn-id: trunk@35473 -
2017-02-22 20:59:52 +00:00
maciej-izak
533c89e128
* New test for management operators to detect regressions like regression fixed in r35461 (many times initialized global variables)
...
git-svn-id: trunk@35463 -
2017-02-21 14:20:15 +00:00
maciej-izak
92c0e57c59
* Test suite for management operators. We have management operators on trunk! Enjoy ^^
...
git-svn-id: trunk@35452 -
2017-02-19 14:34:09 +00:00
florian
3d6d5145bf
* fix handling of const string symbols in preprocessor expressions
...
+ accept string constants in preprocessor expressions, resolves #31246
git-svn-id: trunk@35432 -
2017-02-12 17:29:45 +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
maciej-izak
1d301b6dbe
More consequent writing of Rtti. Part of code related to recorddef moved from recorddef_rtti to write_child_data_rtti(). When typeinfo is used in code init Rtti is a child of the full Rtti. Commit also contains correction for code commited for mantis #31249 (r35376) and mantis #31305 (r35377) for objects. Before was impossible to compile code with usage of typeinfo() function for object without managed fields ("Undefined symbol" error).
...
+ Test attached
git-svn-id: trunk@35403 -
2017-02-06 18:52:37 +00:00
florian
41b028ffc0
* unpcklp* require aligned memory, so do not spill replace their first operand by a memory location, resolves #31332
...
git-svn-id: trunk@35400 -
2017-02-05 20:59:54 +00:00
Jonas Maebe
6d5339cdb6
* CP819/IBM819 should be mapped to Windows code page 28591 (ISO8859-1)
...
(mantis #30639 )
git-svn-id: trunk@35397 -
2017-02-04 22:44:36 +00:00
michael
eaa02f2f88
* Basic RTL for pas2js generated programs
...
git-svn-id: trunk@35384 -
2017-02-04 11:31:55 +00:00
svenbarth
11493de99b
+ add test from Mantis #31305 for completeness sake
...
git-svn-id: trunk@35377 -
2017-01-31 18:24:00 +00:00
svenbarth
c1390b3442
* fix for Mantis #31249 : applied (adjusted) patch provided by Maciej Izak
...
Commit message:
[PATCH] More consistent RTTI (also better performance) for classic
objects (reference to initrtti from fullrtti).
git-svn-id: trunk@35376 -
2017-01-31 18:21:53 +00:00
michael
a809705fb8
* New simple program to test if pparser parses some code
...
git-svn-id: trunk@35358 -
2017-01-29 14:50:34 +00:00
svenbarth
26135d605f
+ implement interface RTTI inspired by the changes from Steve Hildebrandt, yet not exactly the same. Like his implementation this one isn't Delphi compatible either.
...
+ added test
git-svn-id: trunk@35341 -
2017-01-27 17:00:15 +00:00
svenbarth
4742e826f6
+ add test for Mantis #23702 , just to be sure that we don't re-add that already solved problem
...
git-svn-id: trunk@35335 -
2017-01-27 13:58:54 +00:00
michael
27329429d9
* Fix possible buffer overflow (bug ID 31203)
...
git-svn-id: trunk@35330 -
2017-01-25 20:59:35 +00:00
Jonas Maebe
048666a25c
* when freeing a procdef that hasn't been registered for writing to the ppu
...
at the end of compiling a unit, also remove it from its owning procsym
in case the procsym does get written to the ppu (possible because you
can have extra overloads in the implementation) (mantis #25283 )
o also fixes webtbf/tw4103 on the platforms where this still failed
(on the platforms where it worked, it worked by accedent since the
compiler was accessing memory of a freed procdef)
git-svn-id: trunk@35309 -
2017-01-15 17:41:27 +00:00
Jonas Maebe
382bbc1201
- removed gotderef from valid_for_assign(), and return true at every place
...
where it used to be set to true (dereferencing a pointer always means
that regardless of what the pointer was, the resut is assignable)
(mantis #22979 )
o also removed gotpointer, since it was only used in combination with
gotderef
git-svn-id: trunk@35308 -
2017-01-15 16:32:51 +00:00
michael
180b93b326
* JSON2pas command-line tool added
...
git-svn-id: trunk@35297 -
2017-01-14 10:22:16 +00:00
michael
e6000e88d1
* Added JSON to pascal converter
...
git-svn-id: trunk@35296 -
2017-01-14 09:06:49 +00:00
michael
a33812f88c
* Improved router implemented
...
git-svn-id: trunk@35292 -
2017-01-13 22:26:46 +00:00
Károly Balogh
a8325b763f
fppkg: shortened the name of pkguninstalledsourcesrepository.pp
...
git-svn-id: trunk@35277 -
2017-01-12 13:35:08 +00:00
Jeppe Johansen
7e75457a3e
Added more Nordic Semi controllers. Created a new unit for NRF52x controllers with a more precise register naming following Nordic SDK conventions.
...
Patch from Paul Mitchell.
git-svn-id: trunk@35274 -
2017-01-10 20:30:20 +00:00
florian
1bea9e36eb
+ entropy test for random
...
git-svn-id: trunk@35260 -
2017-01-08 10:26:12 +00:00
florian
29a2c433f7
* -Sr option for iso mode: in case no command line parameter is passed, the file name for program parameters is derived from their variable name
...
git-svn-id: trunk@35257 -
2017-01-07 14:50:58 +00:00
svenbarth
6b641394d0
* fix for Mantis #31201 : don't write any RTTI for undefined defs (and while we're at it abort if an error def is encountered)
...
+ added test
git-svn-id: trunk@35256 -
2017-01-07 14:35:25 +00:00
Károly Balogh
58f85ed4e4
atari: dos unit skeleton for atari. to be implemented.
...
git-svn-id: trunk@35253 -
2017-01-07 01:15:45 +00:00
Károly Balogh
d084bd0d3b
aros: implemented pascal sysinit, will be shared across all cpus. also refactored the RTL build
...
git-svn-id: trunk@35237 -
2017-01-05 00:21:59 +00:00
Károly Balogh
419629c9b7
atari: some initial proof-of-concept AES unit, so first GEM app works
...
git-svn-id: trunk@35216 -
2016-12-30 10:33:21 +00:00
Károly Balogh
114c90ecca
tosunits: first bits of the Atari TOS/GEM interface package
...
git-svn-id: trunk@35214 -
2016-12-30 01:23:09 +00:00
Károly Balogh
51e28ac717
atari: reworked param handling once more, based on the Amiga code, fixes argv/argc
...
git-svn-id: trunk@35205 -
2016-12-27 17:12:49 +00:00
Károly Balogh
8760ff96e1
atari: new pascal startup code, reworked build, also ParamStr/ParamCount works now
...
git-svn-id: trunk@35201 -
2016-12-27 08:14:34 +00:00
svenbarth
150441627a
+ add test for Boolean RTTI
...
git-svn-id: trunk@35187 -
2016-12-23 16:05:57 +00:00
marcus
3f4e9cfcb7
Ami-Extra: example code for muihelper
...
git-svn-id: trunk@35165 -
2016-12-18 15:17:02 +00:00
marcus
b93a685ab8
Amiga: moved muihelper to ami-extra, added more macros, 64bit ready
...
git-svn-id: trunk@35163 -
2016-12-18 14:11:38 +00:00
svenbarth
d34acf3bc7
* fix for Mantis #31120 : check current_genericdef only if the current_procinfo isn't used
...
+ added test
Note: the test is added to webtbs although it's right now still failing, cause I'll remove the restriction for nested procedures since the compiler now supports them correctly. Due to the way we handle generics we don't have problems with them unlike Delphi.
git-svn-id: trunk@35147 -
2016-12-17 21:20:44 +00:00
svenbarth
a9d14fe30b
* extend TOrdType by entries for 64-bit values
...
* have tkInt64 and tkQWord entries also contain the OrdType field (basically the compiler can now use the same function to generate them only with different type kinds)
+ added test
git-svn-id: trunk@35135 -
2016-12-16 14:22:04 +00:00
svenbarth
460f309035
* fix for Mantis #31123 , applied patch by Maciej Izak
...
* adjusted test trtti10.pp due to renamed RecInitTable field
Original commit message:
Public interface for init table for records in TypInfo:
* Rename RecInitTable to RecInitInfo (because it is special kind of PTypeInfo for init table of record). Has more sense in practical usage.
+ New structure TRecInitData (and related PRecInitData) to handle data for (init) type info for records (aka init table)
+ New structure TInitManagedField and pointer type PInitManagedField (for init table)
+ Special helper property RecInitData to get PRecInitData for tkRecord
+ test attached
git-svn-id: trunk@35134 -
2016-12-16 13:43:12 +00:00
svenbarth
121a857af8
* fix for Mantis #31118 : applied patch by Maciej Izak to fix usage of wrong variable
...
+ added test
git-svn-id: trunk@35133 -
2016-12-15 13:47:26 +00:00
svenbarth
12dba952f0
* integration of Part 2 patch of Mantis #30687 with a few adjustments:
...
- indentation in ncgrtti.pas
- fewer ifdefs in rtti.inc
- InitTable/Terminator field as first field to avoid padding on targets that require proper alignment and have SizeOf(Pointer) > 4
Original message by Maciej Izak:
Breaking change for rtti layout for record rtti. Init table
is always accessible from regular rtti. Rtti table contains indirect
reference to init table, additionally init table contains nil-terminator (for
rtl purposes - the only way to determine kind of info : init or rtti). Pros:
* will be possible to create more Delphi compatible code for RTTI, finally end-user can access to *real* managed fields of records (some work on TypInfo.pp is still required but is not necessary).
* important step forward for management operators (anyway this commit is not directly related to management operators)
* much more optimal memory allocation/initialization/finalization for records created/destroyed by InitializeArray/FinalizeArray, for example:
type
TBar = record
f1,f2,f3,f4,f5,f6,f7,f8,f9: byte;
s: string;
end;
previously:
GetMem(PB, SizeOf(TBar));
InitializeArray(PB, TypeInfo(TBar), 1); // FPC_INITIALIZE was executed 10 times
now:
GetMem(PB, SizeOf(TBar));
InitializeArray(PB, TypeInfo(TBar), 1); // FPC_INITIALIZE is executed just once
+ test attached
git-svn-id: trunk@35125 -
2016-12-13 23:03:11 +00:00
svenbarth
17154fedaa
* move rtti unit from common directory to inc directory as the former is basically for non-Windows files
...
git-svn-id: trunk@35123 -
2016-12-13 22:04:32 +00:00
svenbarth
22e579cc74
* fix for Mantis #31107 : disallow calling of ordinary record methods using the record's type.
...
git-svn-id: trunk@35113 -
2016-12-12 22:08:28 +00:00
svenbarth
5fa181b5d9
* second fix for Mantis #31033 : also check for df_specialization instead of is_specialization for parameters to correctly handle nested types that aren't really true specializations themselves
...
+ added additional test
git-svn-id: trunk@35103 -
2016-12-10 19:47:09 +00:00
svenbarth
0c372f0beb
* fix compilation of Rtti unit on PowerPC: converting a Int64 to a Boolean failed (in this case with an internal error)
...
+ added a test though we should probably extend tcnvint2.pp to test converting ints to different sized boolean types...
git-svn-id: trunk@35101 -
2016-12-10 19:13:07 +00:00
svenbarth
3e5f8af01d
+ add RTTI unit from Joost's Attribute branch
...
* adjust unit to work without attributes
* adjust unit to work without unit list (TRttiContext.GetTypes is disabled due to this)
+ add ShortString support (due to an intermediary test I had done in $H-)
+ add unit test from Joost's Attribute branch
* adjust unit test accordingly (no attributes, no TRttiContext.GetTypes)
+ add ShortString tests
+ add testrunner for RTL-ObjPas tests using the new simpletestrunner
git-svn-id: trunk@35096 -
2016-12-09 20:45:46 +00:00
svenbarth
933e449848
+ add a simple test runner for FPCUnit (no parameters, only plain output, sets ExitCode depending on any failures/errors) that can be used with FPC's testsuite
...
git-svn-id: trunk@35095 -
2016-12-09 20:22:33 +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
michael
7ead78e71b
* Forgot to add fpfonttextmapping.pp
...
git-svn-id: trunk@35090 -
2016-12-09 14:24:14 +00:00
Jonas Maebe
18077d9530
* when determining the best candidates for overloaded method calls, apply
...
the scope penalty relative to the nearest symtable that contains one of
the applicable overloads, rather than relative to the nearest symtable
that simply contains a method with this name (based on patch by
Maciej Izak, mantis #25607 )
git-svn-id: trunk@35089 -
2016-12-09 13:39:42 +00:00
michael
4406ec7e68
* Forgot to add subsetter font
...
git-svn-id: trunk@35084 -
2016-12-09 13:22:48 +00:00
michael
b7083402cf
* Fix from Graeme adding Font subset embedding and underline/strikethrough
...
git-svn-id: trunk@35083 -
2016-12-09 12:51:06 +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
svenbarth
70817baf98
* since we already allow inline specializations in mode ObjFPC due to generic functions it's only consequential to also allow specializations after pointers (they are already allowed in mode Delphi).
...
+ added tests
* tgeneric87.pp and tgeneric88.pp are no longer considered as tests that should fail
git-svn-id: trunk@35078 -
2016-12-06 21:37:22 +00:00
Károly Balogh
eb6fe91208
amiga: proof-of-concept untested implementation for OS4/PowerPC Pascal startup code
...
git-svn-id: trunk@35076 -
2016-12-05 21:12:23 +00:00
Károly Balogh
b356b18675
amiga: forgot to commit the actual buildrtl.pp in the previous commit
...
git-svn-id: trunk@35069 -
2016-12-04 18:37:47 +00:00
Károly Balogh
788c622307
amiga: pascal startup code for 68k and buildrtl refactor
...
git-svn-id: trunk@35068 -
2016-12-04 18:21:24 +00:00
Károly Balogh
f3e33a9dde
morphos: new pascal-written internal startup code. also refactored the rtl build process for morphos
...
git-svn-id: trunk@35054 -
2016-12-04 00:15:41 +00:00
svenbarth
4fb77b71ec
* fix for Mantis #31029 , based on the patch provided by Silvio Clécio: PArrayOfByte is not necessary and in fact the purpose of TArrayOfByte is a different one from reference counting (namely to ensure correct passing of the parameter), so renamed accordingly (plus a comment); similar change in SetDynArrayProp. Also Get-/SetPropValue in Variants unit has been adjusted to make use of Get-/SetDynArrayProp.
...
+ added adjusted test
git-svn-id: trunk@35025 -
2016-11-30 19:32:41 +00:00
svenbarth
d9ea6aae4d
* fix for Mantis #30761 : always return the symbol found in the helper instead of doing this dependant on the presence of the overload attribute; for this the collection of all suitable overloads is done in tcallcandidates instead.
...
+ added test
git-svn-id: trunk@35024 -
2016-11-30 17:52:25 +00:00
svenbarth
6ba85c2a70
* second fix for Mantis #30626 : also search in parent classes for a suitable pre-existing specialization
...
+ added test
git-svn-id: trunk@35014 -
2016-11-29 17:04:07 +00:00
svenbarth
ebfeb5b62a
* fix for Mantis #30830 : also remove unregistered specializations from the procsym's deflist when they're removed to avoid an access to freed data
...
+ added tests (adjusted original test plus a mode Delphi variant)
git-svn-id: trunk@35012 -
2016-11-29 14:12:02 +00:00
svenbarth
bfaa26d16a
Commit r35010 also fixed Mantis #30524 .
...
+ added tests
git-svn-id: trunk@35011 -
2016-11-28 18:37:20 +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
7bb8873c83
* do not throw an internal error if in case of an previous error the parameter class of an errordef is requested, resolves #31016
...
git-svn-id: trunk@34984 -
2016-11-27 13:16:12 +00:00
florian
48fbd569fd
* support for the CDQE instruction, by Emelyanov Roman, resolves #30978
...
git-svn-id: trunk@34982 -
2016-11-27 12:42:22 +00:00
florian
da7e1b3769
+ tavraddrnode.pass_generate_code, avoiding unneeded moves
...
git-svn-id: trunk@34973 -
2016-11-26 19:31:33 +00:00
sergei
133fcb5ab2
* Fixed VMOVQ instruction encoding, now assembles correctly also in 32-bit code.
...
+ Test
git-svn-id: trunk@34949 -
2016-11-21 13:59:44 +00:00
Jonas Maebe
48ef33a8b3
* fixed interprocedural gotos for llvm
...
o ensure that the label's local "jumpbuf" variable gets moved to the
parentfpstruct soon enough
o don't generate global symbols for interprocedural labels: they're not
necessary if they are only used via setjmp/longjmp (all references are
local in that case), and if they are referenced via an assembler block
then we'll have to handle them by passing a blockaddress() expression
as parameter to that assembler block (which does not require a global
symbol, but which is not yet implemented)
git-svn-id: trunk@34946 -
2016-11-21 07:39:13 +00:00
sergei
ebe134febc
* Fixed memory reference size for MOVSS instruction, Mantis #29954 .
...
git-svn-id: trunk@34943 -
2016-11-21 03:31:25 +00:00
Jonas Maebe
a89a4d905f
+ test for already fixed mantis #30948
...
git-svn-id: trunk@34928 -
2016-11-20 11:44:25 +00:00
florian
10132bfafa
* removed accidently committed file
...
git-svn-id: trunk@34927 -
2016-11-20 11:26:48 +00:00
sergei
edf943a4f6
* Changed memory operand size for VMOVSS instruction to 32 bits, Mantis #29957 .
...
git-svn-id: trunk@34918 -
2016-11-18 23:37:01 +00:00
florian
56252d59f0
+ support for the PREFETCHTW1 instruction based on a patch by Emelyanov Roman, resolves #30933
...
git-svn-id: trunk@34917 -
2016-11-18 20:19:39 +00:00
svenbarth
63b0024e4c
* fix for Mantis #30626 : unset current_procinfo so that further specializations don't use a symtable to specialize themselves in that they shouldn't use (cause current_procinfo takes precedence)
...
git-svn-id: trunk@34916 -
2016-11-18 16:17:09 +00:00
svenbarth
0e7a9ad375
* partial fix for Mantis #30831 (partial, because no exception has been encountered yet): when checking whether the left node of a vmtaddrnode is a generic, don't rely on df_generic, but instead use is_generic which checks for a true generic (the other will also be true if it's merely a structured type declared (or specialized) inside another generic)
...
+ added test
git-svn-id: trunk@34915 -
2016-11-18 14:43:45 +00:00
svenbarth
fc5ce63134
* fix for Mantis #30832 : instead of checking a procdef's struct for df_generic check the procdef itself, this way global generic methods or generic methods that are part of non-generic classes or records are caught as well.
...
+ added test
git-svn-id: trunk@34914 -
2016-11-18 14:01:03 +00:00
florian
67570a6262
+ patch to support assigning class procedures to procedure variables by Ondrej Pokorny, resolves #30936
...
+ additional tests
git-svn-id: trunk@34909 -
2016-11-17 19:40:42 +00:00
florian
3f072b3e29
* workaround for issue #30348 , FPC allowes now 65535 sections in coff object files, but as the section index is normally signed, this is only a dirty workaround
...
git-svn-id: trunk@34904 -
2016-11-15 22:06:00 +00:00
sergei
b4904deea8
* MIPS: Fixed code generation for PIC global symbols with large offset, resolves #30552 .
...
git-svn-id: trunk@34902 -
2016-11-15 20:04:27 +00:00
florian
6d6a45c034
* add/sub nodes with nf_internal set should not do overflow checking, resolves #30889
...
* do not convert succ/pred into add/sub nodes if nf_internal is set
git-svn-id: trunk@34896 -
2016-11-13 21:18:39 +00:00
Jonas Maebe
b28221349e
- removed aoptcs unit and (dummy) units that used it
...
o remenants of a long abandoned attempt at adding a generic
assembler CSE optimiser
git-svn-id: trunk@34886 -
2016-11-13 16:06:14 +00:00
florian
9bff3ac624
* copy also pushedparasize when copying call nodes, resolves #30923
...
git-svn-id: trunk@34885 -
2016-11-13 14:46:55 +00:00
michael
5e6026b020
* Added KeepConnection by Silvio Clecio (Bug ID 30788)
...
git-svn-id: trunk@34875 -
2016-11-11 12:28:44 +00:00
michael
5af24e94ae
* Patch from wp to add BOM detection to CSV reader (bug ID 30897)
...
git-svn-id: trunk@34871 -
2016-11-11 10:03:14 +00:00
Tomas Hajny
ff02b2dfb5
+ added test based on bug #24504
...
git-svn-id: trunk@34850 -
2016-11-08 22:24:22 +00:00
marcus
f8a7708741
AROS: startupcode for arm-aros
...
git-svn-id: trunk@34820 -
2016-11-06 17:32:40 +00:00
florian
a27b07b342
+ more restrictions on pred/succ to dec/inc optimization
...
o check if the argument can be used as a call by reference parameter
o check if the argument has no side-effects
+ tests
git-svn-id: trunk@34816 -
2016-11-06 16:36:02 +00:00
pierre
89c1b68b14
* Delete regvars unit.
...
This unit was empty unless OLDREGVARS macro was set,
but this does not compile and no change has been made since 2011.
* Remove regvars from all _USES clauses.
git-svn-id: trunk@34808 -
2016-11-06 14:01:39 +00:00
florian
96858dd64d
+ additional tests which ensure that constant propagation is off
...
as the compiler optimizes the original tests too much with constant propagation
to keep them useful
git-svn-id: trunk@34796 -
2016-11-05 23:05:57 +00:00
florian
8bbd2e4030
+ test for issue #27744
...
git-svn-id: trunk@34790 -
2016-11-05 23:05:46 +00:00
marcus
31fe583ce2
morphunits: commodities library unit
...
git-svn-id: trunk@34769 -
2016-10-30 16:22:36 +00:00
marcus
3463e418f9
arosunits: Commodities library unit
...
git-svn-id: trunk@34768 -
2016-10-28 20:44:28 +00:00
florian
9c81e90e08
+ extension to iso mode: reset/rewrite can take a file name as a second parameter
...
git-svn-id: trunk@34726 -
2016-10-16 07:55:08 +00:00
florian
ec54cb2a7a
- unit not used anymore
...
git-svn-id: trunk@34723 -
2016-10-15 17:58:38 +00:00
svenbarth
d4e573c1e3
* fix for Mantis #27349 : nested classes might also reside inside records
...
+ added test
git-svn-id: trunk@34714 -
2016-10-13 20:40:47 +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
Jonas Maebe
5efb32285a
* fixed alignment for interface RTTI (patch by Alfred, mantis #30182 )
...
git-svn-id: trunk@34695 -
2016-10-09 12:34:01 +00:00
Károly Balogh
0af22b9177
rtl-objpas: clean up all the identical varutils variants and made all platforms except Windows to use the common one
...
git-svn-id: trunk@34686 -
2016-10-09 06:37:54 +00:00
Károly Balogh
f6222e44ef
rtl-objpas: remove system-specific varutils for Amiga-like systems which were in fact identical, added a common implementation and enable the package for atari as well
...
git-svn-id: trunk@34673 -
2016-10-08 18:00:20 +00:00
Károly Balogh
71a4087bc5
atari: new file for xbios defines
...
git-svn-id: trunk@34661 -
2016-10-08 13:24:40 +00:00
michael
95eb4ed2eb
* Added jsminifier unit
...
git-svn-id: trunk@34652 -
2016-10-08 08:14:42 +00:00
Jonas Maebe
233622157c
* don't attempt to load the VMT of a niln when taking the address of a
...
class method (mantis #30706 )
git-svn-id: trunk@34641 -
2016-10-07 16:41:32 +00:00
joost
174163ad81
* Added ability to add the location of directories containing packages, to
...
make all packages in those directories available to fppkg.
git-svn-id: trunk@34625 -
2016-10-04 19:46:35 +00:00
Károly Balogh
7bf2055ef9
atari: added an include file containing GEMDOS calls and other defines, to be used in the RTL
...
git-svn-id: trunk@34609 -
2016-10-03 23:12:05 +00:00
Jonas Maebe
a3afefc6cb
+ test for mantis #27522 (fixed in r29811)
...
git-svn-id: trunk@34601 -
2016-10-02 21:51:31 +00:00
Jonas Maebe
868370d727
+ InterlockedCompareExchangePointer() alias for InterlockedCompareExchange(pointer)
...
(mantis #29964 )
git-svn-id: trunk@34599 -
2016-10-02 12:57:07 +00:00
Jonas Maebe
94d7a7274b
* compare floating point default parameter values bytewise instead of as
...
floating point values, so that NaNs can also be compared (mantis #30299 )
git-svn-id: trunk@34597 -
2016-10-02 12:56:49 +00:00
Jonas Maebe
de60bfab9c
* make the string data of pchar constants read-only (mantis #30666 )
...
git-svn-id: trunk@34594 -
2016-10-02 12:56:40 +00:00
Károly Balogh
bfe904fb16
atari: dummy sysutils unit. to be implemented.
...
git-svn-id: trunk@34590 -
2016-10-02 01:58:32 +00:00
Károly Balogh
175cc52e8d
atari: added classes unit and a dummy threading implementation
...
git-svn-id: trunk@34589 -
2016-10-02 01:33:26 +00:00
Károly Balogh
39f043c7fd
atari: removed the ancient readme, stating there's no Makefile, as there's one now apparently
...
git-svn-id: trunk@34586 -
2016-10-01 16:39:48 +00:00
svenbarth
246de84ef3
* ensure that a finalization section is parsed before the generation of specializations as otherwise specializations in such sections would result in unresolved forward declarations
...
git-svn-id: trunk@34582 -
2016-09-30 15:41:35 +00:00
marcus
f2b60d07d3
MorphOS: added locale library unit
...
git-svn-id: trunk@34539 -
2016-09-17 14:51:38 +00:00
svenbarth
386b7ac154
* fix for Mantis #28753 : don't return generic dummys from single_type(); ensures that parameters correctly evaluate to error defs should generic dummies be used
...
git-svn-id: trunk@34534 -
2016-09-16 20:40:19 +00:00
svenbarth
ce18b10c81
* fix for Mantis #30530 : when the global/static symtable is reached defowner is Nil, so respect that in the loop condition
...
+ added test
git-svn-id: trunk@34532 -
2016-09-16 15:39:03 +00:00
svenbarth
50f2aab0ef
* fix for Mantis #22192 : handle the case that a specialization has the same name as the generic it's based on as in that case the typedef of the symbol is an errordef; therefor we need to use the symbol's real name
...
+ added test
git-svn-id: trunk@34530 -
2016-09-16 15:13:27 +00:00
svenbarth
2ea587f746
* fix for Mantis #30537 : also allow the parasymtable as a parent symtable when generating the mangled name as that is needed for generic functions
...
+ added test
git-svn-id: trunk@34527 -
2016-09-16 14:10:53 +00:00
svenbarth
0500c678e5
* fix for Mantis #30534 : don't consider all types with generic constraints as equal, but at least ensure that they have the same basetype (Note: this still needs a bit more improvement)
...
+ added test
git-svn-id: trunk@34526 -
2016-09-16 13:24:28 +00:00
michael
a55c176bef
* Patch from Mattias Gaertner: Record support, detect duplicate identifiers, bug fixes
...
git-svn-id: trunk@34520 -
2016-09-13 08:01:37 +00:00
marcus
97a4c7b9f7
AROS: added locale library unit
...
git-svn-id: trunk@34519 -
2016-09-12 20:53:58 +00:00
michael
7fec0f92af
* Fix bug ID #30469 (allow quoting to start inside values)
...
git-svn-id: trunk@34509 -
2016-09-11 12:24:57 +00:00
michael
8c63be40f9
* Fix bug ID #24983 : additional possibilities for boolean reading/writing
...
git-svn-id: trunk@34506 -
2016-09-11 08:04:36 +00:00
joost
79d2d05c58
* Replaced the local- and global-repositories with a list of repositories.
...
A repository can contain installed or packages available for installation.
The repositories have a helper-class that contains information about
where the packages are installed and such. Things like installing a
package from the current-directory are done using temporary 'fake'
repositories. The TpkgFPpkg-class keeps track of all repositories
and packages.
git-svn-id: trunk@34503 -
2016-09-10 21:15:26 +00:00