Commit Graph

4047 Commits

Author SHA1 Message Date
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
michael
a5d38c7ba6 * Added TStringBuilder
git-svn-id: trunk@33695 -
2016-05-16 15:23:40 +00:00
marco
dd2aae023e * delete win9xwsmanager, conform bugreport #29108
git-svn-id: trunk@33687 -
2016-05-13 18:52:02 +00:00
marcus
a414a8bded os4units: support for Cybergraphics gfx
git-svn-id: trunk@33659 -
2016-05-06 19:07:14 +00:00
marcus
b6f73bf1cf os4units: support for Picasso96 gfx
git-svn-id: trunk@33658 -
2016-05-06 16:33:56 +00:00
marcus
acd7b1f128 AmigaOS4: Library unit for icon.library part 2
git-svn-id: trunk@33644 -
2016-05-03 20:17:50 +00:00
Jonas Maebe
14bab6c85d * fixed ppc jump table generation in case a jump table has cases for the
lowest and highest element of the type of the case expression, and the
    lowest element <> 0 (mantis #29906)

git-svn-id: trunk@33630 -
2016-05-03 09:00:52 +00:00
nickysn
a1621bd01c + XInput2.h header translation
git-svn-id: trunk@33625 -
2016-05-02 23:38:16 +00:00
nickysn
d06fb061db + added unit xfixes - header translation of X11/extensions/Xfixes.h
git-svn-id: trunk@33624 -
2016-05-02 21:32:27 +00:00
marcus
88a7915fb5 AmigaOS4: Added library units for asl, diskfont and workbench
git-svn-id: trunk@33623 -
2016-05-02 19:30:28 +00:00
nickysn
521790367d + new unit xge - header translation of X11/extensions/Xge.h
git-svn-id: trunk@33621 -
2016-05-02 17:25:20 +00:00
nickysn
5fa75f6037 + added unit xinput - a header translation of X11/extensions/XInput.h
git-svn-id: trunk@33620 -
2016-05-02 16:47:27 +00:00
nickysn
03dcc0f9ff + added header translation of X11/extensions/XI2.h
git-svn-id: trunk@33608 -
2016-05-01 23:53:18 +00:00
Károly Balogh
8d4e07c262 amunits: removed two Makefiles, which weren't actually in use for a good while
git-svn-id: trunk@33607 -
2016-05-01 22:46:26 +00:00
Károly Balogh
9e10e2fab4 ami-extra: moved pcq unit here from amunits/utilunits, so it's compiled for all Amiga-like platforms
git-svn-id: trunk@33606 -
2016-05-01 22:42:20 +00:00
michael
ad8e20efb7 * Moved hpack to fcl-web
git-svn-id: trunk@33602 -
2016-05-01 18:03:18 +00:00
Jonas Maebe
2bbab60c92 * when simplifying a constant string concatenation that gets assigned to a
rawbytestring, ensure the resulting constant string does not get CP_NONE
    as codepage, but the default system code page (mantis #30082)

git-svn-id: trunk@33597 -
2016-05-01 13:16:02 +00:00
Jonas Maebe
130d9fee91 * don't take the address of element 0 of a dynamic array in
tcallparanode.copy_value_by_ref_para() if the array is empty
    (mantis #30007)

git-svn-id: trunk@33595 -
2016-05-01 12:35:09 +00:00
florian
bd54a11f1c + TX86AsmOptimizer.OptPass1VMOVAP for i386 and x86-64
+ new unit aoptutils which helpers for the assembler optimizer

git-svn-id: trunk@33587 -
2016-05-01 09:37:21 +00:00
marcus
d9139219a9 os4units: mui added, DoMethod, DoSuperMethod and so on added.
git-svn-id: trunk@33585 -
2016-04-30 21:40:04 +00:00
marcus
77e47d21bb os4units: added iffparse, keymap, clipboard, graphics, intuition, activated some packages
git-svn-id: trunk@33581 -
2016-04-30 13:39:08 +00:00
michael
87be61c807 * Added HPACK implementation by José Mejuto (bug ID 30058)
git-svn-id: trunk@33579 -
2016-04-30 08:29:26 +00:00
michael
ecde605017 * Moved expression parser test to proper location, patch by Graeme Geldenhuys (bug ID 30037)
git-svn-id: trunk@33578 -
2016-04-30 07:53:36 +00:00
Jonas Maebe
44682f9f4d * ensure that if we create a temp for the funcretnode in a call node,
the funcretnode field keeps a reference to this temp even after we
    assign it to the call-by-reference return parameter if it is deleted
    by changing it into a normal temp (after which it will be freed when
    the result of the call node is used), because in that case getcopy
    for the callnode must copy this reference after copying the
    tempdeletenode in order to reset tempinfo^.hookoncopy (mantis #29891)

git-svn-id: trunk@33569 -
2016-04-28 20:33:12 +00:00
marcus
6e9e508091 os4units: inputevents and library unit for layer.library
git-svn-id: trunk@33560 -
2016-04-26 17:46:22 +00:00
marcus
d23ee52001 os4units: library unit for graphics.library
git-svn-id: trunk@33555 -
2016-04-25 21:27:30 +00:00
marcus
44a544d0f5 AmigaOS4: library units for utility.library, timer.device and dos.library
git-svn-id: trunk@33552 -
2016-04-24 16:30:36 +00:00
marcus
31b6e2df9b AmigaOS4: initial package checkin with exec.library unit
git-svn-id: trunk@33549 -
2016-04-23 14:55:20 +00:00
svenbarth
d07b49270f Fix for Mantis #30030.
pgenutil.pas:
  * parse_generic_specialization_types_internal: ignore the parasymtable of procvars (as before the addition of generic routines) and instead use the type's hierarchy name
  * generate_specialization_phase2: specialize types of procvars into the parameter symtable as they don't have a local one

+ added test

git-svn-id: trunk@33544 -
2016-04-22 13:07:48 +00:00
florian
3c2dab9878 * i386 peephole assembler uses largely the common peephole optimizer infrastructure, the resulting code is besides a few improvements the same
git-svn-id: trunk@33542 -
2016-04-21 20:14:01 +00:00
Jonas Maebe
1850cb4ccc * don't look at the resultdef, but at the defs of the operands to decide
whether a multiplication needs to be signed or unsigned (can be different
    in case of a 32x32->64 multiplication) (mantis #30035)

git-svn-id: trunk@33539 -
2016-04-20 22:17:15 +00:00
michael
ef564491b2 * Fixes from Graeme Geldenhuys for bug ID #30006 and bug ID #30008:
--------------------------------
  * pdf unittests: fixes failing test after fpPDF changes, plus newtest added.
  * pdf: fixes failing test due to recent changes in fpPDF.
  * pdf tests: new test for new behaviour.
  * pdf: Applies patch from Mantis 30006 - and replaced bitmasks with Sets.
  * pdf tests: Updates the README file with exact font details used by the tests.
  * ttf: fixes debug output directory.
  * pdf: FPC Mantis BugID 30008: fpTTF: wrong Ascender/Descender calculation
  * pdf: fix bug where return value was never set.
  * pdf: fixes compiler hint about uninitialised variables being used.
  * pdf unittests: fixes memory leak in one test.
  * pdf unittests: fixes compiler hint about unused units in uses  clause.

git-svn-id: trunk@33535 -
2016-04-19 07:10:59 +00:00
Jonas Maebe
f50dec5202 * don't allow implicit type conversions from pointers to c-style blocks in
Delphi mode, because unlike for procvars we need full type information
    to be able to generate a block (mantis #30022)

git-svn-id: trunk@33529 -
2016-04-17 19:07:26 +00:00
marcus
e38e051425 Amicommon: Unified parameterhandling for Amiga, AROS, MorphOS
git-svn-id: trunk@33528 -
2016-04-17 15:31:18 +00:00
nickysn
7e25b3e429 * updated ptcpas to version 0.99.14.1
git-svn-id: trunk@33511 -
2016-04-14 21:43:52 +00:00
Jonas Maebe
2a1f2b9fd9 * fixed a_load_regconst_subsetreg_intern() when loading a 32 bit register
to a non-zero bit offset in a subsetreg (mantis #29933)

git-svn-id: trunk@33498 -
2016-04-13 17:09:31 +00:00
michael
b30a809fdd * Added ttfdump tool
git-svn-id: trunk@33482 -
2016-04-11 18:26:23 +00:00
Jonas Maebe
08d63e3408 * allow default parameters for constref (mantis #29992)
git-svn-id: trunk@33480 -
2016-04-10 21:27:29 +00:00
svenbarth
f8e9b33f99 Merge first batch of package handling related revisions from the packages branch
Merged revision(s) 28796, 28837-28845, 28847-28850, 28852, 32135 from branches/svenbarth/packages:
Provide possibility to pass packages and search paths for packages as parameters.

fpkg.pas:
  + new unit which contains the base types related to package files (most importantly "tpackage")
globals.pas:
  + new variable "packagesearchpath" which contains all paths in which package files should be looked for
  + new variable "packagelist" which contains a list of all packages that should be used in a program or library
  * InitGlobals & DoneGlobals: initialize/finalize "packagesearchpath" accordingly ("packagelist" is handled in unit fpkg using a init/done-callback)
options.pas:
  + TOption: new fields "parapackagepath" and "parapackages" to keep track of package search paths and package files passed as parameters
  * TOption.interpret_option: use '-Fp' for package search paths and '-FP' for package files
  * read_arguments: apply the passed package search paths and packages to their respective containers
........
+ add a new unit which will contain basic functions related to handling packages
........
Move package related functions from pmodules to pkgutil.

pmodules.pas => pkgutil.pas:
  * createimportlibfromexports
  * varexport
  * procexport
  * insert_export
  * RewritePPU
........
* adjust indentation
........
Extract the code to export the symbols of a unit to its own function in pkgutil so that less functions need to be exported.

pmodules.pas, proc_package:
  * move code to export the symbols of a unit to new function export_unit
pkgutil.pas:
  + new function export_unit
  - remove exports of procexport, varexport and insert_export
........
Some small fixes for package parsing.

pmodules.pas, proc_package:
  * use orgpattern instead of pattern to build the module name (like is done in uses sections)
  * ignore duplicates when generating exports
  - no need to generate an import library for the package; that is done by the program/library that uses the package
........
+ new unit fpcp of which the class tpcppackage handles the reading and writing of package metadata from/to pcp files (equivalant to tppumodule).
........
+ add unit which contains representation of a PCP file (tpcpfile) like tppufile is for units.
........
Improve export generation.

pkgutil.pas:
  + new function exportprocsym to correctly export a procedure with all its aliases
  + new function exportabstractrecordsymproc to export the members of structured types 
  * insert_export: handle also namespacesym and propertsym (by ignoring them)
  * insert_export: correctly export classes, record and objects
  * insert_export: use new exportprocsym function to export a procsym
  * insert_export: only export public variables of a static symtable


........
+ add entry constants for the name of the package and the package file names, both used by a PCP file
........
* use messages to get rid of most writelns related to package loading
........
Add additional entry types for PCP files

entfile.pas:
  + new entries ibstartrequireds and ibendrequireds to store the list of required packages
  + new entries ibstartcontained and ibendcontained to store the list of contained units
  + new entries ibstartppus and ibendppus to store the list of contained PPU files
........
Generate the PCP file once the package file and the used units were compiled correctly.

pmodules.pas:
  * proc_package: generate the PCP file upon successful compilation
........
Add the possibility to load all packages supplied as parameters.

pkgutil.pas:
  + new function load_packages to load all packages supplied as parameters
pmodules.pas, proc_program:
  * use load_packages to load all packages before any unit is loaded
........
Add code which tries to load a unit from a package first and only then as usual.

fppu.pas, tppumodule:
  + new method loadfrompackage which searches all available packages for the unit and loads it from there if found
  * loadppu: first try to load the unit from a package if any are available
........
Don't link objects files of a unit that is provided by a package.

pmodules.pas, proc_program:
  * if a unit has uf_in_library set we must not include it in the units we link against
........

git-svn-id: trunk@33452 -
2016-04-08 15:40:27 +00:00
florian
406e3c4ac1 + support xgetbv instruction, resolves issue #29958
git-svn-id: trunk@33418 -
2016-04-03 20:53:10 +00:00
Jonas Maebe
1e1b36515e * don't narrow expressions that contain a mod/div followed by an "and",
since the mod/div get a different result if calculated using fewer
    bits (mantis #29930)

git-svn-id: trunk@33413 -
2016-04-02 22:09:34 +00:00