Commit Graph

2189 Commits

Author SHA1 Message Date
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
florian
bb1f2b8062 * make NativeInt and NativeUInt unique types, resolves #29444
git-svn-id: trunk@33234 -
2016-03-13 15:30:38 +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
c93e8a51cd * fixed test result after r33201
git-svn-id: trunk@33204 -
2016-03-07 19:59:05 +00:00
Jonas Maebe
70cd8f6e59 - removed overflow, so the test also works with constant propagation and -Co
git-svn-id: trunk@33201 -
2016-03-07 14:40:52 +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
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
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
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
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
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
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
Jonas Maebe
a65ab73e8b * support unicodestring constants in "case string of" (mantis #29353)
git-svn-id: trunk@32970 -
2016-01-20 21:11:26 +00:00
svenbarth
82788b4995 tw20821.pp:
* test program attached to the bug report was incorrectly transformed to a test for the test suite

git-svn-id: trunk@32962 -
2016-01-17 12:14:54 +00:00
florian
df82921cd8 * fix test after r32820
git-svn-id: trunk@32855 -
2016-01-05 13:46:06 +00:00
florian
a4d2f71d3d * better estimation of compatibility of array constructors with open arrays, resolves issue #29244
git-svn-id: trunk@32846 -
2016-01-04 23:10:45 +00:00
svenbarth
61b12af82b Fix for Mantis #29321.
pexpr.pas, postfixoperators:
  * also handle type helpers for static arrays

+ added test

git-svn-id: trunk@32845 -
2016-01-04 22:02:24 +00:00
florian
a7f1ce2e98 * patch by Dmitry Boyarintsev: initialize dyn. arrays more cleverly in a setlength call with ref. count>1, resolves issue #29250
git-svn-id: trunk@32721 -
2015-12-26 08:53:56 +00:00
Jonas Maebe
0df558af36 * disabled pic
* mark eax as used in assembler block in main program

git-svn-id: trunk@32689 -
2015-12-20 20:56:13 +00:00
Jonas Maebe
b4e857e9c4 * skip for darwin because it always requires/expects a 16 byte aligned stack
* mark ebx as modified in the assembler blocks

git-svn-id: trunk@32688 -
2015-12-20 20:56:11 +00:00
sergei
272e3db1db * Fixed test on x86_64 ('nostackframe' modifier ensures that no prologue/epilogue code is added on fixed-stack targets).
git-svn-id: trunk@32673 -
2015-12-16 16:46:23 +00:00
sergei
31623565cb * Skip test for Win64, since *nix-style PIC is not supported on that system.
git-svn-id: trunk@32672 -
2015-12-16 16:37:41 +00:00
florian
a3964d9ee0 + support for RDTSCP, resolves issue #28916
git-svn-id: trunk@32652 -
2015-12-13 13:28:51 +00:00
Jonas Maebe
092a0af0ec * removed special-purpose code for constant chars while parsing typed string
constants: it did not properly handle ansistring code pages, and was just a
    hack to speed things up a bit (mantis #29153)

git-svn-id: trunk@32636 -
2015-12-11 15:33:28 +00:00
Jonas Maebe
ed03286be5 * simplify "div -1" to unaryminusn, not just for performance reasons but
also because "div -1" is not handled correctly by the div-to-mul/shift
    transformation on x86 (mantis #28702)

git-svn-id: trunk@32619 -
2015-12-08 15:57:07 +00:00
Jonas Maebe
0b4f3f01b3 * fixed another case of endless recursion in
tabstractrecordsymtable.has_single_field(), due to always looking in the
    symlist of the original record rather than properly recursing into those
    of nested ones (mantis #28641)

git-svn-id: trunk@32618 -
2015-12-08 15:35:19 +00:00
Jonas Maebe
01d93b61c3 * save/restore the type (and hence code page) of ansistring constsyms in/from
the ppu (mantis #28964)
  * also save/restore the type of constnil, constresourcestring and constguid
    in/from the ppu

git-svn-id: trunk@32617 -
2015-12-08 14:27:23 +00:00
florian
19a7bc0aee * fix test for 64 bit targets
git-svn-id: trunk@32613 -
2015-12-07 21:48:19 +00:00
florian
cad29a4e19 * set nf_write flag correctly for subscript nodes, resolves issue #28713
git-svn-id: trunk@32602 -
2015-12-06 19:17:50 +00:00
Jonas Maebe
03067f240c + added already working test for mantis #27149
git-svn-id: trunk@32577 -
2015-12-04 14:00:37 +00:00
Jonas Maebe
2e0fea94b8 * set operand size information when accessing fields in assembly
(mantis #29096)

git-svn-id: trunk@32567 -
2015-12-02 15:53:22 +00:00
Jonas Maebe
0c4edd2aa9 * fixed getting address of interface methods after r32414: interfaces are not
a pointer to a vmt, but a pointer to a pointer to vmt (mantis #29086)
   o also adjusted the llvm type for interfaces accordingly

git-svn-id: trunk@32530 -
2015-11-25 19:28:17 +00:00
Jonas Maebe
9ea38f4577 * support static fields in nested types in records, by always including
support for nested types when generating an access to a static fied;
    we also always do that when generating the mangled name of a static
    field declaration in symcreat.make_field_static() (mantis #29030)

git-svn-id: trunk@32517 -
2015-11-24 16:04:19 +00:00
Jonas Maebe
9dc5f1acb4 * support LOC_(C)SUBSETREG in tcgvecnode.pass_generate_code, can also occur
for function results (patch by Do-wan Kim, mantis #29064)

git-svn-id: trunk@32516 -
2015-11-24 15:03:34 +00:00
svenbarth
6ff3226e3c Fix for Mantis #29066.
git-svn-id: trunk@32459 -
2015-11-22 11:17:15 +00:00
svenbarth
318b69600c Fix for Mantis #29065.
+ add an ObjFPC variant of the test for 29053.

git-svn-id: trunk@32453 -
2015-11-22 10:44:03 +00:00
nickysn
79336c59de * fixed test for PIC code on i386
git-svn-id: trunk@32434 -
2015-11-21 15:02:04 +00:00
svenbarth
fcae436177 Add test for Mantis #29053 to make sure it doesn't get broken by accident.
git-svn-id: trunk@32432 -
2015-11-21 14:35:35 +00:00
nickysn
82eb67cd24 * fixed test for PIC code on x86_64
git-svn-id: trunk@32431 -
2015-11-21 14:34:28 +00:00
nickysn
ba66456bdb * properly determine the operand size for inline assembler references to procvar
variables without a manually specified size override such as 'dword ptr'.
  Mantis #29010.

git-svn-id: trunk@32379 -
2015-11-20 16:29:40 +00:00
Jonas Maebe
fd0c2f36e5 * don't parse "flags" as a register name in the Intel assembler reader
(mantis #29040)

git-svn-id: trunk@32368 -
2015-11-19 19:40:06 +00:00
Jonas Maebe
f004227d91 * ignore the name of class con- and destructors (patch by Ondrej Pokorny,
mantis #28801)

git-svn-id: trunk@32223 -
2015-11-03 18:10:08 +00:00
Jonas Maebe
8087389f63 * support assigning static methods to regular procvars in (obj)fpc mode
(patch by Ondrej Pokorny, mantis #27414)

git-svn-id: trunk@32216 -
2015-11-01 18:02:46 +00:00
Jonas Maebe
4decb81ac4 * correctly handle code page names specified in upper case (mantis #28934)
git-svn-id: trunk@32202 -
2015-10-30 15:10:26 +00:00