Commit Graph

2992 Commits

Author SHA1 Message Date
marco
8cf0c3bcb6 * camel case paramcount as per mantis #28503
git-svn-id: trunk@31307 -
2015-08-10 08:17:46 +00:00
Jonas Maebe
eda52f81cd * fixed the type of the "count" parameter of the int_FinalizeArray() forward
declaration

git-svn-id: trunk@31289 -
2015-08-05 21:06:07 +00:00
michael
8600940c26 * Initialize and finalize
git-svn-id: trunk@31224 -
2015-07-23 18:52:33 +00:00
florian
ba1297b1ab + provide also 8 and 16 bit div/mod helper
* tmoddivnode.first_moddivint does not force a 32 bit helper, the used helper depends now on the resultdef type set by tmoddivnode.pass_typecheck

git-svn-id: trunk@31195 -
2015-07-05 20:16:50 +00:00
michael
770ad238f4 * Added Fail and TypeOf routines
git-svn-id: trunk@31182 -
2015-07-01 19:42:02 +00:00
michael
d9fec2035a * Add some compiler intrinsics
git-svn-id: trunk@31037 -
2015-06-13 16:44:32 +00:00
michael
ebf465a42b * Default intrinsic and some base types added
git-svn-id: trunk@31033 -
2015-06-13 16:16:14 +00:00
michael
1ec8a3bde9 * Small corrections to previous patch from Denis Kozlov (bug ID 13518)
git-svn-id: trunk@31026 -
2015-06-12 07:17:37 +00:00
michael
a3e542eba4 * Patch for incomplete backtraces on error
git-svn-id: trunk@31025 -
2015-06-12 07:12:53 +00:00
Jonas Maebe
3f736f6114 * handle the loading of VMT entries at the node level, so it's done in a
type-safe way (for LLVM, and also internal consistency checking between
    the VMT as generated in nobj.pas and ncgvmt.pas)
   o also converted the VMT validity checking to the node level

git-svn-id: trunk@30950 -
2015-05-31 16:50:47 +00:00
florian
7dd1d6aa77 o fixes handling of iso i/o parameters/program parameters:
* explicit reset is needed
  * variable must be declared again

git-svn-id: trunk@30757 -
2015-05-01 20:58:31 +00:00
Tomas Hajny
23300b8a41 * fix by Charlie correcting treatment of a trailing directory separator on Amiga(-likes)
git-svn-id: trunk@30653 -
2015-04-18 18:29:19 +00:00
nickysn
75ec4adcf9 * fixed compilation of lnfodwrf in the i8086 medium and compact memory models
git-svn-id: trunk@30638 -
2015-04-18 01:56:29 +00:00
florian
10dc944d35 * disable some function using ansistrings if the ansistring feature is turned off
git-svn-id: trunk@30630 -
2015-04-17 20:12:36 +00:00
michael
0c76b8e656 * Patch from Anton Kavalenka to fix bug #17805 (load resources from libraries)
git-svn-id: trunk@30574 -
2015-04-13 19:05:54 +00:00
michael
81fa382c42 * Rename WriteExceptionToStdErr -> WriteErrorsToStdErr
git-svn-id: trunk@30555 -
2015-04-12 15:37:46 +00:00
michael
94e57aa463 * Moved WriteExceptionToStdErr to system unit, so it is observed even in absence of sysutils (bug ID 27708)
git-svn-id: trunk@30551 -
2015-04-12 13:58:49 +00:00
florian
886e3e8d02 * disable several complex procedures for avr with a newly introduced define: EXCLUDE_COMPLEX_PROCS. They
might compile with an improved register allocator in the future

git-svn-id: trunk@30546 -
2015-04-11 14:43:39 +00:00
Jonas Maebe
67be73afa5 * fixed type of size parameter of strn(case)cmp
git-svn-id: trunk@30487 -
2015-04-07 19:35:28 +00:00
nickysn
28dc9fe68b * fixed definition of the ALUSInt type on 16-bit CPUs
git-svn-id: trunk@30453 -
2015-04-05 21:47:32 +00:00
florian
134457fb8c + define types depending on the ALU register size of the CPU, e. g. for most 8 Bit CPUs this is different from Ptr(U)Int, and e.g. also for the far pointer memory models of i8086
git-svn-id: trunk@30451 -
2015-04-05 21:25:03 +00:00
florian
9ab9e03650 * limit number of possible units with initialization/finalization for a certain architecture to high(aint)
+ give an error if the number of possible units is exceeded

git-svn-id: trunk@30450 -
2015-04-05 21:06:58 +00:00
florian
98856437b2 * disable fpc_chararray_enum for now on avr because the register allocator cannot currently handle it
git-svn-id: trunk@30380 -
2015-03-29 19:46:02 +00:00
florian
d0f4e7cc99 * respect feature defines
git-svn-id: trunk@30378 -
2015-03-29 19:43:25 +00:00
Jonas Maebe
bd203a5b57 * synchronised with trunk till r30240
git-svn-id: branches/hlcgllvm@30241 -
2015-03-15 19:44:58 +00:00
svenbarth
dcfd734bbf Fix cycling with -dFPC_USE_LIBC on Linux systems to allow usage of FPC Linux programs on OSv.
memchr seems to have a bug on recent Linux systems if the count that is passed in is larger than the buffer (in our specific case the count is -1 to find the 0 byte of \0 terminated strings): the function "randomly" fails to find the byte and returns zero thus leading to for example incorrect parameter handling.

rtl/inc/cgeneric.inc:
  * use rawmemchr on Linux if -1 is passed as count

git-svn-id: trunk@30160 -
2015-03-10 18:34:04 +00:00
Jonas Maebe
6a70c84258 + internal bsr/bsf support for ppc32 and ppc64
git-svn-id: trunk@30152 -
2015-03-09 16:48:34 +00:00
Jonas Maebe
67b8aceaee * synchronized with privatetrunk till r30095
git-svn-id: branches/hlcgllvm@30101 -
2015-03-05 20:32:15 +00:00
Jonas Maebe
b4033efc00 * fixed typo in comment
git-svn-id: trunk@30079 -
2015-03-02 21:45:43 +00:00
Jonas Maebe
60dbce940a * converted readstr/writestr to use system.Utf8CodePointLen()
git-svn-id: trunk@30049 -
2015-03-01 17:12:24 +00:00
Jonas Maebe
ff020a3be4 + "Utf8CodePointLen(pansichar,MaxLookAhead,IncludeCombiningDiacriticalMarks):
sizeint"  function that returns:
   <0: invalid sequence detected after processing "-result" bytes
   0:  incomplete (may still be valid if MaxLookAhead is increased)
   >0: sequence of result bytes forms a codepoint (+ combining diacritical
       marks if that parameter was true)

git-svn-id: trunk@30047 -
2015-03-01 17:12:17 +00:00
Jonas Maebe
416d0b3974 * enable internal handling of 64 bit sar() on AArch64
git-svn-id: trunk@29983 -
2015-02-23 22:57:15 +00:00
Jonas Maebe
a8d05b66e2 + AArch64 internal bsf/bsr support
git-svn-id: trunk@29979 -
2015-02-23 22:57:02 +00:00
Jonas Maebe
03f8a15904 * enable internal handling of 32 and 64 bit rotates on AArch64
git-svn-id: trunk@29977 -
2015-02-23 22:56:56 +00:00
Jonas Maebe
5a8959381c + Darwin/AArch64 support
git-svn-id: trunk@29934 -
2015-02-23 22:53:50 +00:00
Jonas Maebe
6d0f0f430d * added Darwin/AArch64 support to the objc unit
git-svn-id: trunk@29927 -
2015-02-23 22:53:20 +00:00
Jonas Maebe
b0112fa63f + initial AArch64 support in systemh.inc, options.pas, version.pas and
psystem.pas

git-svn-id: trunk@29903 -
2015-02-23 22:52:04 +00:00
Jonas Maebe
5c6afe259e * long double = double on Darwin/AArch64
git-svn-id: trunk@29888 -
2015-02-23 22:51:15 +00:00
Jonas Maebe
dad442c7e3 + aarch64 fpu init, atomic routines and memory barriers
git-svn-id: trunk@29885 -
2015-02-23 22:51:06 +00:00
pierre
f56990ee29 Revert aligntoptr to RTTIAlign rename
git-svn-id: trunk@29739 -
2015-02-17 07:35:31 +00:00
sergei
72315c9bee * Finalize units after printing the runtime error message. Rationale:
* Unit finalization executes arbitrarily large amount of code. Doing it when error occurred can cause
    other errors, overwriting the original error information.
  * Code that prints error message depends on everything and a kitchen sink (most notably, Unicode manager
    and lineinfo unit). Running it after finalizing units can be successful only by coincidence.
  * Last but not least, this sequence (ExitProc -> print RTE -> finalize units) is same as one used in Delphi.

git-svn-id: trunk@29733 -
2015-02-16 22:05:54 +00:00
sergei
7666cd5c0e + Overloaded procedure dump_stack that calls CaptureBacktrace, thus encapsulating internals of stack traversing.
* Use this new procedure in heaptrc unit.

git-svn-id: trunk@29713 -
2015-02-15 20:00:24 +00:00
pierre
42cc1d504f Avoid warnings by adding noreturn modifiers to dummy dynamic library manager
git-svn-id: trunk@29711 -
2015-02-15 18:03:11 +00:00
sergei
d93d36e6d3 * Win64: Use separate implementation of CaptureBacktrace that calls RtlCaptureStackBackTrace. This way it does not require non-optimized code to work correctly.
git-svn-id: trunk@29692 -
2015-02-14 11:41:33 +00:00
sergei
438c433c50 * CaptureBacktrace: fixed off-by-one error. Caller's context must be captured if skipframes=0.
git-svn-id: trunk@29691 -
2015-02-14 02:50:03 +00:00
svenbarth
2d454dc8fa Move DynLibs support to System unit using a manager approach like for Threads, WideStrings, etc.. This is needed so that we can support features like "delayed" and loading of dynamic packages.
Each port that allows the usage of dynamic libraries should call InitSystemDynLibs during initialization of the System unit.
The DynLibs unit has been adjusted to be a forwarder for the functions that now reside in the System unit (for backwards compatiblity just in case). Additionally the unit will register the DynLibsManager if it doesn't reside in the System unit anyway.
Currently only the Windows targets (Win32, Win64 and WinCE) implement the DynLibsManager inside the System unit. For other systems using the LoadLibrary, etc. functions will lead to a run error/exception.
If a port wants to implement its own DynLibsManager then it needs to define DISABLE_NO_DYNLIBS_MANAGER. TLibHandle, NilHandle and optionally TOrdinalEntry (it's set to SizeUInt otherwise) should be defined in sysdlh.inc which needs to be enabled using the define FPC_SYSTEM_HAS_SYSDLH (because there are targets which have FEATURE_DYNLIBS enabled, but don't support them... e.g. powerpc-wii -.-).
The DynLibsManager contains methods for loading a library based on a RawByteString and based on a UnicodeString. BOTH should be implemented, but internally one can forward to the other.
The loading by ordinal *can* be be implemented. If it is set to Nil then the implementation of GetProcAddress(lib,ordinal) will return Nil.

+ new functions SetDynLibsManager and GetDynLibsManager to set and retrieve the current DynLibsManager
* provide interface of DynLibs unit in unit System

git-svn-id: trunk@29613 -
2015-02-03 20:00:00 +00:00
marco
576c754034 * corrected typo.
git-svn-id: trunk@29546 -
2015-01-24 23:30:31 +00:00
Jonas Maebe
146e3bcb9e * synchronised with trunk till r29513
git-svn-id: branches/blocks@29516 -
2015-01-21 23:28:34 +00:00
marco
0abb3f3e02 * fixed capitalization Int64 and added qword
git-svn-id: trunk@29470 -
2015-01-13 17:18:29 +00:00
marco
db43ec946f * definition of internal type int64 for documentation purposes.
git-svn-id: trunk@29469 -
2015-01-13 17:14:51 +00:00