Commit Graph

555 Commits

Author SHA1 Message Date
florian
8de37f69b9 * spelling
* check against current_settings.cputype
2025-09-09 22:52:37 +02:00
J. Gareth "Curious Kit" Moreton
0af3f2a903 * Improved shift-to-rotate node optimisation to reduce code size and permit the use of a variable index 2025-09-08 14:26:34 +02:00
Pierre Muller
e1509e1c6d Use setlow field of tsetdef class to generate new set typedef in set add node 2025-05-24 08:56:15 +00:00
Rika Ichinose
23875bd8c4 Return NaN from sin/cos(±∞/NaN). 2025-04-16 22:10:32 +02:00
florian
548e91f104 * fix rol/ror instruction usage and spilling on RiscV 2025-03-28 22:26:59 +01:00
Michaël Van Canneyt
d3a0a2dddf * Call free instead of destroy 2025-03-21 14:25:19 +01:00
Michaël Van Canneyt
8c5a48da2b * Make compilerwidestring a class using dyn array, rework tstringconstnode: value_str -> valueas, valuews 2025-03-20 17:01:31 +01:00
florian
d147488133 * partly revert 8cd6606970, resolves #41052
(cherry picked from commit 854d4e6f4a5b53040160f8921d0089167f6b00be)
2024-12-23 14:27:48 +01:00
florian
b6af220f1a + print add node flags 2024-11-15 22:39:19 +01:00
Rika Ichinose
bb31f32941 Force shortcut boolean evaluation when rewriting length(Windows widestring) = 0. 2024-10-17 02:23:49 +03:00
florian
8e58bbea61 * set proper expectloc for dyn. array comparisons, resolves #40947 2024-10-16 22:39:47 +02:00
Rika Ichinose
d63b6294b5 Compile “length(string or array) = 0” as “pointer(string or array) = nil” without further check, unless really required.
Also handle length <> 0, > 0, < 0, >= 0, <= 0, assuming lengths are never negative.
2024-10-16 16:53:59 +03:00
Sven/Sarah Barth
7f03fb6966 * revert the changes from b0d61558e3, as 61397d40ae fixes it more correctly 2024-04-24 23:13:57 +02:00
florian
2f9ed0576e * optimize x </>= length(...) also if the operands are swapped 2024-04-18 23:07:40 +02:00
florian
e130557d9f * optimize x < length(arr) and x >= length(arr) as proposed in #40292 2024-04-17 23:29:13 +02:00
florian
f29ff58ab9 + get_int_value 2024-04-16 23:11:16 +02:00
florian
2e9556f2eb + fold also constant pointer operations on nil nodes 2024-04-15 22:52:32 +02:00
florian
5c46b5116d + also fold nil nodes when used as pointer constants 2024-04-13 22:52:46 +02:00
Sven/Sarah Barth
b0d61558e3 * fix #40725: pass along whole array constructor to the Insert() so that it's converted with the correct checks
+ added test
2024-04-12 17:34:58 +02:00
J. Gareth "Curious Kit" Moreton
2b7df4237b * nf_pass1_done, nf_error, nf_processing and nf_do_not_execute
have been moved to a new "transientflags" node field that
    isn't stored in PPU files
2024-03-24 18:14:49 +00:00
florian
4100f75056 + optimize s:=s+[e] into include(s,e) 2024-03-23 21:02:15 +01:00
florian
06fc6f1e6b * use destination location instead of a temp when constructing sets, resolves #40384 2024-03-22 21:50:42 +01:00
J. Gareth "Curious Kit" Moreton
e1297e0859 * Adjustment to "(v>=x) and (v<=y)" so it also optimises its inverse: "(v<x) or (v>y)" 2024-03-20 21:01:35 +00:00
florian
e35403c3b8 * optimize additions of empty sets away if possible, part of #40384 2024-03-10 10:47:24 +01:00
florian
594d4cc4f9 * transform -1-x into not(x) 2024-03-08 22:42:26 +01:00
florian
59c77a48b5 * transform -x-1 into not(x), resolves #40313 2024-03-05 22:11:32 +01:00
florian
4103b3d180 * formatting 2024-03-02 21:31:21 +01:00
J. Gareth "Curious Kit" Moreton
ecc16278f0 * Flags specific to TAssignmentNode have been moved to their own field 2024-03-02 21:31:21 +01:00
J. Gareth "Curious Kit" Moreton
b804fc5164 * Flags specific to TAddNode have been moved to their own field 2024-03-02 21:31:21 +01:00
florian
6e5860cb87 * check for *-1 multiplications after folding, resolves #40448 2023-11-12 22:30:43 +01:00
Michaël Van Canneyt
3eee2d8ff3 * Do not insert a widestring <-> ansistring conversion node when checking for (un)equal empty string. 2023-07-22 08:26:22 +00:00
Sven/Sarah Barth
c994b5efe8 * fix #39447: when checking whether the parameters are valid for pointer arithmetic check the *correct* parameter for being valid pointer-like type (I'd say that this was a copy&paste mistake...)
+ added test
2023-06-30 17:42:39 +02:00
Nikolay Nikolov
8cd6606970 + support nil comparison of WebAssembly reference types (externref and funcref) 2023-06-11 07:17:04 +03:00
florian
64319dc019 * PopCount takes care only of the bit pattern, so take the uvalue to avoid an internal error, resolves #40190 2023-03-17 22:30:36 +01:00
J. Gareth "Curious Kit" Moreton
c4899b5dc0 * Dead code in TAddNode.Simplify has been stripped 2023-02-28 20:56:38 +00:00
J. Gareth "Curious Kit" Moreton
487ca08cf3 * In TAddNode.Simplify, commutative operations now ensure integer constant operands go on the right for simplicity 2023-02-28 20:56:38 +00:00
J. Gareth "Curious Kit" Moreton
a5702d89e8 * More complex uses of the pruning methods in TAddNode.Simplify 2023-02-21 20:44:02 +00:00
J. Gareth "Curious Kit" Moreton
9d8fd6d55e * TAddNode.Simplify now uses pruning methods 2023-02-21 20:44:02 +00:00
florian
09b435cdab * transform a/a only into 1 if fastmath is on 2023-01-29 13:49:33 +01:00
florian
789031a6e6 * compile float*2 as float+float if possible as proposed by Rika, resolves #40116 2023-01-22 20:07:40 +01:00
florian
30e0df384d * second part of #40041 fixed
+ tests
2022-12-22 22:41:39 +01:00
florian
e0fef23d77 * properly transform a+const1-const2 into a+const1+(-const2), resolves #40041 2022-12-21 22:34:46 +01:00
Sven/Sarah Barth
7a34677b2a * as long as the type passed into a TypeInfo() is not an undefined or error def the resulting value will always be constant at compile time, so it can be compared to another then no matter if typenode or not
+ added tests
2022-12-02 17:47:15 +01:00
florian
1700516721 * cleanup 2022-11-26 23:27:02 +01:00
florian
247423400f * create muln with create instead of create_internal when converting "n - n mod const)" so pass1 works properly, resolves #40004 2022-11-24 22:43:27 +01:00
Pierre Muller
84be45f55d Fix compilation failure of RTL with -Co option for x86_64-linux target 2022-11-24 17:01:37 +00:00
Pierre Muller
1a19fe1f03 Use correct class typecast for commit ba4cee279b 2022-11-23 08:43:28 +01:00
florian
0ba4cee279 * convert n-n mod const into n div const*const, resolves #39615 2022-11-22 22:41:58 +01:00
florian
f6a8b045c2 * cosmetics 2022-11-21 22:10:29 +01:00
Sven/Sarah Barth
02aac653d2 * optimize shortstring concatenations if they're on the right side of an assignment to directly use the left side instead of a temporary 2022-10-09 13:56:52 +02:00