Commit Graph

35790 Commits

Author SHA1 Message Date
paul
d752ce2c11 compiler:
- postpone insertion of hidden params into record methods after the full record parse to prevent interface and implementation difference because of the possible record size change after the method parse (issue #0021044)
  - skip hidden arguments during methods search for a property setter because of the above change and also for consistency with getter method search
  - test

git-svn-id: trunk@20161 -
2012-01-24 01:45:31 +00:00
Tomas Hajny
c8ff351634 * EMX and Watcom use .exe extension too
git-svn-id: trunk@20159 -
2012-01-23 21:36:43 +00:00
Tomas Hajny
682299a647 + add previously missing support for link map generation for OS2 and EMX targets
git-svn-id: trunk@20158 -
2012-01-23 21:29:00 +00:00
marco
6182f2d25d * Patch by Ludo:
- Added the optional creation of a lazarus design/runtime package for the activex container.
- Added full files in case diff doesn't work.

Fixes to typelib importer:
- avoid duplicate enum members (translated to const) (Office10\MSWORD.OLB)
- don't make TEventSink or TActiveXContainer descendants if interface does not descend from IDispatch (VBA6\VBE6EXT.OLB)
- add type declaration for coclass interface pointing to default interface
- fixed property setter for array properties
- added typecasting for byref interface event parameters
- typecasting workaround for pvarVal^ and pbstrVal^ "Can't take the address of constant expressions" error caused by var type mismatch OLEVariant <> Variant and POleStr<>WideString
- reverted to the use of OLEVariant. POLEVariant isn't automatable in trunk but PVariant isn't automatable in 2.6.0 neither.
- added byref VT_INT, VT_UINT, VT_DECIMAL event parameter support (Office10\MSWORD.OLB)
- replace the use of TOleEnum with LongWord. Definition in ActiveX (type TOleEnum = type LongWord;) prohibits casting of OleVariant to TOleEnum.(Office10\MSOUTL.OLB)
- disambiguate method name for INVOKE_PROPERTYPUT and INVOKE_PROPERTYPUTREF on same property (ado\msado25.tlb)
- postpone interface declaration until full declaration of ancestor class.

git-svn-id: trunk@20157 -
2012-01-23 14:16:03 +00:00
sergei
b9b960ebcf * fpc_pchar_length: fixed exit without restoring EDI register if argument is nil, bug #21135.
git-svn-id: trunk@20156 -
2012-01-22 23:52:46 +00:00
marco
c729bd7a3f * Use own power of ten scaling routine to avoid problems with FPU precision.
Patch by Lacak2, mantis #20011

git-svn-id: trunk@20154 -
2012-01-22 18:53:43 +00:00
Tomas Hajny
b19d53a609 + new test for lineinfo functionality
git-svn-id: trunk@20152 -
2012-01-22 16:14:49 +00:00
Tomas Hajny
aacc62fa0a * OS/2 doesn't support generation of shared libraries yet due to ld limitations
git-svn-id: trunk@20151 -
2012-01-22 16:13:25 +00:00
svenbarth
7986f03186 * pgenutil.pas, generate_specialization:
* When building the typename for a generic use the full typename
	  including it's surrounding object- or abstractrecorddefs. This allows
	  that a nested non-generic type of a generic type A can be used as
	  type arguments for more than one specialization of another generic B
	  (there were some problems when B e.g. defined a pointer to the type
	  argument's type)

	* Always CRC the constructed specialization name as otherwise it might
	  reach the limit of 255 characters (not yet including unit name,
	  method name or method arguments)
	  Note: Errors like "expected XYZ, but got ABC" will need to be 
		adjusted to use the prettyname...

* increased PPU version
+ added test for above's point 1

git-svn-id: trunk@20149 -
2012-01-22 13:29:12 +00:00
marco
89866cd17e * LoadExtension, patch by BigChimp, Mantis #20640
git-svn-id: trunk@20146 -
2012-01-21 21:46:31 +00:00
Jonas Maebe
eedb5c89de * part of r20140, forgot to commit
git-svn-id: trunk@20145 -
2012-01-21 21:16:47 +00:00
Tomas Hajny
5d82eaa628 * fix buggy stabs offset calculation
git-svn-id: trunk@20144 -
2012-01-21 20:43:03 +00:00
Jonas Maebe
20cacb7a51 * {$PACKENUM 4} -> {$z4} so the units can also be compiled by Delphi
(patch by Alexey Voychehovich, mantis #21111)

git-svn-id: trunk@20143 -
2012-01-21 19:51:37 +00:00
Jonas Maebe
e5c097a6e2 * mark nodes that have been created by transforming a read-accessor of
of a property with nf_no_lvalue flag, and check that such nodes are
    never used in direct assignments (fixes mantis #21087 and a couple of
    other cases of invalid assignments to properties)

git-svn-id: trunk@20140 -
2012-01-21 19:09:30 +00:00
Jonas Maebe
28bf0c74ee * don't try to assign values by indexing properties that return an
array

git-svn-id: trunk@20139 -
2012-01-21 19:05:46 +00:00
Jonas Maebe
6432c82c01 * don't pass property as var-parameter to val()
git-svn-id: trunk@20137 -
2012-01-21 16:54:57 +00:00
florian
d01824ab22 * prevent crash of h2pas if an unknown specifier is encountered, resolves #18664
git-svn-id: trunk@20136 -
2012-01-21 15:17:11 +00:00
marco
a0b200db76 * Add dlvsym under ifdef ELF, defined ELF for the OSes I could check
(FreeBSD, OpenBSD, Linux) Mantis #18892

git-svn-id: trunk@20134 -
2012-01-21 11:56:40 +00:00
joost
925024a915 * Always use the bootstrap-units to compile these fpmake.pp files. Also when the regular .ppu's are available. To avoid checksum-problems when running make on a non-clean checkout. (make install)
git-svn-id: trunk@20133 -
2012-01-21 06:40:47 +00:00
Jonas Maebe
ab9b52a003 * truncate indices into arrays from 64 to 32 bit on 32 bit
platforms so that their code generators don't get 64 bit
    operands (fixes internalerrors on at least ppc32  after r20108)

git-svn-id: trunk@20132 -
2012-01-20 22:43:55 +00:00
marco
77197cdc39 * Added CharInSet, Fixes #14599, since issurrogate* already is in unit Character.
git-svn-id: trunk@20131 -
2012-01-20 22:10:32 +00:00
sergei
f136e44b6b - RTL: cleaned up remaining 'decr_ref' routines (not removed completely due to bootstrapping needs, but aliased to 'finalize' ones).
git-svn-id: trunk@20130 -
2012-01-20 19:19:08 +00:00
joost
822cd6dec4 * Added dependency on univint on iphonesim target
git-svn-id: trunk@20129 -
2012-01-20 18:16:17 +00:00
joost
c3095c92d9 * Fixed unixutils fmpake.pp file
git-svn-id: trunk@20128 -
2012-01-20 18:02:24 +00:00
joost
8c4b24dc13 * Added fpmake.pp file for opengles
git-svn-id: trunk@20127 -
2012-01-20 17:09:07 +00:00
pierre
7167b5b065 Fix cross rtl compilation problems
git-svn-id: trunk@20124 -
2012-01-20 16:39:57 +00:00
pierre
736299ffd9 Add ia64 define cpuXXXX series
git-svn-id: trunk@20123 -
2012-01-20 14:19:59 +00:00
pierre
752fabab73 Fix compilation of alpha/cpuinfo unit
git-svn-id: trunk@20122 -
2012-01-20 14:18:53 +00:00
pierre
6b2a0e978b Fix ia64 compilation problems
git-svn-id: trunk@20121 -
2012-01-20 14:17:56 +00:00
pierre
c6be9b29ee Try to update test to adapt to softfpu source changes
git-svn-id: trunk@20120 -
2012-01-20 13:56:24 +00:00
sergei
06192a8137 Values of managed variables are never ever used after decrementing reference on the variable, so there is no point of having a 'decrement reference' as a separate operation. We can always do 'finalize', i.e. clear the contents after decref.
* Modified fpc_ansistr_decr_ref and fpc_widestr_decr_ref so they always zero the pointer passed by reference. Other _decr_ref helpers already do it.
- Removed tcg.g_decrrefcount, calling cg.g_finalize instead.
- finalize_data_node and tcg.g_finalize: removed code generation for zeroing locations, because it is now done by RTL helpers. This further reduces code size.

As a total result of this change and r20118, the size of Lazarus executable is reduced by about 12%.

git-svn-id: trunk@20119 -
2012-01-19 23:11:09 +00:00
sergei
afb4992113 * Changed code generation for assignments of managed types, it now generates a single call to helper procedure (significantly reducing code size) and is handled entirely in firstpass.
git-svn-id: trunk@20118 -
2012-01-19 22:28:29 +00:00
joost
76fb845f4a * Re-generated makefile. It contained an invalid package name for some reason
git-svn-id: trunk@20117 -
2012-01-19 21:23:00 +00:00
joost
ac799e43ed * Do not pass -Fisrc to the compiler, fixes compiling with rtl compiled without -Ur
git-svn-id: trunk@20116 -
2012-01-19 21:11:03 +00:00
joost
4bb05b21ed * Converted fpmkunit and the packages it depends on to fpmake building.
Hash, paszlib, fcl-process and fpmkunit itself are build using
   fpmkunit_bootstrap. The fpmkunit-Makefile.fpc still contains dependencies
   on hash,paszlib and fcl-process because the packages depending on fpmkunit
   needs those. For fpmkunit itself those dependencies are ignored by directly
   setting the unit-search path to the rtl-unit search path.

git-svn-id: trunk@20115 -
2012-01-19 20:02:41 +00:00
sergei
568ef396fb * Added fpc_dynarray_assign (a helper for dynamic array assignments), added local access to fpc_intf_assign, and switched fpc_copy to use assignment helpers instead of incr_ref/decr_ref combinations.
git-svn-id: trunk@20114 -
2012-01-19 17:43:37 +00:00
pierre
ac80391c74 * Try to fix go32v2 problems related to DJGPP 2.04 CVS code using __environ as alias of _environ
git-svn-id: trunk@20113 -
2012-01-19 17:12:03 +00:00
pierre
bf321b72c7 * Try to fix go32v2 problems related to DJGPP code using C free on _environ ppchar by reallcating with malloc
git-svn-id: trunk@20111 -
2012-01-19 14:01:47 +00:00
pierre
a088820cfe * Try to fix problem with gdbver executable
git-svn-id: trunk@20110 -
2012-01-19 13:59:43 +00:00
marco
b5cc3fbd6c * ftBytes,ftVarBytes support in odbcconnection.setparameters
Patch by Lacak2, Mantis #21116

git-svn-id: trunk@20109 -
2012-01-19 10:15:54 +00:00
Jonas Maebe
ceee186f2f * typecheck all array indices, not just integer and boolean types
o allows converting indices to the proper type if required (such as
     variant, mantis #20873)
   o do not create temporary defs for this type checking anymore if not
     necessary
   o makes sure that errors are thrown in case of conversions considered
     as invalid by the compiler rather than that wrong code is silently
     generated (such as in mantis #20873 before this change)

git-svn-id: trunk@20108 -
2012-01-18 21:29:44 +00:00
Jonas Maebe
bab8e5da5a * set the default range type of arrays to ptrsinttype rather
than s32inttype (so it's correct for 64 bit platforms too)

git-svn-id: trunk@20107 -
2012-01-18 21:13:21 +00:00
sergei
a8fe9601de * Get rid of using pdynarraytypeinfo, instead treat rtti as distinct 'header' and 'data' parts. In variants unit, use rtti declarations from typinfo directly. In system unit, declare private tdynarraytypedata record which (like typinfo.TTypeData) is not packed on alignment-sensitive targets. This simplifies code and removes scary pointer manipulations, should also yield better code on aligned targets.
git-svn-id: trunk@20106 -
2012-01-18 19:28:08 +00:00
joost
ee8268dd7f * Do not use a buildunit when compiling intgdb, since it is not possible to compile single files in the BeforeCompile even when a buildunits is used.
* Add the .exe extension to gdbver(.exe) on Windows.

git-svn-id: trunk@20105 -
2012-01-18 18:12:18 +00:00
Legolas
cf9aaaa5ce * Install the examples files for gba and nds
git-svn-id: trunk@20104 -
2012-01-18 17:54:37 +00:00
joost
90cfc86f71 * Re-generated Makefile. It did miss the dependency on fpmkunit because of local changes when fpcmake was run in r20101.
git-svn-id: trunk@20103 -
2012-01-18 15:08:58 +00:00
marco
a7fb5c7e6c * updated comments (Mantis #21107)
git-svn-id: trunk@20102 -
2012-01-17 20:43:20 +00:00
joost
7a69b2cd37 * Switched winceunits package to fpmake building
git-svn-id: trunk@20101 -
2012-01-17 10:15:20 +00:00
michael
7f59902842 * Patch from Hand-Peter Diettrich to fix CHM extension usage
git-svn-id: trunk@20100 -
2012-01-17 08:35:18 +00:00
marco
5ce5f4f2a9 * Init use_proxy to false, Mantis #21097
git-svn-id: trunk@20099 -
2012-01-17 07:57:39 +00:00