Commit Graph

2292 Commits

Author SHA1 Message Date
joost
8a3a0648ad * Renamed fpmake files so they are not recognized anymore by bash-script
used to generate include files for the fpc-all fpmake package. Now sndfile 
   and ptc are effecively disabled for fpmake, just like for Makefile.fpc

git-svn-id: trunk@15265 -
2010-05-13 16:50:52 +00:00
Jonas Maebe
d9c64ed3c1 + (interactive) test for mantis #8076
git-svn-id: trunk@15242 -
2010-05-08 11:31:00 +00:00
Jonas Maebe
45c813929a * update the coordinates properly if a string is written that exactly fills
a line (mantis #15599)

git-svn-id: trunk@15241 -
2010-05-08 11:29:25 +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
43033bacae o partially applied patches from mantis #16248 by Sven Barth:
+ test cpp class renaming (compiled for linux/i386 and all darwin platforms)
   * changed compilation instructions for obj/cpptcl1.cpp

git-svn-id: trunk@15239 -
2010-05-08 09:59:08 +00:00
florian
e01e4e5719 * optimized copy(<dyn. array> ...) by checking if the elements are really ref. counted
git-svn-id: trunk@15228 -
2010-05-05 13:49:06 +00:00
Jonas Maebe
700aa3cf11 * GetEnumNameCount also counted the unit name after r14511 (mantis #16402)
git-svn-id: trunk@15225 -
2010-05-04 17:59:58 +00:00
Jonas Maebe
c60bcf8699 * fixed changing the visibility of a property with a fixed index in a child
class (mantis #15610)

git-svn-id: trunk@15223 -
2010-05-04 14:41:22 +00:00
Jonas Maebe
3f280c34cb * don't generate range checking code for pointers-indexed-as-arrays when
using non-constant indices (mantis #16377)

git-svn-id: trunk@15221 -
2010-05-04 10:39:01 +00:00
Jonas Maebe
2911435c5a * do replace one temp with another while inlining in case the former can
be a regvar while the latter cannot be (mantis #16018)

git-svn-id: trunk@15218 -
2010-05-03 16:29:03 +00:00
florian
f3c572edc5 * handle multiple string labels in one case branch correctly, resolves #16130
git-svn-id: trunk@15212 -
2010-05-02 21:44:24 +00:00
Jonas Maebe
0b44f8db1f * don't give an internal error when creating a dynamic array or a
record that requires init/finalisation with an objcclass
    (mantis #16366)

git-svn-id: trunk@15202 -
2010-05-02 13:42:03 +00:00
joost
df92cfbcf0 * Added templates for fppkg configuration files
git-svn-id: trunk@15193 -
2010-04-27 12:12:30 +00:00
joost
1834156acd * Removed usubst unit, use fpTemplate instead
* Commented out not-implemented option -l from help screen

git-svn-id: trunk@15192 -
2010-04-27 09:25:36 +00:00
joost
3759ad8963 * Moved fpcmkcfg from compiler/utils to utils/fpcmkcfg
git-svn-id: trunk@15189 -
2010-04-27 07:59:20 +00:00
marco
faf2bdfd62 * fix for mantis 16344 (quoted filename in $include ) + testparser example from that series of bugreports.
git-svn-id: trunk@15182 -
2010-04-26 13:17:26 +00:00
Jonas Maebe
c67712f81f + tthread.start method, simply calls tthread.resume for now (mantis #16326)
git-svn-id: trunk@15165 -
2010-04-24 14:52:08 +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
Jonas Maebe
2eddd5e704 * don't try to bitpack types > 32 bit on 32 bit cpus (mantis #16328)
git-svn-id: trunk@15162 -
2010-04-24 12:46:02 +00:00
joost
28395de42e * Moved fptemplate from fcl-web to fcl-base
git-svn-id: trunk@15158 -
2010-04-22 08:54:00 +00:00
florian
62c630abce * handle usage of generics type as class type correctly, resolves #16065
git-svn-id: trunk@15157 -
2010-04-21 20:19:18 +00:00
Jonas Maebe
f2e1819bae * put the call to afterconstructor inside the implicit try/catch block
block of the constructor, so that exceptions thrown there also
    properly abort construction (mantis #16311)

git-svn-id: trunk@15156 -
2010-04-21 20:06:54 +00:00
Jonas Maebe
72758864e4 * only allow field names in record/object typed constant declarations (mantis #16234)
* improved error recovery after encountering invalid field name in record/object typed constant
    declaration

git-svn-id: trunk@15150 -
2010-04-18 07:55:42 +00:00
paul
a1d94c6829 rtl: implement TStreamAdapter.CopyTo, .SetSize, return proper error value for Clone instead of raising exception (#0016161) + test
git-svn-id: trunk@15138 -
2010-04-11 12:52:31 +00:00
paul
c62c487b24 compiler: fix nested type typecast (issue #0016222)
git-svn-id: trunk@15122 -
2010-04-09 17:10:52 +00:00
Jonas Maebe
a18f2594e2 * fixed FloatToStr for ffGeneral when dealing with numbers whose number of
significant digits before the decimal points matches the precision
    parameter exactly (mantis #16188)
  * round instead of cut off digits in FloatToStr with ffGeneral
  * take into account the minus sign when determining whether a number needs
    to be represented using ffExponent instead of ffGeneral because it has
    too many digits

git-svn-id: trunk@15114 -
2010-04-05 14:54:24 +00:00
paul
8a0028a62e compiler: support *sealed* and *abstract* for objects (issue #0016174)
git-svn-id: trunk@15105 -
2010-04-01 14:36:33 +00:00
Jonas Maebe
4833867826 * moved most handling of records that fit in a register but that cannot be
treated as a regvar from pass_1 to the code generator, because this
    can always occur with a function result from a called function (in
    case the ABI prescribes returning certain records in registers)
    (mantis #16163)

git-svn-id: trunk@15101 -
2010-03-31 20:19:42 +00:00
Jonas Maebe
60f8b7fcb1 + int64 version of randomrange() (mantis #16108)
git-svn-id: trunk@15097 -
2010-03-30 20:04:19 +00:00
Jonas Maebe
734f9de2a0 + support for array of widechar typed constants (based on patch by
Blaise Thorn, mantis #16004)

git-svn-id: trunk@15096 -
2010-03-30 19:45:50 +00:00
paul
c879230f08 compiler: fix parsing and handling of typed constants declared inside classes/objects + tests
git-svn-id: trunk@15094 -
2010-03-30 07:09:44 +00:00
paul
973d947d6c compiler: allow const, type, var and class var sections for objects + test
git-svn-id: trunk@15092 -
2010-03-30 04:22:19 +00:00
ivost
d7e149805b * added new testset for interfaces and delegation, also GetInterface, GetInterfaceWeak, GetInterfaceByStr, AS and IS is tested
git-svn-id: trunk@15081 -
2010-03-28 00:44:20 +00:00
Jonas Maebe
a48a37d38b * fixed extended syntax checking {$x-} by moving it from the typecheck pass
to the parser, so that it only looks at what the programmer wrote rather
    than at all statements that the compiler may generate internally
    (mantis #11619)
  + several tests for {$x-} mode
  * modified tenumerators1 so it compiles without extended syntax enabled
    (to check for..in with {$x-})

git-svn-id: trunk@15075 -
2010-03-27 12:51:27 +00:00
Jonas Maebe
d8a902b4c4 * fixed internalerror in case the from-value of a for-loop has loc_jump
(mantis #15750)

git-svn-id: trunk@15071 -
2010-03-26 22:26:25 +00:00
Jonas Maebe
f0298ad2f5 + test for mantis #15363 fixed in r15066
git-svn-id: trunk@15070 -
2010-03-26 22:12:31 +00:00
ivost
f0ce69b264 * added testcase for right behavior of AS and SUPPORTS so that QueryInterface is called before GetInterface
git-svn-id: trunk@15067 -
2010-03-26 00:43:53 +00:00
paul
1b614b526a compiler:
- add own symbol table for enumeration to store enumeration elements
  - reimplement enumeration member traverse using symbol table instead of firstenum/nextenum - that members are removed
  - implement TEnum.Element access syntax - element is searched in the enumeration symtable in this case instead of global/local symtables
  - implement {$SCOPEDENUM ON/OFF} local switch
  + tests

git-svn-id: trunk@15051 -
2010-03-25 05:46:53 +00:00
Jonas Maebe
4d8f578e4c * when typecasting the result of pthread_self, always call it using
pthread_self(), because it's a procvar under Linux and hence otherwise
    the value of the procvar instead of the function result will be
    taken (mantis #15821)

git-svn-id: trunk@15049 -
2010-03-24 21:51:07 +00:00
Jonas Maebe
653974f679 * also give a "potential range error" hint with -CO in case the sizes
match but the source range does not fit in the dest range
    (related to mantis #16023)
  * don't give a "potential range error" when converting between
    s80real and sc80real, since even though the size may differ,
    the represented range does not

git-svn-id: trunk@15044 -
2010-03-24 21:21:19 +00:00
Jonas Maebe
8542632ebe * fixed evaluating constant expressions consisting of more than one term and
that start with a minus in the intel assembler reader (mantis #15843)

git-svn-id: trunk@15041 -
2010-03-24 20:52:31 +00:00
paul
1768810783 compiler: allow to derive classes from a nested class type (issue #0016083)
git-svn-id: trunk@15036 -
2010-03-23 05:36:11 +00:00
Jonas Maebe
82ff623390 + fixed Julian date helpers (based on patch by Bernd Engelhardt, mantis
#16040)
  * finished remaining unimplemented Julian date helpers

git-svn-id: trunk@15032 -
2010-03-22 21:01:46 +00:00
Jonas Maebe
87c9773ac0 + also support & to escape identifiers (and for octal notation) in Delplhi
mode (patch by Blaise Thorn, mantis #15930)

git-svn-id: trunk@15031 -
2010-03-21 23:33:44 +00:00
Jonas Maebe
6db635210a * don't give an internalerror when passing a constant string to an
openstring parameter (mantis #16022)

git-svn-id: trunk@15030 -
2010-03-21 14:51:12 +00:00
marco
c477df5046 * TCriticalSection.Tryenter support (Mantis 15928) + short test/demo
tested on FreeBSD (general Unix) and Windows. Note that Haiku seems 
    to have a native threadmgr rather than the Unix one. Will notify 
    maintainer (Olivier)

git-svn-id: trunk@15026 -
2010-03-21 11:34:05 +00:00
paul
49d94c5a16 compiler: implement {$VARPROPSETTER ON/OFF} support which is required for COM (D7 compatibility):
- add an option to skip varspez during parameters comparison
  - skip varspez comparison when searching a property reader candidate if $VARPROPSETTER is ON

git-svn-id: trunk@15020 -
2010-03-17 09:56:50 +00:00
Jonas Maebe
45d25bbe77 * fixed storing/loading widestring constant nodes into/from ppu files
(mantis #15909)
  * fixed storing/loading widestring constants into/from token streams
  * made storing/loading widestring constant nodes into/from ppu files
    endian safe

git-svn-id: trunk@15017 -
2010-03-14 13:27:00 +00:00
marco
8529d66523 * unzipper unit basic extraction test. (related to mantis 15836)
git-svn-id: trunk@15015 -
2010-03-14 11:41:54 +00:00
Jonas Maebe
171c0289b0 + tests from mantis #15777
git-svn-id: trunk@15013 -
2010-03-14 11:03:09 +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
michael
f39e9ba873 * Test unit for testing purposes
git-svn-id: trunk@15009 -
2010-03-13 16:04:19 +00:00
paul
949290e62f fcl-res: support tlb resources
git-svn-id: trunk@15001 -
2010-03-11 03:00:41 +00:00
Jonas Maebe
88f5addd1c * do not typecheck statements before checking whether they are valid,
because the associated simplifications can turn invalid statements
    into valid statements (based on patch by Aleksa Todorovic, mantis
    #15594)

git-svn-id: trunk@14998 -
2010-03-09 21:13:22 +00:00
marco
18cef789c6 * regenned makefile for Loesje
git-svn-id: trunk@14955 -
2010-02-28 16:11:01 +00:00
florian
e9c95ea46f + NvApi package for win32 and win64 by Dmitry Boyarintsev, resolves #15771
git-svn-id: trunk@14951 -
2010-02-28 09:56:36 +00:00
paul
8d7312f87b rtl: use CreateVCLComObject routing to create VCLComObject in case it is not assigned + test
git-svn-id: trunk@14948 -
2010-02-27 08:49:50 +00:00
paul
f607b7bdd5 tests: add SafeCallException test
git-svn-id: trunk@14941 -
2010-02-26 10:28:19 +00:00
Jonas Maebe
fe5d0b0ef4 * fixed internalerror in case of dereferencing a loc_(c)subsetreg/ref
(mantis #15812)

git-svn-id: trunk@14925 -
2010-02-19 16:26:36 +00:00
Jonas Maebe
78b9820e11 * support record fields separated by commas instead of semicolons in typed
constant record definitions in MacPas mode (patch by Adriaan van Os,
    mantis #15764)

git-svn-id: trunk@14915 -
2010-02-14 14:33:30 +00:00
Jonas Maebe
025ec34e4d + "CExtended" type that is the same as "extended", but conforming to the
properties/behaviour of the equivalent of Extended in C (i.e., to
    "long double" on i386 and x86_64 platforms that support a 10 byte
    long double, and to "double" elsewhere)

git-svn-id: trunk@14912 -
2010-02-14 13:45:58 +00:00
Jonas Maebe
674cdaf3fc * handle fields with the same name as a type also correctly in case of
nested records (mantis #15592)

git-svn-id: trunk@14910 -
2010-02-13 20:51:19 +00:00
Jonas Maebe
85984c2d8f * insert proper type conversions when optimising logical operations and
compares by avoiding unnecessary sign extensions (fixes bug reported in
    http://lists.freepascal.org/lists/fpc-pascal/2010-January/023907.html )
  * never throw away int2int type conversions on bitpacked loads, because
    in these cases the proper bits still need to be selected

git-svn-id: trunk@14892 -
2010-02-12 18:13:08 +00:00
florian
092153e7ad * handle unrolling of for ... downto ... correctly, resolves #15668
git-svn-id: trunk@14884 -
2010-02-10 21:08:54 +00:00
Jonas Maebe
6b0a0c149b * don't perform a range check in Delphi mode when passing a cardinal as
vtInteger to an array-of-const parameter (mantis #15727)

git-svn-id: trunk@14882 -
2010-02-10 16:35:37 +00:00
Jonas Maebe
d60e1f674c * automatically try to call procvars that are subscripted or used in a
with-statement, both in FPC and TP/Delphi modes (mantis #15728)

git-svn-id: trunk@14881 -
2010-02-10 16:12:18 +00:00
florian
c459100773 + basic info program
git-svn-id: trunk@14878 -
2010-02-07 22:56:05 +00:00
florian
0c153a46df * math.power/intpower(0,0) return 1, this is as recommended in IEEE 754
as well as compatible with other programming languages and delphi

git-svn-id: trunk@14873 -
2010-02-06 23:10:03 +00:00
Jonas Maebe
89110baab8 * don't modify the flags while simplifying PIC memory references
(mantis #15694)

git-svn-id: trunk@14871 -
2010-02-06 20:18:36 +00:00
Jonas Maebe
b1d2ab5450 * tobject.inheritsfrom(nil) has to return false (mantis #15690)
git-svn-id: trunk@14870 -
2010-02-06 18:14:26 +00:00
Jonas Maebe
870edaf916 * tobject.unitname and tobject.tostring have to return an ansistring instead
of a shortstring (mantis #15693)
  * changed tobject5 so it checks whether the return values are correct

git-svn-id: trunk@14869 -
2010-02-06 17:53:49 +00:00
michael
7096ee6bfa * Regenerated
git-svn-id: trunk@14863 -
2010-02-04 20:31:49 +00:00
michael
59bd32b7ea * Initial check-in
git-svn-id: trunk@14859 -
2010-02-04 15:18:07 +00:00
michael
34f551ad5e * Initial check-in
git-svn-id: trunk@14857 -
2010-02-04 12:58:02 +00:00
marco
706f0b7975 * New more delphi compat intstrtotime by Bart Broersma #15505 + test
git-svn-id: trunk@14854 -
2010-02-03 15:10:14 +00:00
Jonas Maebe
caca6cea37 * allow any kind of fields in Object Pascal classes that are passed to
Objective-C methods or which are fields of Objective-C classes (since they
    are basically opaque to the Objective-C runtime) + fixed tobjc11 so it
    expects classes to be encoded as opaque types
  * give a proper error message when using illegal field/parameter types in
    Objective-C classes/methods instead of an internal error (only checked
    during rtti generation rather than during parsing, because during parsing
    some types may still be forwarddefs)
  * split objcutil in objcdef and objcutil, with objcdef depending only on
    the symtable so it can be used in symdef

git-svn-id: trunk@14838 -
2010-01-31 21:13:41 +00:00
florian
dfc2652062 + support of compiler intrinsic sar* using a patch by Benjamin Rosseaux, resolves #15606
git-svn-id: trunk@14834 -
2010-01-31 16:47:01 +00:00
Jonas Maebe
13e8b3f23e * don't give a "NoThreadError" for any default rtl/basicevent* routines,
so the TMultiReadExclusiveWriteSynchronizer routines can be safely
    executed even with the default thread manager -> removed ismultithread
    checks, so that it keeps working even if ismultithread is set to true
    between acquiring and freeing a lock (mantis #15619)

git-svn-id: trunk@14830 -
2010-01-29 21:01:11 +00:00
Jonas Maebe
2be600afff * support objc.id.<anyobjcmethod> in Delphi mode (mantis #15607)
git-svn-id: trunk@14822 -
2010-01-28 16:14:42 +00:00
joost
8ef245699a * Merging fcl-web_joost branch into trunk
--- Merging r13710 through r14654 into '.':
 G   utils/debugsvr/README.txt
 G   utils/fpmc/README.txt
 G   utils/tply/COPYING.txt
 G   utils/tply/README.txt
 G   utils/fpdoc/COPYING.txt
 G   utils/fpdoc/README.txt
 G   utils/fppkg/README.txt
 G   utils/README.txt
 G   utils/h2pas/README.txt
 G   ide/README.txt
 G   ide/TODO.txt
 G   rtl/macos/README.txt
 G   rtl/freebsd/x86_64/cprt0.as
 G   rtl/freebsd/x86_64/gprt0.as
 G   rtl/freebsd/buildrtl.pp
 G   rtl/freebsd/buildrtl.lpi
 G   rtl/COPYING.txt
 G   rtl/netware/README.txt
 G   rtl/inc/ustrings.inc
C    rtl/inc/objpash.inc
 G   rtl/inc/ustringh.inc
 G   rtl/README.txt
 G   rtl/objpas/README.txt
 G   tests/test/README.txt
 G   tests/test/tunistr6.pp
 G   tests/test/tunistr1.pp
 G   tests/test/tunistr7.pp
 G   tests/test/tunistr2.pp
 G   tests/test/opt/README.txt
 G   tests/test/tunistr4.pp
   C tests/test/tobject5.pp
 G   tests/test/tunistr5.pp
 G   tests/webtbs/uw13345y.pp
 G   tests/webtbs/tw11846a.pp
 G   tests/webtbs/tw12993.pp
 G   tests/webtbs/tw11846b.pp
--- Merging r13710 through r14654 into 'tests/webtbf/tw13815.pp':
 U   tests/webtbf/tw13815.pp
--- Merging r13710 through r14654 into 'tests/tbf/tb0216.pp':
 U   tests/tbf/tb0216.pp
--- Merging r13710 through r14654 into '.':
 G   compiler/ccharset.pas
 G   compiler/README.txt
 G   compiler/COPYING.txt
 G   compiler/optloop.pas
 G   compiler/utils/README.txt
 G   packages/sdl/README.txt
 G   packages/fcl-net/README.txt
--- Merging r13710 through r14654 into 'packages/fcl-xml/tests/README_DOM.txt':
 U   packages/fcl-xml/tests/README_DOM.txt
--- Merging r13710 through r14654 into '.':
 G   packages/fcl-xml/tests/README.txt
 G   packages/fcl-xml/src/README.txt
--- Merging r13710 through r14654 into 'packages/unzip/src/unzip51g.pp':
 U   packages/unzip/src/unzip51g.pp
--- Merging r13710 through r14654 into '.':
 G   packages/libc/README.txt
 G   packages/newt/README.txt
 G   packages/fcl-process/src/dummy
 G   packages/fcl-db/src/memds/README.txt
 G   packages/fcl-db/src/README.txt
U    packages/fcl-web/Makefile.fpc
A    packages/fcl-web/src/webpage.pp
U    packages/fcl-web/src/fphtml.pp
 G   packages/fcl-web/src/README.txt
C    packages/fcl-web/Makefile
 G   packages/libgd/src/gd.pas
 G   packages/libgd/README.txt
 G   packages/ptc/docs/TODO.txt
 G   packages/ptc/docs/README.txt
 G   packages/postgres/README.txt
 G   packages/fcl-base/examples/intl/README.txt
 G   packages/fcl-base/examples/README.txt
 G   packages/xforms/README.txt
 G   packages/amunits/README.txt
 G   packages/ibase/README.txt
 G   packages/sndfile/README.txt
 G   packages/libxml/src/xml2.pas
 G   packages/svgalib/README.txt
--- Merging r13710 through r14654 into 'packages/winunits-base/src/dwmapi.pp':
 U   packages/winunits-base/src/dwmapi.pp
--- Merging r13710 through r14654 into '.':
 G   packages/cdrom/README.txt
 G   packages/mysql/README.txt
 G   packages/oracle/README.txt
 G   packages/gtk1/README.txt
 G   packages/uuid/README.txt
 G   packages/odbc/README.txt
 G   packages/gdbm/README.txt
Summary of conflicts:
  Text conflicts: 2
  Tree conflicts: 1

git-svn-id: trunk@14808 -
2010-01-26 15:12:56 +00:00
giulio2
bb5891a560 * fpcres: Implemented TClosableFileStream to automatically release and acquire
file handles as needed. It avoids running out of file descriptors
  (fixes bug #15586)

git-svn-id: trunk@14805 -
2010-01-26 08:54:41 +00:00
florian
fc148f4aec * read/write new cstringpattern correctly from/to ppu files
+ test

git-svn-id: trunk@14791 -
2010-01-24 12:34:00 +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
marco
690b6e89ea * strutils rtl unit dir + test of posex. (related to bug #15357)
git-svn-id: trunk@14785 -
2010-01-23 22:02:44 +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
paul
bd6f1d7447 compiler: auto generate method/property dispid if it is not set explicitly
git-svn-id: trunk@14766 -
2010-01-22 02:46:03 +00:00
paul
6bc01f8c7e tests: add 2 fail dispinterface test
git-svn-id: trunk@14749 -
2010-01-19 13:39:52 +00:00
florian
988b94e578 * store array results returned in registers on x86_64-win64 in a memory location if needed, resolves #14388
git-svn-id: trunk@14736 -
2010-01-17 21:07:59 +00:00
florian
20de72b703 * allow writeln/readln on generic type parameters
git-svn-id: trunk@14721 -
2010-01-17 15:58:46 +00:00
micha
e66b0b1f37 * tests: add test for issue #15500
git-svn-id: trunk@14720 -
2010-01-17 15:57:05 +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
74cc1e0bab compiler: allow 'as' for dispinterface, allow comparisons of dispinterface and pointers (issue #0015530, issue #0015529)
git-svn-id: trunk@14663 -
2010-01-16 11:37:25 +00:00
paul
9513b50d26 compiler: don't allow to publish class properties + test
git-svn-id: trunk@14640 -
2010-01-14 15:21:13 +00:00
paul
09fd52791a tests: add fail test for class properties
git-svn-id: trunk@14639 -
2010-01-14 15:04:45 +00:00
Jonas Maebe
08a4ede9c4 * added str(enum,charray) and export str(enum,ansistr/widestr/unicodestr)
(mantis #15504)
  * fixed result parameter of str(enum,ansistr) helper (was shortstring)

git-svn-id: trunk@14629 -
2010-01-12 20:19:52 +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
6b087799ef compiler: nested class types:
- fix is_visible_for_object to work correctly if symbol is in the objectsymtable but no current_objectdef present
  - fix ClassName for nested classes
  + test
  

git-svn-id: trunk@14617 -
2010-01-11 19:44:02 +00:00
paul
67ce65eb35 tests: more tests for classes
git-svn-id: trunk@14611 -
2010-01-11 10:07:14 +00:00
paul
fd6e2cc86e compiler: fix internal class symbol search for method arguments
git-svn-id: trunk@14610 -
2010-01-11 09:55:53 +00:00
paul
166f8a63a2 compiler: implement class constants + tests
git-svn-id: trunk@14609 -
2010-01-11 08:43:10 +00:00
paul
91ed1c6e6f compiler: types in classes:
- fix type visibility (was always public)
  - fix parsing of class sections after the type declaration
  - allow nested classes declarations
  + tests

git-svn-id: trunk@14607 -
2010-01-11 06:22:57 +00:00
paul
cb54b3e7a9 compiler: allow class to have local type sections + tests
git-svn-id: trunk@14605 -
2010-01-11 02:35:10 +00:00
Jonas Maebe
a1bcc1c8d2 * turn openstring value parameters into regular shortstring parameters
(mantis #14940 and #14941)
  * only turn var/our shortstring parameters with a length of 255 into
    openstring parameters with {$p+} (new tbf/tb0217.pp)

git-svn-id: trunk@14602 -
2010-01-10 15:36:23 +00:00
Jonas Maebe
106baa8b2f * optimized version of TMultiReadExclusiveWriteSynchronizer that allows
concurrent readers (mantis #14451)

git-svn-id: trunk@14587 -
2010-01-09 23:00:45 +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
Jonas Maebe
77fd8bacc7 * fixed compiler crash when using nested procedures in Objective-C methods
git-svn-id: trunk@14583 -
2010-01-09 15:05:24 +00:00
Jonas Maebe
9cc211e88e * changed {$align mac68k} from an alias for {$packrecords 2} to a proper
implementation for mac68k alignment (mantis #15061)
  * changed {$align power} from an alias for {$packrecords 4} to an alias for
    {$packrecords c}, as Power alignment is the default C alignment for
    PowerPC under Mac OS X (it's close to {$packrecords 4}, but not identical)

git-svn-id: trunk@14577 -
2010-01-08 15:36:22 +00:00
paul
67ae263dd9 compiler: load methodpointer for static class methods - fixes internal error 200305061 when some class member is called inside the class static method + test
git-svn-id: trunk@14571 -
2010-01-07 20:35:23 +00:00
florian
d94f37e375 + patch by Sven Barth to add native NT rtl support to the fpc rtl, resolves #14887
git-svn-id: trunk@14568 -
2010-01-07 18:47:04 +00:00
florian
34227e811d + patch by Sven Barth to add native NT rtl support to the compiler, resolves #14886
git-svn-id: trunk@14565 -
2010-01-07 17:42:11 +00:00
Jonas Maebe
0c1247ba7d * removed extra space character when generating the maximal number of
significant digits and frac(value)+roundcorr overflows to 1
    (mantis #15308, fix by Dariusz Mazur)

git-svn-id: trunk@14563 -
2010-01-07 15:26:30 +00:00
florian
e6648da567 * make heaptrc aware of the fact that multi threading could be initialized before heaptrc itself is initialized, this is currently the case for windows dlls
git-svn-id: trunk@14560 -
2010-01-07 13:41:43 +00:00
florian
4ddebcbf1c * handle subrange enumeration types in GetEnumValue correctly, resolves #15467
git-svn-id: trunk@14544 -
2010-01-05 16:10:13 +00:00
Jonas Maebe
83c3e7a94b * fixed pred/succ for integer constants that equal the low/high bound of a
built-in integer type (reported by Stefan Kisdaroczi) 

git-svn-id: trunk@14537 -
2010-01-04 15:12:27 +00:00
florian
40cea8d4d5 * handle mm register properly when used as top_local, resolves #14566
git-svn-id: trunk@14535 -
2010-01-03 20:33:01 +00:00
florian
7e7f154f88 + OpenCL package by Dmitry Boyarintsev, fixed and tested on win32 and win64, enabled for i386-darwin because submitter tested on Mac OS X, resolves #15297
git-svn-id: trunk@14534 -
2010-01-03 18:26:07 +00:00
Jonas Maebe
6399bcd4e3 * improve precision of values specified with a decimal point and an exponent
(based on report/hints by Dariusz Mazur)

git-svn-id: trunk@14533 -
2010-01-03 15:56:06 +00:00
Jonas Maebe
b4c572483b * always call procvars inside varargs in TP/Delphi mode (mantis #15446)
git-svn-id: trunk@14527 -
2010-01-02 21:43:19 +00:00
Jonas Maebe
04606982ac * fixed evaluation of "mod" operator for tconstexprint with signed operands
(part of mantis #15453)

git-svn-id: trunk@14516 -
2010-01-01 22:50:35 +00:00
florian
81f34dd4bb * avoid too long prefixes of manglednames by using a CRC like for long parameter name lists, resolves #15203
git-svn-id: trunk@14515 -
2010-01-01 21:56:55 +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
florian
701d911f58 * continued on node cse
git-svn-id: trunk@14496 -
2009-12-29 19:45:33 +00:00
florian
20995bb01b * patch by Sven Barth: Add CeRapiInvoke to rapi.pp, resolves #15170
git-svn-id: trunk@14482 -
2009-12-26 21:22:42 +00:00
Jonas Maebe
2d2465aac4 * disabled the use of samevalue() when comparing float variants, because
a) it's Delphi-incompatible
     b) when a tdatetime property is obtained via GetPropValue(), then
        it will be a varfloat rather than a vardate, and there full
        precision certainly is required (mantis #15296)
  - since DoVarCmpFloat() is now identical to DoVarCmpDate(), removed
    DoVarCmpFloat

git-svn-id: trunk@14472 -
2009-12-23 21:30:58 +00:00
Jonas Maebe
e254d607d6 * support arrayconstructornodes of procvars (mantis #15391)
git-svn-id: trunk@14468 -
2009-12-23 20:11:35 +00:00
florian
448f3d99c1 * cleanup of case <string> of code by Sergei Gorelkin, resolves #13700
git-svn-id: trunk@14467 -
2009-12-23 19:27:50 +00:00
florian
dab642986e * patch by Sergei Gorelkin, fixes several issues with implements, resolves #15209
git-svn-id: trunk@14466 -
2009-12-23 16:23:19 +00:00
Jonas Maebe
1a87386bfe * allow and properly handle @classtype(pointerconst).field (mantis #15415)
git-svn-id: trunk@14462 -
2009-12-22 15:19:05 +00:00
florian
8cecea9b53 * GetEnumName handles subrange types correctly, resolves #15377
git-svn-id: trunk@14461 -
2009-12-22 11:36:47 +00:00
paul
d89463588c compiler: don't compile incorrect statements if operators are involved (issue #0015338) + test
git-svn-id: trunk@14458 -
2009-12-21 06:57:38 +00:00
florian
9955e6b2bf * dfa fixes by Sergei Gorelkin, resolve #15402
git-svn-id: trunk@14455 -
2009-12-20 21:02:11 +00:00
josef
b99a49d982 * Added missing UndefinedClasses.inc to /uikit
* Changed the PHP variable which was causing the parser to not produce iphone headers
  * Added /utils/iphone directory which is the last safe version of the parser. This is because future versions of the parser will likely break the iphone parsing ability before it can be fully restored.

git-svn-id: trunk@14454 -
2009-12-20 14:29:12 +00:00
pierre
d294e80eea * test for bug report 15370
git-svn-id: trunk@14447 -
2009-12-17 15:07:56 +00:00
Jonas Maebe
10cfba3b28 * convert booleans to the actual array index type (mantis #15364)
git-svn-id: trunk@14445 -
2009-12-17 13:53:09 +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
florian
d3cd6132f2 * handle rounding of currency values correctly, resolves #12207
git-svn-id: trunk@14438 -
2009-12-13 16:19:56 +00:00
florian
b5e7b3e1e7 o patch by Sergei Gorelkin which basically resolves #14308 (still misses some tests):
* constant widestrings must be allocated and copied at program start up through an api call else they couldn't be passed between progam/dlls

git-svn-id: trunk@14432 -
2009-12-13 10:03:30 +00:00
marco
3fc150d920 * OpenAL example from Mantis 15306 by Craig Chapman.
git-svn-id: trunk@14416 -
2009-12-11 22:40:43 +00:00
Jonas Maebe
76c499a0f6 * fixed some corner cases when parsing nested (* *) comments (mantis #15293)
git-svn-id: trunk@14412 -
2009-12-11 22:02:36 +00:00
pierre
9b703628bb + Add solaris/x86_64 c objects
git-svn-id: trunk@14403 -
2009-12-11 15:44:08 +00:00
Jonas Maebe
f2c0190aa3 * treat parameters that are passed in registers as register operands in the
x86 intel assembler reader (patch by Sergei Gorelkin, mantis #6851)

git-svn-id: trunk@14402 -
2009-12-11 13:33:05 +00:00
Jonas Maebe
3d1c799190 + initial tests based on ALGLIB submitted by Sergey Bochkanov
git-svn-id: trunk@14398 -
2009-12-10 22:25:34 +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
dd7e472fa4 * don't convert "cardinal div (cardinal-cardinal)" to longint after it
has been upcasted to int64, but convert it back to cardinal (mantis
    #15015)
  * put the "remove unnecessary 64 bit type conversions" code between
    {$ifndef cpu64bitalu} instead of {$ifndef cpu64bitaddr}

git-svn-id: trunk@14396 -
2009-12-10 21:08:31 +00:00
Jonas Maebe
e50c05f44e * fixed inverted condition in inc/dec range/overflow case that caused
unsigned 32/64 bit values to be always explicitly typecasted to signed
    32/64 bit instead of never (mantis #15304)

git-svn-id: trunk@14379 -
2009-12-09 21:54:46 +00:00
Jonas Maebe
40f88809af * don't error out or generate invalid code for "with x do ;"
(Delphi/TP-compatible, mantis #15274)

git-svn-id: trunk@14370 -
2009-12-08 19:45:08 +00:00
Jonas Maebe
b521f80b13 * give a proper error when a rangen appears in a vecn that's not an
array parameter (mantis #15287)

git-svn-id: trunk@14368 -
2009-12-08 18:47:24 +00:00
Jonas Maebe
b9b95a8f73 * fixed compiler crash when putting non-constant string in a set expression
(mantis #15288)

git-svn-id: trunk@14367 -
2009-12-08 17:15:31 +00:00
sekelsenmat
4fd2aa297a Adds mipsel lazarus project
git-svn-id: trunk@14349 -
2009-12-07 13:04:05 +00:00
Legolas
ec841a86f5 * Updated to devkitARM r27 and libnds 1.4.0
git-svn-id: trunk@14344 -
2009-12-06 19:37:58 +00:00
florian
9e59c6dec7 * more mipsel code
git-svn-id: trunk@14340 -
2009-12-06 12:12:15 +00:00
Jonas Maebe
fa42b022d2 * made test names unique (if you overwrite an existing binary with another
one on iPhoneOS, the OS refuses to execute the new binary; you have to
    remove the old one first -- but it's easier to make sure that there are
    no two tests with the same name)

git-svn-id: trunk@14331 -
2009-12-04 21:06:33 +00:00
Jonas Maebe
280f27b45c * store/restore trttinode.rttidatatype to/from ppu file, and also copy it in
rttidatatype.getcopy (fixes mantis #15207)

git-svn-id: trunk@14318 -
2009-12-03 23:03:25 +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
florian
28ac4a8dda * several mips/mipsel related stuff fixed
* regenerated linux makefile to support mipsel

git-svn-id: trunk@14278 -
2009-11-27 15:10:56 +00:00
florian
80fc5f05dc + system unit part of David Zhang's MIPS port
git-svn-id: trunk@14268 -
2009-11-24 21:26:36 +00:00
ivost
7ac4644289 * splittet zorba(dyn).pas into xqc.pas and zorba(dyn).pas
git-svn-id: trunk@14265 -
2009-11-24 12:10:12 +00:00
Jonas Maebe
d644fc87a1 * handle loc_jump/loc_flags in for-loop upper bound (mantis #15169)
git-svn-id: trunk@14261 -
2009-11-23 21:11:16 +00:00
Jonas Maebe
2c3c6d27d3 * fixed range checking for inc/dec when mixing unsigned and signed types
(mantis #14841)
   -> this also makes it impossible now to use constructs such as
    inc(qword_var,-1) with range checking enabled, because that would require
    a conversion to 128 bit for proper evaluation

git-svn-id: trunk@14260 -
2009-11-23 20:01:07 +00:00
florian
38c68b58aa + MIPS specific part of the rtl, by David Zhang
git-svn-id: trunk@14255 -
2009-11-22 18:35:03 +00:00
Jonas Maebe
dca8c521e5 r316 | jonas | 2009-11-21 16:57:50 +0100 (Sat, 21 Nov 2009) | 4 lines
* changed last parameter of PMSessionValidatePrintSettings from a
    "var boolean" back into a booleanptr as it was before (you can pass
    kPMDontWantBoolean if you are not interested in the result)
...
r315 | gorazd | 2009-11-18 18:07:57 +0100 (Wed, 18 Nov 2009) | 1 line

Added interfaces to QuickLook framework
...
r314 | gorazd | 2009-11-18 18:07:29 +0100 (Wed, 18 Nov 2009) | 1 line

Added interfaces to QuickLook framework

git-svn-id: trunk@14237 -
2009-11-21 16:08:36 +00:00
pierre
2480a6bad1 + x86_64 processor specific solaris files
git-svn-id: trunk@14235 -
2009-11-21 00:18:13 +00:00
Jonas Maebe
af85e45b67 + support for id.anyobjcmethodinscope() calls for Objective-Pascal code,
using standard FPC overload selection logic
  * fixed detection of references to static symbol tables for class
    helpers

git-svn-id: trunk@14234 -
2009-11-21 00:14:21 +00:00
florian
f54365db94 * adapted more fpc-mips stuff to trunk
git-svn-id: trunk@14230 -
2009-11-20 21:13:53 +00:00
florian
0c8546f94c * more MIPS code of David Zhang integrated
git-svn-id: trunk@14228 -
2009-11-20 14:46:45 +00:00
florian
e5ebb2a26e * started to integrate the code of David Zhang's MIPS code from fpc-mips on sf into fpc trunk
git-svn-id: trunk@14219 -
2009-11-19 22:07:10 +00:00
Jonas Maebe
b495fbb991 * let search_class_helper() only return class helper methods; it could
also return regular objcclass methods before, because these are also
    registered under class helper procsyms for future id.anymethod support
  * give an error when calling an inherited method from an objccategory
    method, if that is not declared in the parent of the extended class
    (since calling inherited in an objccategory method is the same as
     calling inherited in a method of the extended class; if a method is
     replaced, calling inherited will *not* call the original method
     from the original class)

git-svn-id: trunk@14213 -
2009-11-18 21:49:57 +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
florian
509447c4b9 + compiled test for win32
* use writeln to show the test result as well for easier manual testing

git-svn-id: trunk@14191 -
2009-11-15 20:56:18 +00:00
pierre
3bcc2b660a * New object added
git-svn-id: trunk@14188 -
2009-11-15 17:27:30 +00:00
Jonas Maebe
60a9ef963d * finished basic support for calling methods from external C++ classes
(slightly modified patch by Sven Barth, mantis #15082)

git-svn-id: trunk@14185 -
2009-11-15 14:55:40 +00:00
Jonas Maebe
38c09952a3 * don't exit the program in the exit code of shared libraries under Linux
(mantis #14958)

git-svn-id: trunk@14184 -
2009-11-15 13:50:14 +00:00
Jonas Maebe
099ceb9574 - removed, it's automatically generated (and removed) by the build process
git-svn-id: trunk@14182 -
2009-11-15 12:56:39 +00:00
Jonas Maebe
af80b89f55 * set default set packing to 1 for TP/Delphi mode (mantis #15088)
git-svn-id: trunk@14177 -
2009-11-14 23:54:10 +00:00
florian
5d01732128 * several fixes which improve the behaviour of nested generics, resolves #15077
git-svn-id: trunk@14176 -
2009-11-14 22:24:55 +00:00
marco
f326302a12 * Test for mantis 14798
git-svn-id: trunk@14166 -
2009-11-13 15:46:42 +00:00
florian
851b00f8e9 * more properties fixed
git-svn-id: trunk@14156 -
2009-11-12 18:11:10 +00:00
florian
517ac768f0 * properties fixed
git-svn-id: trunk@14155 -
2009-11-12 18:03:28 +00:00
pierre
da59236bb3 + Script to generate libgdb directory
git-svn-id: trunk@14149 -
2009-11-11 21:41:24 +00:00
pierre
9f6f70830f + Solaris/i386 gcc compiled objects
git-svn-id: trunk@14148 -
2009-11-11 21:35:29 +00:00
pierre
430c6008db * correct mime type for new file
git-svn-id: trunk@14139 -
2009-11-10 22:40:09 +00:00
pierre
17a838e7da + Add missing file for i386 solaris
git-svn-id: trunk@14138 -
2009-11-10 22:39:13 +00:00
marco
05f831fe17 * fuse package + 1 test, Mantis 12218
git-svn-id: trunk@14117 -
2009-11-08 16:48:30 +00:00
paul
cc8f91f2d0 compiler: allow enumeration of multidimensional arrays with implicit array conversion + test
git-svn-id: trunk@14093 -
2009-11-07 06:21:07 +00:00
Jonas Maebe
f9eb89eb98 * updated r308 of common Mac OS X interfaces:
o all headers updated to Mac OS X 10.6
   o 64 bit support (commented out unsupported routines under 64 bit, fixed
     types)
   o iPhoneOS support to the extent that this is available in the standard
     Mac OS X 10.6 headers (these are not covered under the iPhone SDK
     derivative works limitation)
   o a few new frameworks translated: CoreType, CoreVideo, AudioUnits
   o a number of changes can cause compatibility problems with existing
     programs, listed below
  * many cases where signed parameters were turned into unsigned parameters
    and vice versa, too many to list (due to differences between the classic
    Pascal headers and the new C headers)
  * ATSFontFindFromContainer: ioArray var -> ptr because array
  * ATSFontGetFileSpecification: oFile FSSpec -> ATSFSSpec (was translation
    error?)
  * CFNetworkCopyProxiesForAutoConfigurationScript: got extra CFErrorRef para
  * CMGetDeviceFactoryProfiles: defaultProfID var -> ptr, because can be nil
  * CMIterateColorDevices: seed and count var -> ptr, because can be nil
  * CMIterateDeviceProfiles: seed and count var -> ptr, because can be nil
  * CMSetDeviceProfiles: profileScope and deviceProfiles const -> ptr, because 
    can be nil
  * ConvertFromUnicodeToScriptCodeRun: oScriptCodeRuns var -> ptr because
    array
  * ConvertFromUnicodeToTextRun: oEncodingRuns var -> ptr because array
  * CreateUnicodeToTextRunInfo: iUnicodeMappings var -> ptr because array
  * DCMCreateFieldInfoRecord: findMethods var -> ptr because array
  * DCMGetFieldFindMethods: findMethods var -> ptr because array
  * GetIconRefFromFileInfo: outlabel var -> ptr because can be nil
  * HIImageViewCreate: last parameter ControlRef -> HIViewRef
  * HIViewNewTrackingArea: outRef var -> ptr because can be nil in 10.5+
  * LAGetEnvironmentList: environmentList var -> ptr because array
  * LAListAvailableDictionaries: dictionaryList and opened var -> ptr because
    array
  * LSGetApplicationForURL: outAppRef and outAppURL var -> ptr because can be
    nil
  * LocaleOperationGetLocales: localeVariantList var -> ptr because can be nil
  * MPWaitOnQueue: param1-3 value -> var because "void **" in C
  * QTVRSetBackBufferImagingProc: areasOfInterest var -> ptr because array
  * QueryUnicodeMappings: oReturnedMappings var -> ptr because array
  * TECConvertTextToMultipleEncodings: outEncodingsBuffer var -> ptr because
    array
  * TECFlushMultipleEncodings: outEncodingsBuffer var -> ptr because array
  * TECSniffTextEncoding: numErrsArray and numFeaturesArray var -> ptr because
    array
  * FSCreateResFile: catalogInfo const -> ptr because can be nil

git-svn-id: trunk@14089 -
2009-11-06 22:57: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
2f0cde4625 compiler:
- don't find MoveNext functions with the required arguments
  - add some test from Alexander S. Klenin
(issue #0014990)

git-svn-id: trunk@14044 -
2009-11-04 13:21:10 +00:00
paul
5f7bc2d3b5 compiler:
- don't allow operator enumerator with non object/class/interface result type
  - add some test from Alexander S. Klenin
(issue #0014990)

git-svn-id: trunk@14043 -
2009-11-04 12:59:05 +00:00
paul
61ec5e1417 compiler:
- fix for-in loop for empty sets
  - add some test from Alexander S. Klenin
(issue #0014990)

git-svn-id: trunk@14042 -
2009-11-04 12:25:01 +00:00
paul
5752be310d compiler:
- fix for-in loop for string const array
  - add some test from Alexander S. Klenin
(issue #0014990)

git-svn-id: trunk@14041 -
2009-11-04 12:07:42 +00:00
pierre
3a96d163fd + Add mingw unit
git-svn-id: trunk@14025 -
2009-11-03 22:43:08 +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
Tomas Hajny
0a6888dbcb + enhanced clone of GNU rm, helper for building GO32v2 releases under WinXP, but possibly useful in some other cases too
git-svn-id: trunk@14007 -
2009-11-01 21:33:07 +00:00
Jonas Maebe
8d65471fe2 * give a proper error when trying to use val() on a boolean (mantis #14777)
* don't allow a boolean or (wide)char to be used as the "error" parameter
    for val()

git-svn-id: trunk@14006 -
2009-11-01 17:18:40 +00:00
paul
dfef902c53 rtl: introduce new TObject methods: UnitName, GetHashCode, Equals, ToString added for compatibility with delphi 2009.
+ changes in compiler, utils, packages to resolve identifier conflicts with the new TObject methods (like changing of UnitName arguments to AUnitName, adding Classes. before the toString, etc). (issue #0014931)

git-svn-id: trunk@14005 -
2009-11-01 16:22:47 +00:00
paul
dfdfec0201 compiler: don't write zero ClassInfo pointer even if class does not have published methods rtti (issue #14930)
git-svn-id: trunk@14004 -
2009-11-01 16:01:23 +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
c2e749797b + test
git-svn-id: trunk@13999 -
2009-11-01 14:42:52 +00:00
ivost
4e35433504 * added some new functions to zorba headers
* added an example

git-svn-id: trunk@13993 -
2009-11-01 01:26:13 +00:00