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
yury
064375ea72
* android: Use ICU to get timezone information if running on an Android version where libc does not implement timezone.
...
git-svn-id: trunk@34348 -
2016-08-19 14:57:02 +00:00
svenbarth
f50671fe44
* reference the RTTI assembler symbols if they're queried from a different unit than the own they're declared in
...
git-svn-id: trunk@34347 -
2016-08-19 14:54:28 +00:00
yury
c2ba68df44
* android: Added functions GetSystemProperty() and SystemApiLevel().
...
git-svn-id: trunk@34346 -
2016-08-19 14:50:18 +00:00
yury
b10e4aa27b
* android: cwstring: Fixed crash on unload in some cases. Allow ICU usage from other units.
...
git-svn-id: trunk@34345 -
2016-08-19 14:48:09 +00:00
svenbarth
4a9eaf5317
* use findunitsymtable() when checking the module id
...
git-svn-id: trunk@34344 -
2016-08-19 14:42:03 +00:00
svenbarth
8b853571c6
* don't generate a warning if a "generic" token follows while parsing procedure directives (let's hope we'll never have to add a "generic" directive :/ )
...
+ added test
git-svn-id: trunk@34343 -
2016-08-19 14:07:36 +00:00
svenbarth
54874cccd6
* reference the VMT's assembler symbol if it's from another unit
...
git-svn-id: trunk@34342 -
2016-08-19 14:00:24 +00:00
svenbarth
1bd5d030f5
* don't export the indirect symbols on platforms that require the import redirection as there the indirect ones will be created in the importing binary
...
git-svn-id: trunk@34341 -
2016-08-19 13:48:27 +00:00
svenbarth
f1cdb5c4e9
* don't export types that have been merely renamed (and thus are part of another unit and potentially another package altogether)
...
git-svn-id: trunk@34340 -
2016-08-19 13:29:33 +00:00
svenbarth
1c696b0e77
* use indirect reference for FPC_THREADVAR_RELOCATE if necessary
...
* reference FPC_THREADVAR_RELOCATE assembler symbol if necessary
git-svn-id: trunk@34339 -
2016-08-19 13:07:56 +00:00
svenbarth
fb6546972b
* IID and IIDStr references of the VMT's interface table need to be indirect
...
git-svn-id: trunk@34338 -
2016-08-19 13:06:26 +00:00
svenbarth
77de5dd968
* reference assembler symbol of FPC_EMPTYMETHOD using AB_EXTERNAL and not AB_GLOBAL
...
git-svn-id: trunk@34337 -
2016-08-19 12:42:14 +00:00
svenbarth
70fbe50bac
* reference the extern assembler symbol of the VMT when catching an exception if it's from another unit
...
git-svn-id: trunk@34336 -
2016-08-19 12:41:06 +00:00
pierre
2ec79b3606
Set result of functions calling RunError to avoid useless warnings
...
git-svn-id: trunk@34335 -
2016-08-19 12:21:17 +00:00
pierre
44f00c2bf4
Do not cast @JumpToHandleSignal to a longint, use ptruint type instead
...
git-svn-id: trunk@34334 -
2016-08-19 12:20:21 +00:00
yury
5e9d826d04
* android: Explicitly specified import library name.
...
git-svn-id: trunk@34333 -
2016-08-18 14:39:54 +00:00
yury
2630f3c498
* android: Properly initialize time zone information.
...
git-svn-id: trunk@34332 -
2016-08-18 14:03:34 +00:00