Commit Graph

484 Commits

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