Commit Graph

48657 Commits

Author SHA1 Message Date
svenbarth
2ed7a6de68 New class function tsymsym.find_by_number() to find a tsymsym instance based on it's number. The list containing the mapping from the indices to the symbols is created and freed using the init/done registration mechanism.
git-svn-id: trunk@33889 -
2016-06-03 20:49:06 +00:00
svenbarth
15ff68e144 Fix formatting of the output of unit import symbols.
git-svn-id: trunk@33888 -
2016-06-03 16:09:07 +00:00
svenbarth
b073d2dac5 Fix a bug in ppudump that seems to be there since revision 1.
compiler/utils/pputils/ppudump.pp, readsymbols:
  * ibstartsyms only contains one longint, namely the count of the symbols, not two

git-svn-id: trunk@33887 -
2016-06-03 16:07:54 +00:00
svenbarth
99189db897 hlcgobj.pas, thlcgobj:
* g_call_system_proc: if we directly call a symbol of the system unit from another unit then it must be considered as imported as well

git-svn-id: trunk@33886 -
2016-06-03 14:50:42 +00:00
svenbarth
6c3dd6b601 Another system, another regression... (this time tests/test/tgenfunc15.pp on i386-win32)
pgenutil.pas:
  * generate_specialization_phase2 & generate_specialization_procs: don't add pending specializations if we're currently parsing a generic

git-svn-id: trunk@33885 -
2016-06-03 12:36:27 +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
marco
869d24f7d1 * spelling mistakes fpc repo part, mantis #30233
git-svn-id: trunk@33882 -
2016-06-02 20:01:09 +00:00
svenbarth
af26a31251 psub.pas, read_proc_body:
* reset _FAIL directly after parsing the routine

git-svn-id: trunk@33881 -
2016-06-02 19:31:47 +00:00
svenbarth
dc5d9c7001 rtl/objpas/classes/classes.inc, TThread:
* Synchronize: fill the syncentry using the correct size

git-svn-id: trunk@33879 -
2016-06-02 18:48:41 +00:00
florian
20807f4148 * factored out V<Op> optimizations into OptPass1VOP
* call OptPass1VOP also for i386

git-svn-id: trunk@33878 -
2016-06-01 20:49:35 +00:00
florian
180e0e7561 * avoid spilling of 2nd and 3rd operand of avx instructions
git-svn-id: trunk@33877 -
2016-06-01 20:48:08 +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
florian
a7516dfb50 * fix modification information of VCOMISS and VCOMISD
git-svn-id: trunk@33874 -
2016-06-01 19:58:43 +00:00
svenbarth
fd98ec56e9 Fix (hopefully last) regression introduced due to the reworking specialization of routine bodies.
pgenutil.pas:
  * process_abstractrecorddef & generate_specialization_procs: also check for a forward def is the other module is still compiling (thus an access to tprocdef.forwarddef should still be possible); this might happen due to circular references like in tests/test/tgeneric91.pp

git-svn-id: trunk@33872 -
2016-06-01 19:03:54 +00:00
Károly Balogh
77318be022 m68k: fix build errors with some assemblers on modulo calculation on 020+
git-svn-id: trunk@33867 -
2016-06-01 10:50:22 +00:00
florian
04a68d9b94 * fix compilation with -Oodfa
git-svn-id: trunk@33865 -
2016-05-31 21:14:53 +00:00
svenbarth
d5cc59c22e Avoid the creation of a TExternalThread instance for Synchronize() and Queue() (Delphi does the same).
Note: the Sender parameter of WakeMainThread will be Nil for such threads. This is Delphi compatible.

rtl/objpas/classes/classesh.inc, TThread:
  + TThreadQueueEntry: new field ThreadID so that entries with Thread = Nil can be removed
rtl/objpas/classes/classes.inc, TThread:
  * InitSynchronizeEvent: setup ThreadID field
  * Synchronize: use a local TThreadQueueEntry if no TThread instance was passed in
  * Queue: setup ThreadID
  * RemoveQueueEvents: also check for ThreadID when trying to find the current thread

git-svn-id: trunk@33863 -
2016-05-31 20:01:52 +00:00
Károly Balogh
a561ffe836 m68k: fixed initial offset adjustment for the unaligned store
git-svn-id: trunk@33860 -
2016-05-31 00:47:57 +00:00
yury
c392c6eb2b * pas2jni: Explicitly release JNI local refs while executing method pointers.
git-svn-id: trunk@33859 -
2016-05-30 17:14:55 +00:00
Károly Balogh
4fba4cab15 added m68k vasm to the list of assemblers
git-svn-id: trunk@33855 -
2016-05-29 21:29:56 +00:00
Károly Balogh
b4fd85f19c m68k: unaligned handling for math and typeconv nodes
git-svn-id: trunk@33854 -
2016-05-29 18:48:24 +00:00
Károly Balogh
2d6736e40e m68k: fixed unaligned stores' predecrement addressing. also removed an unnecessary sign-extension of the tmpreg for 16bit stores
git-svn-id: trunk@33853 -
2016-05-29 18:25:33 +00:00
Károly Balogh
a8ad51e96f m68k: unaligned access support in add nodes
git-svn-id: trunk@33852 -
2016-05-29 18:12:36 +00:00
marcus
c4a0c08c8d AmigaOS4: OS4 needs socketbase and interface as threadvars (like all other Amiga-systems)
git-svn-id: trunk@33848 -
2016-05-29 15:55:45 +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
marcus
3d448cd55f Removed debug output from GetServerURL()
git-svn-id: trunk@33846 -
2016-05-29 15:46:12 +00:00
svenbarth
1bd43d9e37 Fix regressions.
pgenutil.pas:
  + new function maybe_add_pending_specialization() to add a pending specialization if it belongs to the current unit
  * generate_specialization_phase2: don't set up the owner as this leads to problems when using overloaded generic routines and don't add it to the pending list if it's a procdef
ncal.pas, tcallnode:
  * pass_typecheck: if we have a specialization then add it to the pending specializations once we know that we use it

git-svn-id: trunk@33843 -
2016-05-28 22:12:45 +00:00
svenbarth
7c5c5d2e4b symdef.pas, tprocdef:
* don't check the type of the owner symtable if we don't have one

git-svn-id: trunk@33842 -
2016-05-28 22:08:00 +00:00
Károly Balogh
c509036c11 m68k: added REMS/REMU to the special formatting requirements list in the assembler writer
git-svn-id: trunk@33840 -
2016-05-28 15:30:48 +00:00
pierre
3ba2d44101 Regenerated after previous commit
git-svn-id: trunk@33832 -
2016-05-28 07:28:49 +00:00
pierre
806890df40 Avoid line longer than 255, to be able to edit Makefile.fpc with fp IDE
git-svn-id: trunk@33831 -
2016-05-28 07:27:24 +00:00
pierre
433da1b199 Add msdos and win16 to the list of target OS for which TargetHasDosStylesDirectories
git-svn-id: trunk@33830 -
2016-05-28 07:26:10 +00:00
michael
9f9abd525a * Patch from Luiz Americo to add const to some string params (Bug ID 30197)
git-svn-id: trunk@33829 -
2016-05-27 19:11:48 +00:00
svenbarth
1d7c19aaf0 Fix regressions.
pgenutil.pas:
  * process_procdef & process_abstractrecorddef: only check whether the procdef's generic is still a forward declaration if it's in the current unit (otherwise we would trigger an internal error)

git-svn-id: trunk@33828 -
2016-05-27 16:29:22 +00:00
svenbarth
ac95dcd7fa Improve inlining of generic routines (no matter whether they belong to a generic type or a generics themselves).
psub.pas, read_proc_body: 
  * also try to generate pending specializations before generating a routine's code so that these might be inlined as well

git-svn-id: trunk@33827 -
2016-05-26 18:57:55 +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
svenbarth
2f6a1c01ba pgenutil.pas, generate_specialization_phase2:
* ensure that the owner of the newly greated def is set to the symtable we specialize in (happens with generic routines)

git-svn-id: trunk@33825 -
2016-05-26 18:37:37 +00:00
svenbarth
f8def6dbc9 Store and use procedure directives of generic routines.
scanner.pas, tscannerfile:
  + new method is_recording_tokens to check whether token recording is already active
pdecsub.pas, parse_proc_directives:
  * record tokens into the declaration token buffer of a generic routine if necessary
pgenutil.pas, generate_specialization_phase2:
  * process the procedure directives that had been recorded with the generic routine

git-svn-id: trunk@33824 -
2016-05-26 18:35:08 +00:00
Károly Balogh
a2a630e9c5 m68k: fixed and enabled hardware mod/div support for coldfire, also it no longer depends on cpu family but cpu capability
git-svn-id: trunk@33821 -
2016-05-26 16:54:39 +00:00
Károly Balogh
931c14f0cf m68k: in second_int_to_bool, don't call TST after OR, since OR sets the flags as required already
git-svn-id: trunk@33819 -
2016-05-26 14:48:56 +00:00
Károly Balogh
766eeffc69 m68k: build fix. (changes before commit is a bad idea...)
git-svn-id: trunk@33817 -
2016-05-26 14:47:16 +00:00
Károly Balogh
2bfa1b995a m68k: added division/remainder cpu capabilities
git-svn-id: trunk@33816 -
2016-05-26 14:41:00 +00:00
Károly Balogh
6706445cb4 m68k: enable hardware divisions for all '020+, not only 020 itself
git-svn-id: trunk@33810 -
2016-05-26 10:38:08 +00:00
Károly Balogh
aa63aa95bb m68k: a bunch of '000 related fixes and cleanups. generated source now compiles for '000 again, which was broken due to recent improvements conflicting with limitations of the original '000
git-svn-id: trunk@33809 -
2016-05-26 10:33:29 +00:00
Károly Balogh
62e0eab89b m68k: also handle large register save/restore offsets on 68000
git-svn-id: trunk@33808 -
2016-05-26 00:04:55 +00:00
Károly Balogh
0dd5beb064 m68k: more unaligned access support in the base cg, also enabled the code
git-svn-id: trunk@33807 -
2016-05-26 00:03:25 +00:00
Károly Balogh
b6d845e732 m68k: needs_unaligned helper. returns true when the given reference with the given size needs to be loaded with unaligned support on the given cpu
git-svn-id: trunk@33806 -
2016-05-25 23:56:24 +00:00
Károly Balogh
391a79aebf m68k: a bunch of tweaks and improvements to assembly functions. higher move() speed on coldfire, disabled fillword implementation on CPUs not supporting unaligned access
git-svn-id: trunk@33805 -
2016-05-25 22:44:18 +00:00
Károly Balogh
7fbae10515 m68k: added more cpu capabilities (unaligned access, long addressing, various MULx), and the 68060 cpu target
git-svn-id: trunk@33804 -
2016-05-25 22:14:58 +00:00