Commit Graph

43 Commits

Author SHA1 Message Date
florian
867786c953 * update version
- -Oodfa removed

git-svn-id: trunk@46345 -
2020-08-09 18:52:25 +00:00
florian
fe99252a9b * lazarus version update
git-svn-id: trunk@42198 -
2019-06-09 20:08:09 +00:00
nickysn
ed984e0c76 - removed missing file from project
+ compile with the EXTDEBUG define to catch more errors

git-svn-id: trunk@36025 -
2017-04-30 20:48:35 +00:00
maciej-izak
ee4ae1254f undo accidental commit (r35721) :/
git-svn-id: trunk@35722 -
2017-04-03 17:10:20 +00:00
maciej-izak
b4b87a841c git-svn-id: trunk@35721 - 2017-04-03 17:08:01 +00:00
Jonas Maebe
b57c95043f + support overriding tdef/tsym methods with target-specific functionality:
o made all (non-abstract) tdef and tsym constructors virtual
   o added c*def/c*sym classref types for every (non-abstract) t*def/t*sym
     class
   o added cpusym unit for every architecture that derives a tcpu*def/tcpu*sym
     class from the base classes, and initialises the c*def/c*sym classes with
     them. This is done so that the llvm target will be able to derive from
     the tcpu*def/sym classes without umpteen ifdefs, and it also means that
     the WPO can devirtualise everything because the c* variables are only
     initialised with one class type
   o replaced all t*def/t*sym constructor calls with c*def/c*sym constructor
     calls

git-svn-id: trunk@27361 -
2014-03-29 22:31:55 +00:00
florian
440a592d68 * project file updated for newer lazarus versions
git-svn-id: trunk@25685 -
2013-10-06 13:13:53 +00:00
florian
3d1fb1cc60 * reverted accidental commit in r22568
git-svn-id: trunk@22576 -
2012-10-07 19:46:59 +00:00
florian
283ff05127 * merged avx support in inline assembler developed by Torsten Grundke
git-svn-id: trunk@22568 -
2012-10-06 19:47:18 +00:00
florian
46bf1823b8 * fixed/cleaned up lazarus project file
git-svn-id: trunk@22457 -
2012-09-25 18:53:11 +00:00
svenbarth
88af293155 Fix for Mantis #22160
The cause of the internal error was the following:
We have a generic in an unit ("A") which uses another unit ("B") in the implementation section and this other unit uses unit A in the interface section. Now the generic is specialized in the interface section of B. This leads to the problem that in unit A when it tries to load the globalsymtable of unit B that globalsymtable will be Nil, because parsing of the interface section is not yet finished. Thus the change in pgenutil.pas, specialization_init: if the unit is still "in_interface" the localsymtable needs to be used instead of the globalsymtable.

This doesn't necessarily lead to a compiling test though, as there is the following possibility:
Unit A contains a generic class/record (with methods) and uses unit B in the implementation section. This unit B also contains a generic class/record (with methods) and uses unit A in the implementation section. Both units contain a specialization of the other unit's generic outside of it's own generics (such that generate_specialization is fully triggered). Let's assume compilation starts with unit A and we reach the uses of unit B. Now compilation switches to unit B and completes as unit A is already registered and in compilation. The problem now is that the generic in unit A still contains unresolved forward declarations as the implementation section of A was not yet parsed which will lead to "forward declaration not solved" errors (Note: Delphi compiles this).

The solution to this is the following: if a generic is specialized from another unit which is not in state ms_compiled then the unit of the specialization needs to wait for the unit of the generic. So the specialization's unit adds itself into a list of waiting units of the generic's unit. Now inside "proc_unit" we need to check whether this module is waiting for other modules and if so avoid "finishing" the unit (which means generating the methods of the specialization, generating assembler code and ultimately freeing the scanner and PPU). Now when the generic's unit finishes we need to check whether other modules are waiting for it and finish them (of course it's a bit more complicated in reality, but that pretty much sums it up).

+ globstat.pas: Added an unit which handles the saving and restoring of the global state which was originally inside "parser.pas, compile" so that Don't Repeat Yourself (DRY) is respected.
* fmodule.pas, tmodule: 
  + add fields to keep track of the units the module is waiting for and which modules are waiting for the module
  + add field for the saved global state (raw pointer to avoid circles)
  + add field for the state which is needed to finish the unit (raw pointer to avoid circles)
  + move the code which was used in "parser.pas, compile" after a module was successfully compiled to the new virtual method "end_of_parsing"
+ fppu.pas, tppumodule.end_of_parsing:
  free the ppufile here
* pgenutil.pas:
  + add new procedure "maybe_add_waiting_unit" which adds the specialization's unit to the waiting list of the generic if that unit is not yet compiled
  * generate_specialization: call the new function when we add a new (true) specialization
  * specialization_init: instead of not adding implementation units at all check whether the unit is still parsing the interface section and add the localsymtable in that case
* pmodules.pas:
  * change "proc_unit" to a function which returns "true" if the unit was already finished (no need to wait for other units)
  + move the code from "proc_unit" from "generate_specialization_procs" on to a new procedure "finish_unit" which
  * this procedure is either called immediately in "proc_unit" if the unit does not need to wait for other units or from "finish_unit" itself if a unit that is waiting for the given unit does no longer wait for another module (special care is taken in proc_unit to avoid circles)
* parser.pas, compile:
  * correctly handle the case if an unit is not finished
  * use the new global state functionality from globstat.pas
  * pay special attention when calling "set_current_module" (see comment at that call)

+ add tests from 22160
+ add test for above mentioned "diamond" case

git-svn-id: trunk@22452 -
2012-09-25 09:45:25 +00:00
florian
5cfc865889 * version update
git-svn-id: trunk@21237 -
2012-05-05 18:33:15 +00:00
florian
1f154028da * proper title value
git-svn-id: trunk@20706 -
2012-04-04 19:42:31 +00:00
paul
8b0cb2c1d5 compiler:
- don't parse '(' token after the type declaration inside the type block
  - replace parse of "string<codepage>" to "type AnsiString(codepage)" for delphi compatibility
  - fix tests to use "type AnsiString(codepage)"

git-svn-id: trunk@19148 -
2011-09-19 04:11:57 +00:00
florian
e2f21c0a56 * version update
git-svn-id: trunk@18239 -
2011-08-17 10:57:32 +00:00
florian
84b8733945 - remove accidently commited working directory entry
git-svn-id: trunk@18229 -
2011-08-16 20:18:22 +00:00
svenbarth
80e6498921 Rebase to revision 17096
git-svn-id: branches/svenbarth/classhelpers@17099 -
2011-03-09 16:29:47 +00:00
svenbarth
07eebff55c Rebase to revision 16827
adjusted nflw.pas to compile again

git-svn-id: branches/svenbarth/classhelpers@16831 -
2011-01-28 22:15:34 +00:00
florian
197049c221 * updated to version 9
git-svn-id: trunk@16800 -
2011-01-23 11:01:37 +00:00
florian
0085c22c59 - NaN floating point constants do not anymore cause an error when $Q or $R is active (resolves #16315 and #14757)
+ $ieeeerrors (command line switch -C3) to enable errors on NaN floating point constants
+ tests

git-svn-id: trunk@15765 -
2010-08-10 19:05:13 +00:00
Jonas Maebe
57bd6d2685 + merged nestedprocvars branch
+ support for nested procedural variables:
    o activate using {$modeswitch nestedprocvars} (compatible with all
      regular syntax modes, enabled by default for MacPas mode)
    o activating this mode switch changes the way the frame pointer is
      passed to nested routines into the same way that Delphi uses (always
      passed via the stack, and if necessary removed from the stack by
      the caller) -- Todo: possibly also allow using this parameter
      passing convention without enabling nested procvars, maybe even
      by default in Delphi mode, see mantis #9432
    o both global and nested routines can be passed to/assigned to a
      nested procvar (and called via them). Note that converting global
      *procvars* to nested procvars is intentionally not supported, so
      that this functionality can also be implemented via compile-time
      generated trampolines if necessary (e.g. for LLVM or CIL backends
      as long as they don't support the aforementioned parameter passing
      convention)
    o a nested procvar can both be declared using a Mac/ISO Pascal style
      "inline" type declaration as a parameter type, or as a stand-alone
      type (in the latter case, add "is nested" at the end in analogy to
      "of object" for method pointers -- note that using variables of
      such a type is dangerous, because if you call them once the enclosing
      stack frame no longer exists on the stack, the results are
      undefined; this is however allowed for Metaware Pascal compatibility)

git-svn-id: trunk@15694 -
2010-08-02 22:20:36 +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
paul
eee6658a46 revert occasionally committed pp.lpi
git-svn-id: trunk@14064 -
2009-11-05 03:34:06 +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
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
florian
ab217ca748 * lpi version increased
git-svn-id: trunk@13415 -
2009-07-19 18:12:57 +00:00
florian
08f0ead3ef * version got updated
git-svn-id: trunk@12584 -
2009-01-23 13:26:33 +00:00
florian
b76211b426 * more improvements
git-svn-id: trunk@5348 -
2006-11-12 22:32:26 +00:00
florian
e29892329a * improved pp.lpi
git-svn-id: trunk@5347 -
2006-11-12 22:24:15 +00:00
florian
34a361e4b5 * windowism removed
git-svn-id: trunk@5226 -
2006-11-04 17:59:06 +00:00
florian
2d73d2462d * properties set
git-svn-id: trunk@5225 -
2006-11-04 17:55:22 +00:00
florian
53e4ea7bc1 * fixed broken project
git-svn-id: trunk@5158 -
2006-11-01 17:39:53 +00:00
florian
7fbd71ab99 * removed session info
git-svn-id: trunk@5157 -
2006-11-01 17:19:09 +00:00
florian
237d66c4b9 * improved default lazarus project
git-svn-id: trunk@5156 -
2006-11-01 17:15:15 +00:00
florian
6263aefef5 * locally changed pp.lpi reverted
git-svn-id: trunk@3880 -
2006-06-16 20:32:16 +00:00
mazen
bc18d6eb8a + added palmos support to makes files
+ added Makefile.fpc to palmos in rtl
+ added faked prt0 to plamos rtl

git-svn-id: trunk@2443 -
2006-02-05 19:22:12 +00:00
Vincent Snijders
708cb4fb7a fixed compilation by lazarus
git-svn-id: trunk@576 -
2005-07-03 21:09:07 +00:00
florian
f6442b758c * overloading of assignment operator by different unique result types now possible 2005-04-28 19:32:11 +00:00
mazen
581b52422c - remove $IFDEF DELPHI and related code
- remove $IFDEF FPCPROCVAR and related code
2004-10-15 09:14:16 +00:00
mazen
e90d8a42e3 * USE_SYSUTILS merged successfully : cycles with and without defines
* Need to be optimized in performance
2004-10-14 18:16:17 +00:00
mazen
e27d695e7c * Fix new command line parameters 2004-09-22 15:41:57 +00:00
mazen
72556ae39f * fix compile problem 2004-07-26 04:00:35 +00:00
mazen
4a0a19d733 + added to use Lazarus debugging compiler 2004-03-17 11:58:03 +00:00