Commit Graph

515 Commits

Author SHA1 Message Date
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