Commit Graph

4087 Commits

Author SHA1 Message Date
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
yury
2630f3c498 * android: Properly initialize time zone information.
git-svn-id: trunk@34332 -
2016-08-18 14:03:34 +00:00
svenbarth
e0fd432c9d * use a Pascal tool instead of a Makefile to generate the list of test files; this way the testsuite works again with older versions of make that don't support $(info ...) (e.g. 3.80 and earlier)
git-svn-id: trunk@34310 -
2016-08-14 11:25:10 +00:00
svenbarth
2808be3e20 + add and use sysinit unit for Win64 (only one since we don't support cygwin and gprof there)
* switch Win64 to indirect entry information

git-svn-id: trunk@34307 -
2016-08-13 19:10:27 +00:00
Jonas Maebe
051317e82e * load the function result from the parentfpstruct to its original location
in exit nodes, because the wrapping code added in
    tnodeutils.wrap_proc_body() gets inserted before the exit label to which
    the exit node jumps

git-svn-id: trunk@34305 -
2016-08-13 14:47:50 +00:00
Jonas Maebe
20cbdf75ea + test for mantis #24189 (already works in trunk, still broken in 3.0)
git-svn-id: trunk@34290 -
2016-08-12 13:40:19 +00:00
Jonas Maebe
8e0ee6599c * store parameters to inline routines that are already in a temp into a new
temp if the original temp was marked as ti_const, and the new parameter
    gets modified (mantis #30015)

git-svn-id: trunk@34289 -
2016-08-12 13:35:56 +00:00
Jonas Maebe
b17f90d183 * test for mantis #26402 (already fixed in 3.1.1, still broken in 3.0)
git-svn-id: trunk@34282 -
2016-08-12 13:35:37 +00:00
Jonas Maebe
c752050728 * don't print "parameter not used" hints for abstract methods (mantis #30431)
git-svn-id: trunk@34281 -
2016-08-12 13:35:34 +00:00
Jonas Maebe
de97285393 * fixed conformsToProtocol() declaration (the protocol is not a changeable
parameter, and it's already declared as a pointer type)

git-svn-id: trunk@34246 -
2016-08-03 14:35:32 +00:00
michael
834881179a * dbus component added
git-svn-id: trunk@34239 -
2016-07-31 10:29:29 +00:00
svenbarth
3596809ab4 Fix for Mantis #27206. *Finally* add Maciej Izak's contribution of the Delphi compatible generic collections.
Two small changes were done:
* Generics.Defaults.pas does not require the Contnrs unit (it wasn't used anyway and thus the units can be added as rtl-generics instead of fcl-generics)
* the example files were changed to lowercase filenames 

git-svn-id: trunk@34229 -
2016-07-29 15:13:59 +00:00
yury
980c4741ac * Fixed conversion from PWideChar to ansistring.
+ test. 

git-svn-id: trunk@34219 -
2016-07-29 09:43:05 +00:00
olivier
49132b57dd - remove sysheap.inc override from the Haiku port. mmap is now fully supported under Haiku for a long time. sbrk is also under work and the current implementation limit the available memory.
git-svn-id: trunk@34200 -
2016-07-24 18:47:33 +00:00
Jeppe Johansen
6a1c1e4f29 Added support for NRF52832 controllers.
git-svn-id: trunk@34170 -
2016-07-22 10:01:10 +00:00
Jonas Maebe
a0efde8167 * automatically generate necessary indirect symbols when a new assembler
symbol is defined
   o removed all places where AB_INDIRECT symbols were explicitly generated
   o only generate AB_INDIRECT symbols for AT_DATA on systems_indirect_var_imports
   o for some symbols an indirect symbol is always required (because they are
     dereferenced by code in RTL units) -> use new AT_DATA_FORCEINDIRECT type

git-svn-id: trunk@34165 -
2016-07-20 20:53:03 +00:00
Jonas Maebe
c0ff55e95a * changed the abstract method wrapper generation from thlcgobj to synthetic
methods. Implementing a fully functional g_external_wrapper() for llvm is
    quite hard, and the regular wrapper method that calls FPC_ABSTRACTERROR can
    in principle be optimized to a plain jump by tail call optimisation on other
    targets (to the extent that this matters, because most of them will be
    smartlinked away, and the ones that are executed will trigger an exception)
   o this means that the synthetic method generation needs to be run for all
     objectdefs on all platforms now, rather than only for Java classes

git-svn-id: trunk@34127 -
2016-07-14 15:24:13 +00:00
michael
9115dc2521 * OData and Office365 REST API support
git-svn-id: trunk@34097 -
2016-07-11 14:39:59 +00:00
svenbarth
54b6cacf36 Fix for Mantis #30357.
Reset tstoredsymtable.init_final_check_done when a symbol is added or removed as otherwise property getters in a record *before* any managed field would trigger it, thus leading to the record being considered as "non-managed".

git-svn-id: trunk@34088 -
2016-07-08 18:20:47 +00:00
Károly Balogh
0e54f616b5 merged i386 int64 mod helper fix by Max Nazhalov (Mantis 30240)
git-svn-id: trunk@34059 -
2016-07-03 21:20:07 +00:00
Jonas Maebe
db77aad2cc * support LOC_MMREGISTER for paralocs when loading 128 bit function results
into integer registers (a record that consists of 4 32 bit floats is
    returned in 2 xmm registers on x86_64) (mantis #30329)

git-svn-id: trunk@34058 -
2016-07-03 21:18:23 +00:00
joost
48f8199659 * Revert r34055, which was automatically committed while testing an automated repository-system
git-svn-id: trunk@34056 -
2016-07-03 19:06:35 +00:00
joost
57d1cd5668 'Release of package googleapi version 3.1.1'
git-svn-id: trunk@34055 -
2016-07-03 18:40:39 +00:00
Jonas Maebe
8df1d1f9b8 * fixed compilation of tw15391 with range checking enabled after r34034:
support maybe_call_procvar() on internal block nodes, which return
    their result via the last statement

git-svn-id: trunk@34051 -
2016-07-02 21:09:59 +00:00
michael
ffe626fe6e * Patch from Graeme Geldenhuys to remove unneeded tools
git-svn-id: trunk@34037 -
2016-06-30 17:47:26 +00:00
Jonas Maebe
ec5dea1092 * don't perform the "/ const" to "* (1/const)" transformation for comp-typed
expressions, since comp cannot represent fractions (bug reported at
    http://lists.freepascal.org/pipermail/fpc-pascal/2016-June/048234.html )

git-svn-id: trunk@34035 -
2016-06-30 15:33:51 +00:00
Jonas Maebe
996e325175 * converted range checking for open arrays/array of const from the code
generator to the typecheck pass, so that it also works for platforms
    that use the parentfpstruct way to handle accesses to nested frames
    in case the array has been migrated to such a parentfpstruct
   o additionally, the number of comparisons for such range checks
     has been reduced from 3 (for signed indices) or 2 (for unsigned
     indices) to 1 in all cases
   o the range checking code is disabled for the JVM target, as the
     JVM automatically range checks all array accesses itself anyway

git-svn-id: trunk@34034 -
2016-06-30 15:33:47 +00:00
pierre
40292a476f Expicitly disable range check on old test and add new test with and changes
git-svn-id: trunk@34012 -
2016-06-21 08:14:43 +00:00
pierre
df7e562d94 Add explicit $R- or $Q- to avoid different results if -Criot option is used
git-svn-id: trunk@34010 -
2016-06-20 15:55:10 +00:00
svenbarth
266eccde9f Merge revision(s) 32484 from branches/svenbarth/packages
Move PascalMain external from the si_*.inc files to a new include file si_impl.inc that's included in the implementation sections of the si_*.pp units

git-svn-id: trunk@33970 -
2016-06-12 16:49:56 +00:00
Jonas Maebe
b8ed0fac5d * give an error when trying to get the address of an element of a dynamic
string in a typed constant, like Delphi (instead of generating a bogus
    address)

git-svn-id: trunk@33958 -
2016-06-12 09:20:57 +00:00
svenbarth
f406867100 Merged revision(s) 31929-31931,32547 from branches/svenbarth/packages:
Switch Mac OS X to indirect entry information.

compiler/systems/t_bsd.pas, TLinkerBSD:
  + implement InitSysInitUnitName
compiler/system.pas:
  * systems_internal_sysinit: add Darwin systems
compiler/hlcgobj.pas, thlcgobj:
  * gen_proc_symbol_end: for Darwin systems don't directly call PascalMain for libraries, but FPC_LIBMAIN instead
rtl/darwin:
  + add sysinit.pas unit which contains the executable and library entry points for Darwin
rtl/darwin/Makefile.fpc:
  * add sysinit unit
rtl/bsd/sysosh.inc:
  + add a Darwin specific TPlatformEntryInformation (could probably be used for all Unix systems...)
rtl/bsd/system.pp:
  * define FPC_HAS_INDIRECT_MAIN_INFORMATION for Darwin systems once we're no longer bootstrapping with 2.6.x
  + add EntryInformation variable (this could maybe moved to system.inc...)
  + add new procedure SysEntry that is called from the entrypoint and which sets up necessary information required by other parts of the RTL
  * the old FPC_SYSTEMMAIN is still in place for bootstrapping
rtl/inc/systemh.inc, TEntryInformation:
  * PascalMain is cdecl on non-Windows systems (ToDo: really?)
rtl/inc/system.inc:
  * initialstklen is provided by the indirect entry information, so no external here
........
Fix bootstrapping.

rtl/darwin/sysinit.pas:
  * enable the code only when no longer bootstrapping with 2.6.x
........
Fix bootstrapping.

rtl/objpas/objpas.pp:
  * define FPC_HAS_INDIRECT_MAIN_INFORMATION for Darwin only while not bootstrapping with 2.6.x
........
rtl/darwin/sysinit.pas:
  * reference PASCALMAIN correctly (I wonder how this even worked previously :/ )

git-svn-id: trunk@33949 -
2016-06-11 20:29:51 +00:00
Jonas Maebe
0ed6c3d80e * also use the last floating point parameter register on AArch64 in case of
a HFA type (which in practice also applies to plain floating point types)
    (patch by Alfred, mantis #30207)

git-svn-id: trunk@33922 -
2016-06-05 20:18:24 +00:00
florian
49f63d67b2 * correctly check left.location instead of left.expectloc when generating
code for not nodes, resolves #30208

git-svn-id: trunk@33906 -
2016-06-04 15:54:17 +00:00
svenbarth
aaff6d0b97 Allow Delete() and Insert() to be used with generic types as arguments.
+ added test

git-svn-id: trunk@33897 -
2016-06-03 21:45:23 +00:00
svenbarth
9fb2a8bba9 + added simple test to check whether Delete() and Insert() still work correctly (though a mistake there would probably have broken the cycling totally anyway...)
git-svn-id: trunk@33896 -
2016-06-03 21:38:29 +00:00
svenbarth
8c96fbed8f Fix for Mantis #28832
ninl.pas, tinlinenode:
  * pass_typecheck: let code pass on to simplify() for undefineddefs in Low() and High()
  * simplify: create a constant 0 as fallback

+ added test

git-svn-id: trunk@33884 -
2016-06-03 12:14:30 +00:00
svenbarth
04adcf2a12 Fix for Mantis #30179 and #30203.
pexpr.pas:
  * handle_factor_typenode: rework code for records and objects so that Delphi style specializations are handled as well
  * sub_expr.generate_inline_specialization: also do a typecheck pass on pload to be sure that we have a resultdef

+ added tests

git-svn-id: trunk@33876 -
2016-06-01 20:06:40 +00:00
svenbarth
c3c345d569 Fix for Mantis #30202.
pexpr.pas, sub_expr.generate_inline_specialization:
  * do_member_read() needs to happen independently of whether we're calling a method of the same object (was incorrectly copypasted code... :/ )

+ added test

git-svn-id: trunk@33875 -
2016-06-01 20:03:59 +00:00
Károly Balogh
a756609a27 m68k: added a simple VASM writer frontend for the GNU AS writer (as VASM has a compatiblity mode)
git-svn-id: trunk@33847 -
2016-05-29 15:52:43 +00:00
svenbarth
f27ce0b159 Rework the way the method bodies for specializations are generated: instead of walking the global and local symboltable all pending specializations are kept in a list of the current module which is (for now) walked at the end of a unit/program to generate the method bodies as before.
fmodule.pas, tmodule:
  + new list pendingspecializations which keeps track of all pending specializations of the current module
psub.pas:
  * move generate_specialization_procs and related routines to pgenutil
  + new procedure read_proc_body to read a routine's body, cause generate_specialization_procs needs it (unlike the already existing overload in the implementation section, this one can only handle bodies of non-nested routines) 
pgenutil.pas:
  * generate_specialization_phase2: add the newly specialized generic to the current module's pending specializations
  * generate_specialization_procs: reworked so that it uses the new pendingspecializations field instead of walking the global and local symboltable of the current unit
pmodules.pas:
  + add pgenutil to uses due to the moved generate_specialization_procs

+ added test

git-svn-id: trunk@33826 -
2016-05-26 18:56:16 +00:00
michael
300db70983 * Updated from latest service descriptions
git-svn-id: trunk@33777 -
2016-05-24 08:35:58 +00:00
florian
57f93ed40d * correctly generate accesses to jump tables if it contains negative entries, resolves issue #30119
git-svn-id: trunk@33760 -
2016-05-22 21:02:49 +00:00
Károly Balogh
963c4aa1f8 * fixed the sign handling of i386 fpc_div_int64 helper (Mantis 30166)
git-svn-id: trunk@33753 -
2016-05-22 16:57:30 +00:00
nickysn
bffe9480f4 + added the winapi functions, structures and constants for raw keyboard and mouse input
git-svn-id: trunk@33746 -
2016-05-22 01:59:27 +00:00
svenbarth
8927b8f6b1 * use the dummy DOS unit from the Embedded target so that we can use it for the ExtPas unit
git-svn-id: trunk@33711 -
2016-05-20 13:17:46 +00:00
Jonas Maebe
f1dad33217 * file forgotten to commit in r33708
git-svn-id: trunk@33710 -
2016-05-20 07:09:45 +00:00
Károly Balogh
25c34aedc2 m68k: implemented tcpucasenode.genlinearlist. 68k doesn't need cmp after sub, as sub sets the flags as expected. results in simpler, faster and more compact code
git-svn-id: trunk@33709 -
2016-05-19 21:33:45 +00:00
michael
5e3b22ab15 * Patch to Split AdvancedIPC and AdvancedSingleInstance, by Luiz Americo (Bug ID 30141)
git-svn-id: trunk@33699 -
2016-05-16 16:25:50 +00:00
michael
5f8fd810b8 * Test programs for crashing IPC server
git-svn-id: trunk@33698 -
2016-05-16 16:22:39 +00:00