Commit Graph

50459 Commits

Author SHA1 Message Date
nickysn
b6d05dba9e * mark the sar/shl/shr/rol/ror_assign nodes as having side effects
git-svn-id: trunk@35781 -
2017-04-12 12:17:08 +00:00
nickysn
f514657e45 + implemented the sar/shl/shr/rol/ror inline modify-in-place nodes; the actual
optimization of "i:=i shl/shr k", etc statements is not performed yet

git-svn-id: trunk@35780 -
2017-04-12 00:41:15 +00:00
yury
252f9ef153 * pas2jni: Support for class references.
- Fixed inclusion of unneeded pointer types.

git-svn-id: trunk@35779 -
2017-04-11 18:34:58 +00:00
joost
13b73244b3 * Added tests for r35776 and r35777
git-svn-id: trunk@35778 -
2017-04-11 16:59:58 +00:00
joost
f38f4d637f * Handle directories that do no contain an installed package
git-svn-id: trunk@35777 -
2017-04-11 16:57:54 +00:00
joost
61739262c7 * Give a clear error when the source of a package is not available
git-svn-id: trunk@35776 -
2017-04-11 16:42:37 +00:00
joost
2aa623964e * Fix the location where the .cod-files are installed on unices.
git-svn-id: trunk@35775 -
2017-04-11 16:30:52 +00:00
nickysn
7b40bdaa6e + treat the new modify-in-place inline nodes as having side effects in
check_for_sideeffect()

git-svn-id: trunk@35774 -
2017-04-11 14:59:38 +00:00
nickysn
5bb77905cd * fixed the missing warnings for unused variables at -O3, when one of the new
modify-in-place inline nodes are used

git-svn-id: trunk@35773 -
2017-04-11 14:25:57 +00:00
nickysn
4697a653a4 + perform the "i:=i +/-/and/or/xor k" optimization when there are two typecasts
inserted. This makes the optimization work for more integer types.

git-svn-id: trunk@35772 -
2017-04-11 11:25:40 +00:00
joost
31bff45d19 * Test for r35770
git-svn-id: trunk@35771 -
2017-04-11 09:39:35 +00:00
joost
977a82b866 * Do not stop on invalid package-files, but show a warning + test
git-svn-id: trunk@35770 -
2017-04-10 22:06:24 +00:00
joost
a9d4b17638 * Solved possible AV
git-svn-id: trunk@35769 -
2017-04-10 21:13:44 +00:00
joost
e5be5bd460 * When no TestPath is given, use the default. The ExpandFileName avoided this
git-svn-id: trunk@35768 -
2017-04-10 21:00:51 +00:00
joost
d1d1c5a7bd Added notification to trace where packages are found
git-svn-id: trunk@35767 -
2017-04-10 20:58:36 +00:00
joost
7412276722 * Removed dead code
git-svn-id: trunk@35766 -
2017-04-10 20:54:02 +00:00
joost
1119207fe3 * Added test-framework for fppkg
git-svn-id: trunk@35765 -
2017-04-10 15:47:30 +00:00
nickysn
8d885ffde6 + write the inlinenumber of inline nodes in the node tree
git-svn-id: trunk@35764 -
2017-04-10 14:54:50 +00:00
nickysn
d8406c4227 + perform the "i:=-i" / "i:=not i" optimization even when there are typecasts
inserted; this makes the optimization work for all integer types

git-svn-id: trunk@35763 -
2017-04-10 14:06:19 +00:00
nickysn
98be270adb * fixed a memory leak in the "i:=-i" / "i:=not i" optimization
git-svn-id: trunk@35762 -
2017-04-10 13:27:29 +00:00
nickysn
876c0c5fd5 + added helper function are_equal_ints()
git-svn-id: trunk@35761 -
2017-04-10 13:22:50 +00:00
nickysn
e78f0aafcd - remove whitespace, was inserted by accident
git-svn-id: trunk@35760 -
2017-04-10 11:55:26 +00:00
joost
7b3275e2cd * Added missing slash in fppkg.cfg-template
git-svn-id: trunk@35759 -
2017-04-09 17:57:42 +00:00
nickysn
3616627d0b * at -O3 optimization level, convert "i:=not i" and "i:=-i" to the new
in_not_assign_x and in_neg_assign_x inline nodes, which may generate better
  code on certain cpus (such as x86)

git-svn-id: trunk@35758 -
2017-04-09 14:55:15 +00:00
nickysn
9187825e3a * fixed tnegnotassign1.pp on powerpc and other RISC cpus
git-svn-id: trunk@35757 -
2017-04-09 14:28:13 +00:00
joost
11b163ee18 * Resolved infinitive loop on an exception during the one-time-setup of a testsuite
git-svn-id: trunk@35756 -
2017-04-08 14:43:21 +00:00
joost
1888f8747f * Resolved some compiler-warnings
git-svn-id: trunk@35755 -
2017-04-07 22:43:41 +00:00
joost
cb402adf32 * Fixed mem-leaks
git-svn-id: trunk@35754 -
2017-04-07 22:41:02 +00:00
joost
39b780c3e3 * Fixed mem-leak
git-svn-id: trunk@35753 -
2017-04-07 22:23:29 +00:00
marco
f218076c8a * fix for #31645. Probably 16-bits mnemonics now really generate 16-bits opcodes,
so now really use 32-bit mnemonics for pushf/pusha and pop variants.

git-svn-id: trunk@35752 -
2017-04-07 22:08:58 +00:00
nickysn
c6680a32d7 * also support LOC_CREGISTER and LOC_CREFERENCE in in_not_assign_x and in_neg_assign_x
git-svn-id: trunk@35751 -
2017-04-07 21:33:56 +00:00
nickysn
6b43705437 * fixed compiler internal error when the in_not_assign_x/in_neg_assign_x are
applied to a LOC_REGISTER variable

git-svn-id: trunk@35750 -
2017-04-07 19:16:00 +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
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
nickysn
199574c7c6 * updated the compiler source files list in ppc8086.lpi
git-svn-id: trunk@35747 -
2017-04-07 12:40:20 +00:00
yury
ea61dee00b * ppudump: Mark objects with abstract methods in the JSON/XML output.
* pas2jni: Properly handle inherited classes when an ancestor has abstract methods.

git-svn-id: trunk@35746 -
2017-04-07 09:53:54 +00:00
nickysn
9093047a7a * fixed a bug in the i8086 32-bit rol/ror code generation method rm_fast_386
git-svn-id: trunk@35745 -
2017-04-06 15:55:43 +00:00
nickysn
1560f20e7f + implemented other 32-bit rol/ror by const methods for i8086 and added a
(hopefully) reasonable selection for them for all consts between 1 and 31

git-svn-id: trunk@35744 -
2017-04-06 15:41:39 +00:00
nickysn
0fd860d9e7 * refactored the code generation for 32-bit rol/ror by const for i8086, so it
uses less code repetition and allow choosing various methods (some of which
  will be implemented later and selected, according to the cpu and optimization
  settings (size vs speed))

git-svn-id: trunk@35743 -
2017-04-06 13:59:53 +00:00
Mattias Gaertner
c94df5db2a avl_tree: fixed using fNodeMgr, made Remove and RemovePointer functions to return true if node was found
git-svn-id: trunk@35742 -
2017-04-06 10:35:46 +00:00
nickysn
d5e33cce7f * generate better i8086 code for ror32 by 1 and 17
git-svn-id: trunk@35741 -
2017-04-05 14:16:00 +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
Mattias Gaertner
07c98e816f pastojs: external class bracket accessor
git-svn-id: trunk@35738 -
2017-04-05 07:35:52 +00:00
Mattias Gaertner
972b24286d fcl-passrc: added test for unit of only external stuff does not generate a hint
git-svn-id: trunk@35737 -
2017-04-05 07:35:14 +00:00
Mattias Gaertner
4bce2e2b4d pastojs: remove empty $impl
git-svn-id: trunk@35736 -
2017-04-04 23:00:14 +00:00
Mattias Gaertner
2afaeb60de fcl-passrc: nicer error message when calling property proc var with wrong args
git-svn-id: trunk@35735 -
2017-04-04 22:59:33 +00:00
nickysn
321876252b + enabled the rol/ror intrinsic on i8086
git-svn-id: trunk@35734 -
2017-04-04 22:37:58 +00:00
nickysn
0b1a54f924 * on 16-bit CPUs, avoid the unnecessary 32-bit conversion of the right shl/shr
parameter, when the operation is 32-bit (even when the operation is 32-bit,
  the shift count is only 16-bit on 16-bit CPUs, so using 32-bits is wasting an
  extra register and an extra instruction to initialize it)

git-svn-id: trunk@35733 -
2017-04-04 21:01:20 +00:00
Mattias Gaertner
2810dc5b44 pastojs: class const
git-svn-id: trunk@35732 -
2017-04-04 20:59:00 +00:00