Commit Graph

75 Commits

Author SHA1 Message Date
florian
9672f0537a * handle exports with a name consisting of a single character correctly
git-svn-id: trunk@21945 -
2012-07-22 14:23:09 +00:00
Jonas Maebe
3589f90cf8 * also show the valid bounds in most cases when signalling a range check
warning/error while evaluating constants (mantis #21299)

git-svn-id: trunk@20507 -
2012-03-10 21:53:36 +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
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
florian
c1f3d8dcaa * unified names of system_*/systems_* sets
git-svn-id: trunk@14566 -
2010-01-07 18:16:20 +00:00
Jonas Maebe
6f3bace0f3 + support for exporting Objective-C classes from dynamic libraries. It works
the same as for exporting functions/procedures and variables: add the name
    of the class to the "exports" section of the library. By default, classes
    are only visible inside a shared library.

git-svn-id: branches/objc@13765 -
2009-09-27 15:40:52 +00:00
Jonas Maebe
eb130d7501 * fixed invalid type cast in case of errors in a library's export section
git-svn-id: trunk@12008 -
2008-11-01 17:08:26 +00:00
Jonas Maebe
2f25c4422b * export names aren't mangled under OS/2 either (follow-up
to r10836, see proc_get_importname in pdecsub.pas)

git-svn-id: trunk@10838 -
2008-04-29 19:08:02 +00:00
yury
c79fe114a3 * DLL export names are not mangled on Windows (bug #11228).
git-svn-id: trunk@10836 -
2008-04-28 20:08:19 +00:00
Jonas Maebe
150eda304b * factored unix exports handling from t_bsd and t_linux into expunix unit
(todo: at least solaris, maybe others)
  * changed the "exports" section handling:
    a) make everything private which is not exported (implemented for
       darwin and linux)
    b) for the exported symbols:
     - functions/procedures
      1) if no name or index is provided, and if the procedure has aliases
         defined via the public/export directives, then export the default
         mangled name and all defined aliases
      2) otherwise if no name is specified (but there is an index) then
        i) if the procedure is defined as cdecl/cppdecl/mwpascal, use the
           appropriately mangled version of the function name
       ii) otherwise export the name without any mangling(e.g. "exports
           proc1" -> proc1 is the exported name)
     - variables
      1) if no name is provided and the variable was specified as cvar,
         use the mangled name
      2) otherwise if no name is provided, export the name without any
         mangling
  -> initialization/finalization of shared libraries under Linux works
     again (mantis #7838)
  -> sharing symbols between shared library and main program works
     under Linux (mantis #9089)

git-svn-id: trunk@10551 -
2008-03-24 16:55:05 +00:00
daniel
9adb202a92 * Rework the constexprint to allow operations from low(int64) to high(qword).
+ Some initial work on a formaldef which also carries the typinfo of a parameter.

git-svn-id: trunk@7639 -
2007-06-13 07:41:18 +00:00
peter
0557ddc342 * removed typed const, it is now handled by staticvarsym
* globalvarsym renamed to staticvarsym
  * fixed invalid regvar use in init when the finalize also uses the var

git-svn-id: trunk@5290 -
2006-11-08 21:04:22 +00:00
peter
e17b424e28 * refactor procsym procdef list
git-svn-id: trunk@5210 -
2006-11-03 18:44:46 +00:00
peter
658c46b903 * remove tdictionary and tindexarray
* symtables based on TFPHashObjectList and TFPObjectList
  * rename torddef.typ to torddef.ordtype
  * rename tfloatdef.typ to tfloatdef.floattype
  * rename tdef.deftype to tdef.typ
  * remove obsolete browser code, browcol is kept so the ide
    can still be compiled

git-svn-id: trunk@5192 -
2006-11-03 00:30:30 +00:00
florian
9a1b9071a5 * implemented kylix like local directive, fixes #7242
git-svn-id: trunk@4982 -
2006-10-19 20:26:14 +00:00
florian
3824604e8a * export of qualified unit symbols, fixes #6848
git-svn-id: trunk@3570 -
2006-05-18 20:43:52 +00:00
florian
a1189a9d64 * exports info handling refactored, -E will be passed to ld if necessary
git-svn-id: trunk@1922 -
2005-12-10 22:00:33 +00:00
florian
83c6b3aca2 * from Yury Sidorov:
+ Added new target WinCE for i386 (to be able compile and run programs in WinCE emulator)

git-svn-id: trunk@596 -
2005-07-09 09:31:57 +00:00
florian
c2fe9e3814 + compiler part of WinCE patches from Yuri Sidorov
git-svn-id: trunk@573 -
2005-07-03 15:52:54 +00:00
peter
2720cbd25b * win32 dll smartlink patch from Pavel V. Ozerski
git-svn-id: trunk@182 -
2005-06-03 11:39:57 +00:00
fpc
790a4fe2d3 * log and id tags removed
git-svn-id: trunk@42 -
2005-05-21 09:42:41 +00:00
fpc
50778076c3 initial import
git-svn-id: trunk@1 -
2005-05-16 18:37:41 +00:00
peter
e417e34496 * truncate log 2005-02-14 17:13:06 +00:00
peter
6458bd0ce1 * tvarsym splitted 2004-11-08 22:09:58 +00:00
mazen
581b52422c - remove $IFDEF DELPHI and related code
- remove $IFDEF FPCPROCVAR and related code
2004-10-15 09:14:16 +00:00
florian
8a9758c5e2 * logs truncated 2004-06-20 08:55:28 +00:00
florian
588e2c38bf * dwarf branch merged 2004-06-16 20:07:06 +00:00
peter
f6a28d1513 index number generation for mixed index-nonindexed fixed, patch by Pavel V. Ozerski 2004-04-24 17:32:05 +00:00
michael
c455a796e9 indexed exports needs to be sorted (patch from Pavel) 2004-04-08 11:07:05 +00:00
carl
67486c96c3 * fixes for Delphi 6 compilation
(warning : Some features do not work under Delphi)
2002-10-05 12:43:23 +00:00
daniel
b0364566d1 * Make Tprocdef.defs protected 2002-09-03 16:26:26 +00:00
florian
eb2ca8d10f * rewrote the system handling 2002-07-26 21:15:37 +00:00
peter
06ebac4e27 * readded missing revisions 2002-05-18 13:34:04 +00:00
carl
21b3a10f02 + defines.inc -> fpcdefs.inc to avoid conflicts if compiling by hand
+ try to fix temp allocation (still in ifdef)
+ generic constructor calls
+ start of tassembler / tmodulebase class cleanup
2002-05-16 19:46:34 +00:00
peter
2992e1819c * removed old logs and updated copyright year 2002-05-14 19:34:38 +00:00
peter
5e7a1e3729 * removed unused units
* use tlocation.size in cg.a_*loc*() routines
2002-04-04 19:05:54 +00:00
carl
0ee2ac7451 + added wdosx support (patch from Pavel) 2002-04-04 18:30:22 +00:00
peter
d2e1952377 * procsym definition rewrite 2001-11-02 22:58:00 +00:00
peter
0c03535b5b * registration of targets and assemblers 2001-04-18 22:01:53 +00:00
peter
a7cf57524e * symtable change to classes
* range check generation and errors fixed, make cycle DEBUG=1 works
  * memory leaks fixed
2001-04-13 01:22:06 +00:00
peter
b193bf7df3 * remove unnecessary calls to firstpass 2001-04-04 22:43:50 +00:00
peter
d8abf76f6b * getsym redesign, removed the globals srsym,srsymtable 2001-03-11 22:58:49 +00:00
Jonas Maebe
a60d4d969b * fixed copy/past bugs 2001-01-03 13:12:50 +00:00
peter
350a364890 * export with the case provided in the exports section 2000-12-30 22:53:25 +00:00
peter
32b9cdb7cf + new tlinkedlist class (merge of old tstringqueue,tcontainer and
tlinkedlist objects)
2000-12-25 00:07:25 +00:00
florian
b9796f6a7f * unused units removed from uses clause
* some changes for widestrings
2000-11-29 00:30:30 +00:00
peter
451723647e * symtable splitted, no real code changes 2000-10-31 22:02:46 +00:00
peter
e171f341a0 * moehrendorf oct 2000 rewrite 2000-10-14 10:14:45 +00:00
peter
5218af7926 * delphi compile fixes 2000-09-24 21:19:48 +00:00
peter
a71e44ac49 * use defines.inc 2000-09-24 15:06:10 +00:00