Commit Graph

507 Commits

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