Yuriy Sydorov
b78761efd3
* Removed obsolete OLDREGVARS ifdefs.
2021-11-02 17:08:08 +02:00
florian
a4672fbd1c
o based on a patch by Rika, resolves #39401 :
...
* use Base64 (62=_, 63=$) encoded FNV hash (instead of CR-32) to shorted identifiers
* renamed fpccrc to fpchash
+ test
2021-10-10 10:09:22 +02:00
Jonas Maebe
3fb0fab410
Fix bitpacking 62/63 bit fields on 64 bit targets
...
As reported on the lazarus forum:
* https://forum.lazarus.freepascal.org/index.php?topic=56341.new
* https://forum.lazarus.freepascal.org/index.php/topic,56339.msg418608/topicseen.html
Also optimized nextpowerof2 in the compiler
2021-10-03 14:00:50 +02:00
Jonas Maebe
fcb646bc3b
obcpas: fix categories implementing protocols
...
Allocate the ImplementedInterfaces array for them and save to/load from ppu
Solves #39375
2021-09-25 16:15:45 +02:00
nickysn
3ecb41cd2d
* improvements to the prevention of dangling pointers in tmodule.deflist,
...
introduced in r49417. Now it no longer depends on current_module, so it
handles the case when current_module changes between the time the tdef was
registered and the time it was freed. It also supports freeing the tmodule
before the defs, so the freeing order of the object is once again flexible.
git-svn-id: trunk@49426 -
2021-06-01 15:02:26 +00:00
nickysn
ea5ffd597f
* set self to nil in current_module.deflist for registered defs in the
...
tstoreddef.destroy destructor, instead of doing it after each call to
x.owner.deletedef(x)
git-svn-id: trunk@49417 -
2021-05-30 21:27:57 +00:00
florian
fe57cd3536
* fix LLVM after r48828
...
* global gotos really use the return type of fpc_setjmp to test where we come from
git-svn-id: trunk@48835 -
2021-02-27 22:07:58 +00:00
florian
4c2e0b9ff0
* for setjmp based exception handling, get the type of the exception reason from the setjmp result
...
git-svn-id: trunk@48828 -
2021-02-27 16:47:36 +00:00
florian
857cbddf04
* applied patch by Pierre to fix make cycle -Cr
...
git-svn-id: trunk@48806 -
2021-02-24 21:10:05 +00:00
florian
34f7c3e6d4
+ array defs. of open arrays are now marked by ado_OpenArray, so (internally!) zero sized array can be declared with 0..-1
...
git-svn-id: trunk@48758 -
2021-02-21 18:45:58 +00:00
yury
64c586b86d
* Removed/ifdefed lots of unused variables.
...
git-svn-id: trunk@48384 -
2021-01-24 12:24:01 +00:00
svenbarth
cc92af8423
* apply patch by Blaise.ru to enable the correct generation of names for classes/interfaces inside local symtables; these will be required for reference function types which are in fact interfaces and classes, this does not mean that ordinary classes can be declared inside functions
...
Note: no test as the functionality is not yet used
git-svn-id: trunk@47834 -
2020-12-22 22:22:35 +00:00
svenbarth
cbe352808a
* 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: trunk@47826 -
2020-12-20 22:41:27 +00:00
svenbarth
32938dde1c
* apply patch by Blaise.ru to allow record methods to be assigned to method variables as well (this is Delphi compatible)
...
+ added test
git-svn-id: trunk@47794 -
2020-12-16 21:43:25 +00:00
pierre
6230de31bb
* Second patch xml-node-dump-defs.patch from J. Gareth Moreton from bug report 36882.
...
With same changes to ensure that xmllint find no errors in generated xml files.
git-svn-id: trunk@47667 -
2020-12-02 21:01:40 +00:00
florian
d5e20fa6a9
* take variant alignment from TVARDATA, should resolve #38022
...
git-svn-id: trunk@47286 -
2020-11-02 22:16:18 +00:00
florian
3b0168ae16
* (slightly) modified (formatting, warning) patch by Jan Bruns to speed up overloading search, resolves #36666
...
git-svn-id: trunk@47111 -
2020-10-14 20:08:10 +00:00
svenbarth
eb7158d250
* ensure that internal method names (namely operator overloads and class con-/destructors) result in different mangled names from ordinary methods even if they should be converted to lowercase (which happens for section names)
...
+ added tests
git-svn-id: trunk@47110 -
2020-10-14 09:11:44 +00:00
florian
637976e83f
* patch by Marģers to unify internal error numbers, resolves #37888
...
git-svn-id: trunk@47103 -
2020-10-13 19:59:01 +00:00
svenbarth
d1521e8061
* a classrefdef might also be created with a forwarddef, so handle that correctly
...
git-svn-id: trunk@46850 -
2020-09-11 21:24:59 +00:00
Jonas Maebe
cc315e0ac7
* fix tw3930 after r37927
...
o "unique" class (and interface) type aliases should actually not exist at
all except for overload resolution. All the rest (VMT, UUID, RTTI, ...)
should be taken from the aliased class/interface
o there is one Delphi-incompatibily left after this change, but it shouldn't
matter: tw8180 does not compile if you change the declaration to
"tcl=class(TInterfacedObject,XStr,iinterface)", while Kylix does compile
that. It doesn't really matter though, because in Kylix this actually
adds iinterface twice as implemented interface, so there is no point
in accepting this.
git-svn-id: trunk@46773 -
2020-09-05 12:25:09 +00:00
yury
222f981dd1
* 8086: Fixed Ofs() for far routines.
...
resultdef of typeconvnode.typecheck_proc_to_procvar() is reused every time you get an address of a proc. So it is forbidden to change the far/near attribute of resultdef - it leads to mess during code generation.
Instead it is needed to use separate reusable resultdefs with new flags pc_far_address and pc_offset.
git-svn-id: trunk@46470 -
2020-08-17 13:37:55 +00:00
florian
14bc6674a6
* revert part of r45810 which was accidently committed
...
git-svn-id: trunk@45813 -
2020-07-20 20:21:44 +00:00
florian
d6d92e3666
* revert part of r44879: flock must use kernel_off_t: off_t breaks e.g. i386
...
git-svn-id: trunk@45810 -
2020-07-19 19:54:22 +00:00
Jonas Maebe
3e9e0a0f7d
* completely disable records containing float fields in registers again, as
...
the code generator does not support subsetreg loads of floats
git-svn-id: trunk@45800 -
2020-07-17 20:57:20 +00:00
Jonas Maebe
e7d1a77f9a
* rename the ARM/AArch64-Darwin targets to ARM/AArch64-iOS
...
* rename the m68k/PowerPC-MacOS targets to m68k/PowerPC-MacOSClassic
* repurpose the AArch64/Darwin target for AArch64/macOS
o make AArch64-Darwin default target for a hosted AArch64-Darwin compiler
git-svn-id: trunk@45758 -
2020-07-10 21:52:24 +00:00
svenbarth
f94518a9ae
* fix typo (no code changes)
...
git-svn-id: trunk@45680 -
2020-06-22 20:39:55 +00:00
yury
e63c03125a
* Reworked tprocdef.is_implemented to fix a bug with the parentfp optimization. The bug was detected when using the llvm backend.
...
+ Added a test.
git-svn-id: trunk@45675 -
2020-06-21 19:52:14 +00:00
florian
c6c996f506
* write length/code page when writing the string type
...
git-svn-id: trunk@45654 -
2020-06-15 19:50:49 +00:00
yury
627fcb4354
* Do not use the LOC_VOID location to indicate unused parameters.
...
* Added the tprocdef.parentfpsym property. Set parentfpsym.varstate to vs_read instead of using the pio_needs_parentfp flag.
* Replaced tcgcallparanode.push_zero_sized_value_para by tparamanager.has_strict_proc_signature.
git-svn-id: trunk@45454 -
2020-05-21 09:36:40 +00:00
yury
2808873d1b
* Reworked the optimization of unused $parentfp for nested routines.
...
- Do not remove the $parentfp parameter as was done in the previous optimization approach. Instead when $parentfp is unused to the following:
- On the caller side: Omit passing the value for $parentfp for targets where tcgcallparanode.push_zero_sized_value_para=false (classic CPU targets).
Pass 0/nil as $parentfp for targets where tcgcallparanode.push_zero_sized_value_para=true;
- On the callee side: Prevent allocation of registers/resources for $parentfp.
- When possible keep $parentfp in a register.
- Set the pio_nested_access flag in tprocinfo.set_needs_parentfp() to properly handle deep nesting levels;
git-svn-id: trunk@45436 -
2020-05-19 13:17:47 +00:00
Jonas Maebe
a2174753c1
- removed tabstractrecorddef.get_unit_symtable, which did not always return the unit
...
symtable (when you had a local recorddef in a procdef)
* modified tdef.get_top_level_symtable() so you can specify whether you want to
skip procdefs or not
* changed tobjectdef.vmt_def() to no longer require a typesym for the tobjectdef
(based on patch by Blaise)
git-svn-id: trunk@45361 -
2020-05-13 21:46:29 +00:00
yury
7cda3d9e57
* Code formatting.
...
git-svn-id: trunk@45323 -
2020-05-09 21:53:43 +00:00
yury
a316229ef6
* Always use parentfp for forward-declared nested procedures.
...
git-svn-id: trunk@45320 -
2020-05-09 17:52:17 +00:00
florian
f72a795cc7
* fixed SetIsEmpty
...
git-svn-id: trunk@45094 -
2020-04-26 13:11:02 +00:00
svenbarth
60345366f2
* fix for Mantis #35140 : apply patch by Ryan Joseph together with some further changes by me to add support for constant parameters in generics
...
+ added tests
git-svn-id: trunk@45080 -
2020-04-25 22:12:35 +00:00
florian
d772a42375
* arm: more fixes for fpu_fpv4_sp_d16
...
* take care of FPUARM_HAS_VFP_DOUBLE
* use FPUARM_HAS_VFP_EXTENSION instead of checking fpu_vfp_first and ...last
git-svn-id: trunk@44707 -
2020-04-12 18:05:50 +00:00
florian
96a368fdf9
* building on non-x86/non-xtensa fixed
...
git-svn-id: trunk@44551 -
2020-04-03 20:40:36 +00:00
florian
fa4cbc89a5
+ Xtensa: hard float support, i.e. make use of floating point extension if available
...
git-svn-id: trunk@44539 -
2020-04-03 20:15:23 +00:00
Jonas Maebe
4ba19f5418
* add support for creating non-address-only procvars to
...
cprocvar.getreusableprocaddr()
git-svn-id: trunk@44516 -
2020-04-02 21:21:36 +00:00
svenbarth
41a6957f7d
* keep track of the fileposinfo for generic constraints
...
git-svn-id: trunk@44188 -
2020-02-16 09:53:32 +00:00
svenbarth
cba43ebe1b
- remove generic_buf_needs_swapping again as that is now handled with tmodule.change_endian of the generic's module
...
git-svn-id: trunk@44074 -
2020-01-30 21:49:56 +00:00
pierre
d1e4066477
Hopefully fix problems related to loading of ppufile generated with other endianess for generics
...
git-svn-id: trunk@44056 -
2020-01-28 23:43:56 +00:00
florian
70a836c4a2
* first part of merging parts of Jeppe's intrinsics patch, mainly r31135
...
is merged by this commit with a lot of adaptions
git-svn-id: trunk@43949 -
2020-01-14 21:52:39 +00:00
Jonas Maebe
b355ba3d39
* record whether a function uses fastmath, and define the function as
...
strictfp if it doesn't (so LLVM doesn't perform transformations that can
change the fp/exception behaviour)
git-svn-id: trunk@43818 -
2019-12-30 15:05:06 +00:00
Jonas Maebe
f5833dc048
* support for marking arraydefs as vectors
...
git-svn-id: trunk@43782 -
2019-12-24 22:12:31 +00:00
svenbarth
f2818bfe7a
* apply patch by Blaise.ru to remove last remnants of VMT regeneration which is no longer needed/used
...
git-svn-id: trunk@43628 -
2019-12-02 22:29:29 +00:00
svenbarth
3ced30f816
* apply (adjusted) patch by Blaise.ru: vmtentries is always created since 2008, so treat it as such (also fixes a memory leak in tobjectdef.getcopy)
...
git-svn-id: trunk@43626 -
2019-12-02 06:59:05 +00:00
svenbarth
ea75253926
* initialize the defid in trecorddef.create_global_internal as unique_id_str needs it
...
git-svn-id: trunk@43625 -
2019-12-02 06:58:59 +00:00
svenbarth
06c1a17d13
* use tdef.unique_id_str to generate the unique internal name for anonymous record defs as using the count of the deflist is no longer correct
...
git-svn-id: trunk@43616 -
2019-11-30 17:40:27 +00:00