Commit Graph

5733 Commits

Author SHA1 Message Date
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
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
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
pierre
345361beef Revert commit 33771 and directly replace cpu8086 by cpui8086 which is always defined by ppc8086 compiler
git-svn-id: trunk@33773 -
2016-05-24 06:52:17 +00:00
pierre
ba509152b8 Also define CPUSMALL macro if CPUI8086 is defined
git-svn-id: trunk@33771 -
2016-05-23 21:07:11 +00:00
pierre
6646a0d29f Correct tseg.pp test for i8086 CPPU for which seg/cseg/dseg/sseg should NOT return zero values
git-svn-id: trunk@33770 -
2016-05-23 20:58:37 +00:00
pierre
74b3481918 Use small number for Blocks constant for i8086 CPU also
git-svn-id: trunk@33769 -
2016-05-23 20:51:07 +00:00
nickysn
0a9bcf0369 + added the new test/units/windows directory to the list of dirs, searched for tests by the makefile
git-svn-id: trunk@33763 -
2016-05-23 17:22:07 +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
Jonas Maebe
f0753d85ad * fix the Upgrade to Unicode version 7 and CLDR 27 from r32814
(mantis #29659, fixes tuca* tests)

git-svn-id: trunk@33708 -
2016-05-19 15:44:22 +00:00
michael
8e75ac64f1 * Patch from Graeme GeldenHuys to implement UnicodeString versions of MatchStr() and IndexStr() (bug ID 30113)
git-svn-id: trunk@33700 -
2016-05-16 16:40:27 +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
Jonas Maebe
eabcabe329 * fixed test in case a widestringmanager is installed
git-svn-id: trunk@33611 -
2016-05-02 08:23:14 +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
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
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
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
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
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
yury
511f5b5ded * trwsync test: Increased timeout to 60 seconds. Trying to fix random failures due to the timeout on busy machines.
git-svn-id: trunk@33487 -
2016-04-12 08:38:18 +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
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
pierre
78da04f8d5 + Add verbose boolean variable, set to false by default,
set to true by setting environment variable DOSBOX_VERBOSE.
  Most output generated by the wrapper is now only given if 
  verbose is true.
  + New constant SkipUntilText, default value 'Drive C is mounted as ',
  allow to discard output generated by dosbox program up to the line
  containing this string.

git-svn-id: trunk@33385 -
2016-03-30 07:42:35 +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
9f2defcb7e Adjust the test I committed yesterday so that we treat the warning we don't want to reappear as an error.
git-svn-id: trunk@33325 -
2016-03-25 08:35:34 +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
yury
a37cd66a87 * trwsync test: Increased timeout to 30 seconds. Should prevent failures on busy machines.
git-svn-id: trunk@33313 -
2016-03-22 10:16:25 +00:00
yury
d7cc0064d3 * Disabled test for android.
git-svn-id: trunk@33304 -
2016-03-20 22:09:45 +00:00
yury
3a5412a931 * Disabled tests which force the -Cg- option for Android since they can not be run on Android 5+ where PIE is required.
git-svn-id: trunk@33303 -
2016-03-20 21:52:05 +00:00
yury
d43e5dcab8 * tests: Fixed string comparison.
git-svn-id: trunk@33302 -
2016-03-20 21:25:18 +00:00
yury
a1b8c0f9e3 * Improved FPC version check when to use WaitOnExit().
git-svn-id: trunk@33301 -
2016-03-20 20:03:45 +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
697aed738c * replaced test directory names with ones that doesn't contain decomposable
characters, so the test's success doesn't depend on getdir returning a
    string using the same composition as the used name (fixes test on
    OS X 10.11)

git-svn-id: trunk@33270 -
2016-03-18 12:43:47 +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
florian
f780872069 + return exit code of executed program
git-svn-id: trunk@33219 -
2016-03-11 20:44:44 +00:00