Jonas Maebe
9f42931eeb
* don't print range check warnings when evaluating inlined explicit typecasts
...
git-svn-id: trunk@46904 -
2020-09-20 10:29:51 +00:00
svenbarth
2c372071fd
* correctly handle static arrays with a lower index <> 0
...
+ added test
git-svn-id: trunk@46901 -
2020-09-19 21:20:07 +00:00
svenbarth
bf1eae7bd6
* small formatting adjustments for the sake of consistency
...
git-svn-id: trunk@46892 -
2020-09-18 15:00:17 +00:00
svenbarth
2ff18e48a0
* fix for Mantis #36909 : apply patch by Ryan Joseph so that array constructors can be used for static arrays as well.
...
+ added test
git-svn-id: trunk@46891 -
2020-09-18 15:00:15 +00:00
pierre
57b8f28574
Avoid overflow errors on z80 CPU by changing local variable type from aint to tcgint
...
git-svn-id: trunk@45816 -
2020-07-21 05:23:36 +00:00
svenbarth
eaa2a2006c
* fix for Mantis #37272 : also allow the empty set for dynamic array parameters; Delphi probably started to allow that together with array constructors.
...
+ added tests
git-svn-id: trunk@45706 -
2020-06-27 22:33:31 +00:00
Jonas Maebe
5be84e8079
* replaced custom packed record with tmethod
...
git-svn-id: trunk@45465 -
2020-05-22 13:11:52 +00:00
florian
b6097a0300
* correctly handle result type of string constant nodes for internally created
...
nodes
git-svn-id: trunk@45231 -
2020-05-03 12:41:17 +00:00
Jonas Maebe
f5e89ded35
* fix tc_bool_2_int simplification in case pass typecheck runs again, e.g.
...
after getting a copy of the node during CSE (fixes taddset4 compilation
with LLVM after r44712)
git-svn-id: trunk@45087 -
2020-04-26 11:36:42 +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
4d73a9e637
* simplify tc_bool_2_int
...
git-svn-id: trunk@44712 -
2020-04-12 20:50:39 +00:00
florian
04f3784af5
* better setting of expectloc
...
git-svn-id: trunk@44619 -
2020-04-06 20:44:31 +00:00
Jonas Maebe
afd0ae44ee
* use tprocvardef.getreusableprocaddr also for non-address-only copies of
...
proc(var)defs
git-svn-id: trunk@44517 -
2020-04-02 21:21:40 +00:00
pierre
9c067709f8
Fix invalid typecast revealed by -CriotR option
...
git-svn-id: trunk@44108 -
2020-02-03 22:35:25 +00:00
florian
91696d2cf3
- remote accidently committed printnode call
...
git-svn-id: trunk@44099 -
2020-02-02 19:17:22 +00:00
florian
53d2df07b6
* mark handled currencies correctly, so they are handled properly by simplify
...
git-svn-id: trunk@44098 -
2020-02-02 18:28:42 +00:00
florian
6a1c09bb43
* simplify type conversions of ordinal constants to currency
...
git-svn-id: trunk@44055 -
2020-01-28 21:19:05 +00:00
Jonas Maebe
67dbd0cdb3
* support nf_internal to ignore currency conversion adjustments also on
...
platforms that implement currency using a floating point type
git-svn-id: trunk@43817 -
2019-12-30 15:05:02 +00:00
florian
86d8e79e86
* fix some currency issues, resolves #33963 and #36179
...
git-svn-id: trunk@43620 -
2019-12-01 20:24:00 +00:00
Jonas Maebe
5800ac6213
* fix conversion from Objective-C class/protocol to tvarrec (store in
...
vPointer) (mantis #36362 )
git-svn-id: trunk@43594 -
2019-11-26 21:24:56 +00:00
svenbarth
0a915e883e
* keep track of static symbols that a global function references, as those must now be exported from a dynamic package as well if the function can potentially be inlined
...
git-svn-id: trunk@43544 -
2019-11-21 21:44:53 +00:00
Jonas Maebe
d23c7980aa
* properly perform (or not) range/overflow checking when performing constant
...
propagation into inlined routines, regardless of the range/overflow
checking state at the caller site
git-svn-id: trunk@43436 -
2019-11-10 12:00:05 +00:00
Jonas Maebe
ac1e0f96bd
* replaced tentryfile.get/putsmall/normalset() with a common tget/putset
...
that expects an open array of byte, and use it for all sets
o since all sets need to be typecasted to an array type of the appropriate
size, we'll get a compilation error in case this needs to be done and
that also tells us at the same time that the ppu version will need to
be increased
* enabled {$packset 1} for the compiler, as this is now safe with the above
changes
git-svn-id: trunk@43407 -
2019-11-06 21:50:19 +00:00
florian
e19eff1332
* also type casts to booleans benefit if unneeded type widenings are removed
...
git-svn-id: trunk@43344 -
2019-11-01 09:52:37 +00:00
svenbarth
663040a666
* ensure that aprocdef is initialized to Nil to catch problems with compare_defs_ext() easier
...
git-svn-id: trunk@42699 -
2019-08-15 14:32:57 +00:00
Jonas Maebe
c038e4c3f2
* relaxation of r42272: again only show warnings rather than errors for
...
out-of-range constants, because of the comments mentioned in #35753
(except for enums, as apparently Delphi does the same)
* added range check warnings about explicit type casts that throw away
bits (e.g. byte($fff)), without giving warnings for most common cases
(like cardinal(-1))
* fixed masking/sign exting constant array indices (must be based on index
range type size/signedness rather than on array size/"signedness")
git-svn-id: trunk@42275 -
2019-06-23 14:12:33 +00:00
pierre
243c967967
Commit of new debug feature implemented by J. Gareth Moreton
...
Allows compilation of compiler using -dDEBUG_NODE_XML
which will generate a NAME-node-dump.xml file for each
unit, program or library compiled,
containing a XML description of the nodes handled during
compilation of the unit, program or library.
git-svn-id: trunk@42271 -
2019-06-22 14:08:47 +00:00
florian
749c4d4e47
+ keep (certain) arrays in registers if they are used with constants indices only
...
git-svn-id: trunk@42239 -
2019-06-16 21:29:48 +00:00
Jonas Maebe
281b3ad276
* fix case completeness and unreachable code warnings in compiler that would
...
be introduced by the next commit
git-svn-id: trunk@42046 -
2019-05-12 14:29:03 +00:00
svenbarth
18519c9559
* fix for Mantis #34526 : rely on tc_arrayconstructor_2_set instead of manually converting an array constructor to a set, this way assignment operator overloads are taken into account as well
...
Note: there is still a conversion to a set if the types were determined to be incompatible, so that the error is still "set of X is incompatible to Y" instead of "array of Z is incompatible to Y"
+ added tests
git-svn-id: trunk@41844 -
2019-04-05 15:24:39 +00:00
svenbarth
156b25501d
* improve conversion of array constructor to set so that it behaves as if done inside pass_typecheck
...
git-svn-id: trunk@41843 -
2019-04-05 15:24:36 +00:00
yury
e5c2d13671
* Do not set pi_needs_got in current_procinfo.flags at the node level, since the GOT usage can only be estimated there. Instead set the pi_needs_got flag at places where the GOT register is accessed during the code generation. This eliminates generation of the unneeded initialization of the GOT register and fixes linker errors when the _GLOBAL_OFFSET_TABLE_ symbol is referenced but no actual GOT references are present.
...
git-svn-id: trunk@41460 -
2019-02-25 13:35:40 +00:00
Jonas Maebe
acf02ab64b
* when creating wrappers, add a prefix to parameter names to prevent them
...
hiding the method name of the wrapped routine
o also add a few more '&' prefixes to the generated wrapper code to
prevent issues when keywords are used as identifiers
git-svn-id: trunk@40634 -
2018-12-24 22:10:06 +00:00
Jonas Maebe
dd29088430
* simplify all type conversions for formal constants even for LLVM and JVM
...
(since these happen at compile time and don't result in generated code,
they never need extra type conversions in the code)
git-svn-id: trunk@40629 -
2018-12-24 22:09:48 +00:00
Jonas Maebe
2c7c0d1144
* handle widechar constants directly in the scanner, instead of in the
...
overload selection (where you can't even know whether the string is
a valid widechar constant) (mantis #33875 )
git-svn-id: trunk@40009 -
2018-10-21 17:34:00 +00:00
Jonas Maebe
0b246f3dbd
* converted Boolean8 to an internal type, and mapped Boolean to the
...
new internal pasbool1(type) (part of mantis #34411 )
o apply the _Bool x86-64 parameter passing rules only to pasbool1
git-svn-id: trunk@39949 -
2018-10-16 21:14:18 +00:00
florian
68eb921d46
* broken compilation after r39347 fixed
...
git-svn-id: trunk@39349 -
2018-06-30 12:30:25 +00:00
Jonas Maebe
8da8b956b0
* discard type conversions from/to generic defs for llvm as well
...
git-svn-id: trunk@38864 -
2018-04-28 16:17:45 +00:00
Jonas Maebe
eaafb166ad
* set totypedef correctly when converting @class.classmethod to a procvar
...
of object in FPC mode (for llvm)
git-svn-id: trunk@38863 -
2018-04-28 16:17:41 +00:00
Jonas Maebe
1f9d518c57
* support for non-ASCII widechar constants (mantis #31605 )
...
* also improved type checking for converting constant strings to integers
in MacPas mode
git-svn-id: trunk@38730 -
2018-04-10 19:24:15 +00:00
nickysn
6929af07b7
+ added flag tcnf_proc_2_procvar_get_offset_only
...
git-svn-id: trunk@38680 -
2018-04-04 14:48:12 +00:00
nickysn
99a1cf89b3
+ print convnodeflags in printnodeinfo
...
git-svn-id: trunk@38679 -
2018-04-04 13:20:41 +00:00
nickysn
3318703ece
* moved nf_typedaddr to addrnodeflags (anf_typedaddr)
...
git-svn-id: trunk@38671 -
2018-04-03 16:41:01 +00:00
nickysn
c9aecb8e94
* also compare convnodeflags in ttypeconvnode.docompare
...
git-svn-id: trunk@38669 -
2018-04-03 15:03:40 +00:00
nickysn
da609779d2
* simplify ttypeconvnode.printnodeinfo by making use of the fact that
...
write/writeln now can print enums
git-svn-id: trunk@38668 -
2018-04-03 14:49:31 +00:00
Jonas Maebe
4da6039f40
* simplify empty-dynamic-string-to-pointer (non-p(wide)char) type conversions
...
so that they cannot result in "cmp const, const" at the assembler level
(mantis #33548 )
git-svn-id: trunk@38662 -
2018-04-02 18:35:00 +00:00
nickysn
c665866517
+ introduce the tcnf_proc_2_procvar_2_voidpointer flag (for now it is only set,
...
but not used)
git-svn-id: trunk@38638 -
2018-03-27 16:15:06 +00:00
nickysn
3e9b9451b4
* copy the new convnodeflags field in ttypeconvnode.dogetcopy
...
git-svn-id: trunk@38637 -
2018-03-27 15:58:53 +00:00
nickysn
6ad786f8ef
+ introduce ttypeconvnodeflags (empty for now)
...
git-svn-id: trunk@38636 -
2018-03-27 15:33:50 +00:00
florian
61053ead34
+ optimize is operator if used on sealed classes as proposed in #30097
...
git-svn-id: trunk@38387 -
2018-02-28 22:09:24 +00:00