Commit Graph

832 Commits

Author SHA1 Message Date
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
Sven/Sarah Barth
310afcd783 * fix #41075: don't allow @<anonfunc>
+ added tests
2024-12-26 12:48:44 +01:00
Sven/Sarah Barth
0c52813433 + add support for Delphi-compatible atomic intrinsics 2024-12-12 22:05:15 +01:00
Frederic Kehrein
6618c0dbf7 Fixing a bug where an empty postfix for enum was allowed 2024-11-07 21:09:37 +00:00
florian
76fc3275bc * handle except blocks as normal code block with regard to specialization of generics, resolves #40890 2024-09-17 23:02:25 +02:00
florian
f8da65f8e9 * cosmetics 2024-06-14 22:58:29 +02:00
J. Gareth "Curious Kit" Moreton
179fc5848b * Flags specific to TArrayConstructorNode have been moved to their own field 2024-03-02 21:31:21 +01:00
J. Gareth "Curious Kit" Moreton
c21a0f0654 * Flags specific to TModDivNode 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
J. Gareth "Curious Kit" Moreton
1bba83cebb * Flags specific to TVecNode have been moved to their own field 2024-03-02 21:31:21 +01:00
Michaël Van Canneyt
fe62b3ace8 * Introduce constwresourcestring - in unicode mode, resource strings are unicode strings, and must be streamed differently 2024-02-13 19:44:36 +01:00
florian
2575cbc439 * complain about turned off support of c style operators only in the parser,
so error recovery is better
2024-02-11 11:05:05 +01:00
Sven/Sarah Barth
b00454bb0e * ensure that nested functions that are assigned to function pointers are considered as captured as well 2023-12-30 13:55:15 +01:00
florian
1f91fe4b11 * fix output position of deprecated hint for certain cases where it was wrong, resolves #40534 2023-12-03 11:35:03 +01:00
Michaël Van Canneyt
6652fa7919 * Properly zero-terminate ansistring when calling unicode2ascii 2023-11-15 18:58:20 +01:00
Sven/Sarah Barth
287ef8e79a * fix #40410: allow specialization of a procdef also inside exception handlers + added test 2023-10-20 19:54:05 +02:00
Michael VAN CANNEYT
ed50a1941b * Unicode resource strings 2023-07-25 16:06:53 +02:00
Michael VAN CANNEYT
f364bb6b11 * Forbid use of string alias in system unit 2023-07-22 08:26:22 +00:00
Michaël Van Canneyt
fb9c718371 * get_stringconst should handle widestring correctly: library & import names are unicodestring constants in unicode rtl 2023-07-22 08:26:22 +00:00
Nikolay Nikolov
06f35ae04f - rm commented out debug writeln left over from previous commit 2023-06-20 17:25:57 +03:00
Nikolay Nikolov
5c792c438d + disallow using sizeof() and bitsizeof() on WebAssembly reference types 2023-06-20 16:56:47 +03:00
florian
ec28b7586c + support procvar[] in tp/mac procvar mode if the procvar returns an array type 2023-01-22 16:24:29 +01:00
Sven/Sarah Barth
1d73dab2b0 * a callnode for an anonymous function can have its procdefinition fixed, thus avoid the need to check for overloads 2022-12-30 23:32:00 +01:00
Sven/Sarah Barth
e050a019a2 * fix #29859: ensure that it's correctly passed down into generate_specialization whether a unit name was provided for the specialization and if so search the generic only in that unit
+ added tests
2022-10-28 17:40:53 +02:00
Sven/Sarah Barth
13fb30c52e * fix #39902: correctly handle assignment of procvars to properties with a field write accessor
+ added adjusted/extended test
2022-09-16 16:20:42 +02:00
Sven/Sarah Barth
6407b5f4db * try to specialize a specialize node if it's followed by a < in a non-code section so that we might get better error messages 2022-08-12 17:19:32 +02:00
Sven/Sarah Barth
33ef88858d * extract generating the specialization from a specialize node into a separate function 2022-08-12 17:01:22 +02:00
Sven/Sarah Barth
abb7aebaba * fix typo in comment 2022-08-12 14:47:13 +02:00
Sven/Sarah Barth
35958a9b6b * fix #39860: even if the block type is not correct for the specialization of a generic routine continue to specialize it to not trigger e.g. an internal error
+ added tests
2022-08-12 14:46:56 +02:00
florian
a401898139 * spelling fixes 2022-08-04 23:01:35 +02:00
Sven/Sarah Barth
7974f39522 * implement assignment of procedure and method variables and routines (global, instance and nested) to function references 2022-05-26 21:44:24 +02:00
Sven/Sarah Barth
f2305d1cee * if an invokable that isn't a function reference is followed by a point in a mode that doesn't use TP/Delphi style calling without parameters then don't call it like is done with normal procvars 2022-05-26 21:44:23 +02:00
Sven/Sarah Barth
4dbdb4f0f1 + initial support for anonymous functions, for now as essentially nested functions
Based on work by Blaise.ru
2022-05-26 21:43:00 +02:00
Sven/Sarah Barth
2cc621618a * Delphi-mode calling without parenthesis 2022-05-26 21:43:00 +02:00
Sven/Sarah Barth
2ed2c21313 + add support for parsing function references 2022-05-26 21:42:59 +02:00
Sven/Sarah Barth
bc4eb00a7a * apply patch by Blaise.ru: proper code generation for assigning class non-static methods, accessed via a class reference type, to method pointers
+ added test
2022-05-26 21:42:55 +02:00
Sven/Sarah Barth
a8cf67d73b * apply patch by Blaise.ru: reject assignments of instance methods, accessed via a type, to method pointers
+ add tests
2022-05-26 21:42:54 +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
1a8444087a * ensure that result of factor_handle_sym is initialized 2022-01-22 22:28:01 +01:00
Sven/Sarah Barth
5ce96de0f2 * ensure that an expression that involves an overloaded generic in mode Delphi isn't handled as a specialization if it shouldn't be
+ added tests
2022-01-22 20:27:01 +01:00
Sven/Sarah Barth
d4e0a79d9e * move the handling of the symbol found in factor_read_id to a separate function 2022-01-22 20:27:01 +01:00
florian
e4ee8fa6a2 * patch by Rika to pass some strings by reference, resolves #39338 2021-11-09 22:41:52 +01:00
florian
f78818e387 * some warnings fixed 2021-09-18 19:24:53 +02:00
Yuriy Sydorov
07dcd22b1c * sizeof(array) and length(array) must return sizeUint in case the array
size does not fit in sizeint. This fixes a range check error during
  compilation on small CPU targets where allowed array size is 64K, but
  sizeint is 32K max.
2021-08-16 21:54:46 +03:00
florian
415bf22e01 * remove mhs_exceptions in might_have_sideeffects call for C operators: it improves code
and shouldn't hurt as this is no regression in comparison with current 3.2.x

git-svn-id: trunk@49621 -
2021-07-19 20:55:41 +00:00
florian
0d6a1d24bd * might_have_sideeffects in gen_c_style_operator as proposed by runewalsh, resolves #39206
git-svn-id: trunk@49608 -
2021-07-13 18:31:38 +00:00
svenbarth
6e4984184b * for variant dispatch calls, use the parameter name in source case, not upper case
git-svn-id: trunk@49480 -
2021-06-05 17:43:53 +00:00
svenbarth
2885d3ab56 * fix for Mantis #37426: don't allow an instance function of a type helper to be used on the type instead of a concrete value
+ added test

git-svn-id: trunk@49102 -
2021-04-02 15:25:01 +00:00
svenbarth
7343e9c4a2 * correctly handle the case should the generic dummy symbol be a procsym instead of a typesym
git-svn-id: trunk@48001 -
2021-01-02 23:23:34 +00:00