Commit Graph

49279 Commits

Author SHA1 Message Date
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
florian
f274e316fe + search /usr/lib/powerpc-linux-gnu for powerpc startup files
git-svn-id: trunk@34365 -
2016-08-22 10:01:47 +00:00
pierre
22a7ce8972 Fix memory leak due to double srsym allocation
git-svn-id: trunk@34364 -
2016-08-21 22:26:59 +00:00
pierre
dfeb6e3ae1 Avoid memory leak on trecorddef.variantrecorddesc field
git-svn-id: trunk@34363 -
2016-08-21 22:25:13 +00:00
pierre
eefdf135a5 Always write filename, truncate directory part if needed
git-svn-id: trunk@34362 -
2016-08-21 22:24:07 +00:00
pierre
8d1467157c Fix compiler compilation with -dHEAPTRC.
This was brkoken because the -dHEAPTRC option
  adds ppheap unit at top of the uses clause in pp.pas source,
  which leads to a change in the loading order of the units.
  This order change revealed that initialization of fpkg unit
  was supposed to happen after globals unit.

  Fixed here by testing if initdoneprocs local variable is assigned,
  both in register_initdone_proc and in allocinitdoneprocs,
  to avoid double initialization.

git-svn-id: trunk@34361 -
2016-08-21 22:21:09 +00:00
pierre
ea4350d86a Avoid memory leak on tppumodule.unitimportsymsderefs
git-svn-id: trunk@34360 -
2016-08-21 21:53:02 +00:00
Jonas Maebe
4eea5d9651 * override ttempinfoaccessor.settempinfoflags() for llvm and filter out
ti_may_be_in_reg flag (see comments)

git-svn-id: trunk@34359 -
2016-08-21 14:23:13 +00:00
Jonas Maebe
179c1ab328 * changed ttemp*node.tempinfo^.flags to a private field, and added setters
and getters for the ttemp*node classes instead
   o this will allow descendants to prevent certain flags from being added
     or removed. E.g. for LLVM, certain temps must never be put in registers
     because it cannot typecast a value in a register from a non-record/array
     type to an array type without forcing it to memory (so if that is done
     on an lvalue, the result will be written to the memory temp instead of
     to the register)

git-svn-id: trunk@34358 -
2016-08-21 14:23:09 +00:00
michael
0ab6477081 * Patch from Mattias Gaertner:
pasresolver.pp: new unit, implements TPasResolver, already supports simple
  types, vars, const, arguments, some expressions, calls and used units.

  tcresolver: testing TPasResolver, 

  pastree: fixed some Free with Release calls, added comments, added ForEachCall methods.

  pscanner: added option po_resolvestandardtypes. Making built-in types configurable.

  pparser: added FinishScope, fixed some Free calls with Release, check proc default values, fixed some typos

  Updated tests.

  fppas2js: property UseLowerCase to choose between lowercase and declaration case (default true), 
  using TResolver data, added msg strings, improved error handling, added converter contexts, 
  function results, local vars, unit vars

git-svn-id: trunk@34357 -
2016-08-21 12:04:36 +00:00
yury
7756dab2bf * android: Create app files dir if needed.
git-svn-id: trunk@34356 -
2016-08-20 12:41:36 +00:00
yury
0adfe669aa * android: Fixed netdb. Load DNS servers from system properties.
git-svn-id: trunk@34355 -
2016-08-20 11:47:02 +00:00
joost
dc680ff49d * Added the ability to load multiple 'Repositories' from the configuration
file. A 'Repository' being a list of packages. (These repositories should
   replace the available, local and global list of packages)
 * The OptionParser can now be used for all options, not only the global
   options.

git-svn-id: trunk@34354 -
2016-08-20 11:22:07 +00:00
svenbarth
37c32f4b61 * generate indirect symbols for interface IID and IIDSTR (fixes cycling; I wonder why that worked on Windows without problems :/ )
git-svn-id: trunk@34353 -
2016-08-19 21:49:42 +00:00
yury
419c6ce61e * android:
+ API to write to the Android system log. 
  + API to redirect standard output and error to the Android system log. The redirection is performed automatically for shared libraries loaded by Java applications.

git-svn-id: trunk@34352 -
2016-08-19 20:21:52 +00:00
yury
3822515bd9 * android: Fixed GetAppConfigDir, GetAppConfigFile, GetUserDir, GetTempDir to return correct writable locations. For NDK libraries, the path to local storage of host Java app is used. For console apps the /data/local/tmp is used.
git-svn-id: trunk@34351 -
2016-08-19 18:07:57 +00:00
yury
aa85f515e2 * android: Added API level check for known old versions without timezone implementation in libc.
git-svn-id: trunk@34350 -
2016-08-19 16:37:13 +00:00
yury
4a661ea8f8 * android: Implemented clocale. Fixed makefile.
git-svn-id: trunk@34349 -
2016-08-19 16:30:23 +00:00