Commit Graph

35338 Commits

Author SHA1 Message Date
sergei
8dc6ebb5ed rtl/generic.inc, minor optimizations:
* fpc_help_constructor: call platform-optimized version of FillChar directly instead of going through generic overloaded version.
* don't compile software multiplication routines if not necessary (the interface part already has similar $ifdef around)
* fpc_shortstr_append_shortstr: use sizeint instead of integer (the latter is 16-bit, produces less efficient code on most platforms)

git-svn-id: trunk@19727 -
2011-12-02 20:55:53 +00:00
sergei
32094761ef * win32/system.pp, win64/system.pp: Moved duplicated declarations of WinAPI functions to sysos.inc (Florian's comment about include ordering is no longer true, wstrings.inc comes after sysos.inc these days).
* Result of GetCurrentProcess and first argument of ReadProcessMemory are THandle, not dword.

git-svn-id: trunk@19726 -
2011-12-02 18:52:48 +00:00
michael
c17d15cf72 * Start of project file manipulation program
git-svn-id: trunk@19725 -
2011-12-02 18:44:58 +00:00
michael
e07646a653 * Implemented project file writing functionality, based on patch from Hans-Peter Diettrich
git-svn-id: trunk@19724 -
2011-12-02 16:24:29 +00:00
sergei
37abdd52df * Reverted r19693, calling SysInitMultithreading from PROCESS_ATTACH is plain wrong because it depends on initialized thread manager. Calling InitSystemThreads is more correct, but in case of Win32 it further depends on EnrtyInformation, which is not available at this point. Properly solving the issue requires moving the entire TLS stuff into sysinit units or something like that.
git-svn-id: trunk@19715 -
2011-11-30 15:14:00 +00:00
sergei
e62cd71a2f * Fixed cycling with 2.4.4 after r19707 (2.4.4 does not define FPC_HAS_FEATURE_RESOURCES, so related stuff is not compiled)
git-svn-id: trunk@19711 -
2011-11-30 10:49:47 +00:00
sergei
0093517227 * sysutils: changed RunErrorToExcept to use table instead of case statement for OS exceptions. This is to be able to extract exception class alone for the upcoming SEH support.
* Some Delphi-compatible changes:
  * For floating point underflow condition, raise EUnderflow, not EOverflow.
  * For unknown codes, raise EInOutError, not Exception.
  * Added entries for EZeroDivide and EStackOverflow (actually raising EZeroDivide on floating-point division by zero requires further changes to System because currently both integer and float division by zero is mapped to the same code 200).

  

git-svn-id: trunk@19707 -
2011-11-29 18:41:13 +00:00
marco
0d562f04ff * Improve CHM versioning, now that a compiler is added. Main chm version is in chmbase
git-svn-id: trunk@19703 -
2011-11-29 12:46:12 +00:00
sergei
816953990d * Do not access fields of potentially unassigned resultdef. p1.resultdef is not assigned at this point when dotypecheck=false. Mantis #20765.
git-svn-id: trunk@19694 -
2011-11-28 08:33:18 +00:00
sergei
266acd1bed * Windows TLS callbacks, call SysInitMultithreading early, it is necessary because if a statically loaded DLL creates a thread, apparently DLL_THREAD_ATTACH callback executes right away before the entry point. In turn, DLL_THREAD_ATTACH requires TLSIndex to be initialized.
git-svn-id: trunk@19693 -
2011-11-26 20:52:27 +00:00
sergei
c8e65c501a * Don't optimize away implicit initialization/finalization procedures if corresponding clause is present in the source but is empty. Resolves #19701.
git-svn-id: trunk@19692 -
2011-11-26 05:01:30 +00:00
Jonas Maebe
b584c71e42 * use {$IFNDEF cpu64bitaddr} instead of {$IFDEF cpu32bit} so that it's
also correct for 16 bit cpus (if they use 32 bit addresses anyway)

git-svn-id: trunk@19691 -
2011-11-25 21:12:59 +00:00
Jonas Maebe
f7adaef12a * defined cpu32bit for mips
git-svn-id: trunk@19690 -
2011-11-25 21:12:04 +00:00
Jonas Maebe
5816f0951d * fix alignment of sc80real on darwin
git-svn-id: trunk@19689 -
2011-11-25 17:10:45 +00:00
Jonas Maebe
a1ff3b24b9 * fixed warning/error when cross-compiling from 64 bit to 32/16 bit target
(depend on target bitness, not host bitness -- mantis #20749)

git-svn-id: trunk@19688 -
2011-11-25 17:09:37 +00:00
Jonas Maebe
de3a7f0cfd * the size of the FPC_RESSYMBOL pointer must depend on the target
cpu, not the host cpu

git-svn-id: trunk@19687 -
2011-11-25 16:56:50 +00:00
pierre
2e4b7ae05c Apply fixes from Sven Barth
git-svn-id: trunk@19686 -
2011-11-25 16:53:20 +00:00
sergei
3a579ced7b * Fixed IE201103063 when <dynamic array of unmanaged type> is being passed to <out open array> parameter.
git-svn-id: trunk@19684 -
2011-11-25 14:43:17 +00:00
michael
dce13ae068 * Patch from Reinier Olislagers to improve blob reading speed
git-svn-id: trunk@19683 -
2011-11-25 09:15:29 +00:00
paul
031eb4d51c compiler: fix 'class class' message
git-svn-id: trunk@19682 -
2011-11-25 08:34:24 +00:00
paul
889196f1c8 compiler: don't allow to execute instance methods, use instance fields and properties from the nested class (bug #0020721)
git-svn-id: trunk@19681 -
2011-11-25 08:33:24 +00:00
Jonas Maebe
8d2a7f3b88 * switched linux/ppc64 to tf_smartlink_sections (works fine even with
binutils 2.17, which is kind of ancient by today's standards),
    since it's much faster than tf_smartlink_library without an internal
    assembler 

git-svn-id: trunk@19680 -
2011-11-24 23:46:05 +00:00
Jonas Maebe
d83c7fc4ed * use generic sharedsuffix for libpq (fixes shared library extension
for Mac OS X, patch by Ludo Brands, mantis #20734)

git-svn-id: trunk@19679 -
2011-11-24 19:58:52 +00:00
Jonas Maebe
f67d7f08fc * use temporary location to construct writestr() string, because the
final destination may also be used in the other arguments
    (mantis #20744)

git-svn-id: trunk@19678 -
2011-11-24 19:56:21 +00:00
florian
55c17a94d6 * fixes property typo
git-svn-id: trunk@19677 -
2011-11-24 19:20:34 +00:00
sekelsenmat
efba36c81b Advances TFPImageCanvas.FImage and TFPMemoryImage.FData to protected to allow more useful descendents to be created, see bug #20341
git-svn-id: trunk@19673 -
2011-11-23 21:14:06 +00:00
sergei
fffa4a35a0 * x86_64: Don't waste time initializing/finalizing saved_standard_registers and saved_mm_registers arrays on every procedure. Initialize once, reinitialize if target system happens to change, and let finalization happen implicitly on shutdown.
git-svn-id: trunk@19672 -
2011-11-23 20:06:38 +00:00
michael
4f8bc2aaf4 * Missing conversion to TFPList
git-svn-id: trunk@19670 -
2011-11-22 19:21:20 +00:00
michael
bb54f1375c * TList -> TFPList to match latest changes in fcl-passrc
git-svn-id: trunk@19669 -
2011-11-22 18:15:28 +00:00
sergei
6cb6569d51 * Set pi_uses_exceptions flag when creating/firstpassing ttryexceptnode or ttryfinallynode, not when parsing try statements. It ensures that procedures with exception handling nodes created by compiler (constructors in the first place, but also for..in loops with TObject iterators, etc.) are handled the same way as ones containing exception nodes from user code.
* Modified code generation for constructors so they don't always use pi_needs_implicit_finally. It used to prevent stackframe optimization while not preventing regvar optimization ( tabstractvarsym.is_regvar() checks for pi_uses_exceptions but not for pi_needs_implicit_finally, and constructors were not getting pi_uses_exceptions), resulting in strange code using both exceptions and regvars.
Once setting of pi_uses_exception is fixed, the implicit finally frame can be omitted unless managed temps or local vars are actually present.

git-svn-id: trunk@19668 -
2011-11-22 11:59:44 +00:00
pierre
4bda40649d * Add missing CATRES substitution and remove blank lines in link.res
git-svn-id: trunk@19667 -
2011-11-22 11:15:23 +00:00
pierre
30baddd3b8 Fix Haiku shared library creatiion
git-svn-id: trunk@19665 -
2011-11-21 14:14:31 +00:00
michael
ce1133febb * Uncommented some extra tests
git-svn-id: trunk@19664 -
2011-11-20 22:49:14 +00:00
michael
c9cd1079d4 * More extensive examples taken from RTL
git-svn-id: trunk@19663 -
2011-11-20 22:48:29 +00:00
michael
d078996f69 * Refactoring in preparation of extended features (nested type, extended records) support
git-svn-id: trunk@19662 -
2011-11-20 22:46:54 +00:00
Jonas Maebe
3188916cda * also replace $CATRES for shared libraries (fix for r19649)
git-svn-id: trunk@19661 -
2011-11-20 20:06:43 +00:00
marco
b070a0bbbc * add NULL handling for customvariants, patch by Ludo, Mantis #20697
git-svn-id: trunk@19660 -
2011-11-20 19:45:22 +00:00
michael
a52fe3162d * Patch from Reinier Olislagers to improve blob upload times
git-svn-id: trunk@19659 -
2011-11-19 22:35:13 +00:00
marco
2e3d1a17d0 * also remove *.dbg files. Patch from Jonas, Mantis #20466
git-svn-id: trunk@19658 -
2011-11-19 13:56:43 +00:00
marco
7a7d8e27cd * set transaction of proxy via field instead of setter since that
triggers a cascade of actions. Mantis #20694

git-svn-id: trunk@19657 -
2011-11-19 13:02:31 +00:00
marco
6d830a270d * Adds methods to TBinaryField (getasvariant/setasvarvalue) Mantis #20532
git-svn-id: trunk@19656 -
2011-11-19 12:42:32 +00:00
Tomas Hajny
a2927499c8 * UNDEFINE corrected to UNDEF
git-svn-id: trunk@19655 -
2011-11-19 12:32:32 +00:00
marco
a06c466c76 * Lua libraryname fix, mantis 20705
git-svn-id: trunk@19654 -
2011-11-19 11:50:54 +00:00
marco
21e04073d8 * fixed closepipe<>pipeclose and handle<>fhandle typos reported by Jonas.
git-svn-id: trunk@19653 -
2011-11-19 11:49:59 +00:00
Tomas Hajny
38fca89c69 * TIn/OutputPipeStream gets closed on freeing
git-svn-id: trunk@19652 -
2011-11-18 22:47:06 +00:00
Jonas Maebe
84bf45f0e2 * give an error when trying to call an interface/protocol/category method
using the type name of the interface/protcol/category (they are not
    entities themselves on which you can invoke those methods,
    mantis #20661)

git-svn-id: trunk@19651 -
2011-11-18 22:33:33 +00:00
pierre
836da25e81 * Do not call with UseShell = true if CatFileContent expands the file into parameters
git-svn-id: trunk@19650 -
2011-11-18 22:08:51 +00:00
pierre
b1bd1d29ec Replace cat $RESby $CATRES and call CatFileContent method
git-svn-id: trunk@19649 -
2011-11-18 21:33:24 +00:00
pierre
5d6a7dc03d + TExternalLinker.CatFileContent method and tf_no_backquote_support tsystemflags enum value
git-svn-id: trunk@19648 -
2011-11-18 21:32:25 +00:00
pierre
8e843bc892 Regenerate msg include files
git-svn-id: trunk@19647 -
2011-11-18 21:29:40 +00:00