Commit Graph

2643 Commits

Author SHA1 Message Date
paul
c6ca9e5091 compiler:
- add helper function getansistringcodepage which returns explicitly set codepage or 0 in other case
  - add helper function getansistringdef which return a def with explicitly set codepage or cansistringtype in other case
  - change tstoreddef.createnai constructor to allow set codepage in constructor
  - don't convert string constants to rawbytestring. if string constant already has a codepage - preserve it or convert to ansistring codepage (delphi compatible)
  - don't perform string conversion from ansistring to strings with explicitly set codepage (by directive or by compiler switch) and vice versa (delphi compatible)
  + test which covers most of the cases

git-svn-id: trunk@19510 -
2011-10-19 02:45:52 +00:00
florian
80b5100bf6 * don't check array ranges for being constant in generic declarations, resolves #20028
git-svn-id: trunk@19500 -
2011-10-15 21:28:19 +00:00
florian
2887065c9d * forgotten test for last commit
git-svn-id: trunk@19499 -
2011-10-15 20:30:17 +00:00
marco
43e9ffca3b * add bufdataset to test framework, Mantis #20081, patch by bigchimp
git-svn-id: trunk@19495 -
2011-10-15 16:09:54 +00:00
Jonas Maebe
d8b008b0b0 * require that "overload" is present in the interface if it's used in the
implementation (Delphi-compatible in case multiple overloads exist in
    the current unit, and in other cases avoids compiler crashes in case
    of circular implementation dependencies)
  * ignore other symbol options (deprecated, legacy, platform, ...) as far as
    the interface crc is concerned to avoid trouble in case they appear in the
    implementation but not in the interface (to prevent compiler crashes)

git-svn-id: trunk@19492 -
2011-10-15 14:47:45 +00:00
paul
85c2f195d6 compiler: convert string constants from and to codepage 0. use compiler codepage during the conversion + test
git-svn-id: trunk@19473 -
2011-10-12 06:10:36 +00:00
pierre
6e3c6319c2 * New file for cthreads unit support
git-svn-id: trunk@19452 -
2011-10-10 22:19:11 +00:00
pierre
318232ebb8 i386 openbsd C objects added
git-svn-id: trunk@19436 -
2011-10-09 16:37:49 +00:00
paul
7013237317 tests: fix tencodingtest to use internal bytes instead of external files
git-svn-id: trunk@19419 -
2011-10-08 17:18:00 +00:00
pierre
98524eef69 * Script to check system call numbers
git-svn-id: trunk@19404 -
2011-10-07 18:41:35 +00:00
paul
99621cc290 tests: forgotten test
git-svn-id: trunk@19401 -
2011-10-07 06:00:15 +00:00
paul
fa43a448b9 rtl: add BytesOf(String): TBytes for delphi compatibility
git-svn-id: trunk@19390 -
2011-10-06 06:28:05 +00:00
paul
7817f5017d rtl: add TBytesStream class for compatibility with delphi (TStringStream is a descendant of TBytesStream) + test
git-svn-id: trunk@19389 -
2011-10-06 04:41:10 +00:00
paul
aa666d38ed rtl: check arguments in some TEncoding functions which uses array/string access and raise EEncodingError in case of wrong indexes or string/arrays
git-svn-id: trunk@19387 -
2011-10-06 01:14:51 +00:00
paul
a068e0cae2 tests: add test for TEncoding class
git-svn-id: trunk@19357 -
2011-10-04 05:08:17 +00:00
paul
09fa98a564 rtl: forgotten files
git-svn-id: trunk@19356 -
2011-10-04 05:07:22 +00:00
paul
abf9816a09 rtl: add basic implementation of TEncoding class
git-svn-id: trunk@19355 -
2011-10-04 05:06:32 +00:00
pierre
7654fe6aba * Try to update i386/openbsd port
git-svn-id: trunk@19351 -
2011-10-03 23:24:05 +00:00
florian
df75368d0b --- Merging r19281 into '.':
U    compiler\pdecsub.pas
U    compiler\symdef.pas
U    compiler\pdecobj.pas
U    compiler\htypechk.pas
U    compiler\ncal.pas
U    compiler\symtable.pas
--- Recording mergeinfo for merge of r19281 into '.':
 U   .
--- Merging r19282 into '.':
A    tests\webtbf\tw19975.pp
--- Recording mergeinfo for merge of r19282 into '.':
 G   .

git-svn-id: trunk@19343 -
2011-10-03 20:43:19 +00:00
florian
c6a0cafdb0 * don't generate implicit exception frames for pure assembler routines, resolves #20075
git-svn-id: trunk@19341 -
2011-10-03 20:09:07 +00:00
paul
6384fa2a19 rtl: revert r19330. We probably need to create a separate encoding<->codepage table.
git-svn-id: trunk@19332 -
2011-10-03 10:28:14 +00:00
paul
a0e7196ae9 rtl: move winiconv.inc into general inc directory and rename it to wincodepages.inc, also rename win2iconv, iconv2win to CodePageToCodePageName, CodePageNameToCodePage.
This change is required since CodePage to CodePage name conversions are required in other parts of RTL. Moreover those codepage identifiers are windows codepage identifiers and thus must be compatible with codepage identifiers used by delphi.

git-svn-id: trunk@19330 -
2011-10-03 03:35:45 +00:00
paul
33a67704ac compiler: allow type conversions for ordinal types inside type declarations e.g inside enumerations like: Byte(0)..Byte(15)
git-svn-id: trunk@19328 -
2011-10-03 01:27:21 +00:00
marco
64c8cebac2 * removed tests, moving them to integrated testsuite.
git-svn-id: trunk@19306 -
2011-09-30 16:01:48 +00:00
paul
bcb0317209 rtl: eat $ffff encoding in more routines, fix Insert() procedure to preserve destination string codepage
git-svn-id: trunk@19289 -
2011-09-30 06:10:24 +00:00
paul
485695d4e6 compiler, rtl: pass codepage argument to all ansistring str() helpers to return result with correct codepage
git-svn-id: trunk@19287 -
2011-09-30 03:26:34 +00:00
paul
647218fd13 rtl: patch from Inoussa to complete TCharacter class implementation (mantis #0020302):
* ToLower is functional for all characters including those outside of the BMP
  * ToUpper is functional for all characters including those outside of the BMP
  * Other methods using "const AString : UnicodeString; AIndex : Integer" are 
    functional for all characters including those outside of the BMP

git-svn-id: trunk@19286 -
2011-09-30 00:15:37 +00:00
florian
9d31a0e2f8 * don't evaluate sizeof(<type param>) as a constant to avoid arithmetic errors in constant folding, resolves #20192
git-svn-id: trunk@19285 -
2011-09-29 21:17:44 +00:00
paul
a769ef0ad2 compiler: don't return te_eual when we convert from RawByteString to another codepage
git-svn-id: trunk@19283 -
2011-09-29 12:03:11 +00:00
pierre
33604a6a49 * Shared library dllrpt0.as init code for i386 and x86_64 CPUs
git-svn-id: trunk@19276 -
2011-09-28 23:07:39 +00:00
marco
448e3db450 * fixes Mantis #14730 dealing with oldvalue=null
git-svn-id: trunk@19267 -
2011-09-28 16:27:32 +00:00
pierre
f799019982 Missing freebsd x86_64 objects added
git-svn-id: trunk@19265 -
2011-09-28 15:13:54 +00:00
paul
4cf5e36ce7 compiler:
- add TTagHashSet class descendant of THashSet with an ability to has also a LongWord value together with key
  - change TAsmData.ConstPools[] to be an indexed property to properly initialize ConstPool class, remove pool initialization from all other units
  - add ansistring constants to pool together with their encoding to distinct the same text constants with different codepage
  + test

git-svn-id: trunk@19261 -
2011-09-28 01:18:43 +00:00
sergei
d94460e3b3 * Made the x86-specific scalefactor optimization of tvecnode available on x86_64 as well, by moving update_reference_reg_mul method from ti386vecnode to newly introduced tx86vecnode.
git-svn-id: trunk@19245 -
2011-09-26 12:58:59 +00:00
paul
5560f6b3f2 compiler + rtl: pass codepage to fpc_CharArray_To_AnsiStr to get the preserve the codepage of result string
git-svn-id: trunk@19240 -
2011-09-26 04:49:09 +00:00
Jonas Maebe
028421ca6a + interface delegation test from mantis #19180, already works
git-svn-id: trunk@19228 -
2011-09-25 14:46:19 +00:00
Jonas Maebe
d714eeb84b * give a proper error when a type identifier is missing in a
class operator declaration (mantis #19213)

git-svn-id: trunk@19226 -
2011-09-25 14:38:06 +00:00
marco
b0b12d3a64 * fmtbcd divide fix (and others), Mantis #19636, fix by Lacak2. + Test
git-svn-id: trunk@19220 -
2011-09-24 21:34:39 +00:00
marco
ecaa86d582 * added test from Mantis #19645
git-svn-id: trunk@19217 -
2011-09-24 20:59:51 +00:00
paul
3b9fd15af7 rtl: update character.pas by Inoussa OUEDRAOGO (issue #0020302)
* This new version contains all the unicode code points (BMP and other planes) character properties.

git-svn-id: trunk@19207 -
2011-09-24 15:17:12 +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
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
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
michael
e46bc70389 * Added example for compression level (Bug 20322)
git-svn-id: trunk@19174 -
2011-09-22 11:25:57 +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
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
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
paul
23ea810e0c merge r17608 from cpstrnew branch by inoussa:
tests

git-svn-id: trunk@19125 -
2011-09-17 14:21:28 +00:00
paul
a87bb4283d merge r17604 from cpstrnew branch by inoussa:
tests

git-svn-id: trunk@19123 -
2011-09-17 14:13:49 +00:00