The sources of the Free Pascal compiler, RTL, packages and utilities. See https://www.freepascal.org/ for more info.
Go to file
svenbarth ed94ca4b24 Add support for IfThen() instrinsic that works like the if-statement in that it evaluates only the expression that is indeed executed.
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 -
2016-01-31 14:29:12 +00:00
compiler Add support for IfThen() instrinsic that works like the if-statement in that it evaluates only the expression that is indeed executed. 2016-01-31 14:29:12 +00:00
ide Allow i8086 cross IDE by adding missing compiler/x86 unit directory 2016-01-13 10:11:34 +00:00
installer * added SDL sources 2015-11-17 12:03:49 +00:00
packages Call system.Flush only once within ReadFromStream nested in ExecuteFPC for interactve mode 2016-01-29 22:50:53 +00:00
rtl Fix threadvar handling. Basically a merge of r31913 of my packages branch. 2016-01-30 23:10:35 +00:00
tests Add support for IfThen() instrinsic that works like the if-statement in that it evaluates only the expression that is indeed executed. 2016-01-31 14:29:12 +00:00
utils Fix compilation with range check on by redefining tat array in ClearComments procedure 2016-01-28 17:14:11 +00:00
.gitattributes Add support for IfThen() instrinsic that works like the if-statement in that it evaluates only the expression that is indeed executed. 2016-01-31 14:29:12 +00:00
.gitignore * Removed empty tests directory from svn 2014-11-08 15:47:53 +00:00
fpmake_add1.inc
fpmake_proc1.inc
fpmake.pp
Makefile * Patch from Thaddy de Koning to make 3.0.0 the only starting compiler 2016-01-17 09:24:48 +00:00
Makefile.fpc * Patch from Thaddy de Koning to make 3.0.0 the only starting compiler 2016-01-17 09:24:48 +00:00