Commit Graph

1058 Commits

Author SHA1 Message Date
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
svenbarth
e9d8fadb58 Merged revision(s) 28237 from branches/svenbarth/packages:
Add a new target flag which determines whether the target supports dynamic packages or not.

systems.pas:
  + new flag tf_supports_packages
pmodules.pas, proc_package:
  * error out when flag tf_supports_packages is not set for the current target
msg/errore.msg:
  + error message for when tf_supports_packages is missing and a package file is compiled
........

git-svn-id: trunk@32978 -
2016-01-22 15:35:41 +00:00
nickysn
a508f9e5d3 + added check if the selected cpu is 386+ when writing a 66h or 67h prefix in
the i8086 internal object writer. This allows weeding out spurious 386
  instructions, as is similarly done by NASM when using it as an external
  assembler.

git-svn-id: trunk@32871 -
2016-01-07 15:40:32 +00:00
nickysn
114c76bc4a + added i8086 to the list of supported cpus in the compiler usage help screen
git-svn-id: trunk@32870 -
2016-01-07 14:38:25 +00:00
florian
37cb35d780 + support for the .code directive in arm inline assembler
git-svn-id: trunk@32840 -
2016-01-03 22:08:25 +00:00
Károly Balogh
3675fc75cb VLink Support:
* fixed for MorphOS, added for Amiga/m68k
* enabled as default when running natively on these systems (cross still defaults to GNU LD)
* added -XV command line switch to enable/disable it
* dropped the 'fpc' prefix from vlink binary name on MorphOS

git-svn-id: trunk@32324 -
2015-11-15 01:18:30 +00:00
svenbarth
dabde774c4 Fix for Mantis #29005.
errore.msg:
  * consequently use <x> instead of xxxx for value placeholders

git-svn-id: trunk@32322 -
2015-11-14 21:22:15 +00:00
nickysn
a553b15a1c + handle properly inline asm segment constants different than word:
o 'DB SEG symbol' produces an error
  o 'DD SEG symbol' (and anything larger than DW, like DQ) adds extra high zeros
    to the segment constant (this is Turbo Pascal 7 compatible)

git-svn-id: trunk@32283 -
2015-11-10 21:18:34 +00:00
nickysn
995ca4fb12 + implemented the 'SEG @DATA' inline assembler directive for i8086
git-svn-id: trunk@32280 -
2015-11-10 17:26:21 +00:00
nickysn
7d41d19150 + added an error message when trying to compile a tiny model DOS .COM file with
segment relocations

git-svn-id: trunk@32276 -
2015-11-08 21:13:16 +00:00
pierre
5c5c28ab9b Add new general_e_exception_raised Error
git-svn-id: trunk@31799 -
2015-09-23 16:39:23 +00:00
svenbarth
79f19f79f2 msg/errore.msg:
+ add error message if a generic method is declared inside an interface
  + add error message if a generic method is declared as virtual

git-svn-id: trunk@31764 -
2015-09-18 14:52:47 +00:00
Jonas Maebe
4564bffb85 * use binutils 2.19+ linker script "augmentation" functionality to specify
how the fpc sections have to be linked *on Linux*. This prevents the
    "did you forget -T" warnings from ld, and in general is more correct than
    our previous approach of specifying a complete linker script without -T
    and hoping that there won't be any unexpected interactions with ld's
    built-in linker script (fixed version of r31664, thanks to Alan Modra)
   o use the new -X9 command line option to generate linker scripts that
     are compatible with binutils older than 2.19 (reverts to the old
     behaviour)

git-svn-id: trunk@31675 -
2015-09-14 07:24:54 +00:00
Jonas Maebe
e06a759e20 - reverted r31664, it causes crashes with some ld versions :/
git-svn-id: trunk@31670 -
2015-09-13 20:14:46 +00:00
Jonas Maebe
cd41bf672c * use binutils 2.19+ linker script "augmentation" functionality to specify
how the fpc sections have to be linked *on Linux*. This prevents the
    "did you forget -T" warnings from ld, and in general is more correct than
    our previous approach of specifying a complete linker script without -T
    and hoping that there won't be any unexpected interactions with ld's
    built-in linker script
   o use the new -X9 command line option to generate linker scripts that
     are compatible with binutils older than 2.19 (reverts to the old
     behaviour)

git-svn-id: trunk@31664 -
2015-09-13 19:06:14 +00:00
nickysn
253793ab9d + added the 'farprocspushoddbp' target switch to the help screen
git-svn-id: trunk@31570 -
2015-09-07 19:23:25 +00:00
nickysn
4c9b339c22 + added the huge memory model option to the compiler help screen
git-svn-id: trunk@31518 -
2015-09-04 20:43:38 +00:00
Jonas Maebe
e720b44471 * expand the error message for when trying to use a formal class with an
explanation of what to do

git-svn-id: trunk@31457 -
2015-08-30 14:32:56 +00:00
nickysn
e9c790f4eb + support 'SEG' in the i8086 inline assembler
git-svn-id: trunk@31428 -
2015-08-26 15:57:44 +00:00
nickysn
6e20e0fc84 + added checks and error messages in case a 16-bit segment or group exceeds 64k
git-svn-id: trunk@31416 -
2015-08-25 01:01:20 +00:00
florian
ee89e99189 * correctly write an error if one tries to implement a method introduced in a generic in a specialization of the generic, resolves issue #23169
git-svn-id: trunk@31241 -
2015-07-28 21:16:47 +00:00
florian
f2a5672355 * Update of German error message files by Karl-Michael Schindler, resolves issue #28010
git-svn-id: trunk@30763 -
2015-05-02 13:34:03 +00:00
Jonas Maebe
e3ddf1c0b7 * fixed typos in error.msg (patch by Stéphane Aulery, mantis #27931)
git-svn-id: trunk@30725 -
2015-04-25 18:15:18 +00:00
nickysn
bde7d0aacb + added "code segment too large" and "data segment too large" error messages
git-svn-id: trunk@30687 -
2015-04-20 23:47:22 +00:00
Jonas Maebe
3684e7665d * changed temporary type_e_anonymous_function_unsupported message into an
inline comment, because using a high message number wastes space in
    the messages array

git-svn-id: trunk@30666 -
2015-04-19 14:31:35 +00:00
michael
d802842ecf * Committed working patches to error message files from Stéphane Aulery
git-svn-id: trunk@30617 -
2015-04-17 12:19:13 +00:00
michael
b2caba585d * Patch from Stéphane Aulery to fix typos in compiler messages (bug ID 27857)
git-svn-id: trunk@30604 -
2015-04-15 17:34:56 +00:00
nickysn
470fb65e80 + implemented aasmcpu.process_ea for i8086
git-svn-id: trunk@30495 -
2015-04-08 12:54:09 +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
b07ba5786b * updated errord(u).msg files by Karl-Michael Schindler, resolves #27725
git-svn-id: trunk@30382 -
2015-03-29 20:02:06 +00:00
Tomas Hajny
9f9ab082da * fix typo (space instead of underscore resulting in broken help display)
git-svn-id: trunk@30041 -
2015-02-28 23:30:24 +00:00
florian
91db2a1698 + report when compilation of a unit is stopped because it has been already compiled during the recursive search in uses clauses
git-svn-id: trunk@30001 -
2015-02-24 21:46:09 +00:00
Jonas Maebe
3b5adcb3de + print iphonesim/x86_86-specific command line options in the help
git-svn-id: trunk@29982 -
2015-02-23 22:57:12 +00:00
Jonas Maebe
dcb6f2baae + print Darwin/AArch64-specific command line options in the help
git-svn-id: trunk@29981 -
2015-02-23 22:57:09 +00:00
florian
0d944c8b1d * update of german message files by Karl-Michael Schindler, resolves #27342
git-svn-id: trunk@29595 -
2015-02-01 16:24:23 +00:00
Jonas Maebe
146e3bcb9e * synchronised with trunk till r29513
git-svn-id: branches/blocks@29516 -
2015-01-21 23:28:34 +00:00
Jonas Maebe
e97f31541e - reverted partial commit of merge
git-svn-id: branches/blocks@29515 -
2015-01-21 23:24:37 +00:00
Jonas Maebe
a76bbf363d * synchronised with trunk r29513
git-svn-id: branches/blocks@29514 -
2015-01-21 23:18:29 +00:00
Jonas Maebe
990e47f2d3 * give a warning instead of an error if a parameter or local variable in a
an Objective-C method masks an identifier from a category, because due
    to the fact that all standard categories are imported at the same time via
    the CocoaAll unit, this can often happen with categories you don't know/
    care about. These errors also didn't happen in 2.6.x

git-svn-id: trunk@29497 -
2015-01-17 15:27:42 +00:00
florian
d25dbec070 * allow the varargs directive in combination with stdcall as well, resolves #27299
git-svn-id: trunk@29496 -
2015-01-17 14:23:38 +00:00
Tomas Hajny
b1e51054cb * add information about -vz to the help pages
git-svn-id: trunk@29475 -
2015-01-14 17:08:26 +00:00
pierre
18fe66b0e7 Added two new messages for changes in assembler symbols after use.
Those changes can lead to invalid code generation.

git-svn-id: trunk@29444 -
2015-01-12 10:05:21 +00:00
svenbarth
af43e5e3e9 Fix for Mantis #24872.
psub.pas, tcgprocinfo.parse_body:
  * also check record symtables besides object symtables to determine whether the staticsymtable is accessed from a globally declared generic
  * use a translateable message if the static symtable is accessed if it should not
msg/errore.msg:
  + add new error message for when the static symtable is accessed from a global generic
msgidx.inc & msgtixt.inc:
  * regenerated

+ added test

git-svn-id: trunk@29427 -
2015-01-06 20:46:12 +00:00
florian
9b6b029ca1 * patch by Yuri Zaporozhets to fix typos in text messages, resolves #27250
git-svn-id: trunk@29396 -
2015-01-04 20:46:36 +00:00
florian
2c26c35eb6 * updated copyright year to 2015
+ added "and others" if translation was not updated yet

git-svn-id: trunk@29383 -
2015-01-04 15:26:29 +00:00
Tomas Hajny
ee82b6ea0b * do not mention OS/2 and EMX on option list for x86_64
git-svn-id: trunk@29318 -
2014-12-23 23:08:43 +00:00
florian
4289dd667d * managed types cause a different warning/hint when they are
used uninitialized, so users can turn off these messages if they want, resolves #24601 and #26403

git-svn-id: trunk@29295 -
2014-12-14 20:48:54 +00:00
florian
bb01872821 + handle -CPPACKENUM and -CPPACKRECORD, resolves #27153
git-svn-id: trunk@29283 -
2014-12-13 21:08:18 +00:00
michael
a127bfa51d * Fixed tex marker
git-svn-id: trunk@29276 -
2014-12-12 20:02:09 +00:00
svenbarth
e614914016 Fix a grammatical error in warning asmr_w_global_access_without_got
git-svn-id: trunk@29238 -
2014-12-09 21:19:21 +00:00
florian
25e19f27a0 + write name of missing feature in error message
git-svn-id: trunk@29211 -
2014-12-07 18:20:56 +00:00
florian
ce96980f39 * updates to German message files by Karl-Michael Schindler, resolves #27061
git-svn-id: trunk@29148 -
2014-11-25 19:07:23 +00:00
svenbarth
2288df9fcf Fix for Mantis #27073. The -vx option is not only for Win32, but in fact for information about tool invocation on all platforms.
git-svn-id: trunk@29129 -
2014-11-23 20:46:45 +00:00
Tomas Hajny
4c98113569 * note about multiple 't' in -gt added to the help page
git-svn-id: trunk@29099 -
2014-11-21 13:53:53 +00:00
Tomas Hajny
fc17e318b0 * add some previously missing options to the help page, add support for listing recognized compiler and RTL features in -i and allow skipping an empty section (controllertypes) in -i listing by providing support of multiple output lines based on one source line in the msg file using $\n as newline
git-svn-id: trunk@29097 -
2014-11-21 13:03:24 +00:00
Tomas Hajny
f7e6ea56d9 * support for machine-parseable output of information in fpc -i plus improvements in help (including previously missing information for some less used platforms
git-svn-id: trunk@29032 -
2014-11-09 14:55:31 +00:00
Tomas Hajny
2a0d760a3f * fixed typo (can not)
git-svn-id: trunk@29030 -
2014-11-08 21:03:22 +00:00
Jonas Maebe
839d11eac9 * mention that misplaced global directives are ignored (mantis #27004)
git-svn-id: trunk@28998 -
2014-11-06 09:02:40 +00:00
Károly Balogh
4431ba2c08 merged/updated AROS/i386 target to trunk from AROS branch, to support Marcus Sackrow's work on AROS support which will hopefully benefit all Amiga-like targets (classic, MorphOS) on the long run. Compiler only, RTL comes in the next run.
git-svn-id: trunk@28432 -
2014-08-17 18:18:07 +00:00
Jonas Maebe
c730e16031 * changed the syntax for block procvars from "xxx is block" to
"reference to ...; cdecl;". The "reference to ..." syntax is what Delphi
    uses for anonymous function references. The "cdecl;" indicates that this
    is for the C-variant of such references, which is what blocks are

git-svn-id: branches/blocks@28233 -
2014-07-18 09:15:29 +00:00
Tomas Hajny
109d890adf * added description for option @ and missing bracket at the end of list for -P
git-svn-id: trunk@28187 -
2014-07-08 22:33:00 +00:00
nickysn
7f9fa145e8 + added error message in case the HUGEPOINTERNORMALIZATION directive is used
with an invalid argument

git-svn-id: trunk@28152 -
2014-07-04 17:16:58 +00:00
nickysn
a3b48b79cb - rm the scan_w_hugepointernormalization_not_support message, replaced with
scanner_w_directive_ignored_on_target

git-svn-id: trunk@28150 -
2014-07-04 14:03:18 +00:00
svenbarth
30be5d8d33 As discussed on core enable the abstract class construction warning by default and also make it controllable with {$warn constructing_abstract ...}.
* scandir.pas, dir_warn: also adjust the message state for type_w_instance_abstract_class if the identifier is CONSTRUCTING_ABSTRACT
* msg/errore.msg: enable type_w_instance_abstract_class by default

* msgidx.inc, msgtxt.inc: updated

git-svn-id: trunk@28137 -
2014-07-02 19:40:22 +00:00
Jonas Maebe
43839d1bda * update of German error message files by Karl-Michael Schindler
(mantis #26282)

git-svn-id: trunk@28129 -
2014-07-02 17:17:38 +00:00
svenbarth
a7a9440692 Add a new warning message that is generated if an instance of an abstract class is created. This message is disabled by default, but can be switched on by using {$warn 4122 on} or {$warn 4122 error}.
Please note that this warning won't be triggered if an instance of that class is created using a class variable of that class type as the compiler can not know the type contained in the variable at compile time (see also the added test).

+ msg/errore.msg: added disabled message which informs about the instantiation of an abstract class
* pexpr.pas, do_member_read: generate the message if we have a constructor call for an abstract class using a loadvmtaddrnode (thus the type name is used and not a class variable)

* msg{idx,txt}.inc: updated

+ added test

git-svn-id: trunk@28127 -
2014-07-01 20:41:05 +00:00
nickysn
b3bb9df19f + added a $HUGEPOINTERNORMALIZATION switch
git-svn-id: trunk@28088 -
2014-06-27 13:56:12 +00:00
nickysn
8b7863d076 + added warning in case a far pointer is declared on a platform that does not
support them

git-svn-id: trunk@28084 -
2014-06-27 09:26:08 +00:00
nickysn
140ce2a880 + added the compact and large memory models to the compiler command line option
help screen

git-svn-id: trunk@28082 -
2014-06-26 22:56:55 +00:00
nickysn
ce87e72721 * show an error if the user attempts to create a dos .com file in an i8086
memory model other than tiny

git-svn-id: trunk@28081 -
2014-06-26 22:52:57 +00:00
nickysn
db011dfb7a + added a warning if HeapMax<HeapMin is specified with the $M directive
git-svn-id: trunk@28042 -
2014-06-24 09:16:03 +00:00
Jonas Maebe
2df1d5ec58 * don't allow default parameter values for parameter types that don't accept
constant values (i.e., anything non-value/const/constref) (mantis #263363)
   o fixed default parameter value for var-parameter in chmreader

git-svn-id: trunk@28016 -
2014-06-20 19:50:20 +00:00
nickysn
82eb84ddff + added warning in case of an $M directive with an invalid stack size specified
git-svn-id: trunk@27964 -
2014-06-15 10:14:56 +00:00
sergei
3c1368903f * Updated header: this file is in cp866 encoding.
git-svn-id: trunk@27819 -
2014-05-27 22:45:04 +00:00
nickysn
ce0bd81273 + show an error message 'procedure must be far' if an attempt is made to convert
a near proc to a procvar in a i8086 far code memory model

git-svn-id: trunk@27567 -
2014-04-13 19:29:28 +00:00
florian
d88d644925 + support for FMA intrinsic: if there is no hardware support, the compiler throws an error.
Currently it is implemented only for x86-CPUs supporting the FMA extension. While it would
  be possible to implement it in software or simulate fma(<single>,<single>,<single>) using
  double operations, it makes no sense in my opinion to do so.

git-svn-id: trunk@27564 -
2014-04-13 19:21:54 +00:00
Jonas Maebe
d9dab6f2f1 * changed the severity of messages showing overloaded routines with all
parameters from hint to error in case they give more information
    about definition errors

git-svn-id: trunk@27521 -
2014-04-10 21:07:17 +00:00
Jonas Maebe
4a0528399e * check all overloaded routines for mangled name conflicts on the JVM
platform, as different Pascal declarations are mapped to the same
    JVM representation

git-svn-id: trunk@27520 -
2014-04-10 21:07:14 +00:00
pierre
ca156aa64a Force external linker for nasm smartlinking
git-svn-id: trunk@27512 -
2014-04-10 15:02:04 +00:00
Jonas Maebe
9420a5d7a7 * also check for targets not supporting -gc/checkpointer functionality in
compiler directives, not just on the command line (mantis #25862)

git-svn-id: trunk@27128 -
2014-03-13 20:42:18 +00:00
florian
6697939903 * replaced some aren't, weren't, can't by are not, were not, cannot
git-svn-id: trunk@26842 -
2014-02-22 16:07:27 +00:00
florian
76b2074e59 * updated year in logo from 2013 to 2014
git-svn-id: trunk@26841 -
2014-02-22 15:58:03 +00:00
sergei
e1cf19d05d + Require -d and -u command line options to have an argument, Mantis #25082.
+ Check that argument of -d and -u is a Pascal identifier, Mantis #17056.

git-svn-id: trunk@26755 -
2014-02-12 04:44:35 +00:00
pierre
b4d0cf5593 * Add different message for static libraary not supported
git-svn-id: trunk@26596 -
2014-01-27 22:26:29 +00:00
pierre
af83a74544 Add -h output for new assemblers
git-svn-id: trunk@26551 -
2014-01-21 09:00:53 +00:00
pierre
e44dc53083 Add help output for new -ao option to set asmextraopt
git-svn-id: trunk@26543 -
2014-01-21 00:20:23 +00:00
paul
79ef05407a compiler: fix error message (was error message about resourcestring for property)
git-svn-id: trunk@26389 -
2014-01-05 07:12:41 +00:00
paul
52d1cbc544 compiler:
+ add -FM command line option to pass directory for unicode binary files
  + enable dynamic loading of charset files (don't disable runtime charset files for the moment)

git-svn-id: trunk@26378 -
2014-01-04 15:44:18 +00:00
paul
1c578de28c compiler:
* don't allow to apply the same hint directive twice
  * change parser_e_proc_dir_not_allowed to more generic variant parser_e_dir_not_allowed - they are similar and 'procedure' prefix does not give more information about the error.
  * maybe_parse_hint_directives() uses procdef settings for initial values
  + add tests

git-svn-id: trunk@25720 -
2013-10-08 04:56:42 +00:00
nickysn
4d6a9137cf + added the new -CTcld option to the help screen
git-svn-id: trunk@25597 -
2013-09-28 16:05:01 +00:00
nickysn
912299e9e7 + documented the new options -Wtexe and -Wtcom in the fpc help
git-svn-id: trunk@25530 -
2013-09-21 17:17:50 +00:00
florian
02e054a09e + fpc -i now writes also the available inline assembler input modes
git-svn-id: trunk@25482 -
2013-09-13 19:10:59 +00:00
paul
8d526e9b07 compiler: add a check for srsym <> nil since try_consume_unitsym may change srsym to nil, better error message
git-svn-id: trunk@25423 -
2013-09-05 08:39:10 +00:00
Jonas Maebe
a14ceba791 + -CTinitlocals switch for the JVM that initialises all local variables
that may trigger JVM bytecode verification errors if they are used
    before they are initialised (this includes passing them as a "var"
    parameter) + test
  * sorted -CT parameters alphabetically and alligned them

git-svn-id: trunk@25387 -
2013-08-29 22:21:23 +00:00
Jonas Maebe
6013606a97 + -CTlowercaseprocstart switch to lowercase the first character of routines
so that code written according to Delphi coding standards can be compiled
    into JVM bytecode with routine names conforming to JVM coding standards

git-svn-id: trunk@25385 -
2013-08-29 22:21:15 +00:00
florian
f58d1461c3 * fixed help page for -C3 as mentioned by Dmitry Boyarintsev on the mailing list
git-svn-id: trunk@25375 -
2013-08-26 20:48:49 +00:00
florian
d4968e054b + arm: tsettings.instructionset
* the selected instruction set is now independent from the cpu type: e.g. armv7-a can perfectly execute thumb(2) code

git-svn-id: trunk@25370 -
2013-08-25 21:56:12 +00:00
nickysn
243e3bbb77 + added i8086 memory model flags to the ppu flags and added a check that prevents the using of units compiled for different memory models
git-svn-id: trunk@25365 -
2013-08-25 16:45:04 +00:00
florian
9c1a4e2217 o error message file update by Karl-Michael Schindler:
* updated german ones
  * small mistake in english one corrected

git-svn-id: trunk@24915 -
2013-06-18 18:31:24 +00:00
florian
37df6f6455 * nostackframe now results in an error if used on pascal subroutines
git-svn-id: trunk@24910 -
2013-06-16 18:59:03 +00:00
svenbarth
b6bfa864d4 Disallow the usage of the inline assembler inside generics, because there are currently two problems:
1. At least on x86 the assembler reader initializes the parameter location informations which results in InternalError 200301231
2. Assembler tokens are not stored in the token stream and thus won't be reproduced during specialization

x86/rax86int.pas, tx86intreader.Assemble:
  * check for "parse_generic" before calling generate_parameter_info
pstatmnt.pas, assembler_block & statement:
  * generate an error message if an asm statement should be parsed inside a generic

+ added test

git-svn-id: trunk@24892 -
2013-06-13 19:42:49 +00:00
svenbarth
2e186a91fa Add support for integer constants to SetPEFlags and SetPEOptFlags. This is Delphi compatible.
scandir.pas:
  + add function "get_peflag_const" to retrieve the value of a constant
  * dir_setpeflags & dir_setpeoptflags: first check for an identifier (value is retrieved through "get_peflag_const") and then read a value

+ added messages for illegal parameters for SetPEFlags and SetPEOptFlags respectively
+ added tests

git-svn-id: trunk@24887 -
2013-06-13 10:51:42 +00:00
nickysn
fa9c26f76f + medium memory model added to the compiler help messages
git-svn-id: trunk@24867 -
2013-06-10 21:04:54 +00:00
nickysn
b409d600ee + implemented the tiny memory model for i8086-msdos; we now produce working dos .com files as well
git-svn-id: trunk@24793 -
2013-06-02 23:02:10 +00:00
Jonas Maebe
262593c571 * "can not" -> "cannot"
git-svn-id: trunk@24012 -
2013-03-26 18:35:38 +00:00
florian
79d5d83f6c * fixed lazy english
git-svn-id: trunk@23975 -
2013-03-23 19:29:30 +00:00
svenbarth
376bd046aa Don't allow "static" for class operators or normal methods (except in objects).
pdecsub.pas, pd_static:
  * check whether the given pd is an operator or a class method not inside an Object and generate an error if either of these is true
msg/errore.msg, msgidx.inc, msgtxt.inc:
  * add a message to inform that a certain procedure directive is not allowed

+ added tests

git-svn-id: trunk@23944 -
2013-03-20 10:46:55 +00:00
florian
7511968f2b + warn if one of the linux libc startup code files is not found
git-svn-id: trunk@23892 -
2013-03-17 14:51:19 +00:00
florian
3b7a9543c6 * updates of german message files by Karl-Michael Schindler
git-svn-id: trunk@23619 -
2013-02-14 18:54:26 +00:00
svenbarth
489e038379 Disallow "protected" and "strict protected" in extended records (Delphi compatible).
ptype.pas, parse_record_members:
  * write an error message if "protected" or "strict protected" is encountered
msg/errore.msg:
  + add an error message for disallowed "things" in records

+ added test
* adjusted test (note: according to the bug report this test did not originally have the "protected" section, but it was added by Paul before commiting)

git-svn-id: trunk@23596 -
2013-02-11 18:46:47 +00:00
svenbarth
344571cb4e Added support for type helpers. In non Delphi modes they use "type helper" and in mode Delphi they use "record helper". They can also be used on constants.
symconst.pas:
  + extend "thelpertype" by "ht_type" which tells the code in "pdecobj.parse_extended_type" that a type helper declaration has been parsed
node.pas:
  + add a constant which identifies all constant node types
ptype.pas:
  + read_named_type: add a parameter "hadtypetoken" to tell the code whether a "type" token had been parsed before
  + read_named_type: if an identifier "helper" is parsed we need to check whether "hadtypetoken" is true and the modeswitch "m_class" is set, but the "m_delphi" one is not; in that case we have a "type helper" declaration
pgenutil.pas, generate_specialization:
  * adjust call to read_named_type
pdecl.pas, types_dec:
  * adjust call to read_named_type

pdecobj.pas:
  * parse_extended_type: extend for correct handling of primitive types (includes Delphi compatible handling as well) and reject types that are explicitly not allowed
  * method_dec: require "static" for class methods in type helpers
  * method_doc: allow constructors for type helpers as well
paramgr.pas, tparamanager:
  * set_common_funcretloc_info: handle type helper constructors like record constructors
  * handle_common_ret_in_param: the "self" value of a type helper constructor is also returned in a parameter
pexpr.pas:
  + add a function to postfixoperators which tries to find and apply a type helper for a given type
  * postfixoperators: try to apply type helpers for ordinal constants
  * postfixoperators: use the correct string type for string constants
  * postfixoperators: try to apply type helpers for enum constants
  * postfixoperators: try to apply type helpers for arrays
  * postfixoperators: try to apply type helpers for Variant
  * postfixoperators: try to apply type helpers for pointer types
  * postfixoperators: try to apply type helpers for other types
  * factor: check postfixoperators after _REALNUMBER, _CCHAR, _CWCHAR, _TRUE and _FALSE
  * factor: also check postfixoperators if a _POINT follows a _NIL

symdef.pas, tdefawaresymtablestack.addhelpers:
  * use "generate_objectpascal_helper_key" to generate the key
symtable.pas:
  + add function to generate the key value for the map of extended types using the extended def
  * adjust "search_last_objectpascal_helper" and "search_objectpascal_helper" to handle primitive types as well
  * use the new "generate_objectpascal_helper_key" function to generate the key

pparautl.pas:
  * insert_self_and_vmt_para: don't insert the $vmt symbol for record or type helpers (ToDo: check whether class helpers really need the symbol as well)
  * insert_self_and_vmt_para: pass "self" as var parameter for type helpers as well
psub.pas, generate_bodyentry_block: 
  * also allow type helpers for constructor methods
ncal.pas, tcallnode.gen_self_tree:
  * also use a temp variable for type helper constructors
ncgcal.pas, tcgcallnode.secondcallparan:
  * allow Pointers to be passed as address param if it is the Self value of a type helper extending a pointer type
  * correctly handle the location in case of type helper constructors

+ add tests

git-svn-id: trunk@23580 -
2013-02-06 09:49:35 +00:00
Jonas Maebe
f1ff92529b * group all -CT parameters together
git-svn-id: trunk@23578 -
2013-02-05 23:09:55 +00:00
Jonas Maebe
39e31337f1 * documented -CTthumbinterworking parameter
git-svn-id: trunk@23577 -
2013-02-05 23:09:48 +00:00
florian
3ca7a5ff8e - remove switch -Wx for arm thumb interworking, one should use -CTHUMBTINTERWORKING=ON instead
git-svn-id: trunk@23572 -
2013-02-04 21:46:27 +00:00
florian
cbf7eaaffc * copyright year updated
git-svn-id: trunk@23571 -
2013-02-04 21:33:23 +00:00
florian
d0cbcd419e * update of the German compiler message file by Karl-Michael Schindler, resolves #23728
git-svn-id: trunk@23535 -
2013-01-29 18:34:12 +00:00
sergei
d762ef9e78 + PECOFF targets: support more than 65535 relocations per object section, resolves #23752. DJCOFF targets: give a fatal error, since this object file format does not support extended relocations.
git-svn-id: trunk@23521 -
2013-01-26 16:15:59 +00:00
florian
7184306a4c + option -Wx to generate thumb interworking safe code on arm
git-svn-id: trunk@23463 -
2013-01-20 15:26:59 +00:00
paul
1b8369dd99 compiler: don't allow parameterless constructors
git-svn-id: trunk@23436 -
2013-01-18 01:24:04 +00:00
paul
3a3c10a474 compiler: don't allow constants, methods, class members and properties for local or anonymous records (fixes bug #0023000)
git-svn-id: trunk@23421 -
2013-01-17 09:05:59 +00:00
florian
fce9e953b4 + nested exit support
git-svn-id: trunk@23309 -
2013-01-04 19:09:04 +00:00
Jonas Maebe
6ac8b4fbdf * give a proper error when an mmx/fpu/sse register is used inside a memory
reference (mantis #23441)

git-svn-id: trunk@23152 -
2012-12-15 22:47:16 +00:00
florian
db68214e88 + support setpeoptflags directive, resolves #23447
git-svn-id: trunk@23132 -
2012-12-10 19:17:25 +00:00
Jonas Maebe
2dac1c445a - disabled Stabs support on 64 bit targets (mantis #23365)
* show a warning if an unsupported debug format is selected

git-svn-id: trunk@23056 -
2012-11-24 13:15:58 +00:00
florian
f6109d7c65 * improved error reporting by printing the type being found in with expressions
git-svn-id: trunk@23019 -
2012-11-18 17:09:36 +00:00
Jonas Maebe
cb41d6355c * clarified -Cb explanation (mantis #23308)
git-svn-id: trunk@22982 -
2012-11-12 10:34:00 +00:00
Jonas Maebe
4aa05f5133 + support for automatically generating setters/getters for properties on the
JVM target, since Java bytecode itself has no support for properties and
    hence exposing properties to external Java code can only be done through
    getters/setters. Use the new parameters to do so:
      -CTautogetterprefix=XXX
      -CTautosetterprefix=YYY
    The getter/setter will get the same visibility as the property. If a
    getter/setter with the same naming convention was already specified for a
    property and this getter/setter is declared in the same class as the
    property, then the visibility of this existing getter/setter is
    modified and no new routine is generated.

    Newly generated getters/setters are virtual methods, because that is
    the only way in Java bytecode to allow redefining these getters/setters
    in child classes. However, that also means that using these switches can
    change the behvaviour of code, since normally the used property definition
    is only determined by the declared type of its associated class instance,
    and not by the actual instance type. The compiler will therefore warn when
    such an automatically generated getter/setter is overridden by another
    automatically generated getter/setter in a child class.

git-svn-id: trunk@22959 -
2012-11-08 20:18:08 +00:00
joost
55d03b775e * Within the LaTeX help-text, underscores have to be escaped.
git-svn-id: trunk@22920 -
2012-11-03 17:07:59 +00:00
svenbarth
8a631e9ba8 msg/errore.msg:
added "NativeNT" to target list for i386

git-svn-id: trunk@22882 -
2012-10-30 13:30:53 +00:00
florian
a499a30ca9 * fixes to avx support by Torsten Grundke
git-svn-id: trunk@22773 -
2012-10-19 16:45:53 +00:00
pierre
01c8ac4b3e Fix wrong arg number in pareser_e_nostackframe_with_locals
git-svn-id: trunk@22687 -
2012-10-17 10:52:12 +00:00
pierre
be5839e44a Add warning/error message about possible problems with nostackframe modifier
git-svn-id: trunk@22677 -
2012-10-16 22:42:28 +00:00
florian
283ff05127 * merged avx support in inline assembler developed by Torsten Grundke
git-svn-id: trunk@22568 -
2012-10-06 19:47:18 +00:00
Jonas Maebe
81b50af768 * fixed typo (overring -> overriding)
git-svn-id: trunk@22564 -
2012-10-06 16:22:31 +00:00
Jonas Maebe
eeda54b7eb * fixed copy-paste error in -O4 description
git-svn-id: trunk@22253 -
2012-08-26 21:04:40 +00:00
Jonas Maebe
4d0e4e1b56 * treat "[var + rip]" in intel assembler mode as addr_pic_no_got on x86-64
(mantis #22665)
  + support "[var wrt ..gotpcrel]" nasm/yasm syntax in intel assembler mode
    for GOT-relative accesses on x86-64, + give an error when trying to do
    this on win64 (it doesn't have a GOT)
  * moved code that give a warning when using GOT-relative accesses to
    static data on x86-64 from the AT&T reader to rax86 so it's also
    active for the Intel assembler reader
  + added warning when not using GOT-relative accesses (but plain
    RIP-relative instead) to global data on non-Win64 x86-64

git-svn-id: trunk@22243 -
2012-08-25 15:12:49 +00:00
Jonas Maebe
288d1ec74a * support referencing "result" in nostackframe pure assembler routines if
the result location is a simple location (a single register/reference)
    (mantis #22490)
  * print an error when accessing "result" in a nostack pure assembler routine
    if the result location is not simple

git-svn-id: trunk@22166 -
2012-08-21 19:51:40 +00:00
florian
4d86d25c6c * -O4 switch for optimizations which are correct but which might have unexpected effects
like field reordering (possible problems cracker classes) or using ebp as normal register (broken
      stack traces from dump_stack)
    + niln is also valid in a cse domain
    * parameters passed by reference shall have a complexity >1
    * load nodes from outer scopes shall have a complexity >1
    * better cse debugging
    + more node types added to cse
    * consider parameters passed by reference in cse
    * take care of cse in parameters in simple cases

git-svn-id: trunk@22050 -
2012-08-09 18:58:54 +00:00
florian
fb7f25f410 * removed wrong -N switch (switch is not used) description
git-svn-id: trunk@22037 -
2012-08-08 17:02:05 +00:00
Jonas Maebe
aad3ce960a * give an error when trying to give a parameter of a non-simple type a
default value (mantis #22343)
  * give an error when specifying an invalid default value (e.g. a
    floating point number for a longint parameter)

git-svn-id: trunk@22021 -
2012-08-06 20:13:20 +00:00
sergei
684bf4fba2 + Reject object types without VMT as arguments of typeof(). Without this check, an undefined reference to VMT is generated which fails at the linking stage.
git-svn-id: trunk@21923 -
2012-07-17 05:46:55 +00:00
Jonas Maebe
c2be657671 * give an error instead of a note on the JVM target when overriding a
method by one with a lower visibility, because calling the overriding
    method results in a java.lang.AbstractMethodError in that case

git-svn-id: trunk@21839 -
2012-07-10 09:20:11 +00:00
Jonas Maebe
b0462d27cc * by default, no longer initialize enumeration fields of classes/objects
with the enum instance corresponding to ordinal 0 in JVM constructors,
    because a virtual method called by a parent constructor may already
    have assigned a different value (see tests/test/jvm/tenum2.pp). This
    will result in null pointer exceptions when using such fields without
    first explicitly assigning a value to them though.

    The old behaviour can be restored with the new -CTenumfieldinit command
    line parameter

git-svn-id: trunk@21736 -
2012-06-29 21:24:35 +00:00
Jonas Maebe
9f0fb9cf10 - removed "<<<<<<< HEAD" leftover from a conflicting merge
git-svn-id: trunk@21409 -
2012-05-28 12:08:14 +00:00
florian
6c8eed21c4 + implement auto inlining (-Ooautoinline)
+ implement trashing of local variables if subroutine is inlined
* fix some errors releated to interproc. gotos and inlining
+ node_count function
* inline cannot be used with iochecking and safecall calling conventions
* track inherited usage
* don't inline if inherited is used

git-svn-id: trunk@21335 -
2012-05-19 13:30:02 +00:00
Jonas Maebe
958600e74b * by default disable the warning about interfaces raising a particular
method's visibility, because this is common practice in Object-Pascal.
    It can be re-enabled with {$warn INTF_RAISE_VISIBILITY on} (mainly
    useful when trying to keep code compatible with the JVM target)

git-svn-id: trunk@21329 -
2012-05-19 10:19:49 +00:00
paul
d79eee8ed1 compiler: write a warning if unit should be compiled with built-in system codepage for ansistring constants but this codepage is not known by the compiler
git-svn-id: trunk@21269 -
2012-05-10 01:24:18 +00:00
Jonas Maebe
64f3ba3299 * clarified description of -Xd, it is not always required for
cross-compiling (mantis #21963)

git-svn-id: trunk@21248 -
2012-05-06 15:44:52 +00:00
Jonas Maebe
834026bfb5 * synchronised with trunk up to r21067
git-svn-id: branches/jvmbackend@21068 -
2012-04-26 21:24:20 +00:00
Jonas Maebe
3380b58695 * when we get near the limit of the maximum number of TOC entries that can
be generated for a single object file on AIX, automatically switch to
    an indirection scheme that uses much less TOC entries, but is slower to
    access global variables
  * manually merged infrastructure for target-specific code generation
    switches from JVM branch (-CTxxx switches)
  * -CTsmalltoc switch for AIX that forces the indirection scheme for TOC
    entries from the start in case the automatic one does not conserve
    a sufficient amount (or in case you bump up against the global TOC
    entries limit during linking)

git-svn-id: trunk@20963 -
2012-04-21 20:17:46 +00:00
Jonas Maebe
aee5380ae0 * merged trunk up to r20882
o support for the new codepage-aware ansistrings in the jvm branch
   o empty ansistrings are now always represented by a nil pointer rather than
     by an empty string, because an empty string also has a code page which
     can confuse code (although this will make ansistrings harder to use
     in Java code)
   o more string helpers code shared between the general and jvm rtl
   o support for indexbyte/word in the jvm rtl (warning: first parameter
     is an open array rather than an untyped parameter there, so
     indexchar(pcharvar^,10,0) will be equivalent to
     indexchar[pcharvar^],10,0) there, which is different from what is
     intended; changing it to an untyped parameter wouldn't help though)
   o default() support is not yet complete
   o calling fpcres is currently broken due to limitations in
     sysutils.executeprocess() regarding handling unix quoting and
     the compiler using the same command lines for scripts and directly
     calling external programs
   o compiling the Java compiler currently requires adding ALLOW_WARNINGS=1
     to the make command line

git-svn-id: branches/jvmbackend@20887 -
2012-04-15 15:54:10 +00:00
Jonas Maebe
7aa3b99fb5 + -CN/{$CHECKLOWADDRLOADS+/-} switch to enable explicit checks for accesses
to low addresses in case the target cpu/OS does not support this (enabled
    for reads on AIX/PPC because on AIX the first 16KB are readable)

git-svn-id: trunk@20832 -
2012-04-11 18:05:50 +00:00
Tomas Hajny
b11a2b169a * fixed inconsistent license files references
git-svn-id: trunk@20763 -
2012-04-08 20:00:45 +00:00
Tomas Hajny
a5a7c2aa3e * directions for reporting bugs are different from those for asking questions nowadays
git-svn-id: trunk@20747 -
2012-04-07 16:43:15 +00:00
Tomas Hajny
20ebbefc2b * e-mail address for reporting bugs is not valid since long time ago
git-svn-id: trunk@20746 -
2012-04-07 16:31:08 +00:00
Tomas Hajny
b12c38984b * fpc binary supported options made localizable and not shown separately from those handled by ppc* any longer
git-svn-id: trunk@20694 -
2012-04-02 22:11:21 +00:00
Jonas Maebe
6ba8dc7146 + support for the ARM hard float EABI on Linux (patch by Peter Green):
o new eabihf (hard float) abi
   o vfpv3_d16 variant of VFP (default variant used by EABI assemblers: VFPv3
     with only 16 double registers instead of 32) and pass it to GNU as
   o make the odd numbered single precision floating point VFP registers
     available for explicit allocation for use by the calling convention
  * fixed copy/paste error in stdname of S30 register
  -> use -dFPC_ARMHF to create an ARM eabi hard float compiler
  (mantis #21554)

git-svn-id: trunk@20660 -
2012-03-29 20:50:09 +00:00
svenbarth
c9ca2a6c0c Correct messages that should not have been changed (merge during update gone wrong). Resolves Mantis #21553
git-svn-id: trunk@20631 -
2012-03-25 19:33:26 +00:00
svenbarth
bd19a16be9 Add support for Default() intrinsic. For now this is only (fully) supported
in code and not in constants. In the case of primitive types constant nodes
are used while complex types like arrays, records and objects use a local
variable which is initialized to zero once at the entry of the method (the
variable is reused if Default() is used for the same type multiple times in
the same method). For this a new compilerproc was added which uses FillChar
to initialize the given memory area to zero.
This fixes Mantis #9420.

+ psystem.pas: Added Default symbol to system unit
+ htypechk.pas: Added function "is_valid_for_default" which checks recursively
                whether the given type can be used with Default at all. 
                Forbidden types are files, helpers, ObjC and C++ types. This
                check is used for records, arrays and objects only if the mode
                is a non-Delphi one, as Delphi ignores these types on lower
                levels.
+ msg/errore.msg: Added error message for unsupported types for Default()
+ symconst.pas: Added a new enum value vo_is_default_var which is used for the
                local variables utilized by Default() so their initalization
                and finalization can be avoided.
+ pexpr.pas: Add handling of Default() intrinsic to "statement_syssym"
+ ninl.pas: Extended tinlinenode by a method which returns the correct node for
            a Default() and used that method in handle_typecheck.
* ncgutil.pas: Check for new flag "vo_is_default_var" when initializing and
               finalizing local variables.
* ppu.pas: increase PPU version
+ psub.pas: 
  * Added a new routine which zeros defaultvars of a symtable.
  * Use this routine inside "initializevars".
  * Also use this routine to initialize the staticsymtable of the unit/program.
* Adjusted ppudump, because of the new enum value.
+ Added implementation of fpc_zeromem to system unit.
+ Added tests for Default()

git-svn-id: trunk@20629 -
2012-03-25 16:02:27 +00:00
florian
f4af507321 * inline is only a hint to the compiler which might be ignored so throw only a hint and not a warning if subroutine cannot be inlined
git-svn-id: trunk@20626 -
2012-03-25 14:19:45 +00:00
florian
0a118768c0 * updated copyright message to 2012
git-svn-id: trunk@20605 -
2012-03-23 18:38:05 +00:00
Jonas Maebe
3589f90cf8 * also show the valid bounds in most cases when signalling a range check
warning/error while evaluating constants (mantis #21299)

git-svn-id: trunk@20507 -
2012-03-10 21:53:36 +00:00
Jonas Maebe
eb2cccffda + -WM<X> and -WP<x> command line parameters to specify the minimally required
Mac OS X/iOS version for the compiler code
   o such a parameter is not passed, extract the information from the
     environment variables MACOSX_DEPLOYMENT_TARGET/IPHONEOS_DEPLOYMENT_TARGET,
     like gcc
   o if neither the parameter nor the environment variable is used, use preset
     default values
   o pass on this version setting on to the Darwin linker
   o use this setting to determine which version of the startup code (crt1.o
     etc) to use, if any (based on information gathered from the GCC sources)
   o define a symbol called MAC_OS_X_VERSION_MIN_REQUIRED/
     IPHONE_OS_VERSION_MIN_REQUIRED based on this parameter
   o for usage information, see
     http://wiki.freepascal.org/FPC_New_Features_Trunk#Support_for_specifying_and_querying_the_deployment_version

git-svn-id: trunk@20503 -
2012-03-10 19:31:57 +00:00
Jonas Maebe
a6a43c71ec * give an error message when including a file starting with an UTF-8 BOM
in a compilation module parsed using a different code page, because this
    changes the default ansistring type and {$codepage xxx} is also not
    allowed in the middle of a unit (mantis #21445)

git-svn-id: trunk@20488 -
2012-03-09 22:50:14 +00:00
Tomas Hajny
f1b81f12b5 * indicate -an being only useful with -dEXTDEBUG
git-svn-id: trunk@20433 -
2012-02-26 20:49:45 +00:00
florian
96e8e89e16 * write error code if an object file cannot be created
git-svn-id: trunk@20083 -
2012-01-15 10:59:10 +00:00
florian
ea8ae7c867 * update of Portuguese compiler message file by Marcelo B Paula, resolves #20963
git-svn-id: trunk@19898 -
2011-12-28 17:44:46 +00:00
marco
28c27c409e * fixed up messages compilation after last commit.
git-svn-id: trunk@19780 -
2011-12-08 20:49:18 +00:00
paul
031eb4d51c compiler: fix 'class class' message
git-svn-id: trunk@19682 -
2011-11-25 08:34:24 +00:00
pierre
8f7ea8718b + Add message for TExternalLinker.CatFileContent method
git-svn-id: trunk@19646 -
2011-11-18 21:28:46 +00:00
Jonas Maebe
74510f9069 + generic infrastructure for target-specific switches
+ -CTcompactintarrayinit command line option to change the code generation
    for typed array of some kind of integer-type initialization so that it
    takes up less space in the bytecode (because the bytecode for all
    routines, including the class initialization code that contains the
    typed constant init code, is limited 64kb, large array or multiple
    array constants could fairly easily bump into that limit)

git-svn-id: branches/jvmbackend@19638 -
2011-11-14 22:57:41 +00:00
paul
26f66897cd compiler:
- warn if compiler finds implicit or explicit string type conversion from a form of ansi string to a form of unicode string and vice versa
  - mark explicit warnings as OFF by default
  - warn if compiler finds an assignment of an unicode char const to ansi string or char type (warn for assignment of unicode string const to be implemented)
  - revert a piece of code from r19457 regards shortstring handling because shortstring handling should not differ from ansistring in this paticular case

git-svn-id: trunk@19574 -
2011-11-03 00:39:22 +00:00
florian
6ec0f2549a * factored load node flags out of node flags to gain space
+ implemented iso mode mod, resolves #17685

git-svn-id: trunk@19558 -
2011-10-30 15:14:21 +00:00
sergei
6a3fe72de9 + Support .rva directive in AT&T reader. Put it into base class because it generally applies to all targets with COFF output, but enabled for Windows targets only (others need additional testing).
+ Support .seh_handlerdata directive in Win64.

git-svn-id: trunk@19546 -
2011-10-25 15:18:47 +00:00
sergei
85f7914906 * Don't generate .seh_endprologue if SEH directives are present in the text of (pure assembler) procedure, as it results in duplicate .seh_endprologue.
* Added checks for .seh_endprologue presence and correct position.

git-svn-id: trunk@19388 -
2011-10-06 03:29:35 +00:00
sergei
0db44ae108 + Support SEH directives in x86_64 AT&T asmreader.
git-svn-id: trunk@19366 -
2011-10-04 12:26:41 +00:00
Jonas Maebe
3b47c40ed2 * check whether methods that implement interface methods are public
or published, because interface methods are always public and
    hence mapping them to a private/protected method increases the
    visibility of the underlying method (error on JVM target because
    the JVM doesn't like that, warning on other platforms)

git-svn-id: branches/jvmbackend@19156 -
2011-09-19 21:22:44 +00:00
Jonas Maebe
f96f5f9e94 + {$VARPARACOPYOUTCHECK+/-} / -Cv switch to enable checking
var-parameters on the JVM target for changes to the value passed
    as var-parameter during the function call (because they are handled
    via copy-in/copy-out, this may indicate unexpected bahviour later on).

    out-parameters are checked in the same way, except if the out-parameter
    is a local variable because then reading it before the call may result
    in a bytecode verification error (since the variable may not yet be
    initialized)

git-svn-id: branches/jvmbackend@19153 -
2011-09-19 19:59:26 +00:00
paul
8a4634a7b1 merge r13481 from cpstrnew branch by florian
+ support parsing of strings with code page specification
+ added encoding and elementsize field to ansi- and unicodestring records
+ some basic rtl support routines for encoding aware strings
+ DefaultSystemCodePage
+ DefaultUnicodeCodePage
+ ppu writing/loading of code page aware strings

git-svn-id: trunk@19080 -
2011-09-17 10:37:36 +00:00
pierre
a5d2840980 + Fix commit 19061, by restoring cs_link_smart code and disabling
cs_create_smart if using dwarf information and external assembler
   debug information as this is not compatible.
 * Added a different message for cs_create_smart.

git-svn-id: trunk@19065 -
2011-09-14 13:38:15 +00:00
pierre
5a671336c7 Fix go32v2 rtl compilation error and add warning for %es:Const
git-svn-id: trunk@19057 -
2011-09-13 16:20:12 +00:00
Jonas Maebe
633de3fe30 * give an error when calling a virtual constructor from another constructor
on the JVM target, because the generated code was invalid and I can't think
    of a generic way to solve it (see added comments in njvmcal.pas)

git-svn-id: branches/jvmbackend@19055 -
2011-09-12 18:08:46 +00:00
florian
1491d77c9d * avoid ugly space in compilation summary
git-svn-id: trunk@18865 -
2011-08-27 21:21:24 +00:00
Jonas Maebe
9aa40f5a08 * give a warning that packrecords settings are ignored when compiling for
managed VM targets

git-svn-id: branches/jvmbackend@18815 -
2011-08-23 15:26:14 +00:00
Jonas Maebe
28c20cfc5e * the default string type for the JVM target is no longer automatically
unicodestring = java.lang.String. The reason this was the default in
    the past is that this was the first string type that was implemented,
    and without it being the default most code involving string operations
    would fail. Now the default strings types are the same as for other
    targets
  + new {$modeswitch unicodestrings} directive, that when activated
    *together* with {$h+},
   1) changes char into an alias for widechar
   2) changes string into an alias for unicodestring
   3) changes the preferred string evaluation type (in case of uncertainty)
      to unicodestring
    {$modeswitch unicodestrings} with {$h-} does not change anything at all
    regarding the string type (it still changes the char type)
  + new uuchar unit that redefines char as widechar, and which is automatically
    included by the compiler if {$modeswitch unicodestrings} is enabled

git-svn-id: branches/jvmbackend@18781 -
2011-08-20 08:35:47 +00:00
Jonas Maebe
d48fa1d7e2 * for all managed VM targets, reject ord->ptr typecasts (except for 0),
typeof(), typeinfo(), seg(), ofs(), settextbuf(), slice(), resourcestring,
    new(), dispose()

git-svn-id: branches/jvmbackend@18747 -
2011-08-20 08:32:21 +00:00
Jonas Maebe
7d8cbe80f5 + support for virtual class methods on the JVM platform. The JVM does not
support those natively, so they are emulated via the procvar infrastructure
    (and hence not very fast). Could probably be optimized somewhat by adding
    a cache (hashmap of procvars) to the class hierarchies, maybe in the
    future.

git-svn-id: branches/jvmbackend@18704 -
2011-08-20 08:26:11 +00:00
Jonas Maebe
10a7532968 * differentiate between typecasts on the assignment side or not, because we
cannot insert typecasting checks on the assignment side, only on the
    values that are being assigned
   o since valid_for_assignment() is called in tassignmentnode.typecheckpass()
     after typecheckpassing left and right, moved the conversion of the
     typecheck nodes into JVM-specific constructs from typecheckpass to
     pass_1, so that they can use the information whether they are on
     the assignment side or not
  * forbid casting a child type to a parent type on the assignment side on
    managed platforms, because that circumvents the type checking

git-svn-id: branches/jvmbackend@18515 -
2011-08-20 08:06:20 +00:00
Jonas Maebe
694ccf3df3 + dummy support for untyped var/const/out parameters on the JVM target
o includes basic "auto-boxing" infrastructure to support Delphi.NET-
     compatible untyped parameters as described at
     http://hallvards.blogspot.com/2007/10/dn4dp24-net-vs-win32-untyped-parameters.html

git-svn-id: branches/jvmbackend@18510 -
2011-08-20 08:05:54 +00:00
florian
da9d0d24e8 * update of german error message files by Karl-Michael Schindler, resolves #20021
git-svn-id: trunk@18457 -
2011-08-20 08:01:26 +00:00
Jonas Maebe
009a30d8cf * reworked saving/restoring the scanner state (immediately replace scanner
with temporary one when saving, since it's also freed when restoring ->
    called replace_scanner() instead of save_scanner() now)
  * when using -vd, print out the text that is internally generated for
    injecting into the scanner

git-svn-id: branches/jvmbackend@18442 -
2011-08-20 07:59:54 +00:00
Jonas Maebe
d47f26bbca * for now only auto-generate a parameterless constructor in case no
constructor is declared, rather than all constructors from the parent
    class (because it cannot be done via scanner-injection, since some
    parameter types of the parent constructors may not be visible in the
    current unit, and there is no full-blown tprocdef.getcopy yet nor
    a way to replace the type of the self-parameter afterwards)
  * added sanity checks when inserting the parameterless constructor
    (check for other identifiers called "create", and other parameterless
     methods)

git-svn-id: branches/jvmbackend@18432 -
2011-08-20 07:59:08 +00:00
Jonas Maebe
b6bae1e2e7 * do not automatically resolve constructor calls to constructors of parent
Java classes in case it is not declared in the specified Java class,
    because that will create an instance of such a parent class (in the
    future, we can may automatically clone inherited constructors)

git-svn-id: branches/jvmbackend@18425 -
2011-08-20 07:58:34 +00:00
Jonas Maebe
30a6290aac + support for formal constants (= not typed constants) in Java interfaces,
like in Java (mainly for header translations)

git-svn-id: branches/jvmbackend@18399 -
2011-08-20 07:56:24 +00:00
Jonas Maebe
37b5c061e3 + support for "final" fields in *external* (Java and other) classes, enabled
via {$modeswitch finalfields} (on by default on the JVM target). The
    meaning is the same as in Java: a final (class) field can only be set
    in a (class) constructor of the class it's defined in, and can only be
    written once there (and *must* be set there). They are currently only
    supported for external classes since that basically turns them into
    constants, since for non-external classes we need full dataflow analysis
  o refactored pdecobj.parse_object_members() a bit in the process to reduce
    the amount of repetition (which would have been further increased for
    the support for final fields)
  o made error message about "wrong use of absolute" for fields etc generic,
    so it gives a proper error depending on which token was used (it had
    to be made generic for "final" support, but already was used for other
    things that were wrongly reported as "absolute" misusages)

git-svn-id: branches/jvmbackend@18398 -
2011-08-20 07:56:18 +00:00
Jonas Maebe
e269f68359 * require that class methods are "static" for Java classes
git-svn-id: branches/jvmbackend@18345 -
2011-08-20 07:49:24 +00:00
Jonas Maebe
83dc297346 + Java interface support, mostly the same as Objective-C protocols
(generalised some error messages that were specific to protocols
     so they can also be used for Java interfaces)
  o note, Java interface support requires a fix to Jasmin 2.4:
    http://sourceforge.net/tracker/?func=detail&aid=2897170&group_id=100746&atid=628212

git-svn-id: branches/jvmbackend@18344 -
2011-08-20 07:49:19 +00:00
Jonas Maebe
6e82417a51 * various small support fixes for Java classes:
o support formal external definitions (like for objcclass)
   o allow specifying an "import_dll" for external Java classes, which can
     be used to specify the Java package name (like the dll for cppclass)
   o take the package name into account when mangling the Java class name
   o several messages that were specific to Objective-Pascal classes have
     been generalised because they also apply to Java classes, same for
     several compiler function names
   o disabled some proccall directives for Java, but more needs to happen
     (Java methods are always either instance-virtual or class-static)

git-svn-id: branches/jvmbackend@18319 -
2011-08-20 07:38:26 +00:00
florian
c855c7a0aa * unified handling of comparison of constant and expression with disjunct ranges of values
* warn if such an expression is encountered
* don't optimize the expression if it has side effects, resolves #17838

git-svn-id: trunk@18275 -
2011-08-19 18:47:37 +00:00
florian
cf874a3465 * give a more understandable error message if a procedure "result" is tried to be a
ssigned, resolves #19122 (and breaks hopefully nothing procvar related)

git-svn-id: trunk@18267 -
2011-08-18 21:10:05 +00:00
sergei
bbae63a4f2 * Check that a single interface is only delegated to a single property within a class.
* Disallow simultaneous use of method resolution and delegation for the same interface. An interface with method resolution must be implemented directly. This is Delphi compatible and resolves #18058.

git-svn-id: trunk@18179 -
2011-08-12 14:42:30 +00:00
florian
562961fd42 * catch EOSError, EIOError and IOutOfMemory exceptions inside the compiler
so a proper error message is written (resolves #19871), 
  EOutOfMemory is not handle perfectly because it could be that the exception
  handling requires again a memory allocation

git-svn-id: trunk@18132 -
2011-08-07 09:18:07 +00:00
florian
57cdf34a6b * put -Wpxxxx switch on the help screen
git-svn-id: trunk@18012 -
2011-07-17 20:42:56 +00:00
pierre
bded762fef Add missing x86_64 -A options
git-svn-id: trunk@17930 -
2011-07-04 08:58:46 +00:00
pierre
f220513821 + Warning for possible library overloading
git-svn-id: trunk@17803 -
2011-06-23 08:28:49 +00:00
florian
4f18a59b87 * fixes errore.msg file errors, resolves #19541
git-svn-id: trunk@17722 -
2011-06-11 21:21:59 +00:00
florian
ebc7a10954 * synchronized -Wxxxxx handling in options.pas and help screen, resolves #19400
* limited -Wxxxxx options to the targets they apply to

git-svn-id: trunk@17664 -
2011-06-05 15:39:44 +00:00
florian
93e53e1990 * allow also smaller values for code alignment parameters than the current one, resolves #19463
* limit code alignment parameters to power of 2 up to 256
* give an error for an invalid code alignment directive

git-svn-id: trunk@17659 -
2011-06-04 20:56:15 +00:00
sergei
d908fb42f7 x86 assembler fixes:
* Factored repeating REX operations into a separate function.
* Fixed instruction matching bug which was preventing compilation of 3-operand SIMD instructions with RIP-relative operand + test.
* Do not adjust offset of RIP-relative reference if it is a literal number, this was causing 0x123(%rip) to assemble as 0x122(%rip) in 3-operand instructions. Now tasm2.pp is the same with and without -Aas. Also fixed the expected result, improved verbosity of diagnostic and removed %norun, so it is actually executed.
+ Disallow high-byte registers in instructions requiring REX + test.

git-svn-id: trunk@17478 -
2011-05-16 20:18:03 +00:00
florian
d0c6e23116 + -Sy on the command line is now equal to $T+, resolves #16160
git-svn-id: trunk@17477 -
2011-05-16 15:36:16 +00:00
paul
ab8db32e2e compiler: correct the last used number for parser messages
git-svn-id: trunk@17349 -
2011-04-20 02:34:09 +00:00
paul
f904f41664 compiler: don't allow local or anonymous records to have types (the second part of issue #0019099)
git-svn-id: trunk@17336 -
2011-04-18 06:10:56 +00:00
florian
d3e0105ba8 + Italian UTF-8 message file, contributed by Massimo Soricetti, resolves #19179
git-svn-id: trunk@17332 -
2011-04-16 20:41:59 +00:00
svenbarth
35b47e491c Rebase to revision 17306
git-svn-id: branches/svenbarth/classhelpers@17314 -
2011-04-13 10:04:14 +00:00
florian
c97869bd89 * merge user sections support branch
git-svn-id: trunk@17285 -
2011-04-10 18:08:59 +00:00
svenbarth
d0705a1779 Rebase to revision 17236
git-svn-id: branches/svenbarth/classhelpers@17241 -
2011-04-03 17:24:35 +00:00
svenbarth
a944be69a6 * nflw.pas: search for enumerators in helpers for records as well
* pdecobj.pas:
- parse_object_members: in record helpers class methods need to be declared as "static" like in records
- object_dec: 
 - allow "published" in helpers as well
 - disallow inheritance for record helpers in mode Delphi (and remove the forward declaration flag in that case)
* pdecsub.pas:
pd_abstract: "abstract" isn't allowed in either mode
* pexpr.pas: multiple corrections because of "inherited" and records
- allow "inherited" for "record helpers" (except for mode Delphi)
- load the symbol from the correct class (I hope...)
- give a more precise error message if "inherited" is used in records
* ptype.pas: I forgot to adjust the "(bit)packed record" case
* symtable.pas:
- searchsym_in_helper: "result" was not initialized (and identation fix)
- search_last_objectpascal_helper:
 - don't search if there are no helpers (useful for projects that does not contain helpers like the compiler itself)
 - don't search if the type to search helpers for is defined locally
 - don't search if the type is a anonymous record
- search_struct_member: search for symbols in helpers as well
- msg*: 
* correct the message for "parser_e_not_allowed_in_helper"
* add message "parser_e_inherited_not_in_record" which is used to tell that the use of "inherited" is not allowed in records and (in mode Delphi) record helpers

git-svn-id: branches/svenbarth/classhelpers@17239 -
2011-04-03 14:03:17 +00:00
florian
736071e716 * updated copyright to 2011
* corrected copyright notice in message files and added "and others"

git-svn-id: trunk@17232 -
2011-04-02 20:06:46 +00:00
florian
f328b6d635 + user section type
+ parsing of section directive for variables
  + section test
  + write section names in the assembler/binary writers correctly
  * allow section only after ; and for embedded targets

git-svn-id: branches/usersections@17154 -
2011-03-20 15:42:28 +00:00
svenbarth
f7f357f18e * symconst.pas:
- remove thelpersearch again => adjustments to searchsym_in_class and calls to it
- rename sto_has_classhelper to sto_has_helper
* symbase.pas: make push and pop in tsymtablestack virtual
* symdef.pas:
- add a new class tdefawaresymtablestack which overrides push and pop of tsymtablestack and adjusts the new extendeddefs field of the current tmodule
- tobjectdef.create: sto_has_classhelper => sto_has_helper
* fmodule.pas:
- add new hash object list to tmodule (key: mangled type name) which holds object list instances that contain all helpers currently active for a given type (= key of the hash list)
- tmodule.create: the hash list owns the sublists (but those don't own the defs)
- tmodule.destroy: free the hash list
* pdecobjpas:
- rename parse_extended_class to parse_extended_type
- parsing of constructors:
# for all helper types: no class constructors allowed
# for record helpers: as long as constructors for records themselves are disabled they are for record helpers as well
- object_dec: manually add the helper to the extendeddefs if the overall owner of the current def is a static symtable (implementation section or program/library main file), because the symtable won't be popped and pushed then
* parser.pas: instantiate the new stack class
* psub.pas: backup the extendeddefs in specialize_objectdefs as well
* ptype.pas:
- generate_specialization: backup the extendeddefs as well
- record_dec: _RECORD is now consumed in read_named_type itself
- read_named_type: parse "record helper" if advanced record syntax is enabled
* symtable.pas:
- correct searchsym_in_class declaration => adjustments in this unit as well
- add the possibility to pass a context def to search_last_objectpascal_helper
- rename search_objectpascal_class_helper to search_objectpascal_helper
- rename search_class_helper to search_objc_helper
- searchsym_in_class: 
# search for helpers in every level of the tree of the class
# the contextclassh can also be a subclass of the extendeddef
- searchsym_in_record: search for helper methods as well
- searchsym_in_helper:
# search for symbols in class and record helpers is the same except for the search in the class' ancestors
# search the extendeddef directly and rely on searchsym_in_class only for the class' ancestors as we need to find the helpers there as well
- search_last_objectpascal_helper: use the extendeddefs list of current_module instead of scanning the symbol stack itself
* pexpr.pas: adjustments because of renaming of sto_has_classhelper
* pinline.pas: adjustment because of removing of thelpersearch
* nflw.pas: 
- renamed classhelper to helperdef
- adjusted search_last_objectpascal_helper call
* msg*:
- adjusted error message for constructors in records (this currently applies to record helpers as well)
- renamed parser_e_not_allowed_in_classhelper to parser_e_not_allowed_in_helper => adjustments in code
- added parser_e_no_class_constructors_in_helpers
* pdecsub.pas: adjusted renamed error message
* htypechk.pas: check for helpers in every step of the hierarchy
* nobj.pas: search_class_helper => search_objc_helper
* utils/ppudump.pas: adjust, because of renames

Note: the define "useoldsearch" will be only used for performance comparison on my (faster) Linux machine; that (and its associated code) will be removed afterwards

git-svn-id: branches/svenbarth/classhelpers@17151 -
2011-03-20 11:27:27 +00:00
svenbarth
80e6498921 Rebase to revision 17096
git-svn-id: branches/svenbarth/classhelpers@17099 -
2011-03-09 16:29:47 +00:00
florian
f8b01f76a4 * update of german message files by Karl-Michael Schindler, resolves #18815
git-svn-id: trunk@16995 -
2011-02-24 12:48:40 +00:00
svenbarth
963a4d7b23 Commit of a completely restructured helper implementation. Instead of changing objectdefs with odt_classhelper to odt_class, they'll have the odt_helper type assigned to and this will be kept. This also implies that the parent of a helper is its true parent while the extended type is set to a field in tobjectdef (extendeddef).
This change became necessary of the following reasons:
- Records don't support inheritance, thus for "record helpers" some creativity would have been necessary to implement them; with the new implementation this is more easily
- the new approach allows for easy checks regarding virtual methods and their overrides which would have been more complicated in the old variant
- if someone feels the need the types of helpers (object, interface) can be added rather easily
- unnecessary things like VMT generation can be disabled now

details:
- msg*: 
* moved some messages from parser to type
* adjusted a message ("class helper" => "helper")
- symdef.pas:
* renamed "helperparent" to "extendeddef" and changed its type from "tobjectdef" to "tabstractrecorddef", so records can be extended as well (somewhen in the near future)
* removed "finish_class_helper" method as it isn't necessary (luckily I haven't yet adjusted the ObjC variant)
* changed name of "is_objectpascal_classhelper" to "is_objectpascal_helper" to reflect that this function applies to all helper types
* tobjectdef.create: ImplementedInterfaces isn't created for odt_helper anymore
* tobjectdef.alignment: for helpers it's the same as for classes although this shouldn't be used anywhere...
* tobjectdef.vmtmethodoffset: set to 0 for helpers to be sure...
* tobjectdef.needs_inittable: not needed for helpers (no fields allowed)
* is_objectpascal_helper: only needs check for "odt_helper" object type
- symconst.pas:
* changed odt_classhelper to more general odt_helper
* added new type "thelpertype" which is used to check that "(record|class) helper" corresponds with the given extended type (as Delphi XE checks this as well this strict solution can be kept for modes Delphi and ObjFPC)
- symtable.pas:
* extended "searchsym_in_class" with the possibility to disable the search for helper methods (needed for inherited) => this implies changing all occurences of "searchsym_in_class" with a "true" except some special locations
* renamed "search_objectpascal_classhelper" to "search_objectpascal_helper"
* searchsym_in_class: 
** when an extended method is defined with "overload" it can be that a same named method of the extended class might be called (sadly this means that this search was unnecessary...)
** contextclassh is the def of the helper in the case of an inherited call inside the helper's implementation
** when methods inside a helper are searched, it must be searched in the extended type first
- ptype.pas:
* single_type is used to parse the parent of a helper as well, so allow a helper if the stoParseClassParent is given (needs check in pdecobj.pas/parse_class_parents for normal classes)
* read_named_type: currently the only case when something <> ht_none is passed to the modified parse_objdec (see below) is when the combination "class helper" is encountered ("record helper" will be another one)
- pinline.pas: adjustment for extended "searchsym_in_class"
- pexpr.pas:
* adjustments regarding "searchsym_in_class" and "is_objectpascal_helper"
* factor/factor_read_id: moved the check for "TSomeClassType.SomeMethod" outside of the "is_class" check
* factor: 
** in case of an inherited we need to search inside the extended type first (Note: this needs to be extended to find methods in the helper parent if no method is found in the extended type)
** we also need to disable the search for helper methods when searching for an inherited method (Note: it might be better to introduce a enum to decide whether a helper method should search before or after the methods of the extended type or even never)
- pdecsub.pas:
* insert_self_and_vmt_para: in a helper the type of Self is of the extended type
* pd_abstract, pd_final: more nice error message
* pd_override, pd_message, pd_reintroduce: adjusted checks because now "is_class" is no longer true for helpers
* proc_direcdata: allowed "abstract" for helpers (only to produce a more nice error message)
* parse_proc_direc: adjustment because of "is_objectpascal_helper"
- pdecobj.pas:
* adjustments regarding "is_objectpascal_helper"
* adjusted object_dec to take the type of the helper (class, record) as a parameter to be able to check whether the correct extended type was given
* struct_property_dec: properties are allowed in helpers
* parse_object_options: nothing to be parsed for helpers (at least I hope so ^^)
* parse_parent_classes: 
** the parent of a helper is now parsed as a normal parent, the extended type is parsed in an extra procedure
** check for "sealed" no longer needed
** added check that the parsed parent of a helper is indeed a helper
** allow to parse the closing ")" of the helper's parent
* parse_extended_class:
** new procedure that parses the type which is extended
** it checks that the extended type is a class for "class helper" and a record for "record helper"
** it checks that a helper extends the same class or a subclass for class helpers
** it checks that a helper extends the same record for record helpers
* parse_object_members:
** "type", "const", "var" is allowed in helpers
** don't exclude flags regarding virtual methods, they are needed for the checks in mode Delphi (this implies that VMT loading must be disabled for helpers)
* object_dec:
** don't change "odt_helper" to "odt_class", but still include the "oo_is_classhelper" flag
** allow the parsing of object options (there are none)
** parse the extended type for helpers
- pdecl.pas
* adjustment because of extension of object_dec
* types_dec: remove the call to finish_classhelper
- objcdef.pas
* objcaddencodedtype, objcdochecktype: add references to helpers as implicit pointers although that should not be used in any way...
- nld.pas
* tloadnode.pass_typecheck: self is a reference to the extended type
- nflw.pas
* create_for_in_loop: adjustment because of changed procedure and inheritance type
- ncgrtti.pas
* TRTTIWriter.write_rtti_data: disable for helpers for now (I need to check what Delphi does here)
- ncgld.pas
* tcgloadnode.pass_generate_code: virtual methods of helpers are treated as normal methods
- ncgcal.pas
* tcgcallnode.pass_generate_code: virtual methods of helpers are treated as normal methods
- ncal.pas
* tcallnode.pass_typecheck: adjust for extension of tcallcandidates constructor
- htypechk.pas
* tcallcandidates declaration: extend some methods to (dis)allow the search for helper methods (needed for inherited)
* tcallcandidates.collect_overloads_in_struct: 
** search first in helpers for methods and stop if none carries the "overload" flag
** move the addition of the procsyms to an extra nested procedure because it's used for helper methods and normal struct methods

git-svn-id: branches/svenbarth/classhelpers@16947 -
2011-02-20 11:41:55 +00:00
svenbarth
7cc7826343 - msg*: found a message to reuse
- pdecobj.pas: removed a check whether a class (helper) tries to inherit from a class helper, because now single_type handles this
- pexpr.pas: 
* prohibit type casts to class helpers (note: this might be needed for ObjC categories as well)
* class helper references may only be used when inheriting from them (needs to be checked for ObjC categories as well)
- ptype.pas:
* single_type: extend check against categories for class helpers
* read_named_type: extend check against categories for class helpers
- symbase.pas: add a method that adds symbol table flags recursivly to a stack of symtables (it stops updating the symtables once a symtable already has that flag or it's a global-/staticsymtable)
- symdef.pas: adjusted the constructor of tobjectdef to use the new method for adding flags 

git-svn-id: branches/svenbarth/classhelpers@16889 -
2011-02-07 18:59:09 +00:00
svenbarth
07eebff55c Rebase to revision 16827
adjusted nflw.pas to compile again

git-svn-id: branches/svenbarth/classhelpers@16831 -
2011-01-28 22:15:34 +00:00
svenbarth
d4be11cb42 Implement advanced class helper syntax which allows "inheritance" of class helpers. This is not the same as normal class inheritance as its only used to extend the scope to other class helpers (that pseudo heritage line) when searching for a symbol. The real parent is always the extended class.
- compiler/symdef.pas: add "helperparent" which contains the class helper the current class helper "inherits" from (its real parent is the extended class); it's saved to ppu as well
- compiler/ppu.pas: increase ppu version
- compiler/pdecobj.pas: 
* parse the "parent" of a class helper before parsing the extended class (the real parent)
* also disallow to inherit from class helpers for normal class (and to extend class helpers for class helpers)
* disallow the declarations of fields
* disallow the use of destructors
* don't parse abstract/sealed for class helpers
- compiler/ptyp.pas: _FOR is now parsed inside pdecobj.pas
- compiler/msg*: 
* extended some messages for class helpers
* added some class helper related messages (perhaps the one or other will vanish again...)

git-svn-id: branches/svenbarth/classhelpers@16792 -
2011-01-19 19:39:47 +00:00
marco
88fe11958b * one letter type fixed, reported by Vincent
git-svn-id: trunk@16783 -
2011-01-19 11:37:17 +00:00
marco
ee3004a350 * moved an \end{description} so that the user manual compiles again.
git-svn-id: trunk@16782 -
2011-01-19 10:59:49 +00:00
paul
0c9b40acb7 compiler: record operators
- allow operator also if return type match the structure type (before at least one parameter had to match)
  - search both operands symbol tables for a suitable assignment operator
  - test
based on patch of Blaise Thorn (issue #0018490)

git-svn-id: trunk@16762 -
2011-01-14 02:25:48 +00:00
paul
368c215070 compiler: always derive DispInterface from IDispatch, this solve a problem with assigning dispinterface to IUnknown or IDispatch variables
git-svn-id: trunk@16756 -
2011-01-13 04:43:49 +00:00
paul
bd64575add compiler: require generic name with type parameters for the method class prefix (like TGenericClass<T>.MethodName instead of TGenericClass.MethodName) in delphi mode
git-svn-id: trunk@16707 -
2011-01-05 04:35:56 +00:00
Jonas Maebe
3ca3276400 * changed syntax of external objcclasses (see wiki/FPC_PasCocoa). Another
change is that it is now also allowed to specify an external name for
    formal external class definitions, but if they are later mixed with
    regular class definitions the external names have to match.
   o because the "external" status of methods is now set while parsing the
     class rather than afterwards, some procdir compatibility checks had to
     be inlined because they only have to be performed for 
  * also adapted the syntax for external cppclasses in the same way
  * fixed return type of NSObject.retainCount and NSObject.hash
    (NSUInteger instead of cint)
  * moved "patches" directory from cocoaint/src to cocoaint/utils/cocoa-skel
    so they are used by the conversion script when re-parsing the headers
  * updated Objective-C header parser script to
   o use the new external class syntax
   o not write inheritance information for root classes (NSObject, NSProxy)
   o use internal translation tables for some conflicting method names that
    are named specially in objcbase.pp
   and updated parsed headers
  * fixed rtl/inc/objcbase.pp and tests to conform to the new external class
    syntax

git-svn-id: trunk@16684 -
2011-01-02 14:50:46 +00:00
paul
79813da090 compiler: don't allow record case with parameterized members
git-svn-id: trunk@16682 -
2011-01-02 14:01:09 +00:00
paul
101f545ad0 compiler: don't allow generic object types (interfaces,dispinterfaces,objclasses,...) to have type,var,const sections if regular object types don't have them. currently only objects, classes and records are allowed to have nested type,var,const sections.
git-svn-id: trunk@16669 -
2010-12-31 02:31:51 +00:00
paul
51a9d3280c compiler: require at least one argument of class operator to be of type of structure where this operator is declared
git-svn-id: trunk@16644 -
2010-12-27 02:33:17 +00:00
paul
3c6fde4acc compiler: rename parser_e_constructors_always_objects message to parser_e_only_methods_allowed and extended the meaning it has, don't allow class constructors to be declared outside the class/record + test
git-svn-id: trunk@16626 -
2010-12-24 06:41:41 +00:00
Jonas Maebe
ce93333bda * fixed end of LaTeX environment after r16574 (mantis #18286)
git-svn-id: trunk@16610 -
2010-12-22 09:29:03 +00:00
paul
d1026bb052 compiler: reintegrate branch http://svn.freepascal.org/svn/fpc/branches/paul/extended_records
------------------------------------------------------------------------
r16513 compiler: add support for visibility blocks in records and type, const declarations:
  - add parse_record_members function to parse record blocks based on parse_object_members code
  - disable published section in records
  - rename in_class argument in some functions to in_structure because the same code can work for records now which are not classes
------------------------------------------------------------------------
r16514 compiler: check visibility of record members, allow access to record consts and types:
  - add searchsym_in_record function
  - change is_visible_for_object to accept tabstractrecorddef instead of tobjectdef arguments because records also have visibility sections now
  - change arguments in do_member_read, do_proc_call to tabstractrecorddef from tobjectdef to accept records
  - rename classh arguments to structh and change their type to tabstractrecorddef to show that they can accept records now too
  - move RttiName from tobjectdef to tabstractrecorddef
------------------------------------------------------------------------
r16515 compiler: add current_structdef: tabstractrecorddef and point current_objectdef to it
------------------------------------------------------------------------
r16516 compiler: allow access other record symbols than fields, first extended records tests
------------------------------------------------------------------------
r16519 compiler: 
  - move objname, objrealname fields from tobjectdef to tabstractrecorddef, 
  - load and save them from/to ppu file, 
  - use tabstarctrecorddef in some more places where previously code worked for tobjectdef
  - change push_nested_hierarchy, pop_nested_hierarchy to handle records too
------------------------------------------------------------------------
r16526 compiler: implement record methods and class methods:
  - rename tprocdef._class to tprocdef.struct and change the type from tobjectdef to tabstractrecorddef because methods can belong not to classes only now but to records too
  - replace in many places use of current_objectdef to current_structdef with typcast where is needed
  - add an argument to comp_expr, expr, factor, sub_expr to notify that we are searching type only symbol to solve the problem with records,objects,classes which contains fields with the same name as previosly declared type (like:
  HWND = type Handle;
  rec = record 
    hWnd: HWND;
  end;)
  - disable check in factor_read_id which was made for object that only static fields can be accessed as TObjectType.FieldName outside the object because it makes SizeOf(TObjectType.FieldName) imposible and since the same method was extended to handle records it also breaks a52 package compilation
  - rename tcallcandidates.collect_overloads_in_class to tcallcandidates.collect_overloads_in_struct and addapt the code to handle overloads in records too
  - fix searchsym_type to search also in object ancestors if we found an object symtable
  - add pd_record, pd_notrecord flags to mark procedure modifies which can or can't be used with records. Disallow the next modifiers for records: abstract, dynamic, export, external, far, far16, final, forward, internconst, internproc, interrupt, message, near, override, public, reintroduce, virtual, weakexternal,
Allow the next modifiers for records: static
------------------------------------------------------------------------
r16530 compiler: fix compilation problems caused by tprocdef._class -> tprocdef.struct rename which was found by make fullcycle
------------------------------------------------------------------------
r16531 compiler: redo searchsym_type:
  - remove complex condition which was used previosly to decide whether objectsymtable or recordsymtable requires a search for type or not - they require a search because contains types (although not all object types)
  - don't search only for typesym but for other symbols too - for example UnitSym.TypeSym or ConstSym..ConstSym are also valid types. Skip the next symtypes during the search because they can't be used in type declaration: fieldvarsym, paravarsym, propertysym, procsym, labelsym
------------------------------------------------------------------------
r16541 compiler: move objectoptions to tabstractrecorddef because it will be needed for records too
------------------------------------------------------------------------
r16542 compiler: remove unneeded checks and typecasting caused by move of objectoptions into tabstractrecorddef
------------------------------------------------------------------------
r16543 compiler: move constructor, destructor parsers to interface section to allow future use by records + change current_objectdef to current_structdef for the same reason, make constructor return type = record for records
r16544 compiler: start parsing of record constructors and destructors:
  - disallow record destructor
  - raise internal error for constructor because it is not yet implemented
  - handle class constructors and destructors for records
  - move find_procdef_bytype to tabstractpointerdef
------------------------------------------------------------------------
r16545 compiler: fix static fields creation and access for records
+ extend test to check class constructor/destructor for records and static fields access
------------------------------------------------------------------------
r16546 tests: add a test which checks that records destructors are not allowed
------------------------------------------------------------------------
r16547 compiler: rename aclass->astruct in read_property_dec because records will have properties too
------------------------------------------------------------------------
r16548 compiler: implement properties in records:
  - rename property_dec from pdecobj to struct_property_dec because pdecl also has property_dec and move it to interface to use by records + allow properties for records
  - use struct_property_dec in record parser
  - change structh type from objectdef to abstractrecorddef in read_property_dec to use by records
  - disallow stored and default modifiers for records because records are not used for streaming
  - fix misuse of search_sym_in_class for records in few places
------------------------------------------------------------------------
r16550 compiler: disallow regular class methods in records and allow only static class methods. delphi do so and it is logical because records have no inheritance. + tests
------------------------------------------------------------------------
r16560 compiler: a trial to implement record constructor
  - map self to constructor result
  - don't push vmt for records

At the moment generated assembler has errors although node tree is correct
------------------------------------------------------------------------
r16561 compiler: 
  - add mode switch extendedrecords to allow/disallow extended records syntax, add this mode switch to delphi mode by default
  - disable/enable extended records parsing based on extendedreocrds mode switch
------------------------------------------------------------------------
r16562 compiler: fix record constructor return type when parsing procedure declaration
------------------------------------------------------------------------
r16568 compiler: partly revert r16560 and disable (at least temporary) constructors in records
------------------------------------------------------------------------
r16569 test: add records Self test
------------------------------------------------------------------------
r16570 compiler: generate debug info for record methods:
  - extended write_symtable_procdefs to handle record definitions
  - fix stabs info generator to use prefixed symbol names for record methods, also handle records static symbols the same way as for object types
  - fix dwarf info record generation: add visibility info and write methods, also prefix record members the same way as object members

git-svn-id: trunk@16574 -
2010-12-17 02:19:09 +00:00
paul
742b0bb686 compiler: partly revert r16560 and disable (at least temporary) constructors in records
git-svn-id: branches/paul/extended_records@16568 -
2010-12-16 03:37:16 +00:00
paul
582ab2dd32 compiler: disallow regular class methods in records and allow only static class methods. delphi do so and it is logical because records have no inheritance. + tests
git-svn-id: branches/paul/extended_records@16550 -
2010-12-11 10:21:09 +00:00
paul
7852295f26 compiler: start parsing of record constructors and destructors:
- disallow record destructor
  - raise internal error for constructor because it is not yet implemented
  - handle class constructors and destructors for records
  - move find_procdef_bytype to tabstractpointerdef

git-svn-id: branches/paul/extended_records@16544 -
2010-12-11 07:31:27 +00:00
Jonas Maebe
3a089cea10 * give an error when trying to let an objcclass conform to a
forward-declared objcprotocol (mantis #17341)

git-svn-id: trunk@16523 -
2010-12-08 22:17:24 +00:00
paul
8e36256bc9 compiler: add support for visibility blocks in records and type, const declarations:
- add parse_record_members function to parse record blocks based on parse_object_members code
  - disable published section in records
  - rename in_class argument in some functions to in_structure because the same code can work for records now which are not classes

git-svn-id: branches/paul/extended_records@16513 -
2010-12-07 07:40:34 +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
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
0a625c856d + don't allow non local gotos across procedures containing exception frames
git-svn-id: trunk@16268 -
2010-10-30 20:22:23 +00:00
mazen
b127fc154a * Fixed spell error revealed by lintian.
git-svn-id: trunk@16094 -
2010-10-06 20:33:57 +00:00
Jonas Maebe
ae1fb2bf74 + documented darwin, iphonesim, solaris and win64 options for -T
* removed "for <achitecture>" from all -T option help messages, because
    only targets supported on the current architecture are shown anyway

git-svn-id: trunk@16076 -
2010-10-03 11:24:23 +00:00
Jonas Maebe
1633341906 * treat methods added via an objccategory to an objcclass in exactly the
same way as regular methods as far as overriding is concerned ("override"
    is now allowed, and even required, to override them in a descendent class;
    and similarly, "reintroduce" must be used if a category wants to replace
    a method in a child class if that method was  added by another category in
    a parent class)
  * print the name of owning objcclass/category of the original method in case
    override/reintroduce is missing for objc methods, since this is no longer
    always the parent class

git-svn-id: trunk@16035 -
2010-09-22 21:26:58 +00:00
pierre
c03fa8e79d + Add warning if @GOTPCREL will not be honored
git-svn-id: trunk@15911 -
2010-08-26 15:51:36 +00:00
florian
0c9298a1be * update of German error message file by Karl-Michael Schindler, resolves #17256
git-svn-id: trunk@15904 -
2010-08-25 15:52:56 +00:00
florian
deef8dfa33 * better error message in case of self-referencing generics specialization, resolves #17181
git-svn-id: trunk@15850 -
2010-08-19 08:00:57 +00:00
Jonas Maebe
cc2f4138a3 * make it clear that the unit_u_source_modified is about source files that
are newer than the ones used to create the ppu file, rather than that
    the source file itself is necessarily newer than the ppu file (the
    time stamp of the ppu file is used to check whether the main source file
    has been changed, but for include files the time stamps are recorded in
    the ppu file)

git-svn-id: trunk@15843 -
2010-08-18 14:13:24 +00:00
florian
0085c22c59 - NaN floating point constants do not anymore cause an error when $Q or $R is active (resolves #16315 and #14757)
+ $ieeeerrors (command line switch -C3) to enable errors on NaN floating point constants
+ tests

git-svn-id: trunk@15765 -
2010-08-10 19:05:13 +00:00
florian
6f07880614 * updated copyright notice to 2010
git-svn-id: trunk@15724 -
2010-08-06 11:23:43 +00:00
florian
24fea58b92 + initial implementation of iso style gotos in iso mode
* made setjmp/longjmp accessible to the compiler by compiler proc, they are used by the iso goto code

git-svn-id: trunk@15711 -
2010-08-05 19:20:46 +00:00
Jonas Maebe
57bd6d2685 + merged nestedprocvars branch
+ support for nested procedural variables:
    o activate using {$modeswitch nestedprocvars} (compatible with all
      regular syntax modes, enabled by default for MacPas mode)
    o activating this mode switch changes the way the frame pointer is
      passed to nested routines into the same way that Delphi uses (always
      passed via the stack, and if necessary removed from the stack by
      the caller) -- Todo: possibly also allow using this parameter
      passing convention without enabling nested procvars, maybe even
      by default in Delphi mode, see mantis #9432
    o both global and nested routines can be passed to/assigned to a
      nested procvar (and called via them). Note that converting global
      *procvars* to nested procvars is intentionally not supported, so
      that this functionality can also be implemented via compile-time
      generated trampolines if necessary (e.g. for LLVM or CIL backends
      as long as they don't support the aforementioned parameter passing
      convention)
    o a nested procvar can both be declared using a Mac/ISO Pascal style
      "inline" type declaration as a parameter type, or as a stand-alone
      type (in the latter case, add "is nested" at the end in analogy to
      "of object" for method pointers -- note that using variables of
      such a type is dangerous, because if you call them once the enclosing
      stack frame no longer exists on the stack, the results are
      undefined; this is however allowed for Metaware Pascal compatibility)

git-svn-id: trunk@15694 -
2010-08-02 22:20:36 +00:00
marco
878aa1865b * moved \end{description} becasue of 16991
git-svn-id: trunk@15631 -
2010-07-24 19:14:26 +00:00
Jonas Maebe
2bf79e6e51 * fixed error message when using for-in with Objective-Pascal 1.0
git-svn-id: trunk@15541 -
2010-07-10 10:00:19 +00:00
marco
50af809a6c * a few portuguese message updates by Marcelo B Paula #0016843
git-svn-id: trunk@15539 -
2010-07-10 09:06:50 +00:00
sergei
5abc4bf45d Russian message file update:
* Fixed some typos
* Changed translation of message 5005 (see discussion at http://freepascal.ru/forum/viewtopic.php?t=6021)
* Changed translation of "Target OS" as was suggested by Dmitriy Boyarintsev a long time ago

git-svn-id: trunk@15536 -
2010-07-09 06:11:02 +00:00
marco
e5b9d690b9 * -d and -du msgfiles updated by kms, mantis 16840
git-svn-id: trunk@15527 -
2010-07-04 16:31:42 +00:00
Jonas Maebe
62d677eb92 + support for formally declared objcclasses ("type x=objcclass;external;")
+ tests

git-svn-id: trunk@15476 -
2010-06-25 15:08:37 +00:00
Jonas Maebe
835899524b + support for Objective-Pascal for-in loops ("fast enumerations")
+ {$modeswitch objectivec2}, which is required before you can use
    Objective-C 2.0 features (such as the above). It automatically
    also implies {$modeswitch objectivec1}
  + genloadfield() helper to load a field of a node representing
    a record/object/class

git-svn-id: trunk@15460 -
2010-06-20 12:38:45 +00:00
Jonas Maebe
cddb2ffcae * give a compile-time error when trying to define a short/ansistring typed constant
containing unicode strings instead of producing unpredictable behaviour
    (mantis #16219)

git-svn-id: trunk@15240 -
2010-05-08 10:57:39 +00:00
Jonas Maebe
0dcedf3799 * do not crash but give a fatal error when using Objective-Pascal code
without {$modeswitch objectivec1}

git-svn-id: trunk@15163 -
2010-04-24 12:49:16 +00:00
florian
e235d71cb7 * update of Portuguese message files by Marcelo B Paula, resolves #16314
git-svn-id: trunk@15160 -
2010-04-22 09:25:49 +00:00
Jonas Maebe
3035632ec1 * x86_64 -> x86\_64 in LaTeX description (mantis #16221)
git-svn-id: trunk@15115 -
2010-04-07 09:04:56 +00:00
Jonas Maebe
9bfb20c7eb * fixed execinfo message numbers (patch by A. Klein, mantis #16189)
git-svn-id: trunk@15113 -
2010-04-05 12:22:43 +00:00
paul
24d8a7d833 compiler: start implementation of class constructors/destructors: parsing is ready but at the moment neither class constructors nor destructors are called - this is to be implemented
git-svn-id: trunk@15109 -
2010-04-03 09:14:12 +00:00
Jonas Maebe
347fb53dae - removed BOM (mantis #16179)
git-svn-id: trunk@15106 -
2010-04-01 17:32:15 +00:00
Jonas Maebe
0cfc6e1cac + support for "univ" in macpas mode: a parameter modifier that allows
passing any value to that parameter which has the same size as the
    parameter (it basically acts as if there is an explicit type conversion
    to the parameter type around the value at the caller side). If a procvar
    has an univ parameter, all procvars whose corresponding parameter
    has the same size as that univ parameter are similarly compatible.

    This transparent compatibility can however cause crashes in case of
    of the procvars when one of the types is passed on the stack and the
    other isn't (because then the called routine will a) load the parameter
    from a wrong location and b) pop the wrong amount off of the stack at
    then end). Therefore FPC will warn in most cases where this can happen.
    (mantis #15777)

git-svn-id: trunk@15010 -
2010-03-13 22:13:20 +00:00
marco
bb385c385d * translation updates from kms (Mantis 15849)
git-svn-id: trunk@14937 -
2010-02-26 09:01:09 +00:00
Jonas Maebe
bb28dd7d08 * also show Darwin-specific external resource options for ARM and x86_64
* documented how to specify ARM-specific and x86_64-specific options in
    the help pages

git-svn-id: trunk@14905 -
2010-02-13 20:45:57 +00:00
paul
a8381c8b32 fpc: compiler:
- complete $WARN switch parsing and add a stab to change message state
  - reimplement way of message hiding by -vm switch (by Dmitry Boyarintsev)
(note: $WARN switch does not work at the moment since state handling is not yet implemented)

git-svn-id: trunk@14809 -
2010-01-27 06:59:58 +00:00
florian
c6ffbe9eda * support string constants > 255 chars
* don't cut off anymore string constants silently at 255 chars

git-svn-id: trunk@14789 -
2010-01-24 09:28:46 +00:00
paul
25298fbcd9 compiler: allow hint modifier for 'unit' keyword (reason - delphi compatibility) + test
git-svn-id: trunk@14767 -
2010-01-22 07:15:09 +00:00
florian
cf5c42b596 * give a better error message and do better error recovery if too few typed constant array elements are provided
git-svn-id: trunk@14708 -
2010-01-17 13:04:17 +00:00
paul
587e6142ad compiler: write proper note about unused private class symbol (const,type,property,method instead of method only) with full class prefix. complain also about strict private members.
git-svn-id: trunk@14632 -
2010-01-14 04:08:46 +00:00
Jonas Maebe
28cd8271c9 * initial version of internal Mach-O/i386 assembler by Dmitry Boyarintsev
(mantis #15163)

git-svn-id: trunk@14628 -
2010-01-12 19:52:55 +00:00
paul
166f8a63a2 compiler: implement class constants + tests
git-svn-id: trunk@14609 -
2010-01-11 08:43:10 +00:00
paul
8de3b267a9 compiler: fix message regards VAR and TYPE sections in objects
git-svn-id: trunk@14606 -
2010-01-11 02:39:10 +00:00
paul
3ed4c58502 compiler:
- implement class properties: properties which can access only static fields and static class methods
  - tests
  - fix a possibility to call an instance method from the class method

git-svn-id: trunk@14585 -
2010-01-09 18:37:54 +00:00
florian
d56bd6d246 * give better error messages if an operator is not overloaded
git-svn-id: trunk@14575 -
2010-01-08 14:09:29 +00:00
paul
8166148a37 compiler: 'static' keyword:
- deprecate -St compiler switch
  - remove $STATIC directive
  - unconditionally enable 'static' keyword usage
  - adopt tests, samplecfg, fpc.cft, error messages

git-svn-id: trunk@14569 -
2010-01-07 19:02:09 +00:00
Jonas Maebe
dd94f5cf2b * no longer allow typed files of reference counted data (mantis #15447)
git-svn-id: trunk@14509 -
2010-01-01 14:56:33 +00:00
Jonas Maebe
1743c6f1a8 * also recompile a unit if class/object definitions in indirectly used
units have changed, because these can influence the code of the
    current unit in case method signatures changed (mantis #13840)
    + manual test
  * fixed some recompilation crashes related to WPO info
  * clarified the unit_u_add_depend_to message

git-svn-id: trunk@14503 -
2009-12-30 14:03:31 +00:00
Jonas Maebe
cce3ae1a7a * disable -Xg when used in combination with generating Stabs debug info on
Mac OS X, since it's not supported on that platform

git-svn-id: trunk@14452 -
2009-12-18 16:53:06 +00:00
Jonas Maebe
5f10ff067f * new Portuguese translations by Marcelo B Paula (mantis #15344)
git-svn-id: trunk@14443 -
2009-12-15 12:22:05 +00:00
Jonas Maebe
164db72f07 * implements getter must used target's default calling convention, because
it's called indirectly via an RTL helper that expects this (mantis #15303)

git-svn-id: trunk@14397 -
2009-12-10 21:47:47 +00:00
Jonas Maebe
8f3b1e42c0 + -godwarfmethodclassprefix option to prefix method names in the DWARF debug
info with the classname, like is done for Stabs. Not done by default
    because otherwise once calling methods from the debugger is implemented,
    this would require typing classinstance.classname__methodname

git-svn-id: trunk@14337 -
2009-12-05 22:21:52 +00:00
Jonas Maebe
d1538ab023 o added ARM VPFv2/VFPv3 support:
+ RTL support:
      o VFP exceptions are disabled by default on Darwin,
        because they cause kernel panics on iPhoneOS 2.2.1 at least
      o all denormals are truncated to 0 on Darwin, because disabling
        that also causes kernel panics on iPhoneOS 2.2.1 (probably
        because otherwise denormals can also cause exceptions)
    * set softfloat rounding mode correctly for non-wince/darwin/vfp
      targets
    + compiler support: only half the number of single precision
      registers is available due to limitations of the register
      allocator
    + added a number of comments about why the stackframe on ARM is
      set up the way it is by the compiler
    + added regtype and subregtype info to regsets, because they're
      also used for VFP registers (+ support in assembler reader)
    + various generic support routines for dealing with floating point
      values located in integer registers that have to be transferred to
      mm registers (needed for VFP)
    * renamed use_sse() to use_vectorfpu() and also use it for
      ARM/vfp support
    o only superficially tested for Linux (compiler compiled with -Cpvfpv6
      -Cfvfpv2 works on a Cortex-A8, no testsuite run performed -- at least
      the fpu exception handler still needs to be implemented), Darwin has
      been tested more thoroughly
  + added ARMv6 cpu type and made it default for Darwin/ARM
  + ARMv6+ implementations of atomic operations using ldrex/strex
  * don't use r9 on Darwin/ARM, as it's reserved under certain
    circumstances (don't know yet which ones)
  * changed C-test object files for ARM/Darwin to ARMv6 versions
  * check in assembler reader that regsets are not empty, because
    instructions with a regset operand have undefined behaviour in that
    case
  * fixed resultdef of tarmtypeconvnode.first_int_to_real in case of
    int64->single type conversion
  * fixed constant pool locations in case 64 bit constants are generated,
    and/or when vfp instructions with limited reach are present

  WARNING: when using VFP on an ARMv6 or later cpu, you *must* compile all
    code with -Cparmv6 (or higher), or you will get crashes. The reason is
    that storing/restoring multiple VFP registers must happen using
    different instructions on pre/post-ARMv6.

git-svn-id: trunk@14317 -
2009-12-03 22:46:30 +00:00
Jonas Maebe
5fa1e1cee2 * escaped special characters in latex descriptions
git-svn-id: trunk@14263 -
2009-11-23 21:46:03 +00:00
Jonas Maebe
f8754d8fab + Objective-C category support (old and new ABI, both external and
implemented in Pascal). See
    http://wiki.freepascal.org/FPC_PasCocoa#Category_declaration for syntax
    details

git-svn-id: trunk@14196 -
2009-11-16 00:12:08 +00:00
Jonas Maebe
c1cdf1e087 * merged objc branch:
+ basic support for Objective-Pascal: objcclass, objcprotocol,
      objcselector on all Darwin platforms (ppc32/64, i386, x86_64, ARM),
      see http://wiki.freepascal.org/FPC_PasCocoa and
      http://wiki.freepascal.org/FPC_PasCocoa/Differences for some dialect
      details. Use {$modeswitch objectivec1} to activate
    + Cocoa, iPhone/UIKit and WebKit interfaces for use with the new
      syntax mode

git-svn-id: trunk@14068 -
2009-11-05 16:48:28 +00:00
paul
5c660680b7 compiler: don't allow for-in loop for the enums with jumps. test should fail.
git-svn-id: trunk@14067 -
2009-11-05 15:37:07 +00:00
Jonas Maebe
559e284bd0 * merged r13762-14047 from trunk
git-svn-id: branches/objc@14048 -
2009-11-04 15:50:26 +00:00
paul
cfa89b009f compiler: check that method marked by 'enumerator MoveNext' have no required arguments. correct error message.
git-svn-id: trunk@14045 -
2009-11-04 13:33:57 +00:00
marco
ac5552cec0 * German msg files from KMS, mantis 14966
git-svn-id: trunk@14009 -
2009-11-02 20:15:14 +00:00
paul
aa5a5e79ce merge revisions: 13909,13923,13924,13934,13935,13942,13943,13944,13946,13948,13950,13951,13952,13983,13994:
rtl: add enumerators to the basic classes
tests: add enumerators test which compiles and work both by fpc and dcc
compiler: 
  + start for-in loop implementation: implement for-in loop for types (enumerations and ranges), strings, arrays and sets. todo: perform type checking, optimize array and string loops - use temp for expression, implement for-in loop for classes
test:
  + add a simple test for the 'for-in' loop
compiler: fix string for-in loop. now it uses a temp variable to store string expression result
complier: fix for-in array loop. use a temp variable for the loop expression only if loop is not an open array loop
complier: continue enumerator implementation:
  + add operator enumerator which give an ability to add enumerator for an existent type (for example to override builtin string enumerator)
  + add class enumerator support via delphi compatible GetEnumerator method + enumerator class/object template (function MoveNext: Boolean; property Current)
  + tests
compiler: fix for-in loop for arrays. delphi does not copy arrays to a temp variable and it is possible to change array during loop. + test
compiler: add reference for the enumerator operator when it is used + another test for operator enumerator for a class
compiler: add reference for the enumerator operator when it is used + another test for operator enumerator for a class
compiler: enumerator directive support:
  + allow to mark methods and properties by 'enumerator MoveNext' and 'enumerator Current' modifiers. Parser checks return types and duplicates.
  + prefer *marked* by enumerator directive methods and properties than GetEnumerator and Current builtin symbols
  + increase ppu version
  + test
rtl: add IEnumerator and IEnumerable interfaces declarations
tests: for-in loop tests:
  + add small comment at the top of test program
compiler: allow 'enumerator MoveNext' for the interface function declaration + test
compiler: move all for-in loop helpers to the nflw unit
compiler: don't allow the compiler to choose the non-valid enumerator operator for the for-in loop

git-svn-id: trunk@14008 -
2009-11-02 03:24:48 +00:00
Jonas Maebe
3e624d990d * only allow one "message" modifier per method declaration (mantis #14946)
git-svn-id: trunk@14001 -
2009-11-01 15:23:57 +00:00
paul
e784ec1079 merge revisions 13898-13899:
- compiler: allow message after the *deprecated* keyword
 - compiler: raise an internal error if deprecated message is trying to set to a non clear string pointer

git-svn-id: trunk@13997 -
2009-11-01 14:06:30 +00:00
Jonas Maebe
d61eb3528f * make strict string var checking ({$v+}) the default in TP and Delphi modes
(mantis #14929)

git-svn-id: trunk@13966 -
2009-10-29 15:52:14 +00:00
florian
292b36205a -- Zusammenführen von r13892 in ».«:
A    tests/test/tsymlibrary1.pp
U    compiler/msgtxt.inc
U    compiler/msgidx.inc
U    compiler/htypechk.pas
U    compiler/msg/errore.msg

git-svn-id: trunk@13953 -
2009-10-25 08:58:22 +00:00
florian
ea00759588 + final modifier support for methods by Paul Ishenin
-- Zusammenführen von r13887 in ».«:
A    tests/test/tfinal1.pp
U    compiler/msgtxt.inc
U    compiler/msgidx.inc
U    compiler/pdecsub.pas
U    compiler/tokens.pas
U    compiler/symconst.pas
U    compiler/msg/errore.msg
U    compiler/utils/ppudump.pp
-- Zusammenführen von r13890 in ».«:
G    compiler/msgtxt.inc
G    compiler/msgidx.inc
U    compiler/nobj.pas
G    compiler/msg/errore.msg
-- Zusammenführen von r13891 in ».«:
A    tests/test/tfinal2.pp

git-svn-id: trunk@13938 -
2009-10-24 11:48:52 +00:00
Jonas Maebe
fffa66e2f9 * only allow implicit conversions from 0 to NIL in Delphi mode, rather than
from any ordinal constant, and give a warning for this one allowed
    conversion like Kylix does (mantis #14713)
  * this required calling simplify from typecheckpass in ttypeconvnode for
    cord_to_pointer, because this simplification prevents the type checking
    from happening (but the typecheck itself also does that simplification)

git-svn-id: trunk@13919 -
2009-10-22 19:49:08 +00:00
florian
eb433d1bdd * merged sealed and abstract support by Paul Ishenin
-- Zusammenführen von r13884 in ».«:
U    compiler/msgtxt.inc
U    compiler/msgidx.inc
U    compiler/pdecsub.pas
U    compiler/pdecobj.pas
U    compiler/tokens.pas
U    compiler/ppu.pas
U    compiler/symconst.pas
U    compiler/msg/errore.msg
U    compiler/utils/ppudump.pp
-- Zusammenführen von r13885 in ».«:
A    tests/test/tsealed1.pp
A    tests/test/tabstract1.pp
A    tests/test/tsealed2.pp
-- Zusammenführen von r13893 in ».«:
A    tests/test/tsealed3.pp
A    tests/test/tsealed4.pp

git-svn-id: trunk@13908 -
2009-10-18 20:05:29 +00:00
sergei
2fe34085b1 * Missing percent in russian messages, Mantis 14772
git-svn-id: trunk@13834 -
2009-10-10 14:25:06 +00:00
sergei
5e6bc7d36c * Also updated errorr.msg, cp866 encoding is needed for Windows console.
git-svn-id: trunk@13815 -
2009-10-07 17:43:44 +00:00
sergei
337d0b1b21 Updated Russian message file, and changed cp1251 encoding to UTF-8.
git-svn-id: trunk@13814 -
2009-10-07 17:36:27 +00:00
Jonas Maebe
61e6545483 * message changes belonging to r13701
git-svn-id: branches/objc@13702 -
2009-09-12 17:44:41 +00:00
Jonas Maebe
ed9656d1e6 Merged revisions 13627-13631,13637-13638,13640,13642-13648,13650-13653,13656-13658,13660,13664-13667,13672-13675,13680,13682,13687 via svnmerge from
svn+ssh://jonas@svn.freepascal.org/FPC/svn/fpc/trunk

git-svn-id: branches/objc@13697 -
2009-09-12 12:42:38 +00:00
Jonas Maebe
b76def10b2 + check whether selector names are valid when they are specified in a class
delcaration (instead of only for objcselector() nodes)
  * also print the wrong selector itself when it's wrong

git-svn-id: branches/objc@13689 -
2009-09-11 16:12:27 +00:00
Jonas Maebe
d56a936520 * forgot to commit error message from r13668
git-svn-id: branches/objc@13669 -
2009-09-07 18:30:57 +00:00
Jonas Maebe
e8216ff397 * changed error about unsupported -Xr option into a warning, because the
Makefiles automatically pass it when cross compiling (mantis #14527)

git-svn-id: trunk@13665 -
2009-09-06 18:50:11 +00:00
marco
32c6253c07 * Last commit broke helpfile/doc compilation. Items should be within description,
not after.

git-svn-id: trunk@13646 -
2009-09-05 12:12:31 +00:00
florian
cf215d5097 o patch by Michael V. Denisenko to handle case <string> of (see also #13700)
+ compiler implementation
  + tests

git-svn-id: trunk@13642 -
2009-09-03 20:21:30 +00:00
Jonas Maebe
ab3294dce2 * fixed handling of "type x = y" for objcclass/objcprotocol
* don't allow "type x = type y" for objcclass/objcprotocol for now
    (would require generating new rtti for the new name)

git-svn-id: branches/objc@13641 -
2009-09-03 19:42:37 +00:00
Jonas Maebe
a149674a75 Merged revisions 13458-13596 via svnmerge from
svn+ssh://jonas@svn.freepascal.org/FPC/svn/fpc/trunk

git-svn-id: branches/objc@13598 -
2009-08-25 19:47:36 +00:00
Jonas Maebe
5885866990 + support for objcencode() (equivalent of Objective-C's @encode()) + test
+ functionality to encode Objective-C function signatures (untested)

git-svn-id: branches/objc@13557 -
2009-08-18 19:54:02 +00:00
florian
e022a86c47 * update of german error message files by Karl-Michael Schindler
git-svn-id: trunk@13506 -
2009-08-09 16:35:09 +00:00
Jonas Maebe
335e159c11 Merged revisions 13351-13373,13376-13457 via svnmerge from
svn+ssh://jonas@svn.freepascal.org/FPC/svn/fpc/trunk

git-svn-id: branches/objc@13458 -
2009-07-26 14:31:50 +00:00
Jonas Maebe
aba66582a8 * corrected the description of the option_only_one_source_support warning:
only the last source file specified will be compiled, not the first one
  * also print out both the old and the new source file name to be compiled
    when showing that message (to more easily find where the error is)
  * give an error if an unknown parameter is used, instead of silently
    ignoring it

git-svn-id: trunk@13429 -
2009-07-23 13:48:27 +00:00
Jonas Maebe
97072cd21a * corrected the description of the -Xr parameter
git-svn-id: trunk@13428 -
2009-07-23 13:36:57 +00:00
Jonas Maebe
5a2ccfff52 --WARNING: start build process with FPC 2.2.4; won't work when
starting with a previous 2.3.1 or compiler built from the objc branch
  + added basic objcprotocol support (only for external protocols
    currently)
     o use in type declaration: "type xp = objcprotocol ... end;"
     o when defining a root class that implements it:
       "type yc = objcclass(xp) ... end" (note: no support yet
       for something like "objcclass(id,xp)" or so)
     o when defining a non-root class that implements a protocol:
       "type zc = objcclass(nsobject,xp) ... end"
     o includes support for "required" and "optional" sections
     o no support yet for the objcprotocol(<protocol>) expression
       that enables getting a class instance representing the
       protocol (e.g., for use with "conformsToProtocol:")
     o message names have to specified in protocol declarations,
       but if an objcclass implements a protocol, the message names do
       not have to be repeated (but if they are, they have to match;
       the same goes when overriding inherited methods)
  + allow specifying the external name of Objective-C classes and
    protocols, since classes and protocols can have the same name
    (and you cannot use the same Pascal identifier in such caseq)
  + added NSObject protocol, and make the NSObject class use it
  + added missing NSObject class methods that have the same name
    as instance methods (added "class" name prefix to avoid clashes)
  * fixed several cases where the compiler did not treat Objective-C
    classes/protocols the same as Object Pascal classes/interfaces
    (a.o., forward declarations, alignment, regvars, several type
     conversions, ...)
  * allow "override" directive in objcclass declarations, and print
    a hint if it's forgotten in an external declaration (because it
    doesn't really matter there, and may make automated header
    conversion harder than necessary) and an error if will be used in
    a non-external declaration (because it is not possible to start
    a new vmt entry-tree in Objective-C, you can only override parent
    methods)
  * reject objcclasses/protocols as parameters to typeof()
  * don't try to test VMT validity of objcclasses/protocols

git-svn-id: branches/objc@13375 -
2009-07-09 20:48:28 +00:00
Jonas Maebe
52c6f14de5 * do not allow local type definitions such as string[1] and "file of byte"
inside parameter lists and function results (fixes second problem
    reported in mantis #14104, see also
    http://wiki.freepascal.org/User_Changes_Trunk#Local_type_definitions_in_parameter_lists
    )

git-svn-id: trunk@13372 -
2009-07-08 20:21:37 +00:00
Jonas Maebe
92de010fe1 Merged revisions 13218-13347 via svnmerge from
svn+ssh://jonas@svn.freepascal.org/FPC/svn/fpc/trunk

git-svn-id: branches/objc@13350 -
2009-06-28 16:09:53 +00:00
Jonas Maebe
0356a35e1c Merged revisions 13156-13217 via svnmerge from
svn+ssh://jonas@svn.freepascal.org/FPC/svn/fpc/trunk

........
........
r13157 | marco | 2009-05-17 14:22:41 +0200 (Sun, 17 May 2009) | 2 lines

 * mingw textmode IDE debugging support. First working version (for me), atexit handler for mingw and cygwin stuff under ifndef  USE_MINGW_GDB
    
........
r13158 | marco | 2009-05-17 14:43:57 +0200 (Sun, 17 May 2009) | 1 line

 * Fix for gdb66/mingw (general?) program reset issue. Instructs GDB to turn confirmation off.  Mantis 0011968 
........
r13159 | yury | 2009-05-17 14:43:58 +0200 (Sun, 17 May 2009) | 1 line

* Replaced some ifdef x86_64 by ifdef cpu64bitaddr, since it is more correct.
........
r13160 | yury | 2009-05-17 14:47:26 +0200 (Sun, 17 May 2009) | 1 line

* Set default image base for win64 dlls to $110000000.
........
........
........
r13163 | jonas | 2009-05-17 16:33:20 +0200 (Sun, 17 May 2009) | 3 lines

  * support {$i *.ext} to include source files with the same base name, but
    with a different extension than the current source file (mantis #13696)

........
r13164 | jonas | 2009-05-17 16:42:17 +0200 (Sun, 17 May 2009) | 2 lines

  * copyright in comments updated (from mantis #13048)

........
r13165 | jonas | 2009-05-17 16:50:44 +0200 (Sun, 17 May 2009) | 2 lines

  * small fixes from Karl-Michael Schindler (mantis #13048)

........
r13166 | marco | 2009-05-17 17:37:27 +0200 (Sun, 17 May 2009) | 3 lines

 *  gtk_cell_renderer_combo_new returns gtkcellrenderer not -combo (mantis 13689),
      probably to support some kind of procedural polymorphism.

........
r13167 | jonas | 2009-05-17 18:01:13 +0200 (Sun, 17 May 2009) | 4 lines

  * when loading the functions for a particular OpenGL function, also
    automatically load those for lower versions (patch by "satan", mantis
    #13687)

........
r13168 | marco | 2009-05-17 19:09:26 +0200 (Sun, 17 May 2009) | 3 lines

 * reversed destruction order of TFPObjectList as per Mantis 13715.
  Note that it is _NOT_ good coding to rely on such things

........
........
........
........
r13172 | sergei | 2009-05-18 00:56:51 +0200 (Mon, 18 May 2009) | 9 lines

DOM test suite enhancements:
* Do not convert tests which request implementation attribute 'signed'='true'.
  Such tests aren't applicable to our unsigned DOM, they only cause compiler warnings
  and noise in the test report.
+ Support for default properties (obj.item(x) -> obj[x]).
+ Support black-listing of testcases. Some of them (in HTML testsuite) are easier to
  rewrite by hand than to convert.
+ Support adding certain units to 'uses' clause (e.g. HTML suite must use dom_html).

........
........
........
r13175 | sergei | 2009-05-18 22:33:43 +0200 (Mon, 18 May 2009) | 1 line

dom.pp: Ignore node read-only property when its owning document is being destroyed (enables destroying nodes in arbitrary order).
........
r13176 | sergei | 2009-05-19 00:03:37 +0200 (Tue, 19 May 2009) | 2 lines

* Moved TDOMAttrDef class from xmlread.pp to dom.pp (in order to implement default attribute handling at DOM level).
* Using regular CloneNode() method to create copies of TDOMAttrDef.
........
........
........
........
r13180 | sergei | 2009-05-21 01:08:24 +0200 (Thu, 21 May 2009) | 13 lines

Final strike for #13605:

src/dom.pp:
* GetElementsByTagName[NS] results now get cached in a hashtable. Repeated calls to
  GetElementsByTagName with same arguments return the same instance of NodeList. All NodeLists
  created during document lifetime are destroyed with the document.

src/xmlutils.pp:
* THashTable.Lookup(), changed SetString to SetLength+Move because SetString truncates on #0
+ added THashTable.RemoveData() method

tests/api.xml:
- No longer need to 'garbage collect' the NodeLists.
........
r13181 | jonas | 2009-05-21 11:57:45 +0200 (Thu, 21 May 2009) | 4 lines

  - unconditionally enabled {$ifdef PARAOUTFILE}-code (that define was
    decomissioned quite a while ago, but this file was forgotten in
    that process)

........
r13182 | marco | 2009-05-21 13:26:54 +0200 (Thu, 21 May 2009) | 2 lines

 * win64 compatibility fix from Vincent. TLibHandle is now equal to system.thandle

........
r13183 | marco | 2009-05-21 16:11:16 +0200 (Thu, 21 May 2009) | 1 line

 * some minor vista/w7 related updates to message numbers
........
r13184 | sergei | 2009-05-21 22:45:16 +0200 (Thu, 21 May 2009) | 1 line

dom.pp: Added node memory management code (pure addition, no functionality changes this time).
........
r13185 | sergei | 2009-05-22 01:07:32 +0200 (Fri, 22 May 2009) | 10 lines

dom.pp: Customized memory management, fixes 17 test cases and all memory leaks in testsuite:
* Every node created by Document.CreateXXX method is now guaranteed to be destroyed with the
  document, whether it is part of the tree or not. Therefore, DOM methods which remove nodes
  from the tree (namely, TDOMNode.RemoveChild, TDOMNode.ReplaceChild,
  TDOMElement.SetAttributeNode and TDOMElement.SetAttributeNodeNS) no longer need to destroy
  their return value and are now conformant to the specs.
* Nodes are allocated in arrays of instances (emulates 'placement new operator' in C++ terms).
  Allocation and freeing are as fast as possible (just assigns a couple of pointers).
* Behaviour of nodes that are created by direct call to constructor is unchanged.

........
r13186 | jonas | 2009-05-23 12:10:56 +0200 (Sat, 23 May 2009) | 2 lines

  + Darwin-specific fcntl constants

........
........
r13188 | marco | 2009-05-23 17:40:13 +0200 (Sat, 23 May 2009) | 1 line

 * thread creation failure for win<x>. Mantis 13798
........
r13189 | joost | 2009-05-24 13:17:59 +0200 (Sun, 24 May 2009) | 1 line

 * Modified patch from taka_jp to set the connection-dataset for mysql, bug #13588.
........
r13190 | joost | 2009-05-24 13:20:45 +0200 (Sun, 24 May 2009) | 1 line

 * Fixed resource-leak on exceptions during creating/dropping databases, patch from taka_jp, bug #13587
........
r13191 | jonas | 2009-05-24 13:48:49 +0200 (Sun, 24 May 2009) | 5 lines

  * changed the parameters of gotoxy() and the return values of wherex/wherey
    from byte into tcrtcoord=1..255, since all crt unit coordinates are
    1-based (not for Window() procedure, see comments in crth.inc;
    mantis #13788)

........
r13192 | jonas | 2009-05-24 14:25:33 +0200 (Sun, 24 May 2009) | 2 lines

  * again made less complex in case of PIC, otherwise it fails

........
r13193 | jonas | 2009-05-24 14:26:38 +0200 (Sun, 24 May 2009) | 2 lines

  * make sure example also works without an application bundle

........
r13194 | jonas | 2009-05-25 20:34:04 +0200 (Mon, 25 May 2009) | 2 lines

  * fixed evaluating "nil +/- int_const" expressions (mantis #13815)

........
r13195 | jonas | 2009-05-25 21:41:14 +0200 (Mon, 25 May 2009) | 4 lines

  * fixed missing reference counting in case a refcounted type was implicitly
    type casted to a non-refcounted type, e.g. dynarray to pointer in Delphi
    mode (mantis #13820)

........
r13196 | sergei | 2009-05-25 22:28:40 +0200 (Mon, 25 May 2009) | 8 lines

dom.pp: No more failures on level 1 testsuite... at last.
+ Implemented handling of default attributes:
  * creating an element also creates and attaches the default attributes;
  * removing an attribute restores it with default value, if there's one.
+ Attribute nodes remove themselves from the owner element upon destruction, making it possible
  to Free attributes manually.
* TDOMNamedNodeMap.SetNamedItem does not reset attribute OwnerElement if the argument node is already
  contained in the map (and whole operation is therefore is a no-op).
........
r13197 | marco | 2009-05-26 14:24:58 +0200 (Tue, 26 May 2009) | 5 lines

 * uxtheme moved from Lazarus.
 * Disabled (ifdeffed) lock around init/finalization because of circular
    reference between fcl-base and winunits-base. If needed it can be
    recoded directly using system specific (windows.pas) routines.

........
r13198 | jonas | 2009-05-26 18:22:41 +0200 (Tue, 26 May 2009) | 2 lines

  * make references PIC-safe before pushing them as parameter (mantis #13829)

........
r13199 | marco | 2009-05-26 18:54:49 +0200 (Tue, 26 May 2009) | 2 lines

 * tmschema as include file added at Paul's request

........
r13200 | sergei | 2009-05-27 00:14:21 +0200 (Wed, 27 May 2009) | 6 lines

+ Implementation of TDOMDocument.CreateAttributeNS and CreateElementsNS
+ Initial part of TDOMElement.SetAttributeNS
+ TDOMImplementation.CreateDocumentType checks validity of QualifiedName
* Use 'managed' memory allocation in TDOMEntity.CloneNode and TDOMNotation.CloneNode to avoid leaks
* TDOMDocument.RemoveID now using THashTable.RemoveData(), simplifies things

........
r13201 | marco | 2009-05-27 09:29:04 +0200 (Wed, 27 May 2009) | 2 lines

 * Marquee patch from Paul + some Vista PBM_ constants.

........
r13202 | marco | 2009-05-27 10:46:27 +0200 (Wed, 27 May 2009) | 2 lines

 * first half of vista updates.

........
r13203 | marco | 2009-05-27 18:26:32 +0200 (Wed, 27 May 2009) | 2 lines

 * vista items till WC_STATICA, roughly at 80% now.

........
r13204 | jonas | 2009-05-27 19:26:50 +0200 (Wed, 27 May 2009) | 2 lines

  * various optimizations by Dave Richards (mantis #12440)

........
r13205 | jonas | 2009-05-27 19:50:55 +0200 (Wed, 27 May 2009) | 3 lines

  * forbid "nil +/- ordinal" expressions (Delphi-compatible, and the
    expression is meaningless since nil is not a valid address)

........
r13206 | marco | 2009-05-27 22:08:56 +0200 (Wed, 27 May 2009) | 2 lines

 * more Vista fixes, and implemented some macro's that somehow were not implemented.

........
r13207 | hajny | 2009-05-27 23:18:35 +0200 (Wed, 27 May 2009) | 1 line

  * extension of r13191 to OS/2, EMX and potential other platforms using crt.inc based implementation of unit crt
........
r13208 | florian | 2009-05-29 00:28:58 +0200 (Fri, 29 May 2009) | 1 line

* patch to fix fillpoly, by borsa77
........
r13209 | michael | 2009-05-29 09:24:02 +0200 (Fri, 29 May 2009) | 1 line

* Change so that when FindFirst initially returns nonzero, FindClose is no longer needed (Windows compatible)
........
r13210 | michael | 2009-05-29 09:27:41 +0200 (Fri, 29 May 2009) | 1 line

* Change so that when FindFirst initially returns nonzero, FindClose is no longer needed (Windows compatible)
........
r13211 | michael | 2009-05-29 09:30:46 +0200 (Fri, 29 May 2009) | 1 line

* Fix from Ken Wright for broken FPC changes
........
r13212 | jonas | 2009-05-30 13:29:54 +0200 (Sat, 30 May 2009) | 2 lines

  * fixed/cleaned up tests for "nil + 1"

........
r13213 | michael | 2009-05-30 14:07:16 +0200 (Sat, 30 May 2009) | 1 line

* Some TCustomVariant methods implemented
........
r13214 | sergei | 2009-05-31 10:18:06 +0200 (Sun, 31 May 2009) | 3 lines

+ Processing of prefixed attributes and prefix bindings. This completes namespace support at
  the XML reader side.

........
r13215 | sergei | 2009-05-31 11:14:37 +0200 (Sun, 31 May 2009) | 1 line

* Added .txt extension to README_DOM (this one was missed while fixing Mantis #12358)
........
r13216 | sergei | 2009-05-31 12:38:28 +0200 (Sun, 31 May 2009) | 1 line

Bringing readme's up to date
........
r13217 | Legolas | 2009-05-31 14:15:24 +0200 (Sun, 31 May 2009) | 4 lines

* updated nds/gba linker scripts and reverted some changes for 2.2.4a release
- Removed unused/outdated stuff from libndsfpc
+ Added new examples for libndsfpc
+ Added working (I hope so...) makefile.fpc for all libndsfpc/libgbafpc examples
........

git-svn-id: branches/objc@13348 -
2009-06-28 15:29:53 +00:00
Jonas Maebe
c6733ed9a5 * disallow placing fields after method/property definitions, because this
can create ambiguities for the parser in case the field names also exist
    as modifiers (TP- and Delphi-compatible, mantis #13971) + tests
  * fixed tests that broke because of this change

git-svn-id: trunk@13334 -
2009-06-27 12:59:46 +00:00
Jonas Maebe
5c006b9b86 * enable the directory cache by default starting with the first lookup
(fixes mantis #13756)
  + added -Fd command line parameter to disable the directory cache

git-svn-id: trunk@13325 -
2009-06-26 14:55:31 +00:00
Jonas Maebe
b05992b8a2 * stabs -> Stabs
* dwarf/Dwarf -> DWARF

git-svn-id: trunk@13287 -
2009-06-18 09:10:35 +00:00
florian
22745d74a8 o Message file update by Karl-Michael Schindler
* Updates of error message files, mainly the two German files and a small typo correction of the English 

git-svn-id: trunk@13286 -
2009-06-17 21:30:18 +00:00
florian
d15e6bbe2a + -vs is shown in the help screen, resolves #13958
* -v options slightly reordered so they are easier to read

git-svn-id: trunk@13257 -
2009-06-11 16:15:31 +00:00
Jonas Maebe
7bff50becd * give an error message when the specified wpo feedback input file
is a directory
  * always quote wpo feedback file name in messages

git-svn-id: trunk@13242 -
2009-06-06 12:39:09 +00:00
Jonas Maebe
27afdbf94a * fixed check for forbidding constructors/destructors in objcclasses + tests
git-svn-id: branches/objc@13179 -
2009-05-19 20:24:55 +00:00
Jonas Maebe
27b3689f60 * message file changes from r13177
git-svn-id: branches/objc@13178 -
2009-05-19 20:22:51 +00:00
Jonas Maebe
bbfd8812c9 * small fixes from Karl-Michael Schindler (mantis #13048)
git-svn-id: trunk@13165 -
2009-05-17 14:50:44 +00:00
Jonas Maebe
84cdb246fa * copyright in comments updated (from mantis #13048)
git-svn-id: trunk@13164 -
2009-05-17 14:42:17 +00:00
Jonas Maebe
b1b9894ae3 * initial Objective-C 1.0 support:
o support for declaring external Objective-C classes (see
      rtl/inc/objcbase.pas), including derived classes
    o support for converting methods of objcclasses into selectors
      (see tests/test/tobjc1.pp)
    o support for loading from/storing to fields of objcclasses
    o support for calling Objective-C methods using regular
      Object Pascal syntax (see tests/test/tobjc1.pp)
    o some things that are known to be not yet working:
      o automatic conversion from ID to objcclasses and back
      o declaring and implementing new objcclasses/methods in Pascal code
      o debug information (objcclasses are currently plain pointers
        as far as the debugger knows)

git-svn-id: branches/objc@13162 -
2009-05-17 13:42:50 +00:00
yury
c4439e4e39 * Properly write 64-bit relocations into .reloc section.
* Warning when 64-bit object file contains 32-bit absolute relocations. In such case an executable image can be loaded into lower 4Gb of address space only.

git-svn-id: trunk@13110 -
2009-05-07 10:46:56 +00:00
yury
2b3a54cec0 * Allow usage of internal linker when dwarf debug info is used.
git-svn-id: trunk@13094 -
2009-05-04 10:19:54 +00:00
Jonas Maebe
40247d2d87 * give an error when the typeinfo() function is called for an enumeration
whose base is not 0, or that has jumps in its value range (manits #9551)

git-svn-id: trunk@12960 -
2009-03-22 20:54:49 +00:00
Jonas Maebe
d61a09debf * assigment -> assignment in explanation of warning about uninitialized
variables

git-svn-id: trunk@12940 -
2009-03-21 16:15:20 +00:00
Jonas Maebe
41dcda600c * disabled the internal linker when using DWARF debug info (it doesn't
work correctly with DWARF)
  * only force the internal linker for STABS when generating relocatable
    output (rather than for all debugging formats)

git-svn-id: trunk@12917 -
2009-03-19 09:01:29 +00:00
Jonas Maebe
c6470a75e7 * do not disable smart linking when using DWARF debug information on Darwin,
because there it does work correctly
  * print a note if smart linking is disabled due to using DWARF

git-svn-id: trunk@12896 -
2009-03-15 12:16:45 +00:00
Jonas Maebe
6165536b5e + added {$modeswitch objectivec1}/-Mobjectivec1 mode switch to enable
the use of Objective-C 1.0 constructs. Because it is a mode switch, it
    can be used cumulatively with every syntax mode. Note that a {$mode xxx}
    statement resets all mode switches as well, so you cannot use the
    -Mobjectivec1 variant if you have such a statement in a unit. This
    modeswitch is currently only enabled for Darwin/PowerPC and Darwin/i386,
    as the backend support is not yet implemented for other platforms.
  + implemented selector() statement that can be used to create an Objective-C
    selector for the message with the specified *constant* name (in the future,
    it will also work for Objective-C method identifiers)
  + added SEL type to the system unit (the selector() statement returns it)
  + added all Objective-C segments to the assembler writers
  + (currently mostly dummy) objc1 unit that is automatically included if the
    {$modeswitch objectivec1} statement is used
  + some tests for the selector() statement

git-svn-id: trunk@12870 -
2009-03-08 18:40:32 +00:00
Tomas Hajny
29f0a1096c * add reference to the bug tracker rather than just an e-mail address
git-svn-id: trunk@12833 -
2009-02-28 23:13:36 +00:00
florian
d511f8d84e * year of copyright updated
git-svn-id: trunk@12789 -
2009-02-25 15:44:20 +00:00