* fixes i386 DivMod with negative numbers with a patch from Jonas
* fixes generic DivMod with negative numbers
* test updated
git-svn-id: trunk@14532 -
- Adds threadsafe (Delphi-compatible) versions of DateToStr,
TimeToStr, DateTimeToStr, FormatDateTime.
- Core functionality moved to DateTimeToString, which directly
uses 'out' parameter in order to avoid unnecessary result copying.
- Modified the code so no temporary AnsiStrings are used (speed).
- Fixes a bug which would cause infinite recursion if
(Short|Long)DateFormat variable would contain 'd' character or,
likewise, (Short|Long)TimeFormat would contain 't'.
- Fixes numerous small Delphi compatibility issues, like: empty format
string has the same effect as 'C'; overlong tokens treated as the
longest possible ones (e.g. 'ddddddddd' is the same as 'dddddd');
'AM/PM' is output preserving its case, etc.
- minor reformating
git-svn-id: trunk@14116 -
rtl: add enumerators to the basic classes
tests: add enumerators test which compiles and work both by fpc and dcc
compiler:
+ start for-in loop implementation: implement for-in loop for types (enumerations and ranges), strings, arrays and sets. todo: perform type checking, optimize array and string loops - use temp for expression, implement for-in loop for classes
test:
+ add a simple test for the 'for-in' loop
compiler: fix string for-in loop. now it uses a temp variable to store string expression result
complier: fix for-in array loop. use a temp variable for the loop expression only if loop is not an open array loop
complier: continue enumerator implementation:
+ add operator enumerator which give an ability to add enumerator for an existent type (for example to override builtin string enumerator)
+ add class enumerator support via delphi compatible GetEnumerator method + enumerator class/object template (function MoveNext: Boolean; property Current)
+ tests
compiler: fix for-in loop for arrays. delphi does not copy arrays to a temp variable and it is possible to change array during loop. + test
compiler: add reference for the enumerator operator when it is used + another test for operator enumerator for a class
compiler: add reference for the enumerator operator when it is used + another test for operator enumerator for a class
compiler: enumerator directive support:
+ allow to mark methods and properties by 'enumerator MoveNext' and 'enumerator Current' modifiers. Parser checks return types and duplicates.
+ prefer *marked* by enumerator directive methods and properties than GetEnumerator and Current builtin symbols
+ increase ppu version
+ test
rtl: add IEnumerator and IEnumerable interfaces declarations
tests: for-in loop tests:
+ add small comment at the top of test program
compiler: allow 'enumerator MoveNext' for the interface function declaration + test
compiler: move all for-in loop helpers to the nflw unit
compiler: don't allow the compiler to choose the non-valid enumerator operator for the for-in loop
git-svn-id: trunk@14008 -
+ changes in compiler, utils, packages to resolve identifier conflicts with the new TObject methods (like changing of UnitName arguments to AUnitName, adding Classes. before the toString, etc). (issue #0014931)
git-svn-id: trunk@14005 -
due to wince <-> win32/win64 headerwise. wince has some identifiers in Windows that win32/win64 has in activex
* patches for comobj/comserv from 0014822 and 0014939 as well as one minor fix to activex.
git-svn-id: trunk@13991 -
* left old cpu-specific set helper code under ifdef FPC_OLD_BIGENDIAN_SETS
in case someone wants to write new assembler set helpers (although most
of them should be optimally generated by the compiler already if
http://wiki.freepascal.org/FPC_HowToDo#Bit.28field.29_getting.2Fsetting_primitives
are optimally implemented)
git-svn-id: trunk@13582 -
that cause various problems, added "overload" directive so it gets
overloaded next to the routines in the "math" unit) (based on patch
by Alexander S. Klenin, mantis #13619)
- removed "inline" from that function because all the reference increasing/
decreasing in its body mainly cause code bloat and little if any speed
increase
git-svn-id: trunk@13084 -
* Removed all code of TThread.Synchronize() for BeOS, since existing code is copy/paste from win32 code and does not work anyway.
git-svn-id: trunk@13078 -
unit's initialization code in case we're in a library
+ implemented InquireSignal(), AbandonSignalHandler(), HookSignal() and
UnhookSignal() in the sysutils unit
* for Kylix compatibility, these routines support operating on
SIGINT and SIGQUIT as well, although they are not hooked by default
by FPC. The run time errors/exception codes for these signals are
resp. 217 and 233 (same as in Kylix; I changed ENoWideStringSupport
to 234).
* changed the BSD syscall version of fpsigaction to use pointer
rather than "var" arguments (compatible with other targets, and
required to be able to pass nil arguments inside the system unit)
-> together fixes mantis #12704
git-svn-id: trunk@13077 -
element of its element type) in TBinaryObjectWriter.WriteVariant
by letting variantmanager handle their conversion transparently
git-svn-id: trunk@13075 -
* fixed errors in Inc*() routines regarding skipping the black
home in the data-time continuum around 0, and the same for the
*Between() functions
+ tests, test...
git-svn-id: trunk@12958 -