Commit Graph

33195 Commits

Author SHA1 Message Date
Jonas Maebe
9410f7d5d3 - obsolete, removed (handled by regular script)
git-svn-id: trunk@16532 -
2010-12-10 10:13:55 +00:00
paul
4640d096c4 compiler: redo searchsym_type:
- remove complex condition which was used previosly to decide whether objectsymtable or recordsymtable requires a search for type or not - they require a search because contains types (although not all object types)
  - don't search only for typesym but for other symbols too - for example UnitSym.TypeSym or ConstSym..ConstSym are also valid types. Skip the next symtypes during the search because they can't be used in type declaration: fieldvarsym, paravarsym, propertysym, procsym, labelsym

git-svn-id: branches/paul/extended_records@16531 -
2010-12-10 09:12:44 +00:00
paul
b317139006 compiler: fix compilation problems caused by tprocdef._class -> tprocdef.struct rename which was found by make fullcycle
git-svn-id: branches/paul/extended_records@16530 -
2010-12-10 06:50:58 +00:00
sergei
ae7018cf85 variants, varutils: another portion of misc fixes:
* Handle Variant to ShortString conversions entirely in variants unit, removed VarUtils.VariantToShortString
+ support varUString in DoVarClearComplex
* fixed missing result assignment in TCustomVariantType.VarDataIsEmptyParam
* TCustomVariantType.UnaryOp and BinaryOp now 'implemented', they raise EVariantInvalidOp

git-svn-id: trunk@16529 -
2010-12-10 03:38:21 +00:00
sergei
ae028b1e1d * Intel assembler writer, don't truncate written values to 32 bits, as this code is also used for x86_64. Fixes Mantis #18020.
git-svn-id: trunk@16528 -
2010-12-10 01:51:57 +00:00
sergei
5bf51c991c * VarUtils, fixed missing support for interfaces
- NoInterfaces() not used anymore, removed
+ Basic test for VariantArray of IInterface

git-svn-id: trunk@16527 -
2010-12-09 16:38:55 +00:00
paul
56bf42de57 compiler: implement record methods and class methods:
- rename tprocdef._class to tprocdef.struct and change the type from tobjectdef to tabstractrecorddef because methods can belong not to classes only now but to records too
  - replace in many places use of current_objectdef to current_structdef with typcast where is needed
  - add an argument to comp_expr, expr, factor, sub_expr to notify that we are searching type only symbol to solve the problem with records,objects,classes which contains fields with the same name as previosly declared type (like:
  HWND = type Handle;
  rec = record 
    hWnd: HWND;
  end;)
  - disable check in factor_read_id which was made for object that only static fields can be accessed as TObjectType.FieldName outside the object because it makes SizeOf(TObjectType.FieldName) imposible and since the same method was extended to handle records it also breaks a52 package compilation
  - rename tcallcandidates.collect_overloads_in_class to tcallcandidates.collect_overloads_in_struct and addapt the code to handle overloads in records too
  - fix searchsym_type to search also in object ancestors if we found an object symtable
  - add pd_record, pd_notrecord flags to mark procedure modifies which can or can't be used with records. Disallow the next modifiers for records: abstract, dynamic, export, external, far, far16, final, forward, internconst, internproc, interrupt, message, near, override, public, reintroduce, virtual, weakexternal,
Allow the next modifiers for records: static

git-svn-id: branches/paul/extended_records@16526 -
2010-12-09 02:24:46 +00:00
sergei
4e3cedb492 * VariantInit is a procedure, not a function (according to both MSDN and Delphi docs).
git-svn-id: trunk@16525 -
2010-12-09 01:27:09 +00:00
sergei
ddfb032913 * VarUtils, fixed a wrong identifier
git-svn-id: trunk@16524 -
2010-12-08 23:42:39 +00:00
Jonas Maebe
3a089cea10 * give an error when trying to let an objcclass conform to a
forward-declared objcprotocol (mantis #17341)

git-svn-id: trunk@16523 -
2010-12-08 22:17:24 +00:00
Jonas Maebe
a880603816 * updated version of the conversion script, used to generate the previously
committed cocoa unit conversions, and which can also be used to translate
    the iOS SDK 3.2 headers
  + scripts (make-cocoa-headers.sh, make-ios-headers.sh) to (re)build the
    Cocoa/iOS headers, along with skeleton directories that contain the
    necessary helper files and a few required patches
  + frameworks.xml used by the conversion script
  * updated build instructions

git-svn-id: trunk@16522 -
2010-12-08 21:12:27 +00:00
Jonas Maebe
c132727caf * updated to Mac OS X 10.6 SDK
* generated with version 2.1.2 of the conversion script, with many
    improvements (script and instructions to regenerate headers will
    be committed separately)
   o QuartzCore framework translation
   o categories are no longer merged into classes, but separate
   o corrected several C->Pascal type definitions
   o handle pointer types for parameters, return types and property types 
   o handle struct/class fields that are arrays or pointers
   o handle pointers to id
   o handle external functions that return "void *" (they were parsed as
     procedures)
   o handle anonymous classes (@class NSAnonType, such as CIImage) using
     the "NSAnonType = objcclass; external;" syntax
   o corrected handling of opaque structs
   o fixed parsing of function pointer types
   o instance-bitfields that do not appear in a struct are now recognised
   o bitpacked structs are now translated into bitpacked records (but only
     if they only contain bitpacked fields)
   o C macros indicating deprecation are now translated into "deprecated"
     modifiers for methods/variables/functions/properties
   o no longer ignore deprecated categories, because some categories are
     deprecated in Mac OS X 10.5/10.6, and we want to support writing code
     for older systems too
   o several fixes to property and enum parsing

git-svn-id: trunk@16521 -
2010-12-08 11:27:05 +00:00
Jonas Maebe
43e57f3911 r332 | jonas | 2010-12-08 11:18:24 +0100 (Wed, 08 Dec 2010) | 3 lines
* enable parts of Security framwork for iOS because newer iOS SDK versions
    depend on them

git-svn-id: trunk@16520 -
2010-12-08 10:19:08 +00:00
paul
26cef34005 compiler:
- move objname, objrealname fields from tobjectdef to tabstractrecorddef, 
  - load and save them from/to ppu file, 
  - use tabstarctrecorddef in some more places where previously code worked for tobjectdef
  - change push_nested_hierarchy, pop_nested_hierarchy to handle records too

git-svn-id: branches/paul/extended_records@16519 -
2010-12-08 06:58:48 +00:00
Jonas Maebe
8c4b6c9de2 + full contents of NSZone.h
+ several missing categories and protocols (NSCodingProtocol,
    NSCopyingProtocol, NSCoderMethods, ...)
  * renamed classDescription method to _classDescription because there
    is a method in another class in the Cocoa frameworks that also called
    "classDescription"
  + added overloaded versions of all base methods without the trailing
    underscore, since that seems what everyone has settled to using for
    the rest of the Cocoa translations

git-svn-id: trunk@16518 -
2010-12-07 22:27:46 +00:00
ivost
0876df07f0 * changed output only parameters from var to out
git-svn-id: trunk@16517 -
2010-12-07 21:23:03 +00:00
paul
d7c8d9e620 compiler: allow access other record symbols than fields, first extended records tests
git-svn-id: branches/paul/extended_records@16516 -
2010-12-07 09:53:57 +00:00
paul
902a78eec1 compiler: add current_structdef: tabstractrecorddef and point current_objectdef to it
git-svn-id: branches/paul/extended_records@16515 -
2010-12-07 09:35:10 +00:00
paul
5d1c9ab6ba compiler: check visibility of record members, allow access to record consts and types:
- add searchsym_in_record function
  - change is_visible_for_object to accept tabstractrecorddef instead of tobjectdef arguments because records also have visibility sections now
  - change arguments in do_member_read, do_proc_call to tabstractrecorddef from tobjectdef to accept records
  - rename classh arguments to structh and change their type to tabstractrecorddef to show that they can accept records now too
  - move RttiName from tobjectdef to tabstractrecorddef

git-svn-id: branches/paul/extended_records@16514 -
2010-12-07 08:58:29 +00:00
paul
8e36256bc9 compiler: add support for visibility blocks in records and type, const declarations:
- add parse_record_members function to parse record blocks based on parse_object_members code
  - disable published section in records
  - rename in_class argument in some functions to in_structure because the same code can work for records now which are not classes

git-svn-id: branches/paul/extended_records@16513 -
2010-12-07 07:40:34 +00:00
paul
9a6ae5ef6d create a branch for extended records implementation
git-svn-id: branches/paul/extended_records@16512 -
2010-12-06 06:28:29 +00:00
Jonas Maebe
f8369032da * same fixes as in r16255 for x86_64 (fixes webtbs/tw17714 on Darwin/x86_64)
git-svn-id: trunk@16508 -
2010-12-05 16:45:31 +00:00
paul
3e5f6e7a60 compiler: reduce the overhead made in previous revision
git-svn-id: trunk@16507 -
2010-12-05 14:32:05 +00:00
marco
1c0e482d7d * patch for regex. Fixes exception in rcclear, some casing issues and matching of \w. Also a fix for currentpos in the old version. Mantis 15466
git-svn-id: trunk@16506 -
2010-12-05 11:10:06 +00:00
paul
af39178e06 compiler: redo type search in parent classes. previous trial breaks objective pascal implementation
git-svn-id: trunk@16505 -
2010-12-05 10:59:11 +00:00
marco
69c89d4579 * more tcustomvariant conversion helpers from Lacak2. Mantis 16853
git-svn-id: trunk@16504 -
2010-12-04 20:21:03 +00:00
marco
b1f1c026f8 * enabled cnetdb for Linux, added a demo
git-svn-id: trunk@16503 -
2010-12-04 17:18:05 +00:00
sergei
b8aec6e4aa + Support for UnicodeString in variant conversions, based on patch from Ivan Shikhalev, resolves #18083.
git-svn-id: trunk@16502 -
2010-12-04 03:53:28 +00:00
marco
a1ebbdcee1 * compiles again ( .logger.info references changes to application.log())
git-svn-id: trunk@16501 -
2010-12-03 22:18:05 +00:00
michael
413dcde4aa * Made used SQLLite library name configurable
git-svn-id: trunk@16500 -
2010-12-03 08:59:20 +00:00
michael
627bc7f73b * Forgot to commit constants used in sqldb logging
git-svn-id: trunk@16499 -
2010-12-03 08:37:03 +00:00
michael
0ca7ca5517 * Logging facilities implemented
git-svn-id: trunk@16498 -
2010-12-02 17:35:42 +00:00
florian
34dc727f0b + test for last commit
git-svn-id: trunk@16497 -
2010-12-02 17:32:48 +00:00
florian
9dc584efbf * patch by Aleksa Todorovic to solve another issue with nested generics, resolves #17193
git-svn-id: trunk@16496 -
2010-12-02 17:32:19 +00:00
florian
07e3232fef o patch for OpenCL package by Denis Golovan, resolves #18119
+ A constant for querying OpenCL version is added.
  + A small function for converting errors code into error texts is added.

git-svn-id: trunk@16495 -
2010-12-02 17:15:21 +00:00
paul
8b209be7e9 compiler: put static variables into unit level and not into parent class/object/record (fixes bug #0018131)
git-svn-id: trunk@16494 -
2010-12-02 05:56:13 +00:00
paul
ab4a5c74c1 compiler: allow TFoo.TBar types for object methods (bug #0018123)
git-svn-id: trunk@16493 -
2010-12-02 03:53:02 +00:00
paul
515c99cc01 compiler: cleanup
git-svn-id: trunk@16492 -
2010-12-02 03:06:01 +00:00
paul
2155dadf5e compiler: push to the stack not only nested hierarchy but also class hierarchy for each nested entry both in method declaration and for method body, also push child hierarchy while parsing object members because in other case parent types are invisible for descendants (fixes mantis #0018124, mantis #0018127 and more) + extended test
git-svn-id: trunk@16491 -
2010-12-02 03:04:23 +00:00
paul
37179a6558 compiler: cleanup
git-svn-id: trunk@16490 -
2010-12-01 08:19:32 +00:00
paul
668cd1f3c0 compiler: change check for current in try_consume_unitsym - don't use current_unit in check because specialize code does not replace this variable (fixes bug #0015591)
git-svn-id: trunk@16489 -
2010-12-01 08:18:51 +00:00
paul
d9a43f7858 compiler: cleanup
git-svn-id: trunk@16488 -
2010-12-01 07:40:09 +00:00
paul
ba75daa50d compiler: change find_module_from_symtable to support not only unit symtables but also other symtables with valid moduleid (fixes bug #0016090)
git-svn-id: trunk@16487 -
2010-12-01 04:33:47 +00:00
marco
c9c1179b00 * Initial variantop and compare handlers. Patch from Laaca, bug #16853
git-svn-id: trunk@16486 -
2010-11-30 20:49:46 +00:00
joost
191e83cb7e * Patch from Darius Blaszijk to support version numbers with less then three digits, bug #17833
git-svn-id: trunk@16484 -
2010-11-30 13:51:01 +00:00
Jonas Maebe
4ed666afab * reverted r8795 that saved/set/restored the fpu exception mask before
every glut call, since the gl unit (on which the glut unit depends)
    already globally disables all fpu exceptions now (mantis #18107)

git-svn-id: trunk@16483 -
2010-11-30 12:28:03 +00:00
marco
9534c5bd8b * Delphi XE (2010?) compatible alias for defaultformatsettings.
* deprecated separate globals (Delphi XE). Causes some deprecated
      warnings in dati.inc that still have to be fixed.

git-svn-id: trunk@16482 -
2010-11-30 09:49:19 +00:00
paul
26032c3574 test: add { %norun } directive to tw12249
git-svn-id: trunk@16481 -
2010-11-30 08:14:31 +00:00
paul
433f18e60c compiler: resolve only current typeblock forward declarations when the type block is finished (fixes bug #0018086)
git-svn-id: trunk@16480 -
2010-11-30 00:02:06 +00:00
Jonas Maebe
01a7da9817 * renamed constant "a" to GL_DEPTH24_STENCIL8_EXT (accidentally changed
after applying patch from #18054, belongs with r16442)

git-svn-id: trunk@16479 -
2010-11-29 22:34:24 +00:00