Commit Graph

989 Commits

Author SHA1 Message Date
Sven/Sarah Barth
8b90df2ce2 * an objectdef also requires an init for its members if a member (or a member of one of the parents) has a complex initialization
+ added test

(cherry picked from commit 27c1bb3bea)
2022-08-26 16:12:29 +02:00
svenbarth
f455d66a75 Merged revision(s) 47794-47795, 47826 from trunk:
* apply patch by Blaise.ru to allow record methods to be assigned to method variables as well (this is Delphi compatible)
+ added test
........
* apply patch by Blaise.ru to allow specializations for the result type of function and method variables
+ added tests
........
* fix for Mantis #38238: when creating a copy of a procdef for a procvar set the methodpointer flag also for methods of records
+ added test
........

git-svn-id: branches/fixes_3_2@48653 -
2021-02-11 21:30:38 +00:00
florian
06a0e48958 -- Zusammenführen von r43183 in ».«:
U    compiler/dbgdwarf.pas
-- Aufzeichnung der Informationen für Zusammenführung von r43183 in ».«:
 U   .
-- Zusammenführen von r47286 in ».«:
U    compiler/symdef.pas
-- Aufzeichnung der Informationen für Zusammenführung von r47286 in ».«:
 G   .
-- Zusammenführen von r44070 in ».«:
U    rtl/objpas/sysutils/sysstr.inc
-- Aufzeichnung der Informationen für Zusammenführung von r44070 in ».«:
 G   .

git-svn-id: branches/fixes_3_2@47912 -
2020-12-30 14:52:55 +00:00
svenbarth
036c9f7ff2 --- Merging r45365 into '.':
U    compiler/systems/t_embed.pas
--- Recording mergeinfo for merge of r45365 into '.':
 U   .
--- Merging r45707 into '.':
U    compiler/defcmp.pas
A    tests/tbs/tb0675.pp
--- Recording mergeinfo for merge of r45707 into '.':
 G   .
--- Merging r46279 into '.':
U    compiler/pexpr.pas
A    tests/test/tarrconstr8.pp
--- Recording mergeinfo for merge of r46279 into '.':
 G   .
--- Merging r47110 into '.':
U    compiler/symdef.pas
A    tests/tbs/tb0679.pp
A    tests/tbs/tb0680.pp
--- Recording mergeinfo for merge of r47110 into '.':
 G   .

git-svn-id: branches/fixes_3_2@47819 -
2020-12-19 21:21:05 +00:00
svenbarth
e6ad8a0dfa Merged revision(s) 44172, 44188, 45457 - 45458, 45645, 46218, 46953 from trunk:
r46953
* fix for Mantis #37806: allow undefineddefs for Include() and Exclude() + added tests
---------------------
r46218
* fix for Mantis #37187: inside generics the constant code in pexpr does not handle all cases and thus current_procinfo needs to be checked as well + added test
---------------------
r45645
* correctly set the generic related defoptions for an outlined procdef
---------------------
r45458
  * make more use of is_typeparam
---------------------
r45457
  * constrained type parameters are not undefined defs, resolves #37107
---------------------
r44188
* keep track of the fileposinfo for generic constraints
---------------------
r44172
* only resolve a dummy symbol if it is a type symbol (thus truly a dummy symbol) + added tests
---------------------

git-svn-id: branches/fixes_3_2@47802 -
2020-12-17 21:31:16 +00:00
Jonas Maebe
76045bfc04 * merged macOS/AArch64 support + revisions these changes depended on
git-svn-id: branches/fixes_3_2@46866 -
2020-09-15 19:40:36 +00:00
svenbarth
cbe9654b04 Merged revision(s) 44072-44074 from trunk:
* have the module keep track whether it was loaded from a PPU with a different endianess than the current host system
........
* for deciding whether to swap a generic's buffer use the module's flag instead of the def's
........
- remove generic_buf_needs_swapping again as that is now handled with tmodule.change_endian of the generic's module
........

git-svn-id: branches/fixes_3_2@44080 -
2020-02-01 15:06:24 +00:00
pierre
7062177e1b Merge of commit r44056
------------------------------------------------------------------------
r44056 | pierre | 2020-01-28 23:43:56 +0000 (Tue, 28 Jan 2020) | 1 line

 Hopefully fix problems related to loading of ppufile generated with other endianess for generics
------------------------------------------------------------------------
--- Merging r44056 into '.':
U    compiler/pdecl.pas
U    compiler/pgenutil.pas
U    compiler/scanner.pas
U    compiler/symdef.pas
--- Recording mergeinfo for merge of r44056 into '.':
 U   .

git-svn-id: branches/fixes_3_2@44060 -
2020-01-29 21:50:42 +00:00
marco
d24f4b0926 --- Merging r42998 into '.':
U    compiler/blockutl.pas
U    compiler/jvm/njvmutil.pas
U    compiler/jvm/pjvm.pas
U    compiler/ncal.pas
U    compiler/ninl.pas
U    compiler/pdecl.pas
U    compiler/pdecsub.pas
U    compiler/pdecvar.pas
U    compiler/pexpr.pas
U    compiler/pgenutil.pas
U    compiler/pmodules.pas
U    compiler/pparautl.pas
U    compiler/pstatmnt.pas
U    compiler/psub.pas
U    compiler/psystem.pas
U    compiler/ptype.pas
U    compiler/symcreat.pas
U    compiler/symdef.pas
U    compiler/symsym.pas
U    compiler/symutil.pas
--- Recording mergeinfo for merge of r42998 into '.':
 U   .
--- Merging r43116 into '.':
G    compiler/symsym.pas
A    tests/webtbf/tw36114.pp
--- Recording mergeinfo for merge of r43116 into '.':
 G   .

# revisions: 42998,43116

git-svn-id: branches/fixes_3_2@43442 -
2019-11-10 16:12:48 +00:00
pierre
663c97ed23 Merge of revisions 41425 from trunk to fixes_3_2
------------------------------------------------------------------------
r41425 | pierre | 2019-02-23 23:03:29 +0000 (Sat, 23 Feb 2019) | 11 lines

  + compiler/symdef.pas: Add missing call to tderef.reset methods in all tdef constructors.
  + compiler/sysmsym.pas: Do the same for for all tsym constructors.
  + compiler/symtype.pas: Generate internalerror in  tcompilerppufile.putderef
    if a deref field has index -1, as this means that buildderef was not called
    while it should have been called.
  + compiler/symtable.pas: Fix bug report itself by adding an extra local variable
    CHANGED to add extra cycles in tstoredsymtable.buildderef_referenced method.

New tests for this bug report: tests/webtbs/tw35139.pp and  tests/webtbs/tw35139a.pp


------------------------------------------------------------------------
--- Merging r41425 into '.':
U    compiler/symtype.pas
U    compiler/symdef.pas
U    compiler/symsym.pas
U    compiler/symtable.pas
A    tests/webtbs/tw35139.pp
A    tests/webtbs/tw35139a.pp
--- Recording mergeinfo for merge of r41425 into '.':
 U   .

git-svn-id: branches/fixes_3_2@41620 -
2019-03-06 13:51:14 +00:00
Jonas Maebe
3ac703506c * rest of the previous accidental partial commit
git-svn-id: branches/fixes_3_2@41250 -
2019-02-07 19:56:21 +00:00
pierre
d8b0ded10c Marge of more trunk fixes into fixes branch.
------------------------------------------------------------------------
r39725 | pierre | 2018-09-10 13:28:33 +0000 (Mon, 10 Sep 2018) | 1 line

 Add branches for 3.2.0, 3.2.1 and 3.3.1 versions
------------------------------------------------------------------------
--- Merging r39725 into '.':
U    tests/utils/testsuite/utests.pp
--- Recording mergeinfo for merge of r39725 into '.':
 U   .
------------------------------------------------------------------------
r39733 | pierre | 2018-09-11 08:16:56 +0000 (Tue, 11 Sep 2018) | 1 line

 sparc64-linux objects recompiled with GCC 7.3.0
------------------------------------------------------------------------
--- Merging r39733 into '.':
U    tests/test/cg/obj/readme.txt
U    tests/test/cg/obj/linux/sparc64/ctest.o
U    tests/test/cg/obj/linux/sparc64/cpptcl1.o
U    tests/test/cg/obj/linux/sparc64/cpptcl2.o
U    tests/test/cg/obj/linux/sparc64/tcext3.o
U    tests/test/cg/obj/linux/sparc64/tcext4.o
U    tests/test/cg/obj/linux/sparc64/tcext5.o
U    tests/test/cg/obj/linux/sparc64/tcext6.o
--- Recording mergeinfo for merge of r39733 into '.':
 G   .
------------------------------------------------------------------------
r39808 | pierre | 2018-09-26 09:29:33 +0000 (Wed, 26 Sep 2018) | 1 line

Disable libraries not compiling for jvm-java or jvm-android targets
------------------------------------------------------------------------
--- Merging r39808 into '.':
U    packages/fppkg/fpmake.pp
U    packages/fcl-base/fpmake.pp
U    packages/rtl-extra/fpmake.pp
U    packages/hermes/fpmake.pp
U    packages/fcl-extra/fpmake.pp
U    packages/fcl-db/fpmake.pp
U    packages/unzip/fpmake.pp
U    packages/odbc/fpmake.pp
U    packages/gdbm/fpmake.pp
U    packages/pthreads/fpmake.pp
U    packages/fcl-json/fpmake.pp
U    packages/pcap/fpmake.pp
U    packages/numlib/fpmake.pp
U    packages/rtl-generics/fpmake.pp
U    packages/zlib/fpmake.pp
U    packages/paszlib/fpmake.pp
U    packages/webidl/fpmake.pp
U    packages/regexpr/fpmake.pp
U    packages/libgd/fpmake.pp
U    packages/fcl-net/fpmake.pp
U    packages/fcl-res/fpmake.pp
U    packages/libpng/fpmake.pp
U    packages/dblib/fpmake.pp
U    packages/tcl/fpmake.pp
U    packages/openssl/fpmake.pp
U    packages/ibase/fpmake.pp
U    packages/bzip2/fpmake.pp
U    packages/fcl-sdo/fpmake.pp
U    packages/fcl-sound/fpmake.pp
U    packages/fcl-passrc/fpmake.pp
U    packages/fcl-stl/fpmake.pp
U    packages/libmicrohttpd/fpmake.pp
U    packages/mysql/fpmake.pp
U    packages/postgres/fpmake.pp
U    packages/httpd22/fpmake.pp
U    packages/httpd24/fpmake.pp
U    packages/rtl-console/fpmake.pp
U    packages/sqlite/fpmake.pp
U    packages/fftw/fpmake.pp
U    packages/fcl-pdf/fpmake.pp
U    packages/rtl-objpas/fpmake.pp
U    packages/fcl-image/fpmake.pp
U    packages/pasjpeg/fpmake.pp
U    packages/chm/fpmake.pp
U    packages/fcl-registry/fpmake.pp
U    packages/libtar/fpmake.pp
U    packages/symbolic/fpmake.pp
U    packages/libenet/fpmake.pp
U    packages/imagemagick/fpmake.pp
U    packages/fcl-xml/fpmake.pp
U    packages/oracle/fpmake.pp
U    packages/fcl-fpcunit/fpmake.pp
U    packages/fcl-js/fpmake.pp
U    packages/fcl-async/fpmake.pp
U    packages/fcl-process/fpmake.pp
U    packages/pastojs/fpmake.pp
U    packages/hash/fpmake.pp
U    packages/rtl-unicode/fpmake.pp
U    packages/fpmkunit/fpmake.pp
--- Recording mergeinfo for merge of r39808 into '.':
 G   .
------------------------------------------------------------------------
r40027 | pierre | 2018-10-24 21:37:54 +0000 (Wed, 24 Oct 2018) | 1 line

 Fix compilation of RTL for watcom target
------------------------------------------------------------------------
--- Merging r40027 into '.':
U    compiler/x86/agx86int.pas
--- Recording mergeinfo for merge of r40027 into '.':
 G   .
------------------------------------------------------------------------
r40028 | pierre | 2018-10-25 06:39:42 +0000 (Thu, 25 Oct 2018) | 1 line

Try to fix compilation error after commit #40027
------------------------------------------------------------------------
--- Merging r40028 into '.':
G    compiler/x86/agx86int.pas
--- Recording mergeinfo for merge of r40028 into '.':
 G   .
------------------------------------------------------------------------
r40102 | pierre | 2018-10-31 09:07:57 +0000 (Wed, 31 Oct 2018) | 1 line

 Replace aint (which is a compiler specific type) by ptruint type, which is defined in system unit
------------------------------------------------------------------------
--- Merging r40102 into '.':
U    tests/test/tarray5.pp
--- Recording mergeinfo for merge of r40102 into '.':
 G   .
------------------------------------------------------------------------
r40103 | pierre | 2018-10-31 09:59:45 +0000 (Wed, 31 Oct 2018) | 1 line

 Use pdword to avoid range check erro in tentryfile.getdword method
------------------------------------------------------------------------
--- Merging r40103 into '.':
U    compiler/entfile.pas
--- Recording mergeinfo for merge of r40103 into '.':
 G   .
------------------------------------------------------------------------
r40104 | pierre | 2018-10-31 10:21:51 +0000 (Wed, 31 Oct 2018) | 1 line

 Use longint type instead of AWord for Initial parameter in CalcExecutionWeigths (to avoid range error for avr compiler)
------------------------------------------------------------------------
@@
      begin
        Result:=fen_false;
        n.allocoptinfo;
<<<<<<< MINE (select with 'mc') (367)
        Weight:=PAWord(arg)^;
||||||| ORIGINAL (367)
        Weight:=max(PAWord(arg)^,1);
=======
        Weight:=max(plongint(arg)^,1);
>>>>>>> THEIRS (select with 'tc') (367)
        case n.nodetype of
          casen:
            begin
--- Merging r40104 into '.':
C    compiler/optutils.pas
--- Recording mergeinfo for merge of r40104 into '.':
 G   .
Summary of conflicts:
  Text conflicts: 1
------------------------------------------------------------------------
r40110 | pierre | 2018-10-31 14:51:23 +0000 (Wed, 31 Oct 2018) | 1 line

 Avoid range check error in MaskLength evaluation
------------------------------------------------------------------------
--- Merging r40110 into '.':
U    compiler/x86/aoptx86.pas
--- Recording mergeinfo for merge of r40110 into '.':
 G   .
------------------------------------------------------------------------
r40111 | pierre | 2018-10-31 15:47:53 +0000 (Wed, 31 Oct 2018) | 1 line

 Complement commit 40104, by changing type of executionweight in toptinfo record and adapt pass_2 code
------------------------------------------------------------------------
--- Merging r40111 into '.':
U    compiler/pass_2.pas
U    compiler/optbase.pas
--- Recording mergeinfo for merge of r40111 into '.':
 G   .
------------------------------------------------------------------------
r40112 | pierre | 2018-10-31 15:48:32 +0000 (Wed, 31 Oct 2018) | 1 line

 Disable range check completely in arm/cgcpu unit
------------------------------------------------------------------------
--- Merging r40112 into '.':
U    compiler/arm/cgcpu.pas
--- Recording mergeinfo for merge of r40112 into '.':
 G   .
------------------------------------------------------------------------
r40113 | pierre | 2018-10-31 15:49:14 +0000 (Wed, 31 Oct 2018) | 1 line

 Avoid overflow in code
------------------------------------------------------------------------
--- Merging r40113 into '.':
U    compiler/symdef.pas
--- Recording mergeinfo for merge of r40113 into '.':
 G   .
------------------------------------------------------------------------
r40114 | pierre | 2018-10-31 15:50:26 +0000 (Wed, 31 Oct 2018) | 1 line

Add explicit rtlclean/rtl targets in fullcycle rule if DOWPOCYCLE is set
------------------------------------------------------------------------
--- Merging r40114 into '.':
U    compiler/Makefile.fpc
U    compiler/Makefile
--- Recording mergeinfo for merge of r40114 into '.':
 G   .
------------------------------------------------------------------------
r40120 | pierre | 2018-10-31 23:15:22 +0000 (Wed, 31 Oct 2018) | 1 line

 Change RemoveCurrentP parameter type to tai, because GetNextInstruction does not always return a taicpu, adapt code in avr/aoptcpu unit
------------------------------------------------------------------------
--- Merging r40120 into '.':
U    compiler/aoptobj.pas
U    compiler/avr/aoptcpu.pas
--- Recording mergeinfo for merge of r40120 into '.':
 G   .
------------------------------------------------------------------------
r40121 | pierre | 2018-10-31 23:16:51 +0000 (Wed, 31 Oct 2018) | 1 line

Add check about tloadnode.symtableentry type before typecast
------------------------------------------------------------------------
--- Merging r40121 into '.':
U    compiler/ncal.pas
--- Recording mergeinfo for merge of r40121 into '.':
 G   .
------------------------------------------------------------------------
r40122 | pierre | 2018-10-31 23:18:09 +0000 (Wed, 31 Oct 2018) | 1 line

Fix typecast in FindRegDeAlloc call
------------------------------------------------------------------------
--- Merging r40122 into '.':
U    compiler/arm/aoptcpu.pas
--- Recording mergeinfo for merge of r40122 into '.':
 G   .
------------------------------------------------------------------------
r40123 | pierre | 2018-10-31 23:19:39 +0000 (Wed, 31 Oct 2018) | 1 line

 Remove unneeded typecasts in TryTOptimizeMove
------------------------------------------------------------------------
--- Merging r40123 into '.':
U    compiler/m68k/aoptcpu.pas
--- Recording mergeinfo for merge of r40123 into '.':
 G   .
------------------------------------------------------------------------
r40124 | pierre | 2018-10-31 23:20:29 +0000 (Wed, 31 Oct 2018) | 1 line

 Add global range check disable for i8086 cgcpu and x86 nx86add units
------------------------------------------------------------------------
--- Merging r40124 into '.':
U    compiler/i8086/cgcpu.pas
U    compiler/x86/nx86add.pas
--- Recording mergeinfo for merge of r40124 into '.':
 G   .
------------------------------------------------------------------------
r40131 | pierre | 2018-11-01 07:01:02 +0000 (Thu, 01 Nov 2018) | 1 line

 Remove another wrong typecast when testing  that a tai is an instruction
------------------------------------------------------------------------
--- Merging r40131 into '.':
G    compiler/m68k/aoptcpu.pas
--- Recording mergeinfo for merge of r40131 into '.':
 G   .
------------------------------------------------------------------------
r40236 | pierre | 2018-11-06 07:40:31 +0000 (Tue, 06 Nov 2018) | 1 line

 Really change extension of hs1 local variable in get_exepath
------------------------------------------------------------------------
--- Merging r40236 into '.':
U    compiler/globals.pas
--- Recording mergeinfo for merge of r40236 into '.':
 G   .
------------------------------------------------------------------------
r40237 | pierre | 2018-11-06 07:41:15 +0000 (Tue, 06 Nov 2018) | 1 line

 Disable range checking in rax86int unit
------------------------------------------------------------------------
--- Merging r40237 into '.':
U    compiler/x86/rax86int.pas
--- Recording mergeinfo for merge of r40237 into '.':
 G   .
------------------------------------------------------------------------
r40278 | pierre | 2018-11-08 20:19:54 +0000 (Thu, 08 Nov 2018) | 1 line

 Downgrade EXTDEBUG warning to note about zero size temp, as it is used for empty sets
------------------------------------------------------------------------
--- Merging r40278 into '.':
U    compiler/tgobj.pas
--- Recording mergeinfo for merge of r40278 into '.':
 G   .

git-svn-id: branches/fixes_3_2@40624 -
2018-12-23 22:27:05 +00:00
pierre
1fafc17016 Merge of revisions 39731 39825 39849 39912 39913 39914 39924 39935 39999 40000 40001 40026 40115 40132 40163 from trunk to fixes_3_2
------------------------------------------------------------------------
r39731 | pierre | 2018-09-11 08:00:54 +0000 (Tue, 11 Sep 2018) | 1 line

 Disable overflow for UDIVX ans SDIVX 64-bit instructions
------------------------------------------------------------------------
--- Merging r39731 into '.':
U    compiler/sparcgen/ncpumat.pas
--- Recording mergeinfo for merge of r39731 into '.':
 G   .
------------------------------------------------------------------------
r39825 | pierre | 2018-09-27 06:59:07 +0000 (Thu, 27 Sep 2018) | 1 line

 Add rtl dependency and fix fpcdir value
------------------------------------------------------------------------
--- Merging r39825 into '.':
U    packages/ide/compiler/Makefile.fpc
--- Recording mergeinfo for merge of r39825 into '.':
 G   .
------------------------------------------------------------------------
r39849 | pierre | 2018-10-01 21:50:13 +0000 (Mon, 01 Oct 2018) | 1 line

 Use vfpv2 as default fpu for eabihf if cpu is below armv7
------------------------------------------------------------------------
--- Merging r39849 into '.':
U    compiler/options.pas
--- Recording mergeinfo for merge of r39849 into '.':
 G   .
------------------------------------------------------------------------
r39912 | pierre | 2018-10-11 20:38:39 +0000 (Thu, 11 Oct 2018) | 1 line

 Fix ppuload for string type for i8086, use getasizeint for all string defs but short string
------------------------------------------------------------------------
--- Recording mergeinfo for merge of r39912 into '.':
 G   .
------------------------------------------------------------------------
r39913 | pierre | 2018-10-11 21:02:25 +0000 (Thu, 11 Oct 2018) | 1 line

 fix position of ppuload_platform for trecorddef
------------------------------------------------------------------------
--- Recording mergeinfo for merge of r39913 into '.':
 G   .
------------------------------------------------------------------------
r39914 | pierre | 2018-10-12 06:05:50 +0000 (Fri, 12 Oct 2018) | 1 line

 Adapt ppudump to fix introduced in revision 39912
------------------------------------------------------------------------
--- Recording mergeinfo for merge of r39914 into '.':
 G   .
------------------------------------------------------------------------
r39924 | pierre | 2018-10-13 11:35:34 +0000 (Sat, 13 Oct 2018) | 1 line

 Downgrade some warnings to notes for EXTDEBUG
------------------------------------------------------------------------
--- Merging r39924 into '.':
U    compiler/pass_2.pas
U    compiler/tgobj.pas
--- Recording mergeinfo for merge of r39924 into '.':
 G   .
------------------------------------------------------------------------
r39935 | pierre | 2018-10-14 22:18:50 +0000 (Sun, 14 Oct 2018) | 1 line

 Add missing setting of expectloc for multiplications
------------------------------------------------------------------------
--- Merging r39935 into '.':
U    compiler/nadd.pas
--- Recording mergeinfo for merge of r39935 into '.':
 G   .
------------------------------------------------------------------------
r39999 | pierre | 2018-10-20 18:44:05 +0000 (Sat, 20 Oct 2018) | 1 line

 Avoid run time error if compiled with -CR option
------------------------------------------------------------------------
--- Merging r39999 into '.':
U    compiler/m68k/cpupara.pas
--- Recording mergeinfo for merge of r39999 into '.':
 G   .
------------------------------------------------------------------------
r40000 | pierre | 2018-10-20 18:49:53 +0000 (Sat, 20 Oct 2018) | 1 line

Avoid range check error when compiled with -CR
------------------------------------------------------------------------
--- Merging r40000 into '.':
U    compiler/m68k/cgcpu.pas
--- Recording mergeinfo for merge of r40000 into '.':
 G   .
------------------------------------------------------------------------
r40001 | pierre | 2018-10-20 22:19:08 +0000 (Sat, 20 Oct 2018) | 1 line

 Add explicit typecast to avoid range check error
------------------------------------------------------------------------
--- Recording mergeinfo for merge of r40001 into '.':
 G   .
------------------------------------------------------------------------
r40026 | pierre | 2018-10-24 21:37:22 +0000 (Wed, 24 Oct 2018) | 1 line

 Explicitly disable range checking
------------------------------------------------------------------------
--- Merging r40026 into '.':
U    compiler/x86/cgx86.pas
--- Recording mergeinfo for merge of r40026 into '.':
 G   .
------------------------------------------------------------------------
r40115 | pierre | 2018-10-31 22:53:11 +0000 (Wed, 31 Oct 2018) | 1 line

 Avoid range check error in ReadPosInfo
------------------------------------------------------------------------
--- Recording mergeinfo for merge of r40115 into '.':
 G   .
------------------------------------------------------------------------
r40132 | pierre | 2018-11-01 07:09:47 +0000 (Thu, 01 Nov 2018) | 1 line

 Only call moved if len>0, as otherwise astring local variable is nil, which leads to a range check error for astring[1]
------------------------------------------------------------------------
--- Recording mergeinfo for merge of r40132 into '.':
 G   .
------------------------------------------------------------------------
r40163 | pierre | 2018-11-01 21:58:54 +0000 (Thu, 01 Nov 2018) | 8 lines

  More -CriotR fixes:
  * entfile.pas: Change PPU header falgs filed from longint to dword.
  * ngtcon.pas: Change local variable startoffset type to aword.
  * omfbase.pas: Avoid calling move with a nil string s indexed as s[1],
    to avoid a range check error.
  * owomflib.pas: Disable range check explicitly in hash computation.
  * utils/ppuutils/ppudump.pp: Adapt to flags type change in entfile.pas

------------------------------------------------------------------------
--- Recording mergeinfo for merge of r40163 into '.':
 G   .

git-svn-id: branches/fixes_3_2@40616 -
2018-12-22 22:19:05 +00:00
pierre
6205e530aa Merge commits 39912, 39914, 40001, 40115, 40132 and 40163
------------------------------------------------------------------------
r39912 | pierre | 2018-10-11 22:38:39 +0200 (Thu, 11 Oct 2018) | 1 line

 Fix ppuload for string type for i8086, use getasizeint for all string defs but short string
------------------------------------------------------------------------
------------------------------------------------------------------------
r39914 | pierre | 2018-10-12 08:05:50 +0200 (Fri, 12 Oct 2018) | 1 line

 Adapt ppudump to fix introduced in revision 39912
------------------------------------------------------------------------
------------------------------------------------------------------------
r40001 | pierre | 2018-10-21 00:19:08 +0200 (Sun, 21 Oct 2018) | 1 line

 Add explicit typecast to avoid range check error
------------------------------------------------------------------------
------------------------------------------------------------------------
r40115 | pierre | 2018-10-31 23:53:11 +0100 (Wed, 31 Oct 2018) | 1 line

 Avoid range check error in ReadPosInfo
------------------------------------------------------------------------
------------------------------------------------------------------------
r40132 | pierre | 2018-11-01 08:09:47 +0100 (Thu, 01 Nov 2018) | 1 line

 Only call moved if len>0, as otherwise astring local variable is nil, which leads to a range check error for astring[1]
------------------------------------------------------------------------
------------------------------------------------------------------------
r40163 | pierre | 2018-11-01 22:58:54 +0100 (Thu, 01 Nov 2018) | 8 lines

  More -CriotR fixes:
  * entfile.pas: Change PPU header falgs filed from longint to dword.
  * ngtcon.pas: Change local variable startoffset type to aword.
  * omfbase.pas: Avoid calling move with a nil string s indexed as s[1],
    to avoid a range check error.
  * owomflib.pas: Disable range check explicitly in hash computation.
  * utils/ppuutils/ppudump.pp: Adapt to flags type change in entfile.pas

------------------------------------------------------------------------

git-svn-id: branches/fixes_3_2@40519 -
2018-12-10 21:18:24 +00:00
marco
338873d7a7 --- Merging r39785 into '.':
U    packages/fcl-stl/src/gset.pp
--- Recording mergeinfo for merge of r39785 into '.':
 U   .
--- Merging r39786 into '.':
A    tests/tbs/tb0651.pp
U    compiler/symdef.pas
--- Recording mergeinfo for merge of r39786 into '.':
 G   .
--- Merging r39787 into '.':
U    compiler/pexpr.pas
A    tests/webtbs/uw34287a.pp
A    tests/webtbs/tw34287.pp
A    tests/webtbs/uw34287b.pp
--- Recording mergeinfo for merge of r39787 into '.':
 G   .
--- Merging r39788 into '.':
U    compiler/nbas.pas
--- Recording mergeinfo for merge of r39788 into '.':
 G   .
--- Merging r39812 into '.':
G    compiler/pexpr.pas
--- Recording mergeinfo for merge of r39812 into '.':
 G   .

# revisions: 39785,39786,39787,39788,39812

git-svn-id: branches/fixes_3_2@39835 -
2018-09-27 13:01:08 +00:00
marco
edf32cd5dc The Important Ones:
- 39683, 39684, 39685, 39686 (rework of Interface Method RTTI)
- 39687, 39688, 39689, 39690, 39709, 39710 (change of PPU version)

git-svn-id: branches/fixes_3_2@39809 -
2018-09-26 12:50:46 +00:00
svenbarth
61bde67082 + add method has_non_trivial_init_child() to tdef which provides access to the symtable's
sto_has_non_trivial_init flag

git-svn-id: trunk@39253 -
2018-06-20 19:00:11 +00:00
svenbarth
8423fd7632 * also process procsyms when adding a symtable as they may be generic dummy symbols as well
git-svn-id: trunk@39231 -
2018-06-15 13:49:16 +00:00
nickysn
17823821ca * make procedures and functions, declared in the interface part of a unit in an
i8086 far code memory model to be 'far' even in {$F-} mode. This is TP7
  compatible.

git-svn-id: trunk@38728 -
2018-04-10 15:37:28 +00:00
nickysn
55386ba547 + show whether a procedure or function is far in tprocdef.customprocname
git-svn-id: trunk@38725 -
2018-04-10 13:23:06 +00:00
nickysn
c7503ca291 + introduced tabstractprocdef.ofs_address_type - the address type, generated for
ofs()

git-svn-id: trunk@38681 -
2018-04-04 15:16:42 +00:00
nickysn
7a7e09982b + show whether a procdef is far in tprocvardef.GetTypeName
git-svn-id: trunk@38599 -
2018-03-22 22:57:34 +00:00
florian
6d5ce55232 * unified def creation for open arrays
git-svn-id: trunk@38408 -
2018-03-04 17:59:05 +00:00
svenbarth
b765d661ce * when registering a def also register the syms and defs of its symtables
git-svn-id: trunk@37340 -
2017-09-27 20:34:38 +00:00
svenbarth
a6821c63e0 * store the type of the helper that had been encountered during parsing in the objectdef and by extension the PPU
git-svn-id: trunk@37202 -
2017-09-13 21:24:06 +00:00
svenbarth
0b02dab684 + new Delphi-compatible intrinsic GetTypeKind() which returns the TTypeKind of a type as a constant value (and thus can be optimized away in If- and Case-statements)
+ added test

git-svn-id: trunk@36875 -
2017-08-11 22:12:53 +00:00
svenbarth
06d7e26df0 * move code to add a symbol to the current module's generic dummy symbols into a new function pgenutil.add_generic_dummysym()
git-svn-id: trunk@36466 -
2017-06-09 14:30:23 +00:00
florian
b1dff29cbf * removed unused units
git-svn-id: trunk@36165 -
2017-05-09 19:53:14 +00:00
svenbarth
5f8135dd84 * tarraydef.setelementdef: don't call size for array constructors as they'll only have one once they're converted to dynamic arrays
git-svn-id: trunk@36089 -
2017-05-04 20:57:06 +00:00
maciej-izak
b912deae33 * each record with managed field or with any management operator needs init table (update for symdef.pas, trecorddef.needs_inittable)
git-svn-id: trunk@35440 -
2017-02-18 18:50:57 +00:00
maciej-izak
15ba9b54c6 Store informations about management operators in ppu files for records.
ppu.pas:
  * increase ppu version

symconst.pas:
  + new enum tmanagementoperator and set tmanagementoperators

symtable.pas, trecordsymtable:
  + new field managementoperators
  + new method includemanagementoperator

symdef.pas, trecorddef.ppuload and trecorddef.ppuwrite:
  * save/load for managementoperators

git-svn-id: trunk@35439 -
2017-02-18 18:43:25 +00:00
Károly Balogh
69a502db37 instead of stringdup(ppufile.getstring), have a getpshortstring function in entfile, and use it whereever possible. this avoids an extra shortstring copy, compared to the earlier solution
git-svn-id: trunk@35233 -
2017-01-04 19:19:50 +00:00
Jonas Maebe
6e05c78a54 + support for recording an exception catching personality function for a
procdef for ABI-conformant exception handling

git-svn-id: trunk@35162 -
2016-12-18 13:57:45 +00:00
svenbarth
f8c23c84b6 * have pointerdefs and classrefdefs "inherit" the df_generic and df_specialization flags from the def they point to and set the genericdef accordingly
git-svn-id: trunk@35091 -
2016-12-09 16:20:36 +00:00
Jonas Maebe
472b5228fe * changed ncgutil.has_alias_name(pd,s) to a method of tprocdef
git-svn-id: trunk@35085 -
2016-12-09 13:39:28 +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
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
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
pierre
3919ffccf2 Fix calcsavesize for cross-compilation from aarch64 to arm, by forcing 64-bit computation also on min<low(longint) part
git-svn-id: trunk@34864 -
2016-11-10 17:04:31 +00:00
nickysn
657685a8b6 * use sizesinttype instead of ptrsinttype for the index and high parameter of
open arrays/dynarrays/string-like char arrays, etc.

git-svn-id: trunk@34665 -
2016-10-08 13:56:24 +00:00
nickysn
35b0201002 + added an unsigned counterpart to tpointerdef.pointer_arithmetic_it_type (needed by inc/dec)
git-svn-id: trunk@34653 -
2016-10-08 11:45:24 +00:00
nickysn
acfe6d2f2c + added alusinttype and aluuinttype to symdef, which correspond to the ALU size,
sizeof(aint) and the ALUSInt/ALUUInt types in the RTL

git-svn-id: trunk@34628 -
2016-10-04 22:36:20 +00:00
nickysn
35b2ffa872 + added types sizesinttype and sizeuinttype, corresponding to the SizeInt and
SizeUInt types for the target platform

git-svn-id: trunk@34619 -
2016-10-04 13:40:02 +00:00
nickysn
481a8ec58d * for pointers, converted to arrays, use a newly added virtual method
tpointerdef.converted_pointer_to_array_range_type to obtain their integer
  range type, instead of using ptrsinttype

git-svn-id: trunk@34612 -
2016-10-04 00:01:06 +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
Jonas Maebe
ffd4870a60 * add backticks around special type identifiers in
tabstractprocdef.typename_paras(), after accidentally committing the
    removal of the double quotes in r34358
   o the reason for not using double quotes is that the output of this routine
     is used for some LLVM identifier names, and you can't have double quotes in
     LLVM identifiers (any other character, including space, is no problem)

git-svn-id: trunk@34392 -
2016-08-29 16:05:22 +00:00
pierre
dfeb6e3ae1 Avoid memory leak on trecorddef.variantrecorddesc field
git-svn-id: trunk@34363 -
2016-08-21 22:25:13 +00:00
Jonas Maebe
179c1ab328 * changed ttemp*node.tempinfo^.flags to a private field, and added setters
and getters for the ttemp*node classes instead
   o this will allow descendants to prevent certain flags from being added
     or removed. E.g. for LLVM, certain temps must never be put in registers
     because it cannot typecast a value in a register from a non-record/array
     type to an array type without forcing it to memory (so if that is done
     on an lvalue, the result will be written to the memory temp instead of
     to the register)

git-svn-id: trunk@34358 -
2016-08-21 14:23:09 +00:00
svenbarth
c2662bd96a * mark defs created with create_global_internal() with df_internal so that they can be easily identified
git-svn-id: trunk@34316 -
2016-08-15 14:30:46 +00:00