checking is on, when handling the inc/dec inline nodes, instead of using
current_settings.localswitches
* when creating inline nodes in the optloadmodifystore optimization pass, copy
localswitches from the node, that is being replaced, because otherwise,
localswitches is copied from current_settings.localswitches at the time the
new node is created, and that can already be in a different state, since
optloadmodifystore is performed in a separate pass, after the current
procedure has already been parsed and in this moment, it reflects the state
of localswitches after the end of the procedure.
* these two fixes fix a bug, where an internalerror 2017032701 can happen, when
compiling with -O3 code that turns on and off range/overflow checking in the
middle of a procedure.
git-svn-id: trunk@36195 -
* compinnr.inc include file converted to a unit
* inline number field size stored in ppu increased from byte to longint
* inlines in the parse tree (when written with the -vp option) now printed with
their enum name, instead of number
git-svn-id: trunk@36174 -
optimization, which prevented the optimization from ever being performed. This
should also fix the test failure of tbs/tb0627b.pp on all 64-bit platforms.
git-svn-id: trunk@36071 -
less-than-64-bit CPUs that have a 64-bit OP_SHR/OP_SHL/OP_SAR implementation
in their cg64 backend code generator. This is enabled only for i386 for now.
git-svn-id: trunk@36022 -
be used (TBD in a future commit) for optimizing x:=-x and x:=not x on CPUs
that support performing these operations directly in memory (such as x86)
git-svn-id: trunk@35749 -
op=and/or/xor). They generate more optimal code on certain architectures
(including x86). The new inline nodes aren't generated by the compiler yet,
but will be used in the future, at certain optimization levels, whenever the
pattern x:=x op y is detected by the compiler.
git-svn-id: trunk@35666 -
Since overloading compilerprocs does not work each procedure got its own unique name, but they are using the new compilerproc extension to map them to the Insert and Delete symbol so that error messages can be shown with the respective name for the procedure declarations instead of fpc_shortstr_delete for example.
git-svn-id: trunk@33895 -
ninl.pas, tinlinenode:
* pass_typecheck: let code pass on to simplify() for undefineddefs in Low() and High()
* simplify: create a constant 0 as fallback
+ added test
git-svn-id: trunk@33884 -
with a ctemprefnode.create_offset() hack into a proper array, because
the old way does not work at all with LLVM (and is ugly)
git-svn-id: trunk@33724 -
The result type of the intrinsic is determined by the Then-expression to provide a bit of control. There might however be some situations in which this fails, for this exceptions need to be added (e.g. a constant string needs to be converted to a normal string).
compinnr.inc:
+ add new constant in_ifthen_x_y_z for the IfThen() intrinsic
psystem.pas:
+ create_intern_symbols: add symbol for IfThen() intrinsic
pexpr.pas:
* statement_syssym: parse parameters of IfThen() intrinsic and return corresponding inline node
ninl.pas, tinlinenode:
+ new method handle_ifthen() which converts the inline node to an if-node which assigns the expressions to a temp node that is returned
* pass_typecheck: handle in_ifthen_x_y_z using handle_ifthen()
* pass_1: in_ifthen_x_y_z does not need a first pass as it's already converted after the typecheck pass
+ added tests
git-svn-id: trunk@33036 -
loadvmtaddr and vmt_def
o give an error when trying to use sizeof on a class/object when
targeting the JVM (can't get/load the data size there)
git-svn-id: trunk@32764 -