paul
515c99cc01
compiler: cleanup
...
git-svn-id: trunk@16492 -
2010-12-02 03:06:01 +00:00
paul
2155dadf5e
compiler: push to the stack not only nested hierarchy but also class hierarchy for each nested entry both in method declaration and for method body, also push child hierarchy while parsing object members because in other case parent types are invisible for descendants (fixes mantis #0018124 , mantis #0018127 and more) + extended test
...
git-svn-id: trunk@16491 -
2010-12-02 03:04:23 +00:00
paul
37179a6558
compiler: cleanup
...
git-svn-id: trunk@16490 -
2010-12-01 08:19:32 +00:00
paul
668cd1f3c0
compiler: change check for current in try_consume_unitsym - don't use current_unit in check because specialize code does not replace this variable (fixes bug #0015591 )
...
git-svn-id: trunk@16489 -
2010-12-01 08:18:51 +00:00
paul
d9a43f7858
compiler: cleanup
...
git-svn-id: trunk@16488 -
2010-12-01 07:40:09 +00:00
paul
ba75daa50d
compiler: change find_module_from_symtable to support not only unit symtables but also other symtables with valid moduleid (fixes bug #0016090 )
...
git-svn-id: trunk@16487 -
2010-12-01 04:33:47 +00:00
paul
433f18e60c
compiler: resolve only current typeblock forward declarations when the type block is finished (fixes bug #0018086 )
...
git-svn-id: trunk@16480 -
2010-11-30 00:02:06 +00:00
florian
f570934b45
* patch by Aleksa Todorovic to fix generic interfaces, resolves #16100
...
git-svn-id: trunk@16477 -
2010-11-29 21:13:09 +00:00
paul
8a5c99599e
compiler: skip functions symtables while generating generic specialization symtable stack (fixes test tw12249.pp and bug #0012249 )
...
git-svn-id: trunk@16476 -
2010-11-29 14:50:04 +00:00
florian
7d1627e9ca
* patch by Aleksa Todorovic to handle access to types inside generics correctly
...
when they are used as class variables, resolves #18096
git-svn-id: trunk@16474 -
2010-11-29 09:37:09 +00:00
paul
0d57d38d7c
compiler: fix visibility of inherited protected members (mantis #0018087 ) and strict private/protected members (mantis #0018085 ) to nested classes
...
git-svn-id: trunk@16473 -
2010-11-29 04:08:00 +00:00
florian
e4ecee317e
* finer grained convert levels for strings, prefers widestring<->unicodestring over other conversions, resolves #18075
...
git-svn-id: trunk@16460 -
2010-11-28 10:05:09 +00:00
florian
b1a6ec532d
* fix bootstrapping with 2.4.2
...
git-svn-id: trunk@16459 -
2010-11-27 21:28:45 +00:00
sergei
7dd93b1282
* Variant types: renamed varunicodestring to varustring and changed its value to $102 (for Delphi compatibility), introduced varUStrArg=$73, added some description comments.
...
* ncal.pas, translate_disp_call:
* pass UnicodeString as varUStrArg
* do not typecast ordinal consts to Integer, so typecasts in source (if any) are preserved.
+ test for correct passing of Dispatch method arguments, concludes work on Mantis #17904 .
git-svn-id: trunk@16456 -
2010-11-27 16:17:43 +00:00
pierre
fd2b777435
* ogcoff.pas:
...
{ Direct 32 bit sign extended,
win64 mingw GNU compiler
also generates this type
inside coff objects
We assume they are equivalent to
IMAGE_REL_AMD64_ADDR32 PM 2010-11-27 }
git-svn-id: trunk@16454 -
2010-11-26 23:46:49 +00:00
Jonas Maebe
edfb31c020
* when looking for overloaded conversion (assignment) operators, only ignore
...
those for variants. All defined operators are guaranteed to be valid by
the code that checks them when they are defined (mantis #17846 )
git-svn-id: trunk@16449 -
2010-11-26 15:37:31 +00:00
Jonas Maebe
8f22a5d224
* perform simple imul->lea transformations also for Pentium 3-class target
...
cpus (default target, and should actually be faster there too;
mantis #18056 )
git-svn-id: trunk@16441 -
2010-11-26 10:30:46 +00:00
paul
8aef216f21
compiler: allow nested objects to refence owner class in method arguments (issue #0017986 )
...
git-svn-id: trunk@16440 -
2010-11-26 07:55:55 +00:00
paul
0c23029d8f
compiler: add all nested classes to the symtable stack while parsing method header (issue #0017952 )
...
git-svn-id: trunk@16439 -
2010-11-26 07:30:20 +00:00
florian
675c3391d1
* makes compiler report nice error when one tries to use specialize for function result type, based on a patch by Aleksa Todorovic, part of #15875
...
git-svn-id: trunk@16438 -
2010-11-25 21:45:30 +00:00
florian
d30952b408
* patch by Aleksa Todorovic which adds the ability to reference current generic class. Each reference to current generic class is "translated" to appropriate specialization of that generic class. There are two tests as part of the patch to test that it works. The patch, also, rejects declaring generic inside another generic. 0010479 is easy to implement with this patch applied, resolves #11777
...
git-svn-id: trunk@16423 -
2010-11-24 21:57:41 +00:00
Jonas Maebe
1f61b5b30c
* reverted the rtl patches from r14184, because they cause an endless
...
loop when attempting to terminate a process via the RTL compiled into
a Linux shared library (mantis #17383 )
* call FPC_LIB_EXIT (the internal/generic RTL finalisation routine) instead
of FPC_SHARED_LIB_EXIT (the Linux-specific "process exit" code for shared
libraries) as "fini" routine (fixes #14958 again after reverting r14184)
git-svn-id: trunk@16418 -
2010-11-24 15:33:29 +00:00
Jonas Maebe
1271c221f3
- reverted change accidentally committed as part of r16050 that could break
...
internal resources on 32 bit Darwin platforms with small programs
git-svn-id: trunk@16417 -
2010-11-24 11:03:11 +00:00
Jonas Maebe
c44d79f3ba
* fix the value of the frame pointer for Thumb-2 after r14317
...
(patch by Jeppe Johansen, mantis #18025 )
git-svn-id: trunk@16416 -
2010-11-24 10:07:49 +00:00
Jonas Maebe
749991ec02
+ support extra parameter for initialize() that indicates how many elements
...
should be initialised, similar to how this was already allowed for
finalize() (mantis #17998 )
git-svn-id: trunk@16407 -
2010-11-23 15:14:40 +00:00
Jonas Maebe
a631ab2a7e
* add the C-prefix to the exported name of routines that are automatically
...
exported in {$z+} state in MacPas mode, so that the name chosen by
implicit imports in MacPas units without an implementation section matches
again after r16330 (fixes tests/test/tmacpas1 after r16330 on targets
with a cprefix<>'')
git-svn-id: trunk@16403 -
2010-11-22 14:30:42 +00:00
Jonas Maebe
44178f41b6
* don't overwrite register variables when evaluating <=/>= expressions with
...
smallsets (left is overwritten by an "and", so it cannot be const; mantis
#18013 )
git-svn-id: trunk@16400 -
2010-11-22 12:58:08 +00:00
sergei
b4ac714201
* defutil.pas: added UnicodeString to automatable types, fixes compilation of webtbs/tw2649.pp after r16360. However it requires RTL support similar to one for AnsiString to be complete.
...
* ncal.pas, translate_disp_call(): fixed parameter alignment once more, this time it should be correct for both 32 and 64 bit platforms.
git-svn-id: trunk@16394 -
2010-11-21 18:10:11 +00:00
sergei
9d8d518029
* translate_disp_call, support passing Variants by-value (still pass a pointer, but reset ByRef bit in CallDesc.Args[]).
...
git-svn-id: trunk@16389 -
2010-11-20 21:43:15 +00:00
sergei
ba700ad2ff
* Improvements to Dispatch call handling:
...
o All signed and unsigned ordinal types are made automatable.
o Non-automatable types are rejected when parsing dispinterface declarations.
o Simplified translate_disp_call() a bit.
o translate_disp_call() now supports non-automatable parameters which can be typecasted to automatable ones. UnicodeString is not yet there, though.
o Partially fixes #17904 : parameters of Variant Dispatch calls are passed by reference when they can be mapped to a variable.
git-svn-id: trunk@16360 -
2010-11-18 16:17:50 +00:00
sergei
532f8b9ab5
* Type Word maps to variant type varword, not varqword (probably a typo).
...
git-svn-id: trunk@16359 -
2010-11-18 07:24:37 +00:00
paul
a8deeaa168
compiler: fix search of outer class type inside inner type declarations (bug #0017945 )
...
git-svn-id: trunk@16352 -
2010-11-17 05:51:54 +00:00
paul
d99b4ae7c1
compiler: set moduleid for record symtables and descendants (fixes bug #0017950 )
...
git-svn-id: trunk@16351 -
2010-11-17 02:40:41 +00:00
sergei
2d860e356c
* Fixed parameter generation for dispatch calls: assuming that everything is passed by reference and needs only sizeof(ptruint) bytes is wrong. 64-bit primitive types (Double,Int64) are passed by value and require twice more space on 32-bit platforms.
...
git-svn-id: trunk@16350 -
2010-11-16 11:55:09 +00:00
Jonas Maebe
d36f8ac542
* fixed potential buffer overflow error when creating the fullprocname for
...
display purposes if there was a parameter with a default value > 255 chars
* replace #0 , #10 and #13 in the fullprocname with '.' so they do not cause
line breaks or early string termination when writing them to the
assembler file (mantis #17928 )
git-svn-id: trunk@16344 -
2010-11-14 12:18:48 +00:00
pierre
2003c2af70
* In MacPas mode, externals have realname with target_info Cprefix
...
git-svn-id: trunk@16330 -
2010-11-12 22:00:46 +00:00
Jonas Maebe
de51c4734c
* fixed searching for the 8-character variant of already compiled
...
unit files (patch by Aleksa Todorovic, mantis #17907 )
git-svn-id: trunk@16329 -
2010-11-12 12:10:41 +00:00
Jonas Maebe
44dc6e7283
* also look for a source file ending in .p when checking whether the sources
...
of a pre-compiled unit are available on tf_p_ext_support systems
(patch by Aleksa Todorovic, mantis #17907 )
* fixed indentation/flow of this and a similar check elsewhere
git-svn-id: trunk@16328 -
2010-11-12 11:50:40 +00:00
Jonas Maebe
dd88644237
* record the vmt_offset as the actual offset of the vmt field, so that
...
it correctly reflects the alignment of the object symtable (mantis
#16034 )
git-svn-id: trunk@16321 -
2010-11-10 15:58:47 +00:00
Jonas Maebe
d45ba6c966
* only ordinals and enums can be bitpacked -> don't give an error when
...
e.g. passing a 3-byte record in a bitpacked array as var-parameter
(mantis #17862 )
git-svn-id: trunk@16317 -
2010-11-08 21:23:55 +00:00
florian
d25b6f44f0
* avoid hint about uninitialized variable for compiler generated label jump buffer in macpas mode, resolves #17842
...
git-svn-id: trunk@16311 -
2010-11-06 20:21:06 +00:00
florian
474e8dc273
* ugly indention fixed
...
git-svn-id: trunk@16310 -
2010-11-06 20:00:21 +00:00
Jonas Maebe
d1264eeb3a
* fixed optimized division of signed values by constant power of 2 if the
...
constant is > high(longint), because then it must be loaded into a register
first since such values cannot be encoded directly in non-mov x86-64
instructions (mantis #17836 )
git-svn-id: trunk@16305 -
2010-11-05 15:32:07 +00:00
paul
f5751d81db
compiler: reset section type to regular fields section after the "public", "protected", ... and other section visibility keywords
...
git-svn-id: trunk@16302 -
2010-11-04 15:12:17 +00:00
florian
8ca3c8301b
* don't convert second argument of inc/dec to sinttype when inc/dec are compiled with r+ or q+, fixes code generation for inc(<int64>,<int64>); on 32 bit targets
...
git-svn-id: trunk@16289 -
2010-11-01 21:30:14 +00:00
florian
1c5a3b6bf0
o patch by Graeme Geldenhuys
...
+ adds the missing DWARF3 values
+ introduces the DWARF4 values
+ basic class and debug info structures for DWARF4 support
+ added DWARF4 compiler parameter (-gw4) support
+ updated parameter description
git-svn-id: trunk@16288 -
2010-11-01 20:41:56 +00:00
florian
eb3644140a
* patches from Aleksa Todorovic for #15480 to improve error reporting, does not resolve #15480
...
git-svn-id: trunk@16287 -
2010-11-01 20:24:01 +00:00
florian
d6d3791939
* fix compilation of cmpxchg16b
...
git-svn-id: trunk@16283 -
2010-11-01 08:13:27 +00:00
tom_at_work
446eacaf47
* another compilation failure due to cleanup of changes to r16272
...
git-svn-id: trunk@16281 -
2010-10-31 18:37:49 +00:00
tom_at_work
f1a7cf78fe
* fixed compilation after cleaning up for r16272
...
git-svn-id: trunk@16280 -
2010-10-31 18:26:33 +00:00