Commit Graph

35009 Commits

Author SHA1 Message Date
Jonas Maebe
28bd9a9618 * fixed syntax error
git-svn-id: trunk@19202 -
2011-09-23 21:48:55 +00:00
sergei
ad5d2ccabb * Moved command line handling and randomize() to syswin.inc, so a single copy of code is used for both win32 and win64. This implies that apostrophe is no longer supported as quoting symbol in win64.
Win64 doesn't support it itself either.

git-svn-id: trunk@19201 -
2011-09-23 21:45:02 +00:00
sergei
b997094755 + Generate unwind bytecode for function prologues on win64.
* For now placed actual processing of unwind info under {$ifdef TEST_WIN64_UNWIND}, because in the current state it doesn't add much value.

git-svn-id: trunk@19200 -
2011-09-23 21:22:25 +00:00
Jonas Maebe
dff5ac3b0a * don't allow passing a field of a record that's not an lvalue as
var-parameter, nor allowing taking its address (mantis #20095)

git-svn-id: trunk@19199 -
2011-09-23 21:21:49 +00:00
Jonas Maebe
fadf8bf2a5 * fixed fpc_UnicodeStr_CheckRange() now that apparently the length in
unicodestring record is stored as the number of widechars rather than
    the number of bytes

git-svn-id: trunk@19198 -
2011-09-23 21:17:51 +00:00
florian
a5cdc0cdde * changed check introduced in r19193 into the same method as other locations in nadd.pas do
git-svn-id: trunk@19197 -
2011-09-23 20:34:10 +00:00
Jonas Maebe
258869c8f1 * and one more fix to prevent endless loops
git-svn-id: trunk@19196 -
2011-09-23 19:16:48 +00:00
Jonas Maebe
3469942f34 * fixed potential endless loop if the code page passed to win2iconv()
is not found

git-svn-id: trunk@19195 -
2011-09-23 18:34:31 +00:00
Jonas Maebe
7dd5811828 + support for transcoding the new ansistring type on unix platforms
* initialize DefaultSystemCodePage on unix platforms

git-svn-id: trunk@19194 -
2011-09-23 17:32:18 +00:00
florian
bba726ae78 * don't do x*x -> sqr(x) optmization for arm softfloat
git-svn-id: trunk@19193 -
2011-09-23 17:23:35 +00:00
Jonas Maebe
f0c8563f2d + cwstring for unix platforms
git-svn-id: trunk@19192 -
2011-09-23 16:43:16 +00:00
paul
8f4d02ccfa rtl: add TBytes and TUnicodeCharArray types
git-svn-id: trunk@19191 -
2011-09-23 06:19:46 +00:00
paul
eb8a54d666 rtl: add flat functions (duplicates of TCharacter methods) to character unit
git-svn-id: trunk@19190 -
2011-09-23 03:14:40 +00:00
paul
98f6ec4a05 rtl: raise EContructException in TCharacter constructor (compatible to delphi behavior)
git-svn-id: trunk@19189 -
2011-09-23 02:50:40 +00:00
paul
8af1fa3e57 rtl: fix error message
tests: add test to check utf32<->utf16 conversions

git-svn-id: trunk@19188 -
2011-09-23 02:24:30 +00:00
paul
b47b4c3cba rtl: enable character unit for darwin
git-svn-id: trunk@19187 -
2011-09-23 01:01:20 +00:00
paul
9d509e5897 rtl: try to fix linux makefile
git-svn-id: trunk@19186 -
2011-09-23 00:55:53 +00:00
paul
f8e82b9d4e rtl: try to fix linux makefile
git-svn-id: trunk@19185 -
2011-09-23 00:42:51 +00:00
paul
67ae360a2b rtl: enable character.pas building for win64 and linux
git-svn-id: trunk@19184 -
2011-09-23 00:37:00 +00:00
paul
e774a20c97 rtl:
- fix compilation of character.pas by fpc 2.4
  - check TCharacter method arguments and raise appropriate EArgumentException or EArgumentOutOfRangeException exceptions
  - implement to/from UTF32 conversion based on utf16toutf32 and friends

git-svn-id: trunk@19183 -
2011-09-23 00:28:04 +00:00
paul
1553c8da7d rtl: add EArgumentException, EArgumentOutOfRangeException classes
git-svn-id: trunk@19182 -
2011-09-23 00:07:26 +00:00
pierre
b9009d8c02 * Fix PIC code for BSD x86_64 syscall and x86_64 freebsd startup assembler files
git-svn-id: trunk@19181 -
2011-09-22 21:16:42 +00:00
michael
f8279d9070 * Added Position
git-svn-id: trunk@19180 -
2011-09-22 17:44:33 +00:00
pierre
0b6d38df14 * Avoid compilation failure for PIC mode add a second variable to ensure .L1 is executed
git-svn-id: trunk@19179 -
2011-09-22 14:56:31 +00:00
marco
07fabab526 * fpgetsid, Mantis #20329
git-svn-id: trunk@19178 -
2011-09-22 13:21:38 +00:00
michael
71be686e5a * Fix IPF output for topics (Fix by Graeme, bug #20318)
git-svn-id: trunk@19177 -
2011-09-22 12:05:05 +00:00
pierre
32f7104ffe * Fix failure of webtbs/tw17560:
the C structure sem (also TSemaphore record) used in cthreads unit
    inside cIntSemaphoreInit function via
    a GetMem(sizeof(TSempahore). sem was a simple cint
    value which lead to memoryt overwriting past end of
    allocated memory in sem_XXX calls.

git-svn-id: trunk@19176 -
2011-09-22 11:37:27 +00:00
michael
1579470a68 * Also check TMPDIR, a UNIX standard used by a.o. iOS (mantis #20248)
git-svn-id: trunk@19175 -
2011-09-22 11:29:50 +00:00
michael
e46bc70389 * Added example for compression level (Bug 20322)
git-svn-id: trunk@19174 -
2011-09-22 11:25:57 +00:00
michael
e0f458a7e9 * Applied patch from Daniel Gaspary to add compression level to individual items (Bug 20322)
git-svn-id: trunk@19173 -
2011-09-22 11:22:03 +00:00
paul
935a030dca rtl: enable character unit compilation for win32
git-svn-id: trunk@19172 -
2011-09-22 02:07:05 +00:00
paul
eefdd29151 tests: removed accidentally committed test file
git-svn-id: trunk@19171 -
2011-09-22 00:56:24 +00:00
paul
59a69eaeba rtl: add TCharacter class implementation by Inoussa. At this moment only BMP(0-$FFFF) UnicodeChar are handled.
tests: add character unit tests
(mantis #0020302)

git-svn-id: trunk@19170 -
2011-09-22 00:52:51 +00:00
florian
f14e0a25c6 * reduce code size of dummy threading routines
* threading manager of the embedded target uses only one dummy routine to reduce code size

git-svn-id: trunk@19169 -
2011-09-21 21:00:15 +00:00
florian
375f83c874 * moved heap manager on embedded systems into a separate unit
* moved console io on embedded systems into a seperate unit, this unit might setup input/output e.g. to be redirected to a serial port
* cleanup of the embedded system unit

git-svn-id: trunk@19168 -
2011-09-21 20:57:37 +00:00
pierre
10586b19c3 * Reading tsettings field by field
git-svn-id: trunk@19167 -
2011-09-21 15:34:16 +00:00
Jonas Maebe
2b54010d28 * fixed errors with make -j <high number> caused by a wrong fpvectorial
dependency rule resulting in fcl-base to be concurrently compiled multiple
    times

git-svn-id: trunk@19166 -
2011-09-21 12:33:09 +00:00
paul
828367bebd compiler:
- return default compiler codepage to 8859-1
  - emit ansistring constants in CP_NONE by default
  - add new modeswitch systemcodepage which sets default compiler codepage to system and emits ansistring constants with systemcodepage as delphi do
  - add new mode DelphiUnicode with has the same switches as delphi mode + systemcodepage switch. Later it will also have string = unicodestring by default.

git-svn-id: trunk@19165 -
2011-09-21 01:23:42 +00:00
sergei
f2852137c8 * DisposeAnsiString doesn't need to exist as a separate procedure, because it is only called from a single place. Merging it into caller yields somewhat more efficient code.
* DisposeWideString,DisposeUnicodeString: likewise.

git-svn-id: trunk@19163 -
2011-09-20 18:53:29 +00:00
sergei
c73b6cfbd4 - removed register lists after pure assembler procedures
- removed {$ifdef FPC_HAS_RIP_RELATIVE}, it is obsolete because rip-releative referencing is supported in at least two releases by now.
+ added nostackframe to simple assembler procedures
* Inclocked, Declocked: do not duplicate entire procedures, Win64 and Linux versions differ in a single instruction.

git-svn-id: trunk@19162 -
2011-09-20 17:57:58 +00:00
pierre
841b3e4179 TImportLibWin.generateimportlib method:
local procedure AddImport: Use same RIP relative code
  as in ogcoff unit for x86_64 CPU to allow a VMA above
  0x100000000 even when using.
  TImportLibWin.generateidatasection;
  also used RIP base for import libraries created using -WI option.

git-svn-id: trunk@19161 -
2011-09-20 15:25:13 +00:00
sergei
f35a8179b1 * Status codes are identical for win32 and win64, moved them to syswin.inc.
git-svn-id: trunk@19160 -
2011-09-20 15:01:22 +00:00
paul
6972947c6b compiler: remove unused variable
git-svn-id: trunk@19159 -
2011-09-20 13:44:53 +00:00
sergei
b0c2548019 * Use '.tls' as name for sec_threadvar sections for all Windows and WinCE targets, not just i386-win32.
git-svn-id: trunk@19157 -
2011-09-19 22:27:53 +00:00
pierre
313daaa44a Use Windows TLS Callback by default
git-svn-id: trunk@19151 -
2011-09-19 18:39:31 +00:00
sergei
6f20627220 * Use rip-relative offsets in assembler, fixes linking text mode IDE with internal linker. The better way would be to get rid of this assembler altogether.
git-svn-id: trunk@19149 -
2011-09-19 15:18:28 +00:00
paul
8b0cb2c1d5 compiler:
- don't parse '(' token after the type declaration inside the type block
  - replace parse of "string<codepage>" to "type AnsiString(codepage)" for delphi compatibility
  - fix tests to use "type AnsiString(codepage)"

git-svn-id: trunk@19148 -
2011-09-19 04:11:57 +00:00
paul
eca53485b8 compiler: cleanup
git-svn-id: trunk@19147 -
2011-09-19 02:57:47 +00:00
paul
9c39ad5428 compiler: winlike widestrings should not contain "encoding" and "element size" fields
git-svn-id: trunk@19146 -
2011-09-19 02:13:09 +00:00
paul
41e85bc36a compiler:
- emit ansistring constants with compiler codepage if no codepage is explicitly set
  - set default compiler codepage to default system codepage (delphi compatible)
  + tests

git-svn-id: trunk@19145 -
2011-09-19 01:04:56 +00:00