* 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 -
- 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 -
- 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 -
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 -
- 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 -
- 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 -
fpc_ansistr_compare_equal(). "make cycle" now works under Linux, but
there is probably still a bug somewhere because I don't think that the
compiler should ever trigger the code path the contained this bug
git-svn-id: trunk@19139 -
--- Reverse-merging r19117 into '.':
U tests\tbs\tb0349.pp
U tests\tbs\tb0503.pp
G .
--- Recording mergeinfo for reverse merge of r19117 into '.':
G .
git-svn-id: trunk@19136 -
--- Reverse-merging r19116 into '.':
U tests\webtbs\tw4675.pp
U tests\webtbs\tw7758.pp
U tests\webtbs\tw18702.pp
U tests\webtbs\tw3595.pp
U tests\webtbs\tw5001.pp
U tests\webtbs\tw2250.pp
U tests\webtbs\tw3492.pp
U tests\webtbs\tw16004.pp
G .
--- Recording mergeinfo for reverse merge of r19116 into '.':
G .
git-svn-id: trunk@19135 -
rtl: change UTF8Decode, UTF8Encode, AnsiToUTF8, UTF8ToAnsi to use RawByteString as arguments/result for compatibility with the old code and also with delphi
git-svn-id: trunk@19128 -
compiler: partly revert r17434 because of a test regression. Also this is delphi compatible (although delphi does not know a {$codepage} directive)
git-svn-id: trunk@19127 -
*In normal procedure "var" and "out" RawByteString parameters does not accept other string types. Procedures with
"compilerproc" directive or the newly added "rtlproc" directive accept that. Please note that it is up to the
procedure coder to ensure the correctness of the code page in that case. The new directive is needed to handle
the RTL procedures/functions that are not marked as "compilerproc" such as "UniqueString", "Insert" and "Delete".
*Correct "fpc_ansistr_concat" to handle code page correctly.
*Default "ansitring" type is now created with code page set to "0" instead of "65535". Before that change it was
impossible to distinguish a "RawByteString" with the default "ansistring". At runtime "ansistring" variable'code
page is set to DefaultSystemCodePage
*UniqueString flavor of "SetLength" has been updated to release memory when shrinked to at least 50%, like ansitring
does.
git-svn-id: trunk@19118 -
Patch from Inoussa:
* rtl/inc/astrings.inc
** "fpc_AnsiStr_Concat_multi" : add "cp" parameter. If the "DestS" variable is "nil" this code page
is use in order not to loose the declared code page of the original (result)variable.
** "fpc_AnsiStr_Compare" : modify to compare taking care of the code page of the arguments.
** "fpc_AnsiStr_Compare_equal" : modify to compare taking care of the code page of the arguments.
** "fpc_AnsiStr_SetLength" : add "cp" parameter. If the "S" variable is "nil" this code page
is use in order not to loose the declared code page of the original (result)variable.
* rtl/inc/systemh.inc
** add "SetCodePage" prototype.
git-svn-id: trunk@19114 -
* Patch from Inoussa:
* defcmp.pas
** ansistring to/from RawByteString are evaluated "te_equal"
** ansistring to UTF8string is evaluated (te_convert_l1,tc_string_2_string)
* ncnv.pas
** "ttypeconvnode.typecheck_char_to_string" : WideChar to AnsiString/ShortString
is possible if the source code page is not utf8
** "ttypeconvnode.typecheck_char_to_char" : WideChar to AnsiChar
is possible if the source code page is not utf8
* ncon.pas
** "tstringconstnode.changestringtype" : Unicode to utf8string bug fix(set the encoding),
constants in the source code with code page set utf8 should be converted back to utf8
* nopt.pas
** "genmultistringadd" : fpc_<stringname>_concat_multi have a new parameter "cp"
to indicate the "DestS" code page if the variable content is nil. This is required
in order not to loose the declared code page.
* pinline.pas
** "inline_setlength" : a new parameter "cp" to indicate the code page if the variable content
is nil. This is required in order not to loose the declared code page.
* ptconst.pas
** "parse_arraydef" : for string const to array of ansichar/widechar conversion check for wide string and
convert if it is required. For char const to array of ansichar/widechar conversion check for wide char and
convert if it is required.
git-svn-id: trunk@19113 -