Commit Graph

758 Commits

Author SHA1 Message Date
Sven/Sarah Barth
78025d90b3 + add a tcallnodeflag value that prohibits the tcallnode.pass_typecheck to return a procvar in case of a call without parameters with a found symbol, but no suitable procdef 2023-06-30 17:11:43 +02:00
Sven/Sarah Barth
3dc64dd67e * fix typo in comment 2023-06-30 17:02:37 +02:00
Sven/Sarah Barth
d97d34ee9c * fix #40332: apply patch by Rika to avoid a crash when an overload can't be picked outside of a function (e.g. when using intrinsics inside constants)
+ added test
2023-06-30 15:35:28 +02:00
florian
8f3cce556d * some error messages use nicer symbol names 2023-04-01 22:34:37 +02:00
Jonas Maebe
12bde4e903 WPO: fix dead code detection, and handle procvars
Extend dead code detection to not only look for the main mangled name, but also
for any aliases before deciding that a routine has been dead-stripped.

Assume objects/classes can also be constructed if the address of one of their
constructors or of the TObject.NewInstance class method has been taken.

Resolves #40204
2023-03-24 21:22:18 +01:00
Jonas Maebe
0e46041717 WPO: also consider NewInstance to detect class instancing
Resolves #40200
2023-03-18 21:18:25 +01:00
Pierre Muller
dce70b3b70 Short version of the mips code genration bug 2022-10-29 21:34:00 +01:00
Jonas Maebe
df3a0af7e0 objc: use compile-time macOS version checks
Use "modern" APIs for calling inherited messages when targeting Mac OS X 10.6
or later
2022-09-16 11:21:05 +02:00
Sven/Sarah Barth
cdf676c9b5 * a function also captures other nested functions when these are called 2022-05-26 21:43:36 +02:00
Sven/Sarah Barth
2cc621618a * Delphi-mode calling without parenthesis 2022-05-26 21:43:00 +02:00
Pierre Muller
5acd7a7b83 Rename tsymtable.insert and delete methods to insertsym ands deletesym 2022-05-03 23:00:28 +02:00
Sven/Sarah Barth
74f9523806 * in case of an implicit specialization ensure that the symbol of the generic is indeed considered as used once the final implicit specialization has been picked
+ added test
2022-04-23 16:29:13 +02:00
Sven/Sarah Barth
e0e8620ded * use a single if-condition for both check_hints and addsymref 2022-04-23 16:29:13 +02:00
Sven/Sarah Barth
90844c2027 * fix #35261: apply slightly adjusted changes by Ryan Joseph to implement support for implicit generic function specializations
The main adjustments were as follows:
  - fixing coding style and identation
  - fixing some typos
  - using a better name for the property in tcallcandidates which holds the symbols created for anonymous parameter values
2022-04-20 18:59:31 +02:00
florian
d198fc46cb * just copy value parameters to a temp. when inlining instead of
using (@...)^ constructs, resolves #39590
2022-02-19 23:49:27 +01:00
florian
f56aa9abe7 * set expectloc properly for x87 on x86 2021-09-24 22:27:44 +02:00
svenbarth
7330a0156c * fix writing of the method and parameter names for the Variant call description
git-svn-id: trunk@49479 -
2021-06-05 17:43:49 +00:00
pierre
c8c6e647be Avoid keeping optimized out node in callcleanupblock.statements or callinitblock.statements
git-svn-id: trunk@49094 -
2021-03-31 20:53:08 +00:00
nickysn
7ac2f9e242 * synchronized with trunk
git-svn-id: branches/wasm@48660 -
2021-02-13 02:46:23 +00:00
yury
afc80a84cf * Fixed r48650.
git-svn-id: trunk@48657 -
2021-02-12 11:26:37 +00:00
nickysn
a74024e7d5 * synchronized with trunk
git-svn-id: branches/wasm@48654 -
2021-02-12 01:54:24 +00:00
yury
4245b20a32 * Fixed expectloc of local variables passed as a formal parameter. This issue is caught by cycling the compiler with -dEXTDEBUG. Yet the compiler can't cycle with EXTDEBUG due to other issues with wrong expectloc.
git-svn-id: trunk@48650 -
2021-02-11 10:39:41 +00:00
nickysn
8b4aceea50 * synchronized with trunk
git-svn-id: branches/wasm@48134 -
2021-01-11 07:01:01 +00:00
Jonas Maebe
5c2303a76b * add parameter cleanup nodes to the call cleanup block (mantis #38316)
git-svn-id: trunk@48130 -
2021-01-10 15:47:27 +00:00
nickysn
91e9558f5b * synchronized with trunk
git-svn-id: branches/wasm@47766 -
2020-12-12 23:20:33 +00:00
florian
c82aae59a1 * call node_complexity correctly in order_parameters when sorting parameters
git-svn-id: trunk@47763 -
2020-12-11 22:14:18 +00:00
svenbarth
1efeb5851a * fix regression introduced with r47625 for Mantis #38122: when checking for a dereferentiation of the Self parameter subscript and vec nodes need to be kept
+ added test

git-svn-id: trunk@47747 -
2020-12-10 06:11:46 +00:00
nickysn
dc5b78d5f0 * synchronized with trunk
git-svn-id: branches/wasm@47716 -
2020-12-08 06:57:57 +00:00
svenbarth
69e6f3dcbb * if a call inside a generic's code that involves generic type arguments can't be clearly determined then postpone it till specialization in the hope that the type will be clear then
+ added test

git-svn-id: trunk@47686 -
2020-12-04 22:07:34 +00:00
nickysn
aeafe42144 * synchronized with trunk
git-svn-id: branches/wasm@47653 -
2020-12-01 03:27:01 +00:00
svenbarth
82957ec5a3 * Fix for Mantis #38122: when a deref node is passed as a Self parameter for a type helper (which is a var parameter) we need to pass the non-derefentiated value so that the data it points to can be modified by the helper's method (this is Delphi compatible)
+ added tests

git-svn-id: trunk@47625 -
2020-11-28 18:32:24 +00:00
nickysn
48b81da877 * synchronized with trunk
git-svn-id: branches/wasm@47249 -
2020-10-29 10:49:36 +00:00
florian
3baddff71e + inline subroutines with formal parameters as well
git-svn-id: trunk@47214 -
2020-10-26 22:18:03 +00:00
nickysn
446d824ad6 * synchronized with trunk
git-svn-id: branches/wasm@47067 -
2020-10-08 21:29:04 +00:00
florian
ab9fa2012b * inline more aggressively, if the ie for the initial change re-appears, it must be fixed differently
git-svn-id: trunk@47057 -
2020-10-06 19:43:16 +00:00
nickysn
38c4c93cee * synchronized with trunk
git-svn-id: branches/wasm@46977 -
2020-09-27 22:18:36 +00:00
florian
a628c1c3dd * if an array constructor is passed to a formaldef parameter, it is passed as a set (if the conversion is possible), resolves #37796
git-svn-id: trunk@46973 -
2020-09-27 16:37:20 +00:00
nickysn
d8a9bd4da0 * synchronized with trunk
git-svn-id: branches/wasm@46736 -
2020-08-30 23:47:35 +00:00
florian
b36597c76a * better calculation of estimated stack frame size
git-svn-id: trunk@46733 -
2020-08-30 20:53:59 +00:00
nickysn
7bab5b6483 * synchronized with trunk
git-svn-id: branches/wasm@46681 -
2020-08-25 00:15:56 +00:00
Jonas Maebe
453bfcd370 * emit the correct declaration for procdefs used to force a procname in LLVM
o fixes lazarus startup on macOS/AArch64 when compiled with the LLVM cg

git-svn-id: trunk@46675 -
2020-08-23 21:11:09 +00:00
nickysn
988a833836 * synchronized with trunk
git-svn-id: branches/wasm@46665 -
2020-08-23 15:31:53 +00:00
Jonas Maebe
d1d3d7cd08 * never create a regular temp for inline parameters that can be modified by
the caller (mantis #37465)a
   o in theory, the regular checks for doing so should never trigger, but due
     to compiler-generated nodes (such as calls to fpc_ansistr_unique), they
     could. Internal address nodes can deal with taking the address of the
     function result in this case.

git-svn-id: trunk@46660 -
2020-08-23 11:27:59 +00:00
yury
e5a923eb7a * 8086: Proper implementation of: If a far procvar is called, it must be in a memory location. This fixes a hack to emulate CALL reg1:reg2.
git-svn-id: trunk@46641 -
2020-08-23 10:26:54 +00:00
yury
aefc1be555 * Reverted accidentally committed files.
git-svn-id: trunk@46416 -
2020-08-13 18:48:19 +00:00
yury
7b65f85a0b * Accidental commit.
git-svn-id: trunk@46415 -
2020-08-13 18:46:57 +00:00
nickysn
62cb7c2d12 * synchronized with trunk
git-svn-id: branches/wasm@46214 -
2020-08-03 21:15:39 +00:00
svenbarth
b412259c1c * fix for Mantis #37355: the method name and the named parameters need to be separated by a single #0
+ added test

git-svn-id: trunk@45974 -
2020-07-31 15:55:37 +00:00
nickysn
5e60217a88 [PATCH 15/83] updating parameters sorting for wasm. Goes left-to-right
From e8c19baf75abfeeed8ea333df70be63b08b76ff2 Mon Sep 17 00:00:00 2001
From: Dmitry Boyarintsev <skalogryz.lists@gmail.com>
Date: Wed, 4 Sep 2019 14:54:41 -0400

git-svn-id: branches/wasm@45892 -
2020-07-29 16:42:19 +00:00
Jonas Maebe
924ffe6538 * removed initialisation of unused fparacopyback from tcallparanode.copy_value_by_ref_para
git-svn-id: trunk@45822 -
2020-07-21 17:57:45 +00:00