Commit Graph

47999 Commits

Author SHA1 Message Date
florian
fd61d65313 * handle controller type already in the first options pass_1
* set heapsize for the avrsim controller target to a reasonable size

git-svn-id: trunk@33068 -
2016-02-07 11:24:47 +00:00
sergei
a4ed9f3b54 * Improved sign(x) functions to be branchless in most cases. Resolves #14206.
git-svn-id: trunk@33067 -
2016-02-07 11:18:31 +00:00
florian
56b6cedcf4 * increase ram size of the avrsim controller target
git-svn-id: trunk@33066 -
2016-02-07 11:17:55 +00:00
florian
0695c92b73 * make Dos.GetMsCount a dummy for embedded targets
git-svn-id: trunk@33065 -
2016-02-07 11:16:39 +00:00
Jeppe Johansen
328b6464ed Add debug info to the CPU units by default, to be able to print register contents with GDB.
git-svn-id: trunk@33064 -
2016-02-06 20:16:45 +00:00
michael
eb2e614ae9 * Power no longer in system, but in Math
git-svn-id: trunk@33063 -
2016-02-06 18:57:49 +00:00
michael
39c404d342 * Some fixes from Ondrej Pokorny (bug ID 29538)
git-svn-id: trunk@33062 -
2016-02-06 15:03:28 +00:00
michael
c5a44f7487 * Fix bug #29465: Correct declaration of array properties
git-svn-id: trunk@33061 -
2016-02-06 14:45:25 +00:00
michael
dd00b26c09 * Implement missing functions (Fraction/Exponent/Mantissa/Sign)
git-svn-id: trunk@33060 -
2016-02-06 12:44:23 +00:00
michael
a999f055ef * Implement missing functions (Fraction/Exponent/Mantissa/Sign)
git-svn-id: trunk@33059 -
2016-02-06 12:44:05 +00:00
michael
21920b9cea * Correct string type
git-svn-id: trunk@33058 -
2016-02-06 12:17:41 +00:00
michael
e2733c9a50 * Small correction in POS (prevent moving out of buffer if offset<>1)
git-svn-id: trunk@33057 -
2016-02-06 12:17:13 +00:00
michael
6d051892e5 * Added Offset argument to Pos (exists in wide and ansi/short, forgotten for unicode)
git-svn-id: trunk@33056 -
2016-02-06 12:16:00 +00:00
michael
cf530f117e * Faster stringreplace (bug ID 26864)
git-svn-id: trunk@33055 -
2016-02-06 10:19:56 +00:00
svenbarth
dea4ac557d Fix for Mantis #28100.
symdef.pas, tstoreddef:
  * deref: don't free the deref list and it's entries as deref() might be called again when the unit reloaded a second time

git-svn-id: trunk@33054 -
2016-02-05 19:04:38 +00:00
Tomas Hajny
6a8caf84b2 * -Mdelphiunicode added to the help pages
git-svn-id: trunk@33053 -
2016-02-05 15:31:38 +00:00
michael
ee8652a983 Introduced ExceptionExitCode
git-svn-id: trunk@33052 -
2016-02-05 15:30:58 +00:00
florian
aa0ec8c0e5 + show -Mextendedpascal in the help page
git-svn-id: trunk@33051 -
2016-02-04 20:32:09 +00:00
florian
368d77dfae + show -Miso in the help page
git-svn-id: trunk@33050 -
2016-02-04 20:22:36 +00:00
marco
79305ce4da * mantis #29588 setblobdata moved over pointer ref type.
git-svn-id: trunk@33049 -
2016-02-04 20:19:39 +00:00
svenbarth
8287773b16 Reverted revision 33036. This feature is too controverse to be left in.
git-svn-id: trunk@33048 -
2016-02-04 19:26:51 +00:00
Jeppe Johansen
e20f2111b7 Check for nil before doing loopunrolling.
git-svn-id: trunk@33047 -
2016-02-04 15:53:36 +00:00
Jonas Maebe
9e3c7f175f * load the address of envp before storing it, so we don't overwrite argv
with envp (fixes bug in fix from r32528, mantis #29587 for FPC 3.0.x
    -- FPC 3.1.1+ uses si_*.inc instead, which already works correctly)

git-svn-id: trunk@33045 -
2016-02-04 11:37:29 +00:00
michael
bd49674975 * Fix bug #29576
git-svn-id: trunk@33044 -
2016-02-04 09:05:15 +00:00
nickysn
5aa8392e05 * i8086-msdos compilation fixed
git-svn-id: trunk@33043 -
2016-02-04 08:45:20 +00:00
sergei
d14c6b5e0a * fcl-xml: fixed off-by-one error, preventing 'xmlns:foo' in DTD ATTLIST from being recognized as namespace declaration.
git-svn-id: trunk@33042 -
2016-02-02 17:17:08 +00:00
marco
475d388fdc * misc single and double helpers. No endianess atm.
git-svn-id: trunk@33041 -
2016-02-02 09:25:31 +00:00
sergei
9b25ce2007 * fcl-xml: Fixed parsing DTD, whitespace after name is mandatory only if followed by ExternalID. Mantis #29569.
git-svn-id: trunk@33040 -
2016-02-02 02:27:28 +00:00
Jonas Maebe
2e64c63993 * fixed dependencies for lineinfo unit after r33007
* also made lnfodwrf dependent on lineinfo for all platforms,
    because both units implicitly depend on the exeinfo unit
    and if both are compiled at the same time they can fall
    over each other while writing its .ppu or .s file

git-svn-id: trunk@33039 -
2016-02-01 22:52:50 +00:00
pierre
fd612990e5 Fix number of frames requested when calling CaptureBackTrace function
git-svn-id: trunk@33038 -
2016-01-31 22:08:15 +00:00
svenbarth
05174f3e67 Fix for Mantis #29546.
htypechk.pas, tcallcandidates:
  * create_candidate_list: don't check whether the pd is a specialization if the owner is valid; happens if a generic method is used more than once (which should happen here and then :P )

+ added test

git-svn-id: trunk@33037 -
2016-01-31 17:14:44 +00:00
svenbarth
ed94ca4b24 Add support for IfThen() instrinsic that works like the if-statement in that it evaluates only the expression that is indeed executed.
The result type of the intrinsic is determined by the Then-expression to provide a bit of control. There might however be some situations in which this fails, for this exceptions need to be added (e.g. a constant string needs to be converted to a normal string).

compinnr.inc:
  + add new constant in_ifthen_x_y_z for the IfThen() intrinsic
psystem.pas: 
  + create_intern_symbols: add symbol for IfThen() intrinsic
pexpr.pas:
  * statement_syssym: parse parameters of IfThen() intrinsic and return corresponding inline node
ninl.pas, tinlinenode:
  + new method handle_ifthen() which converts the inline node to an if-node which assigns the expressions to a temp node that is returned
  * pass_typecheck: handle in_ifthen_x_y_z using handle_ifthen()
  * pass_1: in_ifthen_x_y_z does not need a first pass as it's already converted after the typecheck pass

+ added tests

git-svn-id: trunk@33036 -
2016-01-31 14:29:12 +00:00
svenbarth
1951b8aaaa Fix threadvar handling. Basically a merge of r31913 of my packages branch.
rtl/inc/system.inc:
  * provide a public alias for SetupEntryInformation so that it can be used in SysInit as well without globally exporting it
rtl/win/systlsdir.inc:
  * Exec_tls_callback: call SetupEntryInformation before initalizing the heap and multithreading so that the threadvar tables can be referenced correctly

git-svn-id: trunk@33035 -
2016-01-30 23:10:35 +00:00
svenbarth
191a293e4a Fix compilation of Mac OS X. Without the cdecl modifier we need the _
rtl/bsd/system.pp:
  * use _PASCALMAIN instead of PASCALMAIN

git-svn-id: trunk@33034 -
2016-01-30 19:38:40 +00:00
pierre
987907d2a2 Call system.Flush only once within ReadFromStream nested in ExecuteFPC for interactve mode
git-svn-id: trunk@33033 -
2016-01-29 22:50:53 +00:00
michael
0ca95e99df * Introduce DefaultRequestUploadDir for easy configuration of Upload directory location
git-svn-id: trunk@33032 -
2016-01-29 22:43:19 +00:00
pierre
80c5db7aba * Do not call CloseHandle on hStdInput if poPassInput is in Options
git-svn-id: trunk@33031 -
2016-01-29 22:41:05 +00:00
michael
fe1e18eb8d * Fixed TRect setwith and setheight (from Ondrej Pokorny)
git-svn-id: trunk@33030 -
2016-01-29 20:50:21 +00:00
Jonas Maebe
9c3cab8224 * replaced pure LGPL Mersenne Twister implementation with a public domain
version

git-svn-id: trunk@33029 -
2016-01-29 18:03:14 +00:00
svenbarth
e3060130a4 Adjustments so that the resource string related tables are provided inside the system unit (both for indirect and direct entry targets).
rtl/inc/system.inc:
  + new variables that hold pointers to the tables
  + new procedure SetupEntryInformation() that should be used in the entry points of indirect entry targets to setup cross target fields
  + for direct entry targets the two resource string tables are imported here and supplied as initialization to the table pointers
objpas/objpas.pp:
  * adjust table declarations so that the pointers provided from the System unit are used
  * adjust usages of the tables as they are now pointers
win32/system.pp:
  * Exe_Entry: use SetupEntryInformation()
win/syswin.inc:
  * Dll_Entry: use SetupEntryInformation()

git-svn-id: trunk@33028 -
2016-01-29 17:19:33 +00:00
svenbarth
7b67ead440 Pass further main program data through the indirect entry information.
rtl/inc/systemh.inc:
  + TEntryInformation: add Pointer fields ResourceStringTables, ResStrInitTables, WideInitTables (for targets with separate WideString type) and ResLocation (not used on Windows, but since most other targets don't have Windows' resource system it's not part of OS)
rtl/java/jsystemh_types.inc:
  + TEntryInformation: adjust for consistency reasons
rtl/win32/sysinit.inc:
  * SysInitEntryInformation: initialize with pointers to the correct tables

git-svn-id: trunk@33027 -
2016-01-29 16:51:27 +00:00
svenbarth
0491bca72a inc/system.inc:
+ add (uninitialized) global variable EntryInformation for systems that use indirect main information
win32/system.pp:
  - remove initialized EntryInformation and instead rely on the one passed by the sysinit* units

git-svn-id: trunk@33026 -
2016-01-29 16:24:53 +00:00
svenbarth
7e1e947b71 asm_exit is only needed on Win32 (Note: the removal of asm_exit from TEntryInformation in the previous commit should have been in this one -.- )
rtl/win32/sysosh.inc:
  + add TEntryInformationOS for Win32 which contains asm_exit
rtl/win32/system.pp:
  * EntryInformation: adjust initialization
  * system_exit: call the correct function variable
rtl/win32/sysinit.inc:
  * SysInitEntryInformation: adjust initialization
  * SetupEntryInformation: adjust commented setup of the function variable
rtl/java/jsystemh_types.inc:
  * adjust TEntryInformation for consistency reasons

git-svn-id: trunk@33025 -
2016-01-29 15:36:58 +00:00
svenbarth
3da7675eb1 Add a possiblity for targets to specify additional fields for TEntryInformation using an optional sub record called TEntryInformationOS
rtl/inc/systemh.inc:
  + add field OS of type TEntryInformationOS if the target specifies HAS_ENTRYINFORMATION_OS
rtl/java/jsystemh_types.inc:
  + same adjustments as above for consistency reasons despite it being not used there anyway

git-svn-id: trunk@33024 -
2016-01-29 15:32:33 +00:00
svenbarth
b525cecad8 - get rid of the calling convention modifier for PascalMain as it's generated using the default calling convention anyway (without any parameters this luckily doesn't matter that much ;) )
(Note: adjusted merge info as in my packages branch there is a less complete commit for this)

git-svn-id: trunk@33023 -
2016-01-29 14:51:15 +00:00
pierre
6b1c604cb5 Add -I, --interactive option to fpmkunit using new poPassInput TProcess option, allows to use gppc386 with fpmake
git-svn-id: trunk@33022 -
2016-01-29 14:41:40 +00:00
pierre
6c0d2f1b36 Handle poPassInput to be able to handle interactive processes for Windows and Unix systems
git-svn-id: trunk@33021 -
2016-01-29 14:39:41 +00:00
pierre
e1736933fe Add poPassInput to be able to handle interactive processes
git-svn-id: trunk@33020 -
2016-01-29 14:38:35 +00:00
svenbarth
a3871c9d30 Fix compilation of fcl-process on WinCE
packages/fcl-process/src/winall/simpleipc.inc:
  * a WndProc needs to be declared as cdecl
  * WinCE does not provide Get-/SetWindowLongPtr() as it's 32-bit only anyway, so Get-/SetWindowLong() needs to be used

git-svn-id: trunk@33019 -
2016-01-29 14:37:36 +00:00
svenbarth
e15e80ab1f Fix for Mantis #29499.
wince/wininc/struct.inc:
  * the Windows unit of WinCE is compiled with $calling cdecl, but cdecl functions don't support high parameters, thus we need to adjust the calling convention when including the typshrd*.inc files

git-svn-id: trunk@33018 -
2016-01-29 14:32:59 +00:00