pierre
14a10ad6cb
+ Add $rbp FrameName for x86_64 CPU
...
git-svn-id: trunk@16662 -
2010-12-30 14:53:57 +00:00
paul
b437f85984
compiler: forgotten unit in r16660
...
git-svn-id: trunk@16661 -
2010-12-30 08:07:05 +00:00
paul
2af416e145
compiler: move current_objectdef variable to implementation of pdecobj and use explicit type conversion to tobjectdef in other places where current_objectdef is needed
...
git-svn-id: trunk@16660 -
2010-12-30 07:40:31 +00:00
paul
ee78cf0f06
compiler: use current_structdef in more places where current_objectdef was used, change type of current_genericdef and current_specializedef to tabstractrecorddef for future use with generic records
...
git-svn-id: trunk@16659 -
2010-12-30 07:33:57 +00:00
paul
dc5f5c3f63
compiler: use current_structdef instead of current_objectdef in more places
...
git-svn-id: trunk@16658 -
2010-12-30 06:46:06 +00:00
marco
ff2292aafa
* Patch from LacaK2 to improve decimalpoint localisation. (Mantis 18338)
...
git-svn-id: trunk@16653 -
2010-12-29 12:33:14 +00:00
paul
327b570ea4
compiler: rename extended records to advanced records
...
git-svn-id: trunk@16652 -
2010-12-29 03:33:00 +00:00
paul
86d3e41442
compiler: replace MODESWTICH POINTERARITHMETICS with $POINTERMATH directive, 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: trunk@16651 -
2010-12-29 03:24:28 +00:00
Jonas Maebe
5175a5ee07
* handle LOC_SUBSETREG,LOC_CSUBSETREG,LOC_SUBSETREF,LOC_CSUBSETREF in
...
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: trunk@16650 -
2010-12-28 23:52:25 +00:00
paul
a8da9e4bd1
compiler: set result value to dummy function to prevent compiler to generate a hint
...
git-svn-id: trunk@16649 -
2010-12-28 09:51:26 +00:00
paul
04ac114c77
tests: move tb0070.pp to tbs and change expected behavior to success because delphi and fpc both allows this constructions now
...
git-svn-id: trunk@16647 -
2010-12-27 05:51:59 +00:00
paul
210e78e4fa
compiler: allow objects and records to have members which point to themself. 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: trunk@16646 -
2010-12-27 05:47:25 +00:00
paul
e098046608
compiler: fix typo
...
git-svn-id: trunk@16645 -
2010-12-27 03:43:42 +00:00
paul
51a9d3280c
compiler: require at least one argument of class operator to be of type of structure where this operator is declared
...
git-svn-id: trunk@16644 -
2010-12-27 02:33:17 +00:00
marco
b25f51e2e1
* stdcall added to ipropertysetstorage, mantis 18315
...
git-svn-id: trunk@16643 -
2010-12-26 16:52:10 +00:00
paul
77fa5b7fb9
compiler: read and write full token size instead of 1 byte because TToken has more than 255 elements now
...
git-svn-id: trunk@16642 -
2010-12-26 15:15:20 +00:00
paul
fb2c465f22
tests: add Negative and Positive operators test
...
git-svn-id: trunk@16641 -
2010-12-26 12:21:05 +00:00
paul
ee6fe6c4f5
compiler: add unary plus node, search for unary plus operator if a type cannot be handled by compiler, increase ppu version because of node types change
...
git-svn-id: trunk@16640 -
2010-12-26 12:19:28 +00:00
paul
c0c7e40b65
compiler: allow Inc, Dec, Explicit operators for other fpc modes
...
git-svn-id: trunk@16637 -
2010-12-25 11:31:07 +00:00
paul
66b128efb3
compiler: map delphi Implicit operator to := operator of FPC, add Explicit operator for delphi only (for now) which works when explicit type conversion happens + extend test
...
git-svn-id: trunk@16636 -
2010-12-25 11:08:02 +00:00
sergei
2ff5f7a000
* For object fullrtti, add a parent 'field' regardless of whether its type needs inittable.
...
git-svn-id: trunk@16635 -
2010-12-24 16:20:44 +00:00
Jonas Maebe
814658847e
* fixed comments for some comments, they were offset by one line (patch by
...
Dmitry Boyarintsev, mantis #17486 )
git-svn-id: trunk@16634 -
2010-12-24 15:58:41 +00:00
Jonas Maebe
780e75bfac
o patch by Jeppe Johansen to fix mantis #17472 :
...
* 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: trunk@16633 -
2010-12-24 15:54:39 +00:00
sergei
8cbef5627e
Fixed rtti/finalization of objects that have ancestors and fields of managed 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: trunk@16632 -
2010-12-24 14:46:29 +00:00
paul
cdca5f42b7
compiler: extend internal error 200305061 check for records
...
git-svn-id: trunk@16630 -
2010-12-24 09:27:34 +00:00
paul
4531e1231b
compiler: implement Inc, Dec class operators
...
- 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: trunk@16629 -
2010-12-24 09:26:52 +00:00
paul
d62ad56b74
tests: forgot to add { %fail} directive
...
git-svn-id: trunk@16628 -
2010-12-24 07:36:01 +00:00
paul
8c8c1fc151
compiler:
...
- 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: trunk@16627 -
2010-12-24 07:22:48 +00:00
paul
3c6fde4acc
compiler: rename parser_e_constructors_always_objects message to 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: trunk@16626 -
2010-12-24 06:41:41 +00:00
paul
714c4164ad
tests: add also test for +,-,or,xor,and operators
...
git-svn-id: trunk@16625 -
2010-12-24 06:05:17 +00:00
paul
b811f1be15
compiler: implement delphi style class operators:
...
- 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: trunk@16624 -
2010-12-24 05:43:36 +00:00
paul
525f4fea43
compiler: prepare collect_overloads_in_struct to work with operators, replace tprocsym argument in proc_add to tsymtable because tprocsym is only used to get the symtable
...
git-svn-id: trunk@16623 -
2010-12-24 03:17:43 +00:00
paul
d97cf8ed9d
compiler: implement IN operator which was known by compiler but was not supported. + test
...
git-svn-id: trunk@16622 -
2010-12-24 02:25:22 +00:00
marco
9c4675def5
* cleaning out use of old endianess routines (these are centralized in system since 2.0.x days)
...
git-svn-id: trunk@16621 -
2010-12-23 20:38:56 +00:00
Jonas Maebe
067536f8da
* pass large "const" record parameters by reference for non-cdecl/cppdecl
...
(mantis #17442 )
git-svn-id: trunk@16620 -
2010-12-23 16:11:06 +00:00
Jonas Maebe
d10f46ec59
* skip instructions containing a reference with a segment prefix (fixes
...
mantis #18113 )
git-svn-id: trunk@16619 -
2010-12-23 15:24:29 +00:00
Jonas Maebe
c8115921f1
* fixed comment typo
...
git-svn-id: trunk@16618 -
2010-12-23 15:14:30 +00:00
paul
22ddd23d03
compiler: fix error in overloaded_names array. "In" operator has "is" name and vice versa. Add token in comment for each overloaded_names entry to prevent similar errors in future.
...
git-svn-id: trunk@16617 -
2010-12-23 06:44:47 +00:00
marco
b6a8fb8a5b
* fix for 10758, additional terminal type checked (udev)
...
git-svn-id: trunk@16616 -
2010-12-22 21:20:51 +00:00
marco
49c76bdbfd
* bug #8004 . disable ok button if length(texttosearch)=0 in find dialog
...
git-svn-id: trunk@16615 -
2010-12-22 21:12:27 +00:00
marco
1b107bb4a5
* switch IDE to external linker on win32/64 for now (mingw linking compat)
...
git-svn-id: trunk@16614 -
2010-12-22 19:27:09 +00:00
marco
eed9b88f20
* Modified hint for search/replace again to show what will be done. bug #0010715
...
git-svn-id: trunk@16613 -
2010-12-22 18:39:13 +00:00
sergei
cd1f8e14f4
* TRTTIWriter improvements:
...
* Emit typename for Variants (Delphi compatible)
* For objects, write record-style RTTI instead of class-style. Objects cannot have published symbols, so class-style RTTI for them is always empty, thus typeinfo() was returning a useless stub. The new behavior is closer to Delphi, but still different (Delphi typeinfo() returns pointer to what is initrtti in FPC, while we return fullrtti).
git-svn-id: trunk@16612 -
2010-12-22 14:45:40 +00:00
sergei
b50cf9a42a
* TRTTIWriter.fields_write_rtti_data: refactoring. Since TAsmList allows random access, a separate loop iteration to count fields is redundant. Simply count the actually written fields, then insert result before field data.
...
git-svn-id: trunk@16611 -
2010-12-22 12:42:16 +00:00
Jonas Maebe
ce93333bda
* fixed end of LaTeX environment after r16574 (mantis #18286 )
...
git-svn-id: trunk@16610 -
2010-12-22 09:29:03 +00:00
paul
bf3c098c18
compiler: check that records methods have implementation too. previously check worked only for some object types
...
git-svn-id: trunk@16609 -
2010-12-22 03:40:04 +00:00
paul
92d6503704
compiler: rename _EQUAL token to _EQ to prevent problems with adding delphi operator names which contains "EQUAL" name, also rename _UNEQUAL to _NE for consistency
...
git-svn-id: trunk@16608 -
2010-12-22 02:01:40 +00:00
sergei
b3aa9ac813
* Refactored TRTTIWriter by separating some commonly used code into procedures. Improves readability and reduces amount of typing; functionality stays unchanged.
...
git-svn-id: trunk@16607 -
2010-12-21 22:33:48 +00:00
marco
6f1f310ee9
* fix | separator char. Bug 6262D
...
git-svn-id: trunk@16606 -
2010-12-21 19:30:12 +00:00
marco
de5ca33983
* fix one of two issues in mantis 6326, double click on watch entry invokes edit watch
...
git-svn-id: trunk@16604 -
2010-12-21 08:15:31 +00:00