Commit Graph

551 Commits

Author SHA1 Message Date
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
florian
acb06dac1b + Wp<Controllertype> support for arm and avr
git-svn-id: trunk@12664 -
2009-02-02 20:16:25 +00:00
florian
3430f90b2c * updated german message files from Karl-Michael Schindler
git-svn-id: trunk@12547 -
2009-01-13 21:39:42 +00:00
Jonas Maebe
b73ed1587a * added warning to stack checking option
* clarified that -Cs only guarantees setting the stack *checking*
    size, not necessarily the stack size

git-svn-id: trunk@12528 -
2009-01-08 18:42:24 +00:00
Jonas Maebe
423ee926c2 * verify during parameter parsing that -gc and -pg are implemented/
supported for the chosen target platform

git-svn-id: trunk@12451 -
2008-12-28 15:53:15 +00:00
Jonas Maebe
e54aed98a4 * fixed some small errors/inconsistencies in the wpo messages
git-svn-id: trunk@12450 -
2008-12-28 10:10:16 +00:00
florian
7d849d312b + added missing LaTeX statement for wpo error messages
git-svn-id: trunk@12449 -
2008-12-28 09:51:27 +00:00
Jonas Maebe
3216e8c7bc * mark produced object files as "does not require executable stack" by
default for Linux (overridable using -WX switch) (mantis #11563)

git-svn-id: trunk@12356 -
2008-12-12 16:26:25 +00:00