Commit Graph

40848 Commits

Author SHA1 Message Date
Jonas Maebe
d919794fdf * handle the fact that GetEnvironmentStringsA returns the environment in the
OEM instead of in the Ansi code page (mantis #22524, #15233)

git-svn-id: branches/cpstrrtl@25092 -
2013-07-12 17:18:28 +00:00
Jonas Maebe
a5273abc9c + support for CP_OEMCP
* changed all mappings from CP_ACP to DefaultSystemCodePage to calls to the
    new TranslatePlaceholderCP() routine (which also handles CP_OEMCP)
  * removed unnecessary CP_ACP adaptations in fpc_AnsiStr_Concat_multi()
    for JVM target (now handled in the ansistring to unicodestring conversion
    routine)

git-svn-id: branches/cpstrrtl@25091 -
2013-07-12 17:18:24 +00:00
Jonas Maebe
44f4bdfb2e - removed stray stringcodepage assignment in fpc_AnsiStr_Concat_multi()
git-svn-id: branches/cpstrrtl@25090 -
2013-07-12 17:18:20 +00:00
Jonas Maebe
0ef0206417 * fixed off-by-one error in the optimised rawbytestring/unicodestring
dodirseparators() routines + added test (only testable under Windows)

git-svn-id: branches/cpstrrtl@25089 -
2013-07-12 17:18:16 +00:00
Jonas Maebe
ba49e4a29d * fixed do_getdir() for non-defaultdrive after r25042 ("drive" array has to
be an array of widechar now)
  * fixed restoring of original path in do_getdir() (pass contents of
    unicodestring to SetCurrentDirectoryW(), not its address)

git-svn-id: branches/cpstrrtl@25088 -
2013-07-12 17:18:11 +00:00
marco
45b84ab8ca * added TElemdesc alias (found it used in Delphi code)
git-svn-id: trunk@25087 -
2013-07-11 21:33:13 +00:00
nickysn
7a0bf4fa54 * the change in r25067 disabled for 16-bit and 8-bit CPUs, because it relies on reg_cgsize, which gives wrong results on archs that use GetNextReg()
git-svn-id: trunk@25086 -
2013-07-11 12:28:26 +00:00
reiniero
7efdfa8ff6 fcl-db: cosmetic: corrected fpdbexport.pp comments
git-svn-id: trunk@25085 -
2013-07-11 11:09:05 +00:00
reiniero
ed6500b370 fcl-db: cosmetic fixed for XMLXSD export readme
git-svn-id: trunk@25084 -
2013-07-11 11:02:08 +00:00
sergei
e82ecd66f3 - MIPS: removed target-specific real_to_real conversion, generic code handles it just well.
git-svn-id: trunk@25083 -
2013-07-11 08:28:24 +00:00
sergei
ac2006898f * Mark procedures with shortstring value parameters as non-leaf, because such parameters generate a call (to fpc_shortstr_assign).
git-svn-id: trunk@25082 -
2013-07-11 08:21:45 +00:00
michael
e992431bc4 * Do not decode Querystring yet. This is done when parsing it in name=value
git-svn-id: trunk@25081 -
2013-07-10 13:29:46 +00:00
sergei
8b97972482 * Typo in r25079.
git-svn-id: trunk@25080 -
2013-07-10 10:46:13 +00:00
sergei
0cea8466a2 MIPS RTL:
+ fixed missing result assignments in SetRoundMode and SetExceptionMask.
* GetRoundMode: provide correct mapping from FSR bits to TRoundingMode.
* SetExceptionMask: simplified.

git-svn-id: trunk@25079 -
2013-07-10 10:44:14 +00:00
Jonas Maebe
26b2149ced * converted the following sysutils routines to unicodestring and
rawbytestring: FileExists, DirectoryExists, FileSetDate, FileGetAttr,
    FileSetAttr, DeleteFile, RenameFile, FileSearch, ExeSearch,
    FileIsReadOnly

git-svn-id: branches/cpstrrtl@25078 -
2013-07-09 19:01:45 +00:00
Jonas Maebe
c0d2ebb682 * export PathConv(RawByteString) from the system unit and import/use it in
the sysutils unit instead of the ShortString version

git-svn-id: branches/cpstrrtl@25077 -
2013-07-09 19:01:40 +00:00
Jonas Maebe
60365489e2 * converted fileopen/filecreate interface to RawByteString for
msdos/embedded, but do not perform any code page conversions
    (size limits prevent widestring manager on msdos, and the
     embedded routines are empty)

git-svn-id: branches/cpstrrtl@25076 -
2013-07-09 19:01:36 +00:00
Jonas Maebe
93bd1dd12a * factored out ToSingleByteFileSystemEncodedFileName() calls for fileopen/
filecreate and ensure the result gets passed to a rawbytestring parameter

git-svn-id: branches/cpstrrtl@25075 -
2013-07-09 19:01:32 +00:00
Jonas Maebe
00ce3c1f52 * converted nativent sysutils routines to accept unicodestring instead
of rawbytestring and indicate that this platform now uses a two-byte
    file system API for the sysutils unit

git-svn-id: branches/cpstrrtl@25074 -
2013-07-09 19:01:28 +00:00
Jonas Maebe
c604e5af17 * small reorganisation of ansistring/unicodestring routine declarations, so
they are the same as in the unicode branch (to more easily apply patches)

git-svn-id: branches/cpstrrtl@25073 -
2013-07-09 19:01:24 +00:00
Jonas Maebe
b1c10cff02 * actually use the filename converted to the file system codepage in
FileCreate()

git-svn-id: branches/cpstrrtl@25072 -
2013-07-09 19:01:21 +00:00
sergei
1ca2a253e8 MIPS, improved integer to real conversions:
* Use fpc_[int64|qword]_to_double instead of [int64|qword]_to_float64, makes RTL no longer dependent on softfloat code.
* Move 32-bit values from integer registers to FPU registers without using memory.
* Fixed branching, was still using a macro and delay slot was missing.

git-svn-id: trunk@25071 -
2013-07-09 14:17:51 +00:00
svenbarth
6b34c84704 nadd.pas, taddnode.create_internal:
* Fix formatting of parameters

git-svn-id: trunk@25070 -
2013-07-09 08:51:49 +00:00
svenbarth
fc79d47b09 Fix for Mantis #24651. Allow pointer comparison for internal expressions (in this case check for valid VMT).
nadd.pas, taddnode:
  + add new constructor "create_internal" which adds "nf_internal" to the node's "flags"
  * pass_typecheck_internal: allow pointer comparisons other than "=" and "<>" for nodes which have "nf_internal" set
psub.pas, generate_bodyentry_block:
  * create the addnode using "create_internal" instead of "create" to allow the pointer comparison

+ added test 

git-svn-id: trunk@25069 -
2013-07-09 08:04:11 +00:00
svenbarth
407e9d173b Fix for Mantis #17598. When extended syntax is off allow the result of constructors to be dropped when the constructor is called as an instance method instead of a class method.
pstatmnt.pas, statement:
  * check whether the constructor is called as an instance or class method
nflw.pas, tlabelnode.pass_1:
  * don't check the owner of the labelsym when there is none (happens with internally created labels like for e.g. exception handling)

+ added test  

git-svn-id: trunk@25068 -
2013-07-09 07:56:45 +00:00
sergei
f3a1c749fb * tcgtypeconvnode.second_int_to_int: reuse 8 and 16-bit-sized register locations on targets with 32-bit-only registers when casting to larger size (except ShortInt to Word cast). This is possible because upper bits of such registers are always kept valid by code generators (see 'maybeadjustresult' method in cgcpu.pas). Removes a lot of useless register moves.
git-svn-id: trunk@25067 -
2013-07-08 13:27:03 +00:00
sergei
faa778b6c7 * MIPS: div/mod and 32-bit shifts: don't bother reusing argument locations, always allocate new register and emit 3-address instructions.
* Fixed possible overwrite of LOC_CREGISTER numerator in optimized division by power of 2.

git-svn-id: trunk@25066 -
2013-07-08 11:51:39 +00:00
lacak
35f74e86ad fcl-db: tests: Add test for Master-detail (see rev.25055)
git-svn-id: trunk@25065 -
2013-07-08 11:50:15 +00:00
lacak
a12a94eaff fcl-db: tests: move 1 test
git-svn-id: trunk@25064 -
2013-07-08 11:06:56 +00:00
lacak
8602706228 fcl-db: sqldb:
- do not allocate cursor when opening bufdataset from file
- when closing TSQLQuery do not deallocate cursor while can be prepared (fixes "[SETUP] unable to close due to unfinalised statements" bug for SQLite)
- when unpreparing statement take into account that there are also SQLConnections which does not support [un]preparation of statements ... bur for those we must still call UnRegisterStatement (fixes multiple "[TEARDOWN] Access violation" in tests)

git-svn-id: trunk@25063 -
2013-07-08 10:40:27 +00:00
sergei
9e4cc57768 * MIPS: handle 8 and 16-bit arithmetic shifts internally, by shifting argument left by 24/16 bits, followed with 32-bit arithmetic shift right by appropriately adjusted amount.
This approach should be usable for other non-x86 targets as well.

git-svn-id: trunk@25062 -
2013-07-08 08:45:16 +00:00
lacak
87a0868606 fcl-db: tests: more complex test for r25036
git-svn-id: trunk@25061 -
2013-07-08 06:55:15 +00:00
florian
58610af9f0 * adapt max_linear_list on x86-64 as well
git-svn-id: trunk@25060 -
2013-07-07 20:01:10 +00:00
florian
d0db391d7c * cleanup of unused units
git-svn-id: trunk@25059 -
2013-07-07 20:00:33 +00:00
florian
91138a535a * default value for max_linear_list on i386
git-svn-id: trunk@25058 -
2013-07-07 19:51:25 +00:00
florian
507edb16de * use add/sub instead of inc/dec on modern CPUs when optimizing for speed
git-svn-id: trunk@25057 -
2013-07-07 19:50:13 +00:00
michael
af1d33767d * Inherited must be called for Internal(Dis)Connect for housekeeping
git-svn-id: trunk@25056 -
2013-07-07 18:19:23 +00:00
michael
087b6b4a39 * Fixed Master/Detail relation in SQLDB and fixed memory leak
git-svn-id: trunk@25055 -
2013-07-07 18:14:11 +00:00
florian
2cdb4adf39 + tai_const.Create_type_name and tai_const.Create_pint_unaligned
* some locations fixed, where dwarf generated assembler for aligned data accidently

git-svn-id: trunk@25054 -
2013-07-07 15:09:36 +00:00
marco
609f6255d4 * added layout constants.
git-svn-id: trunk@25053 -
2013-07-06 20:46:30 +00:00
Jonas Maebe
a73897f835 - removed svn:mergeinfo properties (please only merge into the top level
directory)

git-svn-id: trunk@25050 -
2013-07-05 14:08:27 +00:00
sergei
bea46f3403 MIPS RTL:
* Fixed InterlockedXXX routines, hopefully thread-safe now.
+ SarInt64 assembler implementations for both mips and mipsel.

git-svn-id: trunk@25049 -
2013-07-05 14:03:18 +00:00
Jonas Maebe
d66d15aad3 + added mkdir/chdir/rmdir(rawbytestring) and (unicodestring) to the system unit
* renamed platform-specific pchar versions of those rouines to do_*() and
    changed them to either rawbytestring or unicodestring depending on the
    FPCRTL_FILESYSTEM_SINGLE_BYTE_API/FPCRTL_FILESYSTEM_TWO_BYTE_API setting
  * implemented generic shortstring versions of those routines on top of either
    rawbytestring or unicodestring depending on the API-kind (in case of the
    embedded target, if ansistring are not supported they will map directly
    to shortstring routines instead)
  * all platform-specific *dir() routines with rawbytestring parameters now
    receive their parameters in DefaultFileSystemCodePage
  - removed no longer required ansistring variants from the objpas unit
  - removed no longer required FPC_SYS_MKDIR etc aliases
  * factored out empty string and inoutres<>0 checks from platform-specific
    *dir() routines to generic ones
  o platform-specific notes:
   o amiga/morphos: check new pathconv(rawbytestring) function
   o macos TODO: convert PathArgToFSSpec (and the routines it calls) to
     rawbytestring
   o nativent: added SysUnicodeStringToNtStr() function
   o wii: convert dirio callbacks to use rawbytestring to avoid conversion
  + test for unicode mk/ch/rm/getdir()

git-svn-id: branches/cpstrrtl@25048 -
2013-07-04 22:28:37 +00:00
Jonas Maebe
e26210f448 * fixed wii compilation after r24993
git-svn-id: branches/cpstrrtl@25047 -
2013-07-04 22:28:31 +00:00
Jonas Maebe
893a9a57c6 * missing getdir -> do_getdir rename for r24993
git-svn-id: branches/cpstrrtl@25046 -
2013-07-04 22:28:27 +00:00
Jonas Maebe
ab9036ecbf + missing unicodestring version of ExpandUNCFileName
* make ansistring version of ExpandUNCFileName call the unicodestring version

git-svn-id: branches/cpstrrtl@25045 -
2013-07-04 22:28:24 +00:00
Jonas Maebe
8368f7dba5 * call unicodestring version of ExpandUNCFileName from ansistring version
instead of infinitely recursing into the ansistring version

git-svn-id: branches/cpstrrtl@25044 -
2013-07-04 22:28:20 +00:00
Jonas Maebe
3ba39f8e71 * fixed building after cpall unit addition
git-svn-id: branches/cpstrrtl@25043 -
2013-07-04 22:28:17 +00:00
Jonas Maebe
08ab4dcabe * convert calls to GetCurrentDirectory to *W in Windows do_getdir()
git-svn-id: branches/cpstrrtl@25042 -
2013-07-04 22:28:13 +00:00
Jonas Maebe
6dbcb7db80 + rawbytestring version of PathConv()
git-svn-id: branches/cpstrrtl@25041 -
2013-07-04 22:28:09 +00:00