Commit Graph

49180 Commits

Author SHA1 Message Date
Jonas Maebe
adcf07aabb * fixed line information for constructor code added to new block while
generating the afterconstruction code

git-svn-id: trunk@34450 -
2016-09-08 14:18:50 +00:00
Jonas Maebe
d22b83ee73 * renamed afterconstructionblock to constructionblock
git-svn-id: trunk@34449 -
2016-09-08 14:18:47 +00:00
pierre
17ba06f7c8 Regenerated after: Add missing -Tlinux help line for mipsel compiler
git-svn-id: trunk@34448 -
2016-09-08 05:53:19 +00:00
pierre
270d5bedec Add missing -Tlinux help line for mipsel compiler
git-svn-id: trunk@34447 -
2016-09-08 05:52:38 +00:00
Jonas Maebe
388c047c8a - removed the code to check whether a parameter to an inline routine is
also the by-reference function result of a call node, now that this is
    properly checked in the general case (these parameters/function results
    are temp nodes in case of inlined calls)

git-svn-id: trunk@34446 -
2016-09-07 19:37:38 +00:00
Jonas Maebe
5ffd06392d * don't optimize "x:=f(x)" whereby the function result of f() is passed
by reference in case x is a temp (mantis #30572)

git-svn-id: trunk@34445 -
2016-09-07 19:37:35 +00:00
Jonas Maebe
997a958f72 * fixed r34439 for big endian
git-svn-id: trunk@34444 -
2016-09-07 16:09:10 +00:00
Jonas Maebe
473cec9d85 * converted tnodeutils.InsertRuntimeInits() to the high level typed const
builder

git-svn-id: trunk@34443 -
2016-09-07 16:09:06 +00:00
Jonas Maebe
8957d7b364 - regenerated after disabling the textmode ide for Darwin again
git-svn-id: trunk@34442 -
2016-09-06 21:28:41 +00:00
Jonas Maebe
35e20ed4b8 - disabled the textmode IDE for Darwin again: I don't want to support it,
and for some reason comprsrc.pas even fails to compile when compiled via
    compunit

git-svn-id: trunk@34441 -
2016-09-06 21:28:37 +00:00
Jonas Maebe
2d051f89f7 * don't increase refcounts for variants assigned to (ti_)const nodes, fixes
memory leak after r34288 and should have been done as part of r34287
    (mantis #30546)

git-svn-id: trunk@34440 -
2016-09-06 21:28:34 +00:00
Jonas Maebe
26f6d2f39d * emit smallsets as a single byte/word/cardinal, since that is how they
are handled in the code generator (and ncgcon) as well

git-svn-id: trunk@34439 -
2016-09-06 21:28:30 +00:00
pierre
2f79e6147b Makefile's regenerated after:
Set GDBMI Makefile environment variable for targets that support
   building IDE with GDBMI.

   GDBMI is set to 1 if target OS is in the list GDBMI_DEFAULT_OS_LIST

 * Add comment about GDBMI_DEFAULT_OS_LIST, stating that this 
   makefile variable appaers at three levels:
   fpcbuild, fpcsrc and fpcsrc/ide
   but that the content should be kept equal.

fpsrc/ide/Makefile.fpc:
 * Do not use GDBMI if NOGDB is used.

git-svn-id: trunk@34438 -
2016-09-06 12:21:19 +00:00
pierre
c3957a0f79 Set GDBMI Makefile environment variable for targets that support
building IDE with GDBMI.

   GDBMI is set to 1 if target OS is in the list GDBMI_DEFAULT_OS_LIST

 * Add comment about GDBMI_DEFAULT_OS_LIST, stating that this 
   makefile variable appaers at three levels:
   fpcbuild, fpcsrc and fpcsrc/ide
   but that the content should be kept equal.

fpsrc/ide/Makefile.fpc:
 * Do not use GDBMI if NOGDB is used.

git-svn-id: trunk@34437 -
2016-09-06 12:19:50 +00:00
Károly Balogh
de6d7be8df powerpc: converted some partial tabs indentation to spaces. no functional changes.
git-svn-id: trunk@34436 -
2016-09-05 21:42:28 +00:00
Károly Balogh
7a6f18c496 powerpc: reworked syscall generation once more. instead of making various assumptions on the syscallib location based on the calling convention, simply search for the lib and use its location. also unified the call generation itself
git-svn-id: trunk@34435 -
2016-09-05 21:11:51 +00:00
pierre
95520ea767 + Add handling of multiline GDBVersion string,
used to display help message if GDBMI does not find GDB executable.
  + Add Nikolay Nikolov to the contributor list in new GDBMI section.

git-svn-id: trunk@34434 -
2016-09-05 13:12:45 +00:00
pierre
fb2a726dbd Add help message to About if GDB version retrieval does not work
git-svn-id: trunk@34433 -
2016-09-05 13:10:17 +00:00
pierre
6d6da7854c Add ExeExt suffix to GDBProgramName if not specified
git-svn-id: trunk@34432 -
2016-09-05 13:09:31 +00:00
pierre
97c2067832 Fix compiler cycling starting from 3.0.0 powerpc64 release compiler
git-svn-id: trunk@34431 -
2016-09-05 09:36:43 +00:00
michael
d876d1d1e7 * Patch from Mattias Gaertner:
New conversion of for loop:

  i=<StartExpr>;
  for(var $loopend=<EndExpr>; i<=$loopend; i++){}

  Because StartExpr and EndExpr must be executed exactly once.

git-svn-id: trunk@34430 -
2016-09-05 05:57:51 +00:00
michael
504e4fb944 * New patch from Mattias Gaertner
* pscanner: 
  New TPasSourcePos record and function TPascalScanner.CurSourcePos: TPasSourcePos.
  TStreamResolver.Streams public, so the tests can find all sources. 

* pastree:
  TPasImplForLoop.VariableName is now TPasExpr.
  Replaced Element.Free calls with Element.Release.

* pparser: 
  Improved the source positions of many types, by passing a TPasSourcePos with TypeName.
  Replaced Element.Free calls with Element.Release.
  Changed try..except to try..finally for nicer stacktraces.
  FinishScope ExceptOnExpr:  called after expression was parsed, before statement 
  FinishScope ExceptOn: called after statement.
  For-Loop now supports a dotted identifier as variablename.

* pasresolver:
  while do
  repeat until
  if then else
  binary operators
  case of
  try..finally..except, on, else, raise
  for loop

* Tests:
  Changed for-loop tests for new VariableName.
  Testing the resolver with Asserts creates hard to understand tests.
  Instead I added an utility function CheckReferenceDirectives to test
  resolved references via markers in source snippets. This also tests the
  element structure and source positions.

git-svn-id: trunk@34429 -
2016-09-05 05:56:10 +00:00
pierre
ca08a3498d Replace -k-bbigtoc by -CTsmalltoc, which is more efficient, thanks to Jonas.
git-svn-id: trunk@34428 -
2016-09-04 22:51:17 +00:00
pierre
55804eb382 Regenerate Mkefile after:
+ Add -bbigtoc linker option for aix IDE  with GDBMI
 * Add AIX to list of OS's using GDBMI by default.

git-svn-id: trunk@34427 -
2016-09-04 16:51:53 +00:00
pierre
c239dc128f + Add -bbigtoc linker option for aix IDE with GDBMI
* Add AIX to list of OS's using GDBMI by default.

git-svn-id: trunk@34426 -
2016-09-04 16:51:09 +00:00
pierre
eca3ddc5ce Regenerate Makefile after change to Makefile.fpc:
Change default mode to using mi interpreter, with GDB running as an separete process.
   + New Makefile variable named:
   GDBMI_DEFAULT_OS_LIST
   which lists all OS's for which the use of gdbmi is enabled by default.
   Starting value:
   darwin freebsd haiku linux netbsd openbsd solaris win32 win64
   Default can be overriden by using NOGDBMI variable.

   This change is mainly to anticipate GDB source switch to C++ after 7.12 version.

git-svn-id: trunk@34425 -
2016-09-04 14:52:53 +00:00
pierre
e52c7d5c43 Change default mode to using mi interpreter, with GDB running as an separete process.
+ New Makefile variable named:
   GDBMI_DEFAULT_OS_LIST
   which lists all OS's for which the use of gdbmi is enabled by default.
   Starting value:
   darwin freebsd haiku linux netbsd openbsd solaris win32 win64
   Default can be overriden by using NOGDBMI variable.

   This change is mainly to anticipate GDB source switch to C++ after 7.12 version.

git-svn-id: trunk@34424 -
2016-09-04 14:52:04 +00:00
michael
1001bac6bb * Accept quoted identifiers, using double quotes
git-svn-id: trunk@34423 -
2016-09-04 06:38:14 +00:00
michael
394ec97d80 * Min/Max aggregates
git-svn-id: trunk@34422 -
2016-09-04 06:07:34 +00:00
Károly Balogh
54ac4c91c8 fixed builds on 32bit hosts to 64bit targets (broken by r34416)
git-svn-id: trunk@34421 -
2016-09-04 05:12:21 +00:00
pierre
f216c359bd Always consider Compilation raised exception internally as an Internal Error
git-svn-id: trunk@34419 -
2016-09-03 10:08:39 +00:00
Károly Balogh
d5d62b7675 aros: startup code tweaks for i386, to keep libbase untouched in eax
git-svn-id: trunk@34418 -
2016-09-03 07:59:32 +00:00
Károly Balogh
84abdd8287 powerpc: simplified code generation for MorphOS syscalls
git-svn-id: trunk@34417 -
2016-09-03 07:58:17 +00:00
Károly Balogh
464ecab542 huge syscall support refactor for Amiga-likes. removed large chunks of ancient duplicated code, and in general tried to make the entire thing more maintainable and cleaner. also added support for AROS EAXBase syscall convention
git-svn-id: trunk@34416 -
2016-09-03 07:57:23 +00:00
pierre
a0713632a9 Consider a 'Compilation raised exception internally' without Fatal nor Error message as an InternalError
git-svn-id: trunk@34415 -
2016-09-02 21:25:46 +00:00
svenbarth
cb27889dea * fix cycling by correctly handling the case that the global symtable of a program file is Nil
* also check the local symtable in that case (a program does not result in a PPU, but we need the imported symbols nevertheless when linking to a package)

git-svn-id: trunk@34414 -
2016-09-02 17:22:59 +00:00
svenbarth
36e5d02e8e * addsymref: do not directly check the top level symtable against the current module's global symtable as that would be false for a specialize symtable; check the module id instead
git-svn-id: trunk@34413 -
2016-09-02 16:03:25 +00:00
svenbarth
80c2e3b51a * special detection of an ongoing specialization for the case that a function that belongs to a generic and has said generic as parameter or result is in turn specialized as a parameter or result of another generic function
git-svn-id: trunk@34412 -
2016-09-02 15:52:03 +00:00
svenbarth
6a14bb5014 * check the owner of current_specializedef as that is Nil if a generic routine is specialized and this is the specialization of one of its parameters or its result type
git-svn-id: trunk@34411 -
2016-09-02 15:48:30 +00:00
svenbarth
08cd62fc7e * rework parse_proc_dec_finish.read_returndef a bit so that specializations as result types of generic routines are handled correctly
git-svn-id: trunk@34410 -
2016-09-02 15:46:08 +00:00
svenbarth
a4a1e9db12 * allow equal result types instead of exactly the same result types for generic functions if both are specializations (otherwise they would be considered as different if they depend on the generic function's generic types)
git-svn-id: trunk@34409 -
2016-09-02 15:43:49 +00:00
svenbarth
3ea78f53ad * as it seems that UnitImportSyms stores symbols that are already freed add an additional check to tderef.build() for tdef (in addition to tsym) to find code that triggers such cases more easily
git-svn-id: trunk@34408 -
2016-09-02 15:35:17 +00:00
yury
b552fc4595 * android: Improved initialization of cwstring.
git-svn-id: trunk@34407 -
2016-09-01 23:34:09 +00:00
yury
a0d6873331 * android: Android versions prior to 4.1 do not support recursive dlopen() calls.
Therefore if a shared library is loaded by JVM ( using dlopen() ),
          it is not possible to use dlopen() in a units initialization code -
          dlopen() simply hangs.
          To workaround this issue, if a library exports JNI_OnLoad(), then
          no unit initialization is performed during library load.
          The initialization is called when JVM has loaded the library and calls
          JNI_OnLoad().

git-svn-id: trunk@34406 -
2016-09-01 23:22:41 +00:00
yury
649823a246 * Removed unused vars.
git-svn-id: trunk@34405 -
2016-09-01 20:01:54 +00:00
yury
e3d9dbbeef * Removed unused vars.
git-svn-id: trunk@34404 -
2016-09-01 19:55:45 +00:00
Jonas Maebe
565288bef0 * also synchronise the data sent from the main thread to the worker threads,
as this can also be read by worker threads before any RTLEvent* has taken
    place

git-svn-id: trunk@34403 -
2016-08-31 17:23:59 +00:00
pierre
c327a07414 Avoid memory leak for InstrWriter field in powerpc TAssembler descendants
git-svn-id: trunk@34402 -
2016-08-30 21:21:59 +00:00
Jonas Maebe
7eea450a52 * avoid a datarace in case a worker thread finishes and the main thread sees
that it is done before it had the chance to call RTLEventSetEvent() (since
    then no memory barrier synchronised the thread state with what the main
    thread would see)

git-svn-id: trunk@34401 -
2016-08-30 21:11:05 +00:00
joost
9487b46b8a * Added new structure to hold the global options. The goal is to get rid
of all globals and to contain all fppkg-related stuff into this
   structure. So it will be easier to embed fppkg into other applications.

git-svn-id: trunk@34400 -
2016-08-30 20:09:34 +00:00