Commit Graph

50440 Commits

Author SHA1 Message Date
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
Mattias Gaertner
5c9c8024be fcl-passrc:
pasresolver: class const
  pasuseanalyzer: no hints for abstract method

git-svn-id: trunk@35731 -
2017-04-04 20:58:29 +00:00
nickysn
b957b65ec8 * generate better i8086 code for 64-bit shl/shr, by masking the shift count by 63
git-svn-id: trunk@35730 -
2017-04-04 17:58:00 +00:00
Mattias Gaertner
6bb2dcf350 pastojs: updated error strings
git-svn-id: trunk@35729 -
2017-04-04 17:25:58 +00:00
Mattias Gaertner
58791a0b5c fcl-passrc: fixed checking proc arg base type from different units, fixed scanner eof row, fixed fail test messages
git-svn-id: trunk@35728 -
2017-04-04 17:25:15 +00:00
nickysn
6580dfee39 * generate better i386 code for 64-bit shl/shr, by masking the shift count by
63, instead of comparing it to 64 and branching. Note that, although this
  changes the behaviour of 64-bit shifts by values larger than 64 (when stored
  in a variable), it actually makes them consistent with both the code,
  generated on x86_64, as well as with 64-bit shift by constant on i386 itself.

git-svn-id: trunk@35727 -
2017-04-04 16:28:54 +00:00
nickysn
76cb419241 * use 16-bit 386+ instructions (shld,shrd) for performing fast 32-bit
shl/shr/sar on i8086, in a_op_const_reg, when the target CPU is set to 80386
  or later

git-svn-id: trunk@35726 -
2017-04-04 14:40:29 +00:00
nickysn
0ab4f01668 * implemented fast (loopless) 32-bit shift by constant for 8086 as well
git-svn-id: trunk@35725 -
2017-04-03 21:04:59 +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
nickysn
0f2ad7b712 * generate faster (i.e. loopless) code for 32-bit shl/shr/sar by const on 186+
git-svn-id: trunk@35723 -
2017-04-03 20:37:21 +00:00
maciej-izak
ee4ae1254f undo accidental commit (r35721) :/
git-svn-id: trunk@35722 -
2017-04-03 17:10:20 +00:00
maciej-izak
b4b87a841c git-svn-id: trunk@35721 - 2017-04-03 17:08:01 +00:00
Mattias Gaertner
e71ac95b69 fcl-passrc: pasuseanalyzer: no hint assigned but never used for out argument
git-svn-id: trunk@35720 -
2017-04-03 15:52:36 +00:00
Mattias Gaertner
dac17860c4 fcl-passrc: pasresolver: when accessing a record member, access the record too
git-svn-id: trunk@35719 -
2017-04-03 15:20:55 +00:00
Mattias Gaertner
457d23a151 fcl-passrc: pasresolver: check proc type or proc var
git-svn-id: trunk@35718 -
2017-04-03 13:01:50 +00:00
maciej-izak
322720236c + added missing dwarf constants: DW_FORM_sec_offset, DW_FORM_exprloc and DW_FORM_flag_present
git-svn-id: trunk@35717 -
2017-04-03 10:42:27 +00:00
Mattias Gaertner
e9791ceffc pas2js: started pass property by reference
git-svn-id: trunk@35716 -
2017-04-03 07:56:29 +00:00
Mattias Gaertner
632b973ed6 fcl-passrc: comments, analyzer option paoKeepPublished
git-svn-id: trunk@35715 -
2017-04-03 07:55:49 +00:00
Mattias Gaertner
bceb016f5f pastojs: added array params to external class 'Array' [integer]:jsvalue, 'Object' [string]:jsvalue
git-svn-id: trunk@35714 -
2017-04-02 18:54:04 +00:00
Mattias Gaertner
d4c801b708 fcl-passrc: pasresolver: allow adding custom arram params
git-svn-id: trunk@35713 -
2017-04-02 18:52:17 +00:00