Commit Graph

49146 Commits

Author SHA1 Message Date
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
pierre
cb5f540eb9 Fix typo in last commit: to disable TraceManager, call SetMemoryManager with saved PrevMemoryManager variable
git-svn-id: trunk@34399 -
2016-08-30 15:51:56 +00:00
Károly Balogh
5dc55b362d ami-extra: moved amsgbox here from amunits, and therefore made it available across all Amiga-likes
git-svn-id: trunk@34398 -
2016-08-30 12:55:43 +00:00
Károly Balogh
ee8fb64a99 amunits: since amsgbox is not used in unit initializations any more, make it depend on intuition and not redefinine EasyRequestArgs
git-svn-id: trunk@34397 -
2016-08-30 12:46:19 +00:00
Károly Balogh
57042351e5 fpmkunit: on compilation failure show the actual compiler output, and don't just swallow the exception and raise a new one with precisely no helpful info
git-svn-id: trunk@34396 -
2016-08-30 12:34:56 +00:00
Jonas Maebe
f64556c125 * when taking the address of a class method via an instance, create a procvar
with the VMT of the instance as self instead of the self instance pointer
    (mantis #29491)

git-svn-id: trunk@34395 -
2016-08-30 07:25:16 +00:00
Károly Balogh
c5a123614a fixed explicit paraloc support in ppudump and made it work on all Amiga-like systems
git-svn-id: trunk@34394 -
2016-08-29 21:26:55 +00:00
Jonas Maebe
eb2ce85269 * correctly set the line info for the implicitly generated entry code nodes,
and update the code to also set it for some implicitly generated exit code

git-svn-id: trunk@34393 -
2016-08-29 16:05:25 +00:00
Jonas Maebe
ffd4870a60 * add backticks around special type identifiers in
tabstractprocdef.typename_paras(), after accidentally committing the
    removal of the double quotes in r34358
   o the reason for not using double quotes is that the output of this routine
     is used for some LLVM identifier names, and you can't have double quotes in
     LLVM identifiers (any other character, including space, is no problem)

git-svn-id: trunk@34392 -
2016-08-29 16:05:22 +00:00
Jonas Maebe
4ca50bc9eb * removed optimisation to reduce the number of unnecessary section headers
in the high level typed constant builder, as it does not work if the
    passed list to start_internal_data_builder() is used for multiple
    nested builders (you can't know what the last section was) -> always
    emit a section header for a nested typed const builder

git-svn-id: trunk@34391 -
2016-08-28 22:08:00 +00:00
Jonas Maebe
a7c893064a * only don't insert passing alignment immediately for anonymous records
rather than for any anonymous aggregate, since for arrays we do know
    the alignment even if we don't know the element count (because it only
    depends on the elementdef, which is/will be set immediately)

git-svn-id: trunk@34390 -
2016-08-28 22:07:57 +00:00
Jonas Maebe
6c40105037 * fixed typo
git-svn-id: trunk@34389 -
2016-08-28 22:07:54 +00:00
Jonas Maebe
10fb90b415 * mark symbols in "no_dead_strip" Objective-C sections also as no_dead_strip
at the symbol level (needed for LLVM)

git-svn-id: trunk@34388 -
2016-08-28 22:07:52 +00:00
Jonas Maebe
d664038aa4 * don't add ".reference" assembler directives on Darwin for symbols that are
in sections marked as "no_dead_strip"

git-svn-id: trunk@34387 -
2016-08-28 22:07:49 +00:00
Jonas Maebe
ae51adac18 * give names to the types of the fields of the enumdef rtti, so that we can
refer to these type names when writing the s2o and o2s arrays in the LLVM
    assembler writer (otherwise we have to write out the entire definition
    of those fields and their subtypes for every access, resulting in a 139MB
    cpubase.ll instead of a more reasonable 1.5MB one now)

git-svn-id: trunk@34386 -
2016-08-28 22:07:47 +00:00
pierre
b6b27f2fb7 + Add tail_size varaible to be able to adjust size of tail memory area.
* Correct computation of CRC for if add_tail is true:
    tail is before extra_info, not after.
    Use tail_size variable to cacluate CRC use the whole tail memory area.
  + New function released_modified. Checks if released memory
    was modified after it release (used if keep_released is true).
  * TraceGetMem,TraceFreeMem TraceReallocMem: adapt to new tail_size variable.
  * TraceInit: Store previous memory manager in local variable,
    to be able to restore it in TracExit call.
  * LoadEnvironment: Add parsing of tail_size=XXX, where XXX is a decimal value,
    rounded up to next multiple of sizeof(ptruint).

git-svn-id: trunk@34385 -
2016-08-28 21:42:07 +00:00
pierre
1612138071 Use $checkpointer off to avoid calls to CheckPointer function if -gc option is used
git-svn-id: trunk@34384 -
2016-08-28 15:59:36 +00:00
pierre
4d3939ba7e Rectify display of shell command, do it if -vx option is used even without -vu
git-svn-id: trunk@34383 -
2016-08-28 13:02:34 +00:00
svenbarth
3a9f8e88fd * don't write or reference debug information for a unit if it belongs to a/another package
git-svn-id: trunk@34382 -
2016-08-26 15:09:24 +00:00
svenbarth
aaceb5518f * fix Mantis #30494 by applying patch from Maciej Izak
+ added test

git-svn-id: trunk@34381 -
2016-08-26 14:23:23 +00:00
svenbarth
d46c015eb1 * when inlining a function we need to import symbols that were loaded from another unit (or the same unit if the inlined function is from another unit and uses another function in the same unit)
git-svn-id: trunk@34380 -
2016-08-26 13:47:10 +00:00
Jonas Maebe
3669419bb3 * fixed tcasenode.simplify() in case we have to pass via a "less" branch of
of a tcaselabel that also has a valid "greater" branch to arrive at the
    correct entry (mantis #30522)

git-svn-id: trunk@34379 -
2016-08-26 13:02:10 +00:00
Károly Balogh
deda4c8247 simplified some code and removed a no longer used const
git-svn-id: trunk@34378 -
2016-08-26 10:07:30 +00:00
michael
2ef1a423fe * Aggregate Functions & ExtractNode
git-svn-id: trunk@34377 -
2016-08-26 07:17:03 +00:00
pierre
be9e097841 Use new class TAsmDataDef as ancestor for TPPCASmData
git-svn-id: trunk@34376 -
2016-08-25 22:27:48 +00:00
pierre
628d7dcb05 Avoid resetting of casmdata from TPPCAsmData back to TAsmDataDef
git-svn-id: trunk@34375 -
2016-08-25 21:56:48 +00:00
Jonas Maebe
18d728eb72 * ensure that local variables and parameters moved to a parentfpstruct aren't
initialised and finalised twice (once at their original location, and once
    when the parentfpstruct is initialised/finalised)

git-svn-id: trunk@34374 -
2016-08-24 16:41:07 +00:00
Jonas Maebe
18a59dddb9 * use ctai_typedconstbuilder.get_dynstring_rec() to get the recorddef representing
string constants instead of giving an internal error if we can't find it in
    the current context (in most cases it will exist, but not when inlining a
    routine from another unit that accesses a locally declared string constant)

git-svn-id: trunk@34373 -
2016-08-24 16:41:04 +00:00
Jonas Maebe
4a42d67b72 + ttai_typedconstbuilder.get_dynstring_rec() class method to get a recorddef
that represents an ansi/unicode/widestring constant of a particular length

git-svn-id: trunk@34372 -
2016-08-24 16:41:02 +00:00
Jonas Maebe
e91ba32b7c * changed the result of get_dynstring_rec_name() to TSymStr
git-svn-id: trunk@34371 -
2016-08-24 16:40:59 +00:00
florian
16ac523f50 * link always excplicitly against libc on linux when using the dl unit so
the correct startup code is used

git-svn-id: trunk@34370 -
2016-08-22 14:16:21 +00:00
yury
6b25cef3ea * pas2jni: Reverted r34367 and mark undesired event handler creation "deprecated".
git-svn-id: trunk@34369 -
2016-08-22 13:12:19 +00:00
florian
80fc6a459c * corrected r34366 (powerpc -> cpupowerpc)
git-svn-id: trunk@34368 -
2016-08-22 10:23:09 +00:00
yury
e81cc4574f * pas2jni: Removed option to create event handler by passing Java method method name as a string. It is not safe, since the target method is treated as unused by Java and the method may be removed from the resulting application.
git-svn-id: trunk@34367 -
2016-08-22 10:13:45 +00:00
florian
385f13cae9 * excplicitly link against libc in the unit dl, so the correct startup files are used, resolves issue #29594
git-svn-id: trunk@34366 -
2016-08-22 10:03:58 +00:00