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 -
sinttype (they're the same on most platforms, except on 8 bit ones where
ossinttype is still 16 bit)
* simplified and documented second_length(), and fixed some (harmless)
errors in the used tcgsize for the resultdef (it had to be OS_SINT
rather than OS_INT -- now it's just def_cgsize(resultdef) so it's
always correct)
git-svn-id: branches/hlcgllvm@28387 -
ninl.pas, tinlinenode.pass_typecheck:
* if the first parameter of an Assert is a undefineddef node then accept it as well if the node is part of a generic function/method
+ added test
git-svn-id: trunk@27875 -
Currently it is implemented only for x86-CPUs supporting the FMA extension. While it would
be possible to implement it in software or simulate fma(<single>,<single>,<single>) using
double operations, it makes no sense in my opinion to do so.
git-svn-id: trunk@27564 -
ninl.pas, tinlinenode.pass_typecheck:
* don't generate a type error if Length() is used inside generics with a generic argument
+ added test
git-svn-id: trunk@27533 -
o made all (non-abstract) tdef and tsym constructors virtual
o added c*def/c*sym classref types for every (non-abstract) t*def/t*sym
class
o added cpusym unit for every architecture that derives a tcpu*def/tcpu*sym
class from the base classes, and initialises the c*def/c*sym classes with
them. This is done so that the llvm target will be able to derive from
the tcpu*def/sym classes without umpteen ifdefs, and it also means that
the WPO can devirtualise everything because the c* variables are only
initialised with one class type
o replaced all t*def/t*sym constructor calls with c*def/c*sym constructor
calls
git-svn-id: trunk@27361 -
* ninl.pas, tinlinenode.handle_default.getdefaultvarsym:
prefix the default variable's name with a "$zero" instead of a "zero" and use only the string from the second character on for comparisons so that findwithhash() and checkduplicates() generate consistent results
+ added test
git-svn-id: trunk@27320 -
sinttype, instead of u32inttype. This:
1) is consistent with what type conversion tshlshrnode.pass_typecheck inserts
on the right side
2) avoids the expensive conversion to 32-bit and the even more expensive
performing the operation in 32-bit on i8086
git-svn-id: trunk@26352 -
o set the code page of the temporary "text" file to utf-8 for writestr with
unicodestring/widestring as destination, so that no data loss can occur
(+ properly deal with cases whereby part of an utf-8 character is
written to the textbuf in this case)
o explicitly pass the code page of the destination ansistring for writestr
with ansistring as destination and set it for the temporary "text" file
o set the code page of the text file for readstr
git-svn-id: trunk@26317 -