Commit Graph

41056 Commits

Author SHA1 Message Date
svenbarth
5be1a905e8 Fix FindNext for NativeNT.
rtl/nativent/sysutils.pp, FindNext:
* the UNICODE_STRING.Length and the FILE_DIRECTORY_INFORMATION.FileNameLength fields contain the amount of bytes, not the amount of characters, so move the correct amount of bytes

git-svn-id: branches/cpstrrtl@25319 -
2013-08-21 10:24:20 +00:00
Jonas Maebe
936bd3c902 * fixed definitions/uses of asmsymbols: always explicitly define local
symbols as local, don't use RefAsmSymbol for symbols that may still
    be defined/used as local symbols later

git-svn-id: trunk@25318 -
2013-08-21 09:49:07 +00:00
paul
4c23d2281a rtl: fpwidestring:
- retry to load currentMap if it is not assigned
  - add more tests for fpwidestring manager

git-svn-id: trunk@25317 -
2013-08-21 06:56:26 +00:00
paul
2cb8125bfc tests: fix test to use fpwidestring manager (by Inoussa, mantis #0024890)
git-svn-id: trunk@25316 -
2013-08-21 06:35:25 +00:00
paul
d375cc88a1 rtl: apply patch of Inoussa which fixes undefined result of UnicodeToLower and UnicodeToUpper (mantis #0024889)
git-svn-id: trunk@25315 -
2013-08-21 06:32:17 +00:00
lacak
99e67d19cc fcl-db: bufdataset: partialy fixes TestOpeningNonExistingDataset. See also #22030.
git-svn-id: trunk@25314 -
2013-08-20 06:42:09 +00:00
lacak
4237cbcfd8 fcl-db: bufdataset: formatting
git-svn-id: trunk@25313 -
2013-08-20 06:11:06 +00:00
paul
e913ab1f9f rtl: apply patch of Inoussa which drops unicode manager dependency on SysUtils (issue #0024887)
git-svn-id: trunk@25312 -
2013-08-20 04:55:05 +00:00
paul
ec7be0d231 test: add more fpwidestring tests by Inoussa
git-svn-id: trunk@25311 -
2013-08-20 02:52:07 +00:00
Jonas Maebe
40ff1c77ca * updated GetWindowsSpecialDir():string so it uses the -A or -W api call
depending on whether the RTL is compiled in Unicode mode to avoid
    conversions

git-svn-id: branches/cpstrrtl@25310 -
2013-08-19 22:47:19 +00:00
Jonas Maebe
63e8d0c31c * do not yet map GetCommandLine() to GetCommandLineW() with -dFPC_UNICODE_RTL,
because its result is assigned to the global cmdline variable which is still
    a pchar in all cases

git-svn-id: branches/cpstrrtl@25309 -
2013-08-19 22:47:15 +00:00
Jonas Maebe
5b09435055 * explicitly call several windows *A() versions of APIs so the intended
routine is called even when we compile with -dFPC_UNICODE_RTL

git-svn-id: branches/cpstrrtl@25308 -
2013-08-19 22:47:12 +00:00
Jonas Maebe
efa95bed66 * changes so the compiler can be compiled with a unicode RTL without warnings
git-svn-id: branches/cpstrrtl@25307 -
2013-08-19 22:47:07 +00:00
Jonas Maebe
2da7c3f05c * changed declarations in finah.inc and diskh.inc from ansistring to
rawbytestring
  * DoDirSeparators() and GetDirs() marked as "rtlproc" so they can accept
    non-rawbytestring arguments as their var-parameters

git-svn-id: branches/cpstrrtl@25306 -
2013-08-19 22:04:40 +00:00
Jonas Maebe
65ecd1273d * removed warning when GetEnvironmentVariable() does not return a
a unicodestring

git-svn-id: branches/cpstrrtl@25305 -
2013-08-19 22:04:36 +00:00
Jonas Maebe
f9f041d470 * SystemOldNAme -> SystemOldName
git-svn-id: branches/cpstrrtl@25304 -
2013-08-19 22:04:33 +00:00
Jonas Maebe
91079d1327 * ensure that constant string concatenations don't result in converting
input strings to DefaultSystemCodePage

git-svn-id: branches/cpstrrtl@25303 -
2013-08-19 22:04:29 +00:00
Jonas Maebe
af3f12f60c * rawbytestring/unicodestring versions of findfirst/findnext/findclose
o these routines are now generic wrappers in filutil.inc, and call
     the platform-dependent internalfindfirst/next/close routines
   o on unix, the fnmatch routine got proper support for UTF-8 matching
     (e.g., it won't match a partial UTF-8 code point to a "?" wildcard)
   o for NativeNT, a similar (untested) UTF-16 version has been added
  + test for the above
  * rawbytestring/unicodestring versions of fileage

git-svn-id: branches/cpstrrtl@25302 -
2013-08-19 22:04:25 +00:00
Jonas Maebe
df97cd65d9 * don't adjust directory separators in fexpand when we're compiling the
sysutils version, it's already done (in a more efficient way) in
    ExpandFileName() before that routine is called

git-svn-id: branches/cpstrrtl@25301 -
2013-08-19 22:04:19 +00:00
Jonas Maebe
26b7f5a36c * ensure that fexpand(ansistring) never converts its argument to a code page
other than DefaultFileSystemCodePage, so that it can work with strings
    holding any encoding
  + test for fexpand(ansistring) with UTF-8 strings while DefaultSystemCodePage
    is set to CP_ASCII

git-svn-id: branches/cpstrrtl@25300 -
2013-08-19 22:04:15 +00:00
Jonas Maebe
14d62028ff * don't convert ansistrings when calling setcodepage() with a code page
number that means the same as the existing one but is nevertheless
    different (e.g. CP_ACP and the actual value of DefaultSystemCodePage)

git-svn-id: branches/cpstrrtl@25299 -
2013-08-19 22:04:11 +00:00
Jonas Maebe
b115231ea4 * never change the code page of a non-empty string when calling setlength on
it

git-svn-id: branches/cpstrrtl@25298 -
2013-08-19 22:04:07 +00:00
florian
6606955b88 + basic support for pic on arm-linux
git-svn-id: trunk@25297 -
2013-08-19 21:35:37 +00:00
paul
7ac3647ff2 rtl: apply patch of Inoussa with Incremental Implementation of the Unicode Collation Algorithm (mantis #0024873)
git-svn-id: trunk@25296 -
2013-08-19 16:35:12 +00:00
paul
f285948fcb rtl, utils: apply patch of Inoussa:
This patch implements collation'loading at runtime. This reduce the final executable' size as the collation's data are now externaly stored. Note that It requires the external collation files to be shipped and the program to load the collations it needs using the "LoadCollation"/"RegisterCollation" procedure(s).

The external collation files are produced by "cldrparser" (while producing the static files). The root collation "ducet" 's external file is produced by "unihelper".

It is important to note that these files are endian specific :
 * collation_*_be.bco for big endian systems
 * collation_*_le.bco for little endian system.

The root collation should at be registered, be it staticaly by using the "unicodeducet" unit or dynamicaly by making a call sush as RegisterCollation(<collation dir>,'ducet'). 
It is possible, in the same application, to make use of static and dynamic.

git-svn-id: trunk@25295 -
2013-08-19 13:42:11 +00:00
lacak
721d695ae4 fcl-db: base: implements AsBytes for TBlobField
git-svn-id: trunk@25294 -
2013-08-19 12:06:36 +00:00
lacak
9cf1ef90cd fcl-db: base: formatting (char-case)
git-svn-id: trunk@25293 -
2013-08-19 11:43:16 +00:00
nickysn
a1fa1954b8 * i8086 medium model fixes in Tresourcestrings.CreateResourceStringData
git-svn-id: trunk@25292 -
2013-08-18 21:18:22 +00:00
masta
dad4079e0c Fix shift128Right in rtl/inc/softfpu.pp
The old code would always return 0 if the shiftamount was more than 63.

git-svn-id: trunk@25291 -
2013-08-18 21:12:53 +00:00
nickysn
e4f84b0f5d * i8086 medium model fixes in tnodeutils.InsertResourceTablesTable
git-svn-id: trunk@25290 -
2013-08-18 20:37:18 +00:00
florian
2806947a8f + FindRegAllocBackward
* search reg. allocations backward in RemoveSuperfluousMove because the changed instruction could be the first one in a list

git-svn-id: trunk@25289 -
2013-08-18 18:56:56 +00:00
florian
bca6dafbc5 * mark the current procedure if it has a non local exit, not the targetted one
git-svn-id: trunk@25288 -
2013-08-18 18:55:53 +00:00
florian
bb397e2b2f + has_sse2_support for i386
+ has_sse3_support for i386

git-svn-id: trunk@25287 -
2013-08-18 18:54:56 +00:00
nickysn
10db067372 * specify Tasmsymtype=AT_FUNCTION and use Create_nil_codeptr when generating the code pointers in the InitFinal table
git-svn-id: trunk@25286 -
2013-08-18 18:27:48 +00:00
florian
e147895f80 * make symbols generated in procedures global when auto-inlining is on
git-svn-id: trunk@25285 -
2013-08-18 17:32:47 +00:00
paul
17ef986b17 compiler: don't treat methods without self node (static class methods, class contructors, destructors, operators) as method pointers, fix comparison of procdef and procvardef to allow assignment of a static class method to a regular procedural variable (issue #24486)
git-svn-id: trunk@25284 -
2013-08-18 17:29:23 +00:00
florian
a2a405581c * don't call the ansistring val variant for a zero based array if not necessary to avoid ansistring usage in embedded applications
git-svn-id: trunk@25283 -
2013-08-18 17:04:06 +00:00
florian
38f3448e22 * applied patch by Cyrax to fix #24722, revertes partially r25054 which was wrong
git-svn-id: trunk@25282 -
2013-08-18 16:05:43 +00:00
paul
dc95ba5b07 compiler: handle other places where we check current_procdef for self node
git-svn-id: trunk@25281 -
2013-08-18 13:09:32 +00:00
paul
4b76782691 compiler: fix property access from a nested routine of the static class method and extend a test
git-svn-id: trunk@25280 -
2013-08-18 12:36:04 +00:00
sergei
38058505ba * Changed linking infrastructure to look like assembler one:
* Changed direct references to linker classes in TSystemInfo records to enumerated ids.
  * RegisterExtennalLinker and RegisterInternalLinker procedures replaced by single RegisterLinker procedure and moved to link.pas.
  - TAbstractLinker is no longer necessary, removed.

This change allows to register linker once per id, rather than once per target, and also allows TSystemInfo records to be read-only.

git-svn-id: trunk@25279 -
2013-08-18 12:01:21 +00:00
sergei
9e3d17778d - Removed TAbstractAssembler and TAbstractAssemblerClass, they are not used anymore.
git-svn-id: trunk@25278 -
2013-08-18 11:03:30 +00:00
sergei
eec8129738 * TInternalLinker.Load_ReadStaticLibrary: exit if error has occurred while opening a static library or dynamic object, continuing can cause other errors/crashes in this case.
* t_linux.pas: use sysrootpath when specifying dynamic interpreter (for cross-linking).

git-svn-id: trunk@25277 -
2013-08-18 09:14:16 +00:00
nickysn
088c06d308 * fixed class VMT generation for the i8086 medium memory model (near code, far data) by setting correctly the Tasmsymtype to each symbol according to whether it points to code or data
git-svn-id: trunk@25276 -
2013-08-18 00:03:55 +00:00
Jonas Maebe
57cdd8c106 * set symbol type/binding of data referred by ppc and arm/darwin stubs (part
of r25264, fixes internalerror 2013081601 after r25266)

git-svn-id: trunk@25275 -
2013-08-17 16:26:37 +00:00
paul
5c33644e5c compiler: fix calling class methods from a nested routine of a static class method (mantis #0024865)
git-svn-id: trunk@25274 -
2013-08-17 04:44:19 +00:00
paul
89e154bc10 compiler: if method has no self node then load it as a usual identifier (issue #0024871)
git-svn-id: trunk@25273 -
2013-08-17 02:54:55 +00:00
marco
d55a32e875 * fix for #24878
git-svn-id: trunk@25272 -
2013-08-16 20:45:41 +00:00
sergei
d11ec8ac47 - Reverted r25269 and commented out r25261. The former one is wrong because it changes unit initialization order. The latter one causes RTL build failures on some targets, needs testing and likely RTL/makefiles patching.
git-svn-id: trunk@25271 -
2013-08-16 15:17:25 +00:00
sergei
feaa006243 * This test uses C-style operators and needs -Sc to compile.
git-svn-id: trunk@25270 -
2013-08-16 14:39:55 +00:00