florian
5670a7543c
* properly reset nf_write/nf_modify flags for min/max inline nodes, needed by dead store optimization, resolves #39958
...
* factored out nutils.node_reset_pass1_write
2022-10-16 22:51:50 +02:00
J. Gareth "Curious Kit" Moreton
798a4d7611
* Fix to bug that would reset nf_write flag on tempref nodes in assignments
2022-08-31 18:25:11 +00:00
Sven/Sarah Barth
8595c927a8
* fix #39876 : correctly Read(Str) enum types which have a size smaller than 4 Byte
...
+ added tests
2022-08-26 17:16:29 +02:00
Sven/Sarah Barth
c122e16beb
* fix #39849 : it's an error when the file (or string) parameter of a Read*/Write* is followed by a ":"
...
+ added test
2022-07-29 17:34:55 +02:00
florian
8eb2cea349
* do not throw an internal error if slice is used on dyn. array paramters, resolves #39806
2022-06-23 23:11:18 +02:00
Pierre Muller
5acd7a7b83
Rename tsymtable.insert and delete methods to insertsym ands deletesym
2022-05-03 23:00:28 +02:00
florian
cecb24344c
Merge branch 'main' into val_range_check
2022-01-19 22:20:24 +01:00
Sven/Sarah Barth
c59b6a5d8d
* High() and Length() for dynamic arrays deal with sizesinttype instead of ossinttype (on AVR the former is 16-bit while the later is 8-bit thus this is an important distinction)
2022-01-18 23:39:31 +01:00
florian
8e4e229a5f
+ DestSize parameter for fpc_Val_UInt functions
2022-01-11 22:10:26 +01:00
florian
292be9029e
* when converting a*a into sqr(a), set the result type correctly
...
* removefloatupcasts takes care of cs_excessprecision, resolves #39012
2021-11-07 21:54:25 +01: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
svenbarth
ca7c775e36
* fix for Mantis #38642 : for enumerations with jumps Delphi behaves as follows:
...
- GetTypeKind returns tkEnumeration (FPC previously generated a compile error here)
- GetTypeInfo on a generic parameters returns Nil for such types (FPC previously generated a compile error here)
- GetTypeInfo otherwise generates a compile error (as before)
git-svn-id: trunk@49064 -
2021-03-27 09:35:07 +00:00
Jonas Maebe
3e047d3691
* generate more efficient code for trunc(currency), trunc(comp), and
...
round(comp) on platforms where currency and comp are handled using the FPU
o also fixes trunc(comp) and trunc(currency) compilation for x86 on LLVM
with -Oofastmath
* add missing removal of excess fpu precision typecasts for trunc/round
git-svn-id: trunk@47854 -
2020-12-27 13:18:47 +00:00
florian
6e4997265c
+ min/max intrinsics for internal use by the compiler
...
git-svn-id: trunk@47692 -
2020-12-05 22:00:58 +00:00
florian
28d248c9d4
* cleanup merge overlefts
...
git-svn-id: trunk@47691 -
2020-12-05 22:00:57 +00:00
florian
bcdfd07bdd
* if a variant is read/written, include the variants unit
...
git-svn-id: trunk@47459 -
2020-11-19 20:53:47 +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
cce2dad1bf
* fix for Mantis #37806 : allow undefineddefs for Include() and Exclude()
...
+ added tests
git-svn-id: trunk@46953 -
2020-09-25 14:13:53 +00:00
svenbarth
ff4e1345ff
* fix for Mantis #37779 : use init RTTI instead of full RTTI when copying an array
...
+ added test
git-svn-id: trunk@46915 -
2020-09-21 20:17:55 +00:00
svenbarth
d3e18ccb5e
* fix for Mantis #37221 : apply adjusted patch by Ondrej Pokorny to allow the use of Copy() on open array parameters (the result will be a dynamic array)
...
+ added test
git-svn-id: trunk@46890 -
2020-09-18 15:00:10 +00:00
florian
60bd9c5ba0
* write a proper error message if types are read/written which are not supported in iso mode, resolves #37763
...
git-svn-id: trunk@46885 -
2020-09-17 19:58:55 +00:00
svenbarth
8770af84bd
* fix for Mantis #37187 : inside generics the constant code in pexpr does not handle all cases and thus current_procinfo needs to be checked as well
...
+ added test
git-svn-id: trunk@46218 -
2020-08-03 21:53:14 +00:00
florian
f542ee7b92
* do not throw an internal error if an errorneous type is passed to str, resolves #37462
...
git-svn-id: trunk@45983 -
2020-08-01 21:11:35 +00:00
florian
18877dc96e
* check if current_procinfo is assigned when creating a default sym to avoid a crash, resolves #37303
...
git-svn-id: trunk@45772 -
2020-07-11 20:30:33 +00:00
svenbarth
d401639b24
* fix for Mantis #37251 : apply patches by Bi0T1N to implement the IsConstValue() intrinsic
...
+ added tests
git-svn-id: trunk@45695 -
2020-06-25 20:42:47 +00:00
florian
d2d2904d78
* make more use of is_typeparam
...
git-svn-id: trunk@45458 -
2020-05-21 18:40:59 +00:00
svenbarth
3d2945726a
* handle generic parameters in Ord()
...
+ added test
git-svn-id: trunk@45232 -
2020-05-03 15:08:31 +00:00
nickysn
b4ff7388df
+ retinparam fixes for exp, frac, int, cos, sin, arctan, ln, round and trunc
...
git-svn-id: branches/z80@45016 -
2020-04-23 00:25:02 +00:00
nickysn
661db99581
+ ret in param fix in pass_typecheck for exp,frac,int,cos,sin,arctan,ln
...
git-svn-id: branches/z80@45015 -
2020-04-23 00:14:13 +00:00
nickysn
5200ff5e49
+ ret in param fix for tinlinenode.first_sqrt_real
...
git-svn-id: branches/z80@45014 -
2020-04-23 00:11:17 +00:00
nickysn
0b19d4235f
+ ret in param fix for tinlinenode.first_sqr_real
...
git-svn-id: branches/z80@45013 -
2020-04-23 00:08:23 +00:00
nickysn
a1ccab5e23
+ handle properly ret in param in tinlinenode.first_abs_real
...
git-svn-id: branches/z80@45012 -
2020-04-23 00:06:03 +00:00
nickysn
0e605eb30e
* fix for the handling of abs(real), sqr(real) and sqrt(real) when the result is returned in param
...
git-svn-id: branches/z80@45011 -
2020-04-22 23:42:32 +00:00
Jeppe Johansen
c20b27ede9
Add most SSE instructions as intrinsics.
...
git-svn-id: trunk@44274 -
2020-03-06 21:34:22 +00:00
florian
3947922fea
* set nf_* correctly when an inc/dec node is converted into an add/sub node
...
* do not firstpass during dead store removal as it disturbes the for each calls
git-svn-id: trunk@44180 -
2020-02-15 13:53:16 +00:00
Jonas Maebe
b625afe800
* never inline routines that call get_frame (otherwise get_frame would return
...
the frame of the caller rather than of the current routine, which could
cause e.g. stackframes to be missed in RTL helpers that are known to be
only called from run time error routines)
git-svn-id: trunk@44064 -
2020-01-29 22:21:14 +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
florian
f7a052f884
+ inline high(<dyn. array>), resolves #28536
...
git-svn-id: trunk@43808 -
2019-12-28 21:38:38 +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
svenbarth
b0ac0ddcc9
+ add support for the IsManagedType() intrinsics which reports for a type (or variable) whether it needs initialization/finalization
...
+ added tests
git-svn-id: trunk@43409 -
2019-11-06 23:04:52 +00:00
Jonas Maebe
a051b8d225
- remmoved doregister parameter from t*sym constructors, as the registration
...
is handled automatically nowadays
git-svn-id: trunk@42998 -
2019-09-14 17:30:45 +00:00
Jonas Maebe
14a7429e19
* factored out inlinenode check whether it may have a side effect
...
o also added register assert as having a side-effect (if asserts are
enabled)
git-svn-id: trunk@42728 -
2019-08-18 15:55:03 +00:00
Jeppe Johansen
7dc515b62c
- Fix result type of SizeOf and BitSizeOf to use sizesint instead of sint.
...
git-svn-id: trunk@42337 -
2019-07-07 14:37:45 +00:00
Jonas Maebe
0a91fcb44f
* LLVM-specific support for bsr*/bsf*
...
git-svn-id: trunk@42309 -
2019-06-29 16:27:18 +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
Jonas Maebe
1b6425176b
* synchronised with trunk till r42049
...
git-svn-id: branches/debug_eh@42050 -
2019-05-12 18:44:05 +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
Jonas Maebe
a0d796e98d
* synchronised with trunk till r41159
...
git-svn-id: branches/debug_eh@41160 -
2019-02-01 17:01:54 +00:00
Jonas Maebe
04d295f186
* first step towards supporting 32 bit targets with the LLVM code generator:
...
use the generic code in more cases when cpuhighleveltarget is defined
git-svn-id: trunk@41133 -
2019-01-29 21:39:09 +00:00