Commit Graph

4004 Commits

Author SHA1 Message Date
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
Jonas Maebe
8c0d9b581c * don't write the destination register in a_load_ref_reg_unaligned() before
the reference has been used for the last time, as the destination
    register could be the base or index register of the reference

git-svn-id: trunk@33393 -
2016-03-30 20:04:31 +00:00
Jonas Maebe
a5dba44fd3 * fixed sign extension for unaligned loads (mantis #29891, although that
code shouldn't use unaligned loads in the first place)

git-svn-id: trunk@33382 -
2016-03-29 14:52:27 +00:00
Jonas Maebe
322493c195 * fixed overflow checking on AArch64 for signed multiplications with zero
(mantis #29912)

git-svn-id: trunk@33380 -
2016-03-29 09:50:42 +00:00
florian
8d5cc3dfa4 * (extended and modified) patch by Emelyanov Roman to add suport of RDRAND, RDSEED and TSX instructions set, resolves issue #29893.
In comparison with the original patch, support for a i386 has been added as well as a test program. 
  Further, a small issue with xbegin has been fixed

git-svn-id: trunk@33375 -
2016-03-28 19:08:13 +00:00
yury
d4d70d3865 * Evaluate currency constant expressions when the currency type is 64-bit integer. Issue #28749.
git-svn-id: trunk@33334 -
2016-03-26 17:48:50 +00:00
svenbarth
35f8d5427f Revert r31262. Not doing type checking on generics leads to strange warnings (e.g. because variables are not considered as written). I better deal with the compile time errors one at a time than the warnings.
The added test shows such a bogus warning (sadly the test suite can handle the occurence or absense of certain messages yet :/ )

git-svn-id: trunk@33324 -
2016-03-24 20:58:04 +00:00
michael
a9fe42b5f0 * Generic linked list class, donated by Denis Volodarsky (bug ID 24501)
git-svn-id: trunk@33311 -
2016-03-21 21:01:38 +00:00
nickysn
759a4f8258 * don't try to build lnfodwrf on i8086-msdos, because it causes internal error
200309041 and thus breaks building i8086-msdos snapshots entirely. Added test
  that reproduces the bug in a small program, so it can be fixed eventually.

git-svn-id: trunk@33276 -
2016-03-18 19:56:37 +00:00
svenbarth
e9fab1bfee Fix for Mantis #29080.
psub.pas, tcgprocinfo.parse_body:
  * ensure that parse_generic and current_genericdef are set correctly when parsing a generic routine
pgenutil.pas, generate_specialization_phase2:
  * when we're specializing inside a generic we don't want to have the routine definitions, so let the compiler assume that the routine is no longer a forward definition

+ added test

git-svn-id: trunk@33275 -
2016-03-18 16:31:23 +00:00
Jonas Maebe
2b210335a1 * fixed pointer arithmetic errors in WideStrAlloc/StrBufSize/StrDispose
(patch by Iks, mantis #29710)

git-svn-id: trunk@33271 -
2016-03-18 13:12:11 +00:00
Jonas Maebe
5919ca84bb * fixed string code page after setstring(rawbytestring,..) (mantis #29833)
git-svn-id: trunk@33268 -
2016-03-18 12:43:42 +00:00
florian
45807056c5 * factored out SymbolCandidateForWarningOrHint
* do not issue a hint if a normal parameter is passed to another procedure by var
+ test

git-svn-id: trunk@33248 -
2016-03-13 19:14:26 +00:00
florian
bb1f2b8062 * make NativeInt and NativeUInt unique types, resolves #29444
git-svn-id: trunk@33234 -
2016-03-13 15:30:38 +00:00
marcus
eaab964a98 MorphOS: Icon and workbench added
git-svn-id: trunk@33224 -
2016-03-12 14:18:02 +00:00
marcus
1e792e6f06 Amiga: systemvartags and longarray removed, array of const -> array of PtrUInt
git-svn-id: trunk@33222 -
2016-03-12 13:01:12 +00:00
michael
674b539293 * Patch from Daniel Plachotich to allow regular procedures as iterators
git-svn-id: trunk@33221 -
2016-03-12 09:49:21 +00:00
svenbarth
27ab1c61c5 Fix for Mantis #29745.
symdef.pas, getansistringdef:
  * use a temporary, non-defaware symtablestack to create the ansistringdef

+ added test

git-svn-id: trunk@33214 -
2016-03-10 19:43:45 +00:00
svenbarth
e58488dc3e Fix for Mantis #29792.
htypechk.pas, tcallcandidates:
  * create_candidate_list: check the correct tableoptions for sto_has_overload flag

+ added test

git-svn-id: trunk@33211 -
2016-03-09 20:45:26 +00:00
Jonas Maebe
0e97811b50 + initialise managed string function results with an error string when
compiling with -gt (mantis #28948)

git-svn-id: trunk@33198 -
2016-03-06 17:22:11 +00:00
Jonas Maebe
315b32918e + Tconstexprint-version of ispowerof2() to correctly deal with constants
> high(int64) (mantis #29620)

git-svn-id: trunk@33191 -
2016-03-06 14:16:47 +00:00
florian
234990b73c + fma test program extended to support arm
git-svn-id: trunk@33185 -
2016-03-06 13:33:22 +00:00
florian
84bb46a35d + cpu unit for arm (linux only so far)
git-svn-id: trunk@33184 -
2016-03-06 13:33:20 +00:00
Jonas Maebe
096e1c45d6 * don't keep records in registers if they contain a field that spans the
boundary between two awords, as our subscript code does not handle
    them correctly (second part of mantis #29669)

git-svn-id: trunk@33180 -
2016-03-06 13:20:25 +00:00
Jonas Maebe
9788bb1316 * fixed check regarding whether a field is in the first or second word of
of 2*sizeof(aword) bitpacked record that's kept in registers
    (mantis #29669)

git-svn-id: trunk@33177 -
2016-03-06 13:20:16 +00:00
michael
67ac09b69f * Moved some types to sqltypes unit so they can be reused outside of sqldb. Added GetObjectList to datadict using new types
git-svn-id: trunk@33169 -
2016-03-05 20:57:08 +00:00
Jonas Maebe
4039c1835c + test from mantis #29547, fixed in r30168 as mantis #27580
git-svn-id: trunk@33164 -
2016-03-05 19:01:47 +00:00
michael
5eb691f2c9 * Added fcl-pdf
git-svn-id: trunk@33162 -
2016-03-05 17:13:07 +00:00
Jonas Maebe
87f46dcafd * updated pos() for Java with an offset parameter (equivalent of r31464 etc)
(mantis #29626)

git-svn-id: trunk@33160 -
2016-03-05 15:32:25 +00:00
Jonas Maebe
a100309350 * made utf8tostring() Delphi-compatible (mantis #29585):
o removed utf8string overload
   o always ignore any code page information from the input, and interpret the
     contents of the input directly as utf8-encoded bytes
 * made utf8tostring() compatible with the JVM backend (mantis #29497)

git-svn-id: trunk@33159 -
2016-03-05 15:32:22 +00:00
michael
d37d99a24f * Move simpleipc samples to appropriate directory
git-svn-id: trunk@33126 -
2016-02-27 09:21:00 +00:00
svenbarth
25744dd3f1 Fix for Mantis #29609.
pexpr.pas, factor.factor_read_id:
  * don't use a cloadvmtaddrnode for accessing class properties in records

+ added test

git-svn-id: trunk@33110 -
2016-02-19 21:37:02 +00:00
Jonas Maebe
f3df3a7a67 + test for mantis #28668
git-svn-id: trunk@33104 -
2016-02-18 22:03:46 +00:00
Jonas Maebe
001417bb47 + test from mantis #28667
git-svn-id: trunk@33103 -
2016-02-18 21:58:34 +00:00
sergei
2861362780 * Reuse binary search routine from rgbase.pas to look up AT&T register names, removes need in regnumber_count_bsstart constant. Resolves #29471.
git-svn-id: trunk@33076 -
2016-02-09 16:48:32 +00:00
svenbarth
8287773b16 Reverted revision 33036. This feature is too controverse to be left in.
git-svn-id: trunk@33048 -
2016-02-04 19:26:51 +00:00
svenbarth
05174f3e67 Fix for Mantis #29546.
htypechk.pas, tcallcandidates:
  * create_candidate_list: don't check whether the pd is a specialization if the owner is valid; happens if a generic method is used more than once (which should happen here and then :P )

+ added test

git-svn-id: trunk@33037 -
2016-01-31 17:14:44 +00:00
svenbarth
ed94ca4b24 Add support for IfThen() instrinsic that works like the if-statement in that it evaluates only the expression that is indeed executed.
The result type of the intrinsic is determined by the Then-expression to provide a bit of control. There might however be some situations in which this fails, for this exceptions need to be added (e.g. a constant string needs to be converted to a normal string).

compinnr.inc:
  + add new constant in_ifthen_x_y_z for the IfThen() intrinsic
psystem.pas: 
  + create_intern_symbols: add symbol for IfThen() intrinsic
pexpr.pas:
  * statement_syssym: parse parameters of IfThen() intrinsic and return corresponding inline node
ninl.pas, tinlinenode:
  + new method handle_ifthen() which converts the inline node to an if-node which assigns the expressions to a temp node that is returned
  * pass_typecheck: handle in_ifthen_x_y_z using handle_ifthen()
  * pass_1: in_ifthen_x_y_z does not need a first pass as it's already converted after the typecheck pass

+ added tests

git-svn-id: trunk@33036 -
2016-01-31 14:29:12 +00:00
michael
273f88a54c * Remove redundant files
git-svn-id: trunk@32999 -
2016-01-24 15:18:25 +00:00
florian
356ab8f63d + test/example programs for WaitOnExit with time out
git-svn-id: trunk@32995 -
2016-01-24 13:55:51 +00:00
michael
ec6ab0233b * Patch from Denis Kozlov to merge all Windows versions into 1 (Bug ID 29496)
git-svn-id: trunk@32994 -
2016-01-24 13:40:45 +00:00
svenbarth
d2a7f17d8c Fix for Mantis #29372.
compiler/ncgcal.pas:
  * tchcallnode.release_para_temps: don't release temps of a constructor's self parameter

+ added test

git-svn-id: trunk@32990 -
2016-01-23 22:19:00 +00:00
sergei
77285b63eb * i386-linux: reworked and cleaned up libc-related startup code:
* Don't replace intended initialization routines with dummy ones, so libc can properly initialize itself.
  * Profiling support (si_c21g.pp) only needs to contain the __gmon_start__ procedure, so it can reuse the entire si_c21.inc, and separate si_21g.inc file is no longer needed.

git-svn-id: trunk@32984 -
2016-01-22 17:11:08 +00:00
svenbarth
02e56f410d Merged revision(s) 28689 from branches/svenbarth/packages:
Extract functionality that is shared between the metadata files for units (PPU) and for packages (PCP) into a parent class called tentryfile

+ add new unit entfile which contains the new tentryfile class and related types and constants
* ppu.pas:
    - remove methods, fields, types and constants which were moved to entfile.pas
    * replace the parts of tppuheader shared with tentryheader by a field of type tentryheader
fppu.pas, pmodules.pas, utils/ppumove.pp, utils/ppuutils/ppudump.pp:
    + add entfile to uses
    * adjust access to common header fields
node.pas, symdef.pas, symsym.pas, symtable.pas, wpoinfo.pas, utils/ppufiles.pp:
    + add entfile to uses
........

git-svn-id: trunk@32976 -
2016-01-22 15:26:30 +00:00