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
Mattias Gaertner
7f8cdc56d3
undo accidental commit: fppas2js: test TestFunctionResult
...
git-svn-id: trunk@35023 -
2016-11-30 10:29:13 +00:00
Mattias Gaertner
3bb089223b
fppas2js: test TestOperators1
...
git-svn-id: trunk@35022 -
2016-11-30 10:23:57 +00:00
Jonas Maebe
1afab1ab69
* moved the floating point constant range checking code from
...
pass_generate_code to pass_typecheck, so that it's also used by targets
that override pass_generate_code (fixes webtbs/tw16315b for LLVM)
git-svn-id: trunk@35021 -
2016-11-29 21:54:33 +00:00
Jonas Maebe
006c7e1ccf
* apply localalignmin/max to local variables for LLVM (fixes webtbs/tw15582)
...
git-svn-id: trunk@35020 -
2016-11-29 21:54:30 +00:00
Jonas Maebe
7af2663ed1
* fixed writing the VMT field of TP-style objects for typed constants if it
...
comes after the last defined field (previously, we emitted a bunch of
superfluous zero-bytes after that field due to bad accounting regarding
the last emitted field)
o fixes webtbs/tw1365.pp for LLVM, and removes junk bytes for all targets
git-svn-id: trunk@35019 -
2016-11-29 21:54:27 +00:00
Jonas Maebe
8cd84bd8e8
* stop updating llvmnextfieldindex once we have established that the current
...
typed constant does not match the equivalent LLVM definition (it's only
used to check whether any emitted data's type differs from the LLVM
definition's field types)
o fixed a potential out-of-bounds access related to this: the index of the
equivalent LLVM field kept getting increased and at some point we checked
whether the current emitted data's type was different from the LLVM field
type without verifying first that the LLVM equivalent field index was not
yet beyond the number of LLVM equivalent fields
git-svn-id: trunk@35018 -
2016-11-29 21:54:25 +00:00
Jonas Maebe
ee014fa4ff
* fixed handling of typed files for LLVM when ISO-like I/O is active: encode
...
the buffer in the type, and support typecasting the typed file to a
different size (needed to be able to pass it to the compiler helpers that
expected a "TypedFile", whose buffer is 0 bytes and which hence will
always have a smaller size than the original type) (fixes test/tisoext1)
git-svn-id: trunk@35017 -
2016-11-29 21:54:21 +00:00
florian
d0b2701693
* similiar fix for i386 as done in r34984 for x86-64
...
git-svn-id: trunk@35016 -
2016-11-29 20:41:33 +00:00
florian
091b31fc76
* fix avr compilation after r34975 by more tests against feature defines, resolves #31036
...
git-svn-id: trunk@35015 -
2016-11-29 20:37:58 +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
0a1e080089
* only create a new procsym for a specialization if it's indeed needed
...
git-svn-id: trunk@35013 -
2016-11-29 14:13:06 +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
ee466b9a28
* extend tdef.fullownerhierarchyname() with a parameter that skips the inclusion of a procdef's parameter declaration using the new pno_noparams option
...
git-svn-id: trunk@35009 -
2016-11-28 18:06:35 +00:00
svenbarth
930070a8ca
+ new tprocnameoption pno_noparams to prohibit tprocdef.customprocname() from adding the procdef's parameters
...
git-svn-id: trunk@35008 -
2016-11-28 18:01:53 +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
michael
a4e9a6d6e4
* Remove debug writeln
...
git-svn-id: trunk@35006 -
2016-11-28 12:50:51 +00:00
Jonas Maebe
1c820e9c8e
* similar change as in r34976 for the generic code: don't assume that if
...
a load node for a procsym has a self pointer, that we have to create
a procvar with a self pointer (e.g. when loading the address of a
static class method). Avoids the generation of superfluous code to
load self which is then not used afterwards
git-svn-id: trunk@35005 -
2016-11-27 21:54:50 +00:00
Jonas Maebe
26f9dabf56
* write the volatile flag for LLVM load/store operations if set
...
git-svn-id: trunk@35004 -
2016-11-27 21:44:32 +00:00
Jonas Maebe
4d951780d1
+ support for LLVM 3.8 and LLVM 3.9 IR to the llvm assembler writer
...
git-svn-id: trunk@35003 -
2016-11-27 21:44:29 +00:00
Jonas Maebe
3ea976fd2d
* fixed compilation of llvm compiler after r34996
...
git-svn-id: trunk@35002 -
2016-11-27 21:44:26 +00:00
Károly Balogh
74c1f2aec9
m68k: cosmetics (less C-ism)
...
git-svn-id: trunk@35001 -
2016-11-27 20:31:11 +00:00
florian
c32e41b551
+ add missing semicolon in fpc_initialize_array declaration, patch by Maciej Izak
...
git-svn-id: trunk@35000 -
2016-11-27 20:01:42 +00:00
florian
3faff7946d
* fix typo for endif VER3_0_0, patch by Maciej Izak
...
git-svn-id: trunk@34999 -
2016-11-27 20:01:41 +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
michael
5786182188
* Proper fix for bug ID #30697
...
git-svn-id: trunk@34997 -
2016-11-27 19:54:49 +00:00
Jonas Maebe
a25ebbba3e
+ added volatility information to all memory references
...
o separate information for reading and writing, because e.g. in a
try-block, only the writes to local variables and parameters are
volatile (they have to be committed immediately in case the next
instruction causes an exception)
o for now, only references to absolute memory addresses are marked
as volatile
o the volatily information is (should be) properly maintained throughout
all code generators for all archictures with this patch
o no optimizers or other compiler infrastructure uses the volatility
information yet
o this functionality is not (yet) exposed at the language level, it
is only for internal code generator use right now
git-svn-id: trunk@34996 -
2016-11-27 18:17:37 +00:00
Károly Balogh
6dff85df58
math: replace trunc() with int() in some functions working with floats to avoid some unnecessary int64->double conversions, as trunc returns an integer, which then has to be converted back to float
...
git-svn-id: trunk@34995 -
2016-11-27 18:08:32 +00:00
Károly Balogh
5c87e870fd
tabs to spaces fix, no functional changes
...
git-svn-id: trunk@34994 -
2016-11-27 17:59:41 +00:00
Károly Balogh
4ee06e7bec
m68k: implemented in_int_real support
...
git-svn-id: trunk@34993 -
2016-11-27 17:50:10 +00:00
Károly Balogh
c3e68d6b2d
inline: implemented the second pass stub calls for inl_int_real nodes
...
git-svn-id: trunk@34992 -
2016-11-27 17:48:36 +00:00
Károly Balogh
c4e954c9a5
m68k: added fint and fintrz instructions
...
git-svn-id: trunk@34991 -
2016-11-27 17:42:24 +00:00
Jonas Maebe
26a05518f8
* implement unary minus for floating point via -1.0*x instead of 0-x,
...
because otherwise -0.0 stays 0.0 (fixes webtbs/tw4534 for llvm)
git-svn-id: trunk@34990 -
2016-11-27 17:17:02 +00:00
Jonas Maebe
5dfaecdbcf
- removed duplicate (differing) rule for ctypes unit
...
git-svn-id: trunk@34989 -
2016-11-27 16:16:04 +00:00
michael
76f7f81c85
* Raise exception if BasicEventCreate fails in constructor (bug ID 30769)
...
git-svn-id: trunk@34988 -
2016-11-27 16:08:40 +00:00
Károly Balogh
975dd13dcb
m68k: fixed a copy paste error, which broke cos node on a coldfire fpu, effectively turning it into a sin node
...
git-svn-id: trunk@34987 -
2016-11-27 15:59:16 +00:00
michael
c0f183258f
* Added EProgrammerNotFound and EInvalidOpException, by Silvio Clecio (bug ID 30627)
...
git-svn-id: trunk@34986 -
2016-11-27 15:54:06 +00:00
Károly Balogh
a595877da3
m68k: in fmove + op + fmove optimizations, allow the ops precision to be different to the fmoves
...
git-svn-id: trunk@34985 -
2016-11-27 15:17:58 +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
michael
783f53d3a7
* Fix DateTimeToUnix, needs trunc instead of round (see bug ID #30697 )
...
git-svn-id: trunk@34983 -
2016-11-27 13:07:31 +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
44e5667372
* fix darwin rtl makefile for make 3.82, partly based on work by Alfred, resolves #30964
...
git-svn-id: trunk@34981 -
2016-11-27 12:27:25 +00:00
michael
c06ab3f0f3
* Fix bug ID #30954
...
git-svn-id: trunk@34980 -
2016-11-27 11:42:10 +00:00
Károly Balogh
98d4c426cb
m68k: some groundwork for an improved optimizer, now tries to optimize away MOVE/FMOVE based unnecessary register shuffling around ops when possible (with room for further improvements)
...
git-svn-id: trunk@34979 -
2016-11-27 11:23:11 +00:00
marcus
f426f8d225
Recreated fpcres Makefile (needed for arm-aros)
...
git-svn-id: trunk@34978 -
2016-11-27 10:56:56 +00:00
Jonas Maebe
477283031c
* fixed tprocvardef.size() for
...
a) C-blocks: they are equivalent to a voidpointertype, as they are
implicit pointer types
b) procvardefs created from static class methods (there is no
self pointer in this case)
o fixes webtbs/tw30936.pp with LLVM
git-svn-id: trunk@34977 -
2016-11-26 21:51:21 +00:00
Jonas Maebe
b2e99da3e6
* use tabstractprocdef.is_addressonly to determine whether a procvar is
...
stored in more than one register (has a self and a code pointer), instead
of assuming it always occupies more than one register if the original
procdef had a self pointer (can be different when getting the address
of a static class procedure)
git-svn-id: trunk@34976 -
2016-11-26 21:51:18 +00:00