summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* * changed syntax of external objcclasses (see wiki/FPC_PasCocoa). Anotherjonas2011-01-02568-5135/+4027
| | | | | | | | | | | | | | | | | | | | | | | | | 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: http://svn.freepascal.org/svn/fpc/trunk@16684 3ad0048d-3df7-0310-abae-a5850022a9f2
* * Dwarf: Hide the implicit pointer from a function-parameter which is passedjoost2011-01-021-9/+15
| | | | | | | by reference, and dereference the (hidden) pointer in the DW_AT_location block. This solves problems with function parameters defined as 'var' git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@16683 3ad0048d-3df7-0310-abae-a5850022a9f2
* compiler: don't allow record case with parameterized memberspaul2011-01-025-377/+400
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@16682 3ad0048d-3df7-0310-abae-a5850022a9f2
* compiler: implement generic array type:paul2011-01-0211-21/+141
| | | | | | | | | | - add tarraysymtable to store generic type symbols - process generic and specialize declarations similar to generic records and classes - fix insert_generic_parameter_types to use def passed in argument instead of current_structdef because generic array type can't be assigned to the current_structdef variable - increase ppu version because of arraydef changes - tests git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@16681 3ad0048d-3df7-0310-abae-a5850022a9f2
* tests: fail test tw9509: disable type section in generic interfacespaul2011-01-021-0/+1
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@16680 3ad0048d-3df7-0310-abae-a5850022a9f2
* compiler: paul2011-01-021-2/+6
| | | | | | | | | - allow pointermath for pchar, pwidechar, array[] of char and array[] of widechar without pointermath directive, - don't check tpointerdef().has_pointer_math if this is not a tpointerdef This fixes testsuite regression (tbs/tb0439.pp) git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@16679 3ad0048d-3df7-0310-abae-a5850022a9f2
* compiler: comment TSymTableType entries + formattingpaul2011-01-012-13/+19
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@16675 3ad0048d-3df7-0310-abae-a5850022a9f2
* * Dwarf3: Classes are not encoded as a pointer to a class-structure, but joost2010-12-311-9/+12
| | | | | | | | | | as a class-structure directly. Make sure that in this case: - The size is the size of the structure, not the size of a pointer - The (hidden) pointer is dereferenced - The class is marked as unallocated when the (hidden) pointer is nil git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@16674 3ad0048d-3df7-0310-abae-a5850022a9f2
* * tconnectevent added to comobjmarco2010-12-311-0/+4
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@16673 3ad0048d-3df7-0310-abae-a5850022a9f2
* formattingpaul2010-12-311-5/+5
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@16672 3ad0048d-3df7-0310-abae-a5850022a9f2
* compiler: make current_genericdef, current_specializedef tstoreddef instead ↵paul2010-12-315-17/+17
| | | | | | of tabstractrecorddef to implement generic arrays git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@16671 3ad0048d-3df7-0310-abae-a5850022a9f2
* compiler: implement generics for records based on generic objects ↵paul2010-12-315-15/+58
| | | | | | implementation + 1 test git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@16670 3ad0048d-3df7-0310-abae-a5850022a9f2
* compiler: don't allow generic object types ↵paul2010-12-317-254/+247
| | | | | | (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: http://svn.freepascal.org/svn/fpc/trunk@16669 3ad0048d-3df7-0310-abae-a5850022a9f2
* compiler: remove unneeded check that def is objectdef when we have another ↵paul2010-12-311-4/+3
| | | | | | check that object has vmt. records don't have vmt so we can leave only one check there git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@16668 3ad0048d-3df7-0310-abae-a5850022a9f2
* compiler: mark operator overloads as operators in rtti (although classes ↵paul2010-12-312-1/+2
| | | | | | don't have operator overloads now) git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@16667 3ad0048d-3df7-0310-abae-a5850022a9f2
* * version 2.13 of the parser, by Ryan Joseph: mainly restructuring andjonas2010-12-306-1592/+1625
| | | | | | | cleanup git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@16666 3ad0048d-3df7-0310-abae-a5850022a9f2
* * Windows RTL: Simplify SysUtils.GetLocalTime(). TSystemTime type for these ↵sergei2010-12-302-21/+3
| | | | | | targets matches one defined in Windows unit, so WinAPI function result can be used directly. Resolves #18346. git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@16665 3ad0048d-3df7-0310-abae-a5850022a9f2
* * renamed is_class_or_interface_or_dispinterface_or_objc() intojonas2010-12-3013-41/+40
| | | | | | | | | is_implicit_pointer_object_type() to better indicate the purpose of that routine, and to avoid having to change its name every time a new object type with this property is added git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@16664 3ad0048d-3df7-0310-abae-a5850022a9f2
* * fixed and simplified tcgaddnode.second_addsmallset: don't modifyjonas2010-12-301-14/+8
| | | | | | | right.register for subn, because it may be constant git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@16663 3ad0048d-3df7-0310-abae-a5850022a9f2
* + Add $rbp FrameName for x86_64 CPUpierre2010-12-301-0/+5
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@16662 3ad0048d-3df7-0310-abae-a5850022a9f2
* compiler: forgotten unit in r16660paul2010-12-301-5/+5
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@16661 3ad0048d-3df7-0310-abae-a5850022a9f2
* compiler: move current_objectdef variable to implementation of pdecobj and ↵paul2010-12-304-7/+8
| | | | | | use explicit type conversion to tobjectdef in other places where current_objectdef is needed git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@16660 3ad0048d-3df7-0310-abae-a5850022a9f2
* compiler: use current_structdef in more places where current_objectdef was ↵paul2010-12-304-114/+114
| | | | | | used, change type of current_genericdef and current_specializedef to tabstractrecorddef for future use with generic records git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@16659 3ad0048d-3df7-0310-abae-a5850022a9f2
* compiler: use current_structdef instead of current_objectdef in more placespaul2010-12-308-23/+23
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@16658 3ad0048d-3df7-0310-abae-a5850022a9f2
* * Patch from LacaK2 to improve decimalpoint localisation. (Mantis 18338)marco2010-12-291-8/+7
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@16653 3ad0048d-3df7-0310-abae-a5850022a9f2
* compiler: rename extended records to advanced recordspaul2010-12-294-5/+5
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@16652 3ad0048d-3df7-0310-abae-a5850022a9f2
* compiler: replace MODESWTICH POINTERARITHMETICS with $POINTERMATH directive, ↵paul2010-12-2912-11/+90
| | | | | | disable pointer arithmetic in delphi mode by default (compatible with delphi), enable pointer arithmetic in fpc/objfpc modes as they had it enabled by default before, add has_pointer_math field to tpointerdef to allow pointer arithmetic with such pointer even if pointer math mode is off (delphi compatible) + tests git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@16651 3ad0048d-3df7-0310-abae-a5850022a9f2
* * handle LOC_SUBSETREG,LOC_CSUBSETREG,LOC_SUBSETREF,LOC_CSUBSETREF injonas2010-12-282-0/+4
| | | | | | | | | unaryminus code (a.o., fixes compiler crash with test/terecs6 on darwin/ppc32 under certain circumstances: http://www.freepascal.org/testsuite/cgi-bin/testsuite.cgi?action=3&run1id=74027&run2id=74101&testfileid=3838 ) git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@16650 3ad0048d-3df7-0310-abae-a5850022a9f2
* compiler: set result value to dummy function to prevent compiler to generate ↵paul2010-12-281-1/+2
| | | | | | a hint git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@16649 3ad0048d-3df7-0310-abae-a5850022a9f2
* tests: move tb0070.pp to tbs and change expected behavior to success because ↵paul2010-12-271-3/+1
| | | | | | delphi and fpc both allows this constructions now git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@16647 3ad0048d-3df7-0310-abae-a5850022a9f2
* compiler: allow objects and records to have members which point to themself. ↵paul2010-12-279-58/+84
| | | | | | | | | | | | only don't permit this to regular fields. - remove testcurobject hack and perform a check only for regular fields - move is_holded_by to interface and rename it to is_owned_by - don't check static symbols in _needs_init_final because they always point to symbols registered on unit level - don't check object type in id_type, read_named_type when we are looking for type of structure member - the only check will be performed for record/object fields now + tests git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@16646 3ad0048d-3df7-0310-abae-a5850022a9f2
* compiler: fix typopaul2010-12-271-1/+1
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@16645 3ad0048d-3df7-0310-abae-a5850022a9f2
* compiler: require at least one argument of class operator to be of type of ↵paul2010-12-275-332/+377
| | | | | | structure where this operator is declared git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@16644 3ad0048d-3df7-0310-abae-a5850022a9f2
* * stdcall added to ipropertysetstorage, mantis 18315marco2010-12-261-1/+1
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@16643 3ad0048d-3df7-0310-abae-a5850022a9f2
* compiler: read and write full token size instead of 1 byte because TToken ↵paul2010-12-261-17/+19
| | | | | | has more than 255 elements now git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@16642 3ad0048d-3df7-0310-abae-a5850022a9f2
* tests: add Negative and Positive operators testpaul2010-12-261-0/+19
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@16641 3ad0048d-3df7-0310-abae-a5850022a9f2
* compiler: add unary plus node, search for unary plus operator if a type ↵paul2010-12-268-5/+86
| | | | | | cannot be handled by compiler, increase ppu version because of node types change git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@16640 3ad0048d-3df7-0310-abae-a5850022a9f2
* compiler: allow Inc, Dec, Explicit operators for other fpc modespaul2010-12-252-38/+88
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@16637 3ad0048d-3df7-0310-abae-a5850022a9f2
* compiler: map delphi Implicit operator to := operator of FPC, add Explicit ↵paul2010-12-257-39/+77
| | | | | | operator for delphi only (for now) which works when explicit type conversion happens + extend test git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@16636 3ad0048d-3df7-0310-abae-a5850022a9f2
* * For object fullrtti, add a parent 'field' regardless of whether its type ↵sergei2010-12-241-1/+1
| | | | | | needs inittable. git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@16635 3ad0048d-3df7-0310-abae-a5850022a9f2
* * fixed comments for some comments, they were offset by one line (patch byjonas2010-12-241-18/+18
| | | | | | | Dmitry Boyarintsev, mantis #17486) git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@16634 3ad0048d-3df7-0310-abae-a5850022a9f2
* o patch by Jeppe Johansen to fix mantis #17472:jonas2010-12-249-8/+157
| | | | | | | | | | | * generate add.w instead of add for thumb-2 in case one of the registers is > r8 * add register interferences for the "add" instruction so the register allocator can detect invalid instruction forms (even for assembler code) * fixed error in thumb2.inc detected by the previous change git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@16633 3ad0048d-3df7-0310-abae-a5850022a9f2
* Fixed rtti/finalization of objects that have ancestors and fields of managed ↵sergei2010-12-243-6/+97
| | | | | | | | | | | types: * Link rtti to ancestor by writing rtti of ancestor as a field of type tkObject and offset zero. This is a cheat from formal point of view (as it replaces inheritance with aggregation), but is fine for the intended purpose of representing memory layout. Now RTL can handle entire instance of descendant object, and such objects can be statically allocated without leaks. * Bypass finalization in inherited object destructors, as the instance is now entirely finalized in outermost destructor. + test git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@16632 3ad0048d-3df7-0310-abae-a5850022a9f2
* compiler: extend internal error 200305061 check for recordspaul2010-12-241-1/+1
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@16630 3ad0048d-3df7-0310-abae-a5850022a9f2
* compiler: implement Inc, Dec class operatorspaul2010-12-247-46/+110
| | | | | | | | | - extend tok2node array to store inline function number for the case when nodetype = inlinen, add Inc, Dec operators to array - implement inline function support in isunaryoverloaded - check for operator overload if Inc, Dec is not used for standard types - extend test to check Inc,Dec operators git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@16629 3ad0048d-3df7-0310-abae-a5850022a9f2
* tests: forgot to add { %fail} directivepaul2010-12-241-0/+1
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@16628 3ad0048d-3df7-0310-abae-a5850022a9f2
* compiler: paul2010-12-242-47/+85
| | | | | | | | - parse operator return type the same way as we parse function return type - which pushing structures into the symtable and allowing self references, - this change allows class operators to have return type = structure where they are defined - extend test to check LogicalNot operator which can be finally compiled now git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@16627 3ad0048d-3df7-0310-abae-a5850022a9f2
* compiler: rename parser_e_constructors_always_objects message to ↵paul2010-12-2423-343/+364
| | | | | | 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: http://svn.freepascal.org/svn/fpc/trunk@16626 3ad0048d-3df7-0310-abae-a5850022a9f2
* tests: add also test for +,-,or,xor,and operatorspaul2010-12-241-1/+47
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@16625 3ad0048d-3df7-0310-abae-a5850022a9f2
* compiler: implement delphi style class operators:paul2010-12-247-49/+332
| | | | | | | | | - add delphi operator tokens into token enum - move optoken search from parse_proc_dec to parse_proc_head and add delphi operator name search - map delphi operators to existent fpc operators and skip some delphi operators for now - implement store operators in record symtable and search in it git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@16624 3ad0048d-3df7-0310-abae-a5850022a9f2