Commit Graph

3364 Commits

Author SHA1 Message Date
florian
92508a9801 * take of life of tlabelnode.left, the test does not test this however because I'am not aware of any example to force a left node for a label
git-svn-id: trunk@26082 -
2013-11-13 19:26:37 +00:00
lacak
aa147703d5 fcl-db: memds: when FieldDefs are changed set TableIsCreated to false to signal, that CreteTable should be called.
+ Add test unit for TMemDataset to allow test specific properties/methods of TMemDataset
+ Add this unit to test frameworks

git-svn-id: trunk@26025 -
2013-11-11 09:14:21 +00:00
florian
1d4a4d0684 + noreturn directive
git-svn-id: trunk@26003 -
2013-11-10 09:00:59 +00:00
florian
1a4584f4c6 + dead store elimination, based on a patch by Jeppe Johansen
git-svn-id: trunk@25962 -
2013-11-06 21:10:26 +00:00
florian
e8787c4b48 + constant propagation, based on a patch by Jeppe Johansen
git-svn-id: trunk@25958 -
2013-11-06 21:10:15 +00:00
Jonas Maebe
51763b26dd + iosxlocale unit that uses CoreFoundation to fill in the sysutils locale
settings on (Mac) OS X and iOS (implementation by Yury Sidorov, mantis
    #18528)

git-svn-id: trunk@25941 -
2013-11-05 20:10:55 +00:00
Károly Balogh
eb8858933d added a simple optional utility to convert FP Testsuite results to JUnit.XML format
git-svn-id: trunk@25915 -
2013-11-02 20:39:11 +00:00
Jonas Maebe
4becf1f3c1 + tests for mantis #23196 and #25122, already fixed by r25888
git-svn-id: trunk@25889 -
2013-10-31 13:10:48 +00:00
Jonas Maebe
21eeec9981 + re-implementation of real->string and string->real conversion routines
based on the Grisu1 algorithm. This corrects several precision issues
    with the previous code used to perform such conversions (patch by
    Max Nazhalov, mantis #25241)
   o adaptation of several tests to deal with the better precision of these
     routines compared to the previous version
  Please don't remove the real2str.inc file yet, it's still used by the
  JVM target for now

git-svn-id: trunk@25888 -
2013-10-31 12:39:27 +00:00
svenbarth
c077adf499 Fix for Mantis #25132
defcmp.pas, objectdef_is_related:
  * use "equal_defs" instead of "=", as the former also handles equivalence of specializations

+ added test

git-svn-id: trunk@25848 -
2013-10-25 19:50:56 +00:00
Jonas Maebe
555634b755 * (re)set upper bits of register when appropriate for all operations in
a_op_reg_reg() (except for NOT, which was already handled correctly)
    + test

git-svn-id: trunk@25840 -
2013-10-22 07:41:52 +00:00
svenbarth
d908dbeec1 Fix for Mantis #25215.
compiler/scanner.pas, tscannerfile.readtoken:
  * after trying to read a _INTCONST check whether a valid first character for an identifier follows and give a syntax error if that is not the case

+ added test

git-svn-id: trunk@25835 -
2013-10-20 12:15:49 +00:00
svenbarth
d91d4afb0f Fix for Mantis #25210 .
compiler/pdecobj.pas, object_dec:
  * since revision 25518 the global symtable of the current module is no longer popped and pushed again so that the defaware symtablestack can add the helper; thus we need to do this not only for static symtables, but for global ones as well
  * adjusted comment to reflect current situation

git-svn-id: trunk@25834 -
2013-10-20 11:33:01 +00:00
nickysn
e0350d6f44 + added test tlea2.pp, which tests the LEA instruction with a 64-bit, 32-bit and
16-bit operand size on x86_64

git-svn-id: trunk@25810 -
2013-10-17 18:25:17 +00:00
nickysn
4aa010eedc + support LEA with 16-bit operand size
git-svn-id: trunk@25808 -
2013-10-17 16:11:08 +00:00
Jonas Maebe
8dd956cbde * convert unicode/widestring constants to ansistring in resourcestring
declarations (mantis #25198)

git-svn-id: trunk@25807 -
2013-10-17 12:43:39 +00:00
Jonas Maebe
2b1a077b98 + added now that the iOS SDK files aren't under NDA anymore
git-svn-id: trunk@25788 -
2013-10-14 19:29:39 +00:00
nickysn
e18f336f3f + added unit ptcmouse, similar to winmouse and msmouse, for use with ptcgraph and ptccrt
git-svn-id: trunk@25779 -
2013-10-14 14:31:14 +00:00
Jonas Maebe
10ae87f11c * fixed LdrLdr2LdrMov optimisation in case the first and second ldr have
a different size (disable it in that case) + test

git-svn-id: trunk@25778 -
2013-10-14 12:49:34 +00:00
Jonas Maebe
31a3122b91 * fixed LsrAnd2Lsr test by replacing the existing buggy check with comparing
the outcome of the original and the optimised sequence and seeing whether
    it's same + test

git-svn-id: trunk@25776 -
2013-10-14 12:49:28 +00:00
nickysn
014a4e4653 * updated PTCPas to version 0.99.14
git-svn-id: trunk@25771 -
2013-10-13 22:34:01 +00:00
paul
1c578de28c compiler:
* don't allow to apply the same hint directive twice
  * change parser_e_proc_dir_not_allowed to more generic variant parser_e_dir_not_allowed - they are similar and 'procedure' prefix does not give more information about the error.
  * maybe_parse_hint_directives() uses procdef settings for initial values
  + add tests

git-svn-id: trunk@25720 -
2013-10-08 04:56:42 +00:00
paul
912384594b fpc: allow hint directives between other procedure directives in Delphi mode (issue #25101)
git-svn-id: trunk@25710 -
2013-10-07 10:59:53 +00:00
michael
4bdf29795c * Example how to create public/private RSA key
git-svn-id: trunk@25709 -
2013-10-07 07:51:53 +00:00
florian
304d7ef7a1 * restores atari support/rtl partially
git-svn-id: trunk@25699 -
2013-10-06 19:36:59 +00:00
florian
f95b225157 * fix wrong constant temp handling, introduced in r24953, resolves #24915
git-svn-id: trunk@25684 -
2013-10-06 13:08:52 +00:00
nickysn
8574642a1f + added and enabled compilation of unit printer for i8086-msdos
git-svn-id: trunk@25670 -
2013-10-06 00:14:08 +00:00
nickysn
119cf760eb * UpdateTargetSwitchStr moved to a new unit dirparse.pas. This avoids the dependence of unit scandir on unit options
git-svn-id: trunk@25629 -
2013-10-03 12:21:33 +00:00
sergei
5af873ee5b * x86 targets: Profiling shows that quite a bit of time is spent in findreg_by_number(), despite it uses binary search. Worse, it is repeated for every piece of register information. Trying to get rid of some of these calls: rearranged registers so that their "opcode" matches 3 LSBs of superregister number (with a few exceptions described at the beginning of x86reg.dat). This allows to lookup opcodes in regval() with O(1) complexity, and removes need in rXXXop.inc files.
git-svn-id: trunk@25627 -
2013-10-03 08:08:04 +00:00
svenbarth
bb00c76fe7 Fix for Mantis #21015 .
symdef.pas:
  * tobjectdef.find_implemented_interface: use equal_defs to ensure that equal specializations of interfaces are found as well
  * getparaencoding: use globals.CP_NONE instead of just CP_NONE, because defcmp contains a cp_none enum as well.

+ added test

git-svn-id: trunk@25609 -
2013-09-30 08:44:46 +00:00
svenbarth
2c93687c5a Fix an embarrasing error in m68k which fixes 60 tests.
m68k/cgcpu.pas, tcg68k.g_flags2reg:
  * don't sign extend the flag value which was stored to the register, but instead do a "AND 1" on it to reduce it to 1 bit; afterall Booleans in Pascal are either 0 or 1 and not 0 or $FF

+ added test

git-svn-id: trunk@25598 -
2013-09-28 20:07:57 +00:00
svenbarth
e8edbd29c0 Fix for Mantis #24687.
pgenutil.pas:
  + add new function could_be_generic which checks whether a given symbol name could be a generic (which is determined using the genericdummysyms list for the current module)
pexpr.pas:
  * factor: only do a typecheck pass (postfixoperators does one as well) if the found node can not be a generic type
  * sub_expr: do a typecheck pass if it isn't a specialization

+ added test

git-svn-id: trunk@25579 -
2013-09-26 10:21:11 +00:00
svenbarth
fb8b0e7a27 Fix for Mantis #24453. Check for nested types after a specialization. Additionally check correctly whether a type is really a generic before accepting it when parsing a generic.
pgenutil.pas, generate_specialization:
  * use "is_generic" instead of "df_generic in defoptions" as nested non generic types will have that flag set as well and thus would be acceptable for the "<...>" notation although no generic version of it exists
ptype.pas, single_type:
  * check for nested types after doing a specialization

+ added tests (one for now working case and one for now forbidden case)

git-svn-id: trunk@25578 -
2013-09-26 09:21:28 +00:00
svenbarth
68a3827539 Fix for Mantis #21051. Correctly handle specializations that occur during the specialization of methods.
cclasses.pas:
  + TFPHashList & TFPHashObjectList: add WhileEachCall methods that walk the list like ForEachCall does, but uses a while-loop instead of a for-loop
psub.pas, generate_specialization_procs:
  * use WhileEachCall instead of ForEachCall as new defs can be added during the specialization that need to be specialized as well

+ added test

git-svn-id: trunk@25577 -
2013-09-26 08:15:58 +00:00
paul
cdd5d029f0 compiler: don't add operator name as a function result into operator symtable. For FPC mode only operator result identifier should be added and for Delphi mode only 'Result' identifier. Fixes mantis #0025081
git-svn-id: trunk@25562 -
2013-09-25 05:22:28 +00:00
paul
c22c364f43 compiler: regenerate parameter list in tprocvardef.getcopy (fixes compiler crash, issue #0025077)
git-svn-id: trunk@25561 -
2013-09-25 03:28:14 +00:00
paul
ce6c8c1b59 compiler: search namespace symbols also in the interface symtable of a unit when we are registering a unit with a namespace in the implementation section (fixes issue #0025059)
git-svn-id: trunk@25560 -
2013-09-25 02:25:26 +00:00
sergei
0914bb7944 - Removed empty include file wustrings.inc
git-svn-id: trunk@25551 -
2013-09-24 16:35:04 +00:00
paul
f3963172ba compiler: don't look at unit and namespace symbols from other units while searching for a type (issue #0025054)
git-svn-id: trunk@25536 -
2013-09-23 09:22:47 +00:00
nickysn
ce123b6956 + started the i8086-msdos version of the unit graph, based on the go32v2
version. Only the CGA routines are enabled for now and the unit compiles, but
  does not work yet.

git-svn-id: trunk@25534 -
2013-09-21 22:06:55 +00:00
svenbarth
9d48bc0baf Implement cross unit type overloading of generics. This fixes the regression introduced with revision 25498.
symtable.pas:
  + add new tsymbol_search_flag type which can be passed to various searchsym* routines
  + add support to not call "addsymref"
  + add new searchsym_with_flags function that calls searchsym_maybe_with_symoption
  * adjust searchsym_maybe_with_symoption, searchsym_in_class & searchsym_in_helper to use new flag type instead of Boolean arguments
  * adjust searchsym & searchsym_with_symoption which call the modified functions
nutils.pas, handle_staticfield_access:
  * adjust searchsym_in_class call
pexpr.pas, handle_factor_typenode, postfixoperators, factor:
  * adjust searchsym_in_helper and searchsym_in_class calls
pinline.pas, new_function:
  * adjust searchsym_in_class call
scanner.pas, try_consume_nestedsym:
  * adjust searchsym_in_class call
fmodule.pas, tmodule:
  + add genericdummysyms field which is a TFPHashObjectList that contains TFPObjectList instances per generic dummy that in turn contains tgenericdummysyms instances
pgenutil.pas:
  + add function split_generic_name to split a generic name into non-generic name and count value of type parameters
  + add function resolve_generic_dummysym which tries to use the new genericdummysyms field to find the real symbol of a dummy sym
  * generate_specialization: adjust searchsym_in_class call
  * specialization_init/specialization_done: save/restore genericdummysyms of module
symdef.pas, tdefawaresymtablestack:
  + add new intermediate method pushcommon which is used by both push and pushafter
  + add new intermediate method remove_helpers_and_generics (which calls remove_generics and remove_helpers if necessary)
  * rename removehelpers to remove_helpers
  * rename addhelpers to add_helpers_and_generics and extend it to correctly fill current_module.genericdummysyms
  * call remove_helpers_and_generics from pop instead of remove_helpers
ptype.pas, single_type, read_named_type.expr_type, read_named_type:
  * try to resolve symbols with sp_generic_dummy with resolve_generic_dummysym

+ added test

git-svn-id: trunk@25519 -
2013-09-18 14:28:46 +00:00
svenbarth
fbceb574eb Fix for Mantis #25041 . Correctly set CurrentThreadVar for those tthread.inc incarnations that don't use the default ThreadProc in classes.inc (this should be changed in the future though...). In addition to Unix systems as described by the bug report this also involved BeOS and Netware LibC.
+ added test

git-svn-id: trunk@25511 -
2013-09-17 18:02:12 +00:00
svenbarth
2da06b004e Added test for Mantis #24458 which was fixed in revision 24628.
git-svn-id: trunk@25509 -
2013-09-17 14:20:23 +00:00
paul
5aa919c2a8 compiler: have unit interface symtable in stack while parsing implementation uses list (fixes issue #10477)
git-svn-id: trunk@25505 -
2013-09-17 08:53:37 +00:00
paul
0d8ad2a932 compiler: don't treat TRUE and FALSE as keywords. They are predefined constants from this moment. This change is compatible with other pascal compilers. Fixes issue #0025030
git-svn-id: trunk@25497 -
2013-09-16 09:11:17 +00:00
michael
3ffae89e12 * Null stream implementation
git-svn-id: trunk@25495 -
2013-09-16 08:24:46 +00:00
paul
99dadf2998 compiler: allow comparative operators to have result other than Boolean. Reasons:
1. It allows to use comparative operators in some unusual cases (issue #25004).
2. Regular type checking does not allow to use other than Boolean types in IF expressions anyway.
3. Delphi compatibility (although Delphi documentation states otherwise).

git-svn-id: trunk@25494 -
2013-09-16 05:10:31 +00:00
paul
93f1ba4493 compiler: don't allow to access an enum members through the enum member. It should be only possible throught the enum type name. Fixes issue #0025029
git-svn-id: trunk@25493 -
2013-09-16 02:48:52 +00:00
nickysn
034f9c6b71 + added and implemented unit keyboard for i8086-msdos, based on the go32v2 version of the unit
git-svn-id: trunk@25489 -
2013-09-15 17:48:35 +00:00
svenbarth
08543ddeba Fix for Mantis #23899 . Allow to overwrite TStringList.ExchangeItems if necessary.
rtl/objpas/classes/classesh.inc, TStringList:
  * rename the private ExchangeItems to ExchangeItemsInt and allow inlining
  + add a protected virtual ExchangeItems
rtl/objpas/classes/stringl.inc, TStringList:
  * Exchange: call ExchangeItemsInt
  + let default implementation of ExchangeItems simply call ExchangeItemsInt
  * QuickSort: call ExchangeItemsInt directly if there is no override otherwise call ExchangeItems

+ added test

git-svn-id: trunk@25480 -
2013-09-13 14:17:01 +00:00