Commit Graph

85 Commits

Author SHA1 Message Date
Nikolay Nikolov
f800e40595 + print an error message, in case 'promising' exports are used on non-WebAssembly platform 2023-06-16 15:44:58 +03:00
Nikolay Nikolov
2f1ccd6f2a + support 'promising last' exports 2023-06-16 11:00:19 +03:00
Nikolay Nikolov
c6b059ede6 * eo_promising renamed eo_promising_first 2023-06-13 11:42:15 +03:00
Nikolay Nikolov
15c95e0ac7 + initial implementation of WebAssembly promising exports 2023-06-11 16:43:45 +03:00
svenbarth
d854d18bd9 * instead of blindly consuming whatever comes next trigger an explicit error if the parsed expression does not match for "INDEX ordexpr" or "NAME strexpr"
+ added tests

git-svn-id: trunk@47995 -
2021-01-02 23:23:08 +00:00
florian
637976e83f * patch by Marģers to unify internal error numbers, resolves #37888
git-svn-id: trunk@47103 -
2020-10-13 19:59:01 +00:00
Jonas Maebe
281b3ad276 * fix case completeness and unreachable code warnings in compiler that would
be introduced by the next commit

git-svn-id: trunk@42046 -
2019-05-12 14:29:03 +00:00
Jonas Maebe
0b61b5d4cf * added extra header to ppu inside a subsection, so we won't run into
trouble when the ppu version hits 255
  * also moved several ppu flags to a set inside that section

git-svn-id: trunk@41846 -
2019-04-06 21:28:43 +00:00
svenbarth
3b71841a84 Merged revision(s) 28691, 31914 from branches/svenbarth/packages:
Convert export options from constants to a set and accordingly adjust all usage locations

git-svn-id: trunk@32945 -
2016-01-15 16:06:06 +00:00
svenbarth
0ff87336aa Convert the Boolean parameters accept_equal, typeonly and hadspecialize of comp_expr(), sub_expr() and factor() to a set parameter and adjust all calls.
pexpr.pas:
  + new enum texprflag and corresponding set texprflags
  * comp_expr: replace accept_equal and typeonly with texprflags parameter
  * factor: replace typeonly and hadspecialize with texprflags parameter
  * sub_expr: replace accept_equal and typeonly with texprflags parameter
  * adjust calls to comp_expr(), factor() and sub_expr()
other units:
  * adjust calls to comp_expr(), factor() and sub_expr() 

git-svn-id: trunk@32269 -
2015-11-07 21:45:03 +00:00
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