Commit Graph

49730 Commits

Author SHA1 Message Date
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
florian
8b3478617d * enable more feature on avr, as long as no pascal level file I/O is used, this does not hurt
git-svn-id: trunk@34975 -
2016-11-26 19:44:55 +00:00
florian
bcb7061314 * made TObject usable, even if no ansistring support is available
git-svn-id: trunk@34974 -
2016-11-26 19:33:31 +00:00
florian
da7e1b3769 + tavraddrnode.pass_generate_code, avoiding unneeded moves
git-svn-id: trunk@34973 -
2016-11-26 19:31:33 +00:00
florian
bfb6d4d1b7 * enable test to work also with small targets taking only a shortint as longjmp argument
git-svn-id: trunk@34972 -
2016-11-26 18:42:15 +00:00
florian
0c238b72e5 + set/longjmp implementation for avr
git-svn-id: trunk@34971 -
2016-11-26 18:33:15 +00:00
michael
10360a823e * Fix bug ID #30960
git-svn-id: trunk@34970 -
2016-11-26 17:28:55 +00:00
michael
3e21810dbd * Change comments for AdjustLineBreaks (bug ID 30959)
git-svn-id: trunk@34969 -
2016-11-26 17:05:54 +00:00
michael
18f2592433 * float version of modulo (Patch from Thaddy De koning, bug ID #30744)
git-svn-id: trunk@34968 -
2016-11-26 16:57:34 +00:00
michael
ba35278552 * Patch from Werner Pamler to implement ^ in expression parser (Big ID 30970)
git-svn-id: trunk@34967 -
2016-11-26 16:16:57 +00:00
michael
784da563ef * Patch from Silvio Clecio to implement QualifiedClassName (bug ID 30985)
git-svn-id: trunk@34966 -
2016-11-26 13:53:27 +00:00