Commit Graph

33214 Commits

Author SHA1 Message Date
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
paul
8c0c614d5a compiler: allow <> operator overload. search for "<>" operator first for "<>" expressions and if not found then use "=" operator + test
git-svn-id: trunk@16603 -
2010-12-21 04:44:37 +00:00
marco
cd4425aa58 * patch from Lacak2, use dbconst for errormessage, mantis #0018161
git-svn-id: trunk@16602 -
2010-12-20 15:51:39 +00:00
Tomas Hajny
934ab56c0a + most of OS/2 threading support implemented; not debugged yet though
git-svn-id: trunk@16601 -
2010-12-19 22:05:05 +00:00
marco
5f3a312d1b * paleobug solved, paste from windows now wraps lines to 200 char. Solves #4943
git-svn-id: trunk@16600 -
2010-12-19 21:59:21 +00:00
michael
9e0b67a2cb * Support for multiple directories.
git-svn-id: trunk@16599 -
2010-12-19 20:40:37 +00:00
Jonas Maebe
cec5843f95 * renamed objcdef.addencodedtype to objcaddencodedtype for consistency
reasons, and to prevent name clashes

git-svn-id: trunk@16598 -
2010-12-19 19:37:47 +00:00
Tomas Hajny
9b79fb3ac9 * avoid range error for sem_indefinite_wait - fix for web bug #18263 (EMX target)
git-svn-id: trunk@16595 -
2010-12-19 15:38:54 +00:00
Tomas Hajny
87c53a6e29 * Sem_Indefinite_Wait constant changed to avoid range check errors - fix for web bug #18263
git-svn-id: trunk@16594 -
2010-12-19 15:34:33 +00:00
sergei
331a72c8d6 * ncnv.pas, insert_varargstypeconv(): Do not cast a string literal to AnsiString if it has been already casted to Wide/UnicodeString, resolves #18266.
git-svn-id: trunk@16593 -
2010-12-19 15:08:42 +00:00
marco
cf49795f9e * fix for mantis 15820, override getnamepath as suggested by Paul.
git-svn-id: trunk@16592 -
2010-12-19 13:22:46 +00:00
marco
fce3a5ca30 * patch from Darius that makes lower verbosity output more FPC language independant using -vq. Mantis #18051
git-svn-id: trunk@16591 -
2010-12-19 13:17:27 +00:00
paul
0f15d89f0a compiler: formatting
git-svn-id: trunk@16590 -
2010-12-19 12:45:20 +00:00
sergei
49e3c30bd1 * Changed the test so it uses typecasting instead of calling the conversion helpers from VarUtils.
git-svn-id: trunk@16589 -
2010-12-18 18:43:40 +00:00
paul
f3af6a83f7 compiler: put static symbol for typed consts declared in classes/records/objects into unit symtable to fix problems with linking and add absolute symbol into record symtable pointed to that static symbol (fixes test test/terecs3.pp on unixes)
git-svn-id: trunk@16588 -
2010-12-18 18:22:31 +00:00
marco
c57c039362 * Update syntaxhighlight settings on desktop load. Partial fix for 5813.
git-svn-id: trunk@16587 -
2010-12-18 18:03:31 +00:00
marco
c3ed1c41a1 * fix from mantis 17360, ISC_Status is 64-bit. (Lp64 vs LLp64 problem)
git-svn-id: trunk@16586 -
2010-12-18 13:36:36 +00:00
marco
df16200a75 * Patch from LacaK2 fixing else clause of vartobcd, bug #16853
git-svn-id: trunk@16584 -
2010-12-17 18:57:16 +00:00
marco
08a89597c6 * Patch from Andrew that allows to set CHM title on the cmdline. (Mantis 18246)
git-svn-id: trunk@16583 -
2010-12-17 18:18:37 +00:00
sergei
34ffb184a8 * MASM and NASM assembler writers, added check for InlineLevel>0 so it suppresses entire source file processing, not just output of source lines. Without this, auto-generated instructions cause output of bogus line information. GAS writer already has similar check.
git-svn-id: trunk@16581 -
2010-12-17 18:03:56 +00:00
marco
d900dcb78f * patch from Andrew adding \uxxxx escapes and superscript, mantis 18245
git-svn-id: trunk@16580 -
2010-12-17 17:54:19 +00:00
pierre
0fabda01a8 * Added code to support Windows 95 again
This code is disabled by default, you need to complie the RTL
  with option -dSUPPORT_WIN95.

    2.4.2 release is already not usable on Windows 95 because
  the kernel32 DLL function TryEnterCriticalSection is loaded
  into system unit unconditionnally, while this function does
  not exist in Winddows 95 kernel32.

    This patch uses LoadLibrary/GetProcAddress coupple to check if
  TryEnterCriticalSection exists and provides an alternate implementation
  that will be used on Windows 95 systems only (Windows 98 kernel32
  DLL does export TryEnterCriticalSection).

git-svn-id: trunk@16579 -
2010-12-17 14:12:43 +00:00
michael
f3f04b3420 * Published all properties in template
git-svn-id: trunk@16578 -
2010-12-17 13:41:10 +00:00
michael
c7fe965f2c Fix for 18239
git-svn-id: trunk@16577 -
2010-12-17 11:15:13 +00:00
Jonas Maebe
2ee7a0f95d * corrected expected line numbers after r16573
git-svn-id: trunk@16576 -
2010-12-17 09:55:55 +00:00
paul
54b5172286 compiler: fix compiler crash (bug #0018222)
- don't use source pointeddef for copied tpointerdef,tclassrefdef if pointteddef is a forward def because in this case when forward def will be resolved copied def will point to garbage
  - put copied def into list of defs awaiting resolve if it was copied from forward def
  + test

git-svn-id: trunk@16575 -
2010-12-17 07:50:47 +00:00
paul
d1026bb052 compiler: reintegrate branch http://svn.freepascal.org/svn/fpc/branches/paul/extended_records
------------------------------------------------------------------------
r16513 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
------------------------------------------------------------------------
r16514 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
------------------------------------------------------------------------
r16515 compiler: add current_structdef: tabstractrecorddef and point current_objectdef to it
------------------------------------------------------------------------
r16516 compiler: allow access other record symbols than fields, first extended records tests
------------------------------------------------------------------------
r16519 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
------------------------------------------------------------------------
r16526 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
------------------------------------------------------------------------
r16530 compiler: fix compilation problems caused by tprocdef._class -> tprocdef.struct rename which was found by make fullcycle
------------------------------------------------------------------------
r16531 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
------------------------------------------------------------------------
r16541 compiler: move objectoptions to tabstractrecorddef because it will be needed for records too
------------------------------------------------------------------------
r16542 compiler: remove unneeded checks and typecasting caused by move of objectoptions into tabstractrecorddef
------------------------------------------------------------------------
r16543 compiler: move constructor, destructor parsers to interface section to allow future use by records + change current_objectdef to current_structdef for the same reason, make constructor return type = record for records
r16544 compiler: start parsing of record constructors and destructors:
  - disallow record destructor
  - raise internal error for constructor because it is not yet implemented
  - handle class constructors and destructors for records
  - move find_procdef_bytype to tabstractpointerdef
------------------------------------------------------------------------
r16545 compiler: fix static fields creation and access for records
+ extend test to check class constructor/destructor for records and static fields access
------------------------------------------------------------------------
r16546 tests: add a test which checks that records destructors are not allowed
------------------------------------------------------------------------
r16547 compiler: rename aclass->astruct in read_property_dec because records will have properties too
------------------------------------------------------------------------
r16548 compiler: implement properties in records:
  - rename property_dec from pdecobj to struct_property_dec because pdecl also has property_dec and move it to interface to use by records + allow properties for records
  - use struct_property_dec in record parser
  - change structh type from objectdef to abstractrecorddef in read_property_dec to use by records
  - disallow stored and default modifiers for records because records are not used for streaming
  - fix misuse of search_sym_in_class for records in few places
------------------------------------------------------------------------
r16550 compiler: disallow regular class methods in records and allow only static class methods. delphi do so and it is logical because records have no inheritance. + tests
------------------------------------------------------------------------
r16560 compiler: a trial to implement record constructor
  - map self to constructor result
  - don't push vmt for records

At the moment generated assembler has errors although node tree is correct
------------------------------------------------------------------------
r16561 compiler: 
  - add mode switch extendedrecords to allow/disallow extended records syntax, add this mode switch to delphi mode by default
  - disable/enable extended records parsing based on extendedreocrds mode switch
------------------------------------------------------------------------
r16562 compiler: fix record constructor return type when parsing procedure declaration
------------------------------------------------------------------------
r16568 compiler: partly revert r16560 and disable (at least temporary) constructors in records
------------------------------------------------------------------------
r16569 test: add records Self test
------------------------------------------------------------------------
r16570 compiler: generate debug info for record methods:
  - extended write_symtable_procdefs to handle record definitions
  - fix stabs info generator to use prefixed symbol names for record methods, also handle records static symbols the same way as for object types
  - fix dwarf info record generation: add visibility info and write methods, also prefix record members the same way as object members

git-svn-id: trunk@16574 -
2010-12-17 02:19:09 +00:00
pierre
96b8699af5 * Skip library tests for go32v2 target
git-svn-id: trunk@16573 -
2010-12-16 16:08:11 +00:00
pierre
818c88dbbf * Fix cprefix problems for tconstref4 test and add cppdecl modifier
git-svn-id: trunk@16572 -
2010-12-16 16:02:24 +00:00
pierre
9276fa437f * Fix tw1041 test failure
git-svn-id: trunk@16571 -
2010-12-16 13:25:20 +00:00
paul
915c412ae3 compiler: generate debug info for record methods:
- extended write_symtable_procdefs to handle record definitions
  - fix stabs info generator to use prefixed symbol names for record methods, also handle records static symbols the same way as for object types
  - fix dwarf info record generation: add visibility info and write methods, also prefix record members the same way as object members

git-svn-id: branches/paul/extended_records@16570 -
2010-12-16 06:12:05 +00:00
paul
d83eab7ae8 test: add records Self test
git-svn-id: branches/paul/extended_records@16569 -
2010-12-16 04:20:41 +00:00
paul
742b0bb686 compiler: partly revert r16560 and disable (at least temporary) constructors in records
git-svn-id: branches/paul/extended_records@16568 -
2010-12-16 03:37:16 +00:00
marco
6bc67184e3 * compile win 64-bit IDE default. It works now, and even gdb is starting to work.
git-svn-id: trunk@16567 -
2010-12-15 19:16:48 +00:00
Jonas Maebe
709f1e8344 * also recognise non-GOT based RIP-relative address expressions as PIC
git-svn-id: trunk@16565 -
2010-12-15 13:39:27 +00:00
marco
b09ce75896 * enabled gdbint for win64 to ease ide testing.
git-svn-id: trunk@16564 -
2010-12-14 21:47:49 +00:00
Jonas Maebe
5691228fb9 * moved daemon example from fcl-base to fcl-extra, because daemonapp is
also in fcl-extra + added to makefile (mantis #18198)

git-svn-id: trunk@16563 -
2010-12-14 15:29:23 +00:00
paul
8c56269076 compiler: fix record constructor return type when parsing procedure declaration
git-svn-id: branches/paul/extended_records@16562 -
2010-12-13 07:04:56 +00:00
paul
726ea27bc0 compiler:
- add mode switch extendedrecords to allow/disallow extended records syntax, add this mode switch to delphi mode by default
  - disable/enable extended records parsing based on extendedreocrds mode switch

git-svn-id: branches/paul/extended_records@16561 -
2010-12-13 07:03:53 +00:00
paul
11d4eddf67 compiler: a trial to implement record constructor
- map self to constructor result
  - don't push vmt for records

At the moment generated assembler has errors although node tree is correct

git-svn-id: branches/paul/extended_records@16560 -
2010-12-13 06:39:29 +00:00
marco
aa93519b5a * fix for bug #18196, moving teventype broke examples.
git-svn-id: trunk@16559 -
2010-12-12 22:11:08 +00:00
sergei
13bea29253 * win/sysutils.pp, FileOpen and FileCreate, removed manual zero-termination of strings. This unit compiles in {$h+} state, and AnsiString zero-termination is handled automatically these days.
git-svn-id: trunk@16558 -
2010-12-12 15:07:38 +00:00
sergei
3c2d918cfe * Partially undo revision 16529: removing VariantToShortString breaks webtbs/tw14536 which calls the mentioned function directly instead of using typecast.
git-svn-id: trunk@16557 -
2010-12-11 23:25:20 +00:00
Jonas Maebe
29265ed672 * also compile freeglutdemo (mantis #18108)
git-svn-id: trunk@16556 -
2010-12-11 22:19:59 +00:00
florian
142e42bd81 o NativeNT target patch by Sven Barth, resolves with r16553 and r16554 #18195
* enables some disabled features for NativeNT in the compiler (all except stackcheck).

git-svn-id: trunk@16555 -
2010-12-11 20:41:37 +00:00
florian
3eec5d1b12 + added Makefile
git-svn-id: trunk@16554 -
2010-12-11 20:39:37 +00:00
florian
382dc3e413 o update by Sven Barth to the NativeNT RTL:
* Many more RTL units are enabled now, like SysUtils, Classes, Math, FGL, etc and Text-, File- and ConsoleIO features are enabled now as well (Threading and Processes are enabled, too, but their implementations are only stubs!). ConsoleIO isn't tested though, because the processes that are started by SMSS have their Standard Handles set to 0.

git-svn-id: trunk@16553 -
2010-12-11 20:39:05 +00:00