Commit Graph

43798 Commits

Author SHA1 Message Date
reiniero
a99919a4bc * fcl-db: bufdataset: effectively revert r27830 due to side effects. See bug #24509
git-svn-id: trunk@27911 -
2014-06-09 09:26:23 +00:00
reiniero
125845fe52 * fcl-db: sql parser/generator:
- Correct OUTER join: there is no separate OUTER JOIN; the syntax is FULL JOIN or FULL OUTER JOIN
- Support for optional OUTER in LEFT OUTER and RIGHT OUTER JOIN

git-svn-id: trunk@27910 -
2014-06-09 09:21:44 +00:00
reiniero
13146211ce * fcl-db: sql parser tests: run all tests by default in Lazarus project
git-svn-id: trunk@27909 -
2014-06-09 08:10:44 +00:00
reiniero
1e21d66b89 * fcl-db: sql parser tests:
- cosmetic changes (capitalization, comments)
- add tests for SET TERM, symbol literal parsing introduced in r27907
- Lazarus test project: default+debug build mode: no optimalization, more checks enabled

git-svn-id: trunk@27908 -
2014-06-09 08:01:20 +00:00
reiniero
75169f7a2b + fcl-db: sql parser:
- add support for Firebird SET TERM statements (changing SQL statement terminator)
- fix sigsegv (e.g. running TTestCheckParser.TestNotBetween)

git-svn-id: trunk@27907 -
2014-06-09 07:54:13 +00:00
michael
e699c6948f * Patch from Laco to update to version 9 of postgres headers (bug ID 26314)
git-svn-id: trunk@27906 -
2014-06-09 07:35:56 +00:00
michael
5ca66a14fa * Applied corrected patch from 26307
git-svn-id: trunk@27905 -
2014-06-09 07:30:12 +00:00
sergei
cd27d64cd5 + Support (as target-independent as possible) optimization of division by constants:
The code generator gets two new methods, a_mul_reg_reg_pair and g_div_const_reg_reg. The first one is basically 32x32 to 64 bits multiplication (or any other size, with result having twice the size of arguments), which must be implemented for every target. The second one actually does the job, its default implementation taken from powerpc64 and is sufficiently good for all three-address targets.

+ Enabled optimized division for MIPS target, target-specific changes are under 30 lines.

git-svn-id: trunk@27904 -
2014-06-08 22:50:24 +00:00
nickysn
73d7f2aa18 * let the compiler generate the stack segment in i8086 near data memory models
as well. Even though, in these models, the stack is dynamically allocated
  (because it goes on top of the heap, but the heap is variable size), there are
  still benefits:
  1) the program will run on a larger stack during initialization, before the
     actual stack (and heap) are ready
  2) in cases, when the system is extremely low on memory, DOS will reject to
     load the program if there's not enough memory for the stack the program
     requires. This way the startup code can be further simplified by omitting
     the 'not enough memory' check in the future (when we add the minimum heap
     size to the executable reserved space as well).

git-svn-id: trunk@27903 -
2014-06-08 21:14:57 +00:00
svenbarth
81c7b22199 Mantis #25236 was fixed by partial specializations addition in revision 27861
+ added test

git-svn-id: trunk@27902 -
2014-06-08 15:51:33 +00:00
svenbarth
45e2e91536 Mantis #22468 was fixed by partial specializations addition in revision 27861
+ added test

git-svn-id: trunk@27901 -
2014-06-08 15:47:13 +00:00
svenbarth
60ef0a61bc Mantis #22792 was fixed by partial specializations addition in revision 27861
+ added test

git-svn-id: trunk@27900 -
2014-06-08 15:43:46 +00:00
sergei
ed46a07f62 * Using x86-specific capability of shifting with carry flag helps to reduce amount of instructions.
git-svn-id: trunk@27899 -
2014-06-08 14:01:41 +00:00
svenbarth
1ebff1a963 Mantis #21622 was fixed by partial specializations addition in revision 27861
+ added test

git-svn-id: trunk@27898 -
2014-06-08 11:38:24 +00:00
svenbarth
8b290f4cb2 Mantis #24690 was fixed by partial specializations addition in revision 27861
+ added test

git-svn-id: trunk@27897 -
2014-06-08 11:34:32 +00:00
svenbarth
47407d2d7a Mantis #23279 was fixed by partial specializations addition in revision 27861
+ added test

git-svn-id: trunk@27896 -
2014-06-08 11:26:44 +00:00
svenbarth
1a22175553 Mantis #23653 was fixed by partial specializations addition in revision 27861
+ added test

git-svn-id: trunk@27895 -
2014-06-08 11:23:31 +00:00
svenbarth
69a8445472 Mantis #22790 was fixed by partial specializations addition in revision 27861
+ added test

git-svn-id: trunk@27894 -
2014-06-08 11:18:04 +00:00
svenbarth
c1fdce5166 Mantis #22540 was fixed by partial specializations addition in revision 27861
+ added test

git-svn-id: trunk@27893 -
2014-06-08 11:12:03 +00:00
sergei
ae627a4ba8 * tcgx86.a_op_const_reg_reg: optimize trivial cases before considering more complex ones.
git-svn-id: trunk@27892 -
2014-06-08 00:08:56 +00:00
sergei
c184d9740c + Implemented target-independent optimization of signed "mod 2**N" as
"sign:=left sar sizeof(left)*8-1; result:=(((left xor sign)-sign) and 2**N-1) xor sign)-sign;"
  This solution yields larger code than one suggested by Mantis #21152, however its speed on i386 is approximately the same, and it is also suitable for all operand sizes, all powers of two and all targets.

git-svn-id: trunk@27891 -
2014-06-07 22:19:10 +00:00
reiniero
da91ac9726 * fcl-db: sql parser: correct hex error message
git-svn-id: trunk@27890 -
2014-06-07 10:32:06 +00:00
reiniero
dcdfa2f307 * fcl-db: cosmetic
git-svn-id: trunk@27889 -
2014-06-07 10:11:35 +00:00
reiniero
614bc64200 * fcl-db: sql parser:
- fix for double precision followed by other subclauses (e.g. DEFAULT)
- of course, associated test

git-svn-id: trunk@27888 -
2014-06-07 09:55:15 +00:00
reiniero
e1d9a068c0 * fcl-db: sql parser: Allow:
- double precision datatype
- blob subtype text and blob subtype binary (instead of only blob subtype 0 and 1)
- Associated tests

git-svn-id: trunk@27887 -
2014-06-07 09:31:12 +00:00
reiniero
9898474fa7 * fcl-db: sql parser: fix for test case r27868,27885
git-svn-id: trunk@27886 -
2014-06-07 08:13:15 +00:00
reiniero
050be49b16 * fcl-db: correct test committed in r27868
git-svn-id: trunk@27885 -
2014-06-07 08:10:52 +00:00
sergei
92cf25b9a5 * Reworked i386 division by constant optimization to reuse code from powerpc64. The algorithm is slightly different, signed version is one instruction shorter, unsigned one is one instruction longer (typically). The new algorithm is easily scalable for x86_64 target, unlike the old one.
git-svn-id: trunk@27884 -
2014-06-07 00:20:05 +00:00
sergei
90d2009a31 * Moved procedures calculating "magic" numbers for division by constants from powerpc64/cgcpu.pas to cgutils.pas, so they can be reused for all targets.
* "Shift" parameter for signed calculation changed from aint to byte, since it only holds values up to 63. It is consistent with unsigned routine.

git-svn-id: trunk@27883 -
2014-06-07 00:00:53 +00:00
Károly Balogh
af95876eba arm: an attempt to improve the a_op_const_ref patch in r27881
git-svn-id: trunk@27882 -
2014-06-06 20:48:31 +00:00
Károly Balogh
5b262df7d0 arm: have a CPU specific op_const_ref, so the reference doesn't get fixed up both in a_load_reg_ref and a_load_ref_reg
git-svn-id: trunk@27881 -
2014-06-06 17:44:45 +00:00
Károly Balogh
17657ca11d m68k: more minor reference usage tweaking, hopefully fixes Mantis 26286
git-svn-id: trunk@27880 -
2014-06-06 16:41:40 +00:00
svenbarth
94f47443f0 Mantis #25043 was fixed by partial specializations addition in revision 27861
+ added test

git-svn-id: trunk@27879 -
2014-06-06 15:52:02 +00:00
svenbarth
6f962e817a Mantis #24072 was fixed by partial specializations addition in revision 27861
+ added test

git-svn-id: trunk@27878 -
2014-06-06 15:39:30 +00:00
svenbarth
49a9f4c1ea Fix for Mantis #26123.
pdecobj.pas, object_dec:
  * Always check for genericdef and genericlist and not genericdef and ifnot then genericlist.

+ added test

git-svn-id: trunk@27877 -
2014-06-06 15:19:45 +00:00
Károly Balogh
381cf72023 m68k: minor bits, addq/subq works also on address regs, remove reference validity check in a_op_const_ref because we have fixref() later anyway
git-svn-id: trunk@27876 -
2014-06-06 15:15:03 +00:00
svenbarth
34394d6925 Fix for Mantis #26180. Accept undefineddef as first parameter type of an Assert if it is used inside a generic.
ninl.pas, tinlinenode.pass_typecheck:
  * if the first parameter of an Assert is a undefineddef node then accept it as well if the node is part of a generic function/method

+ added test

git-svn-id: trunk@27875 -
2014-06-06 14:39:27 +00:00
svenbarth
aca48a4cf2 Fix for Mantis #26288. Types declared inside a generic must have the df_generic flag set. Period.
ptype.pas, read_named_type:
  * array_dec & procvar_dec: set df_generic of the array/procvar if parse_generic was originally set

+ added test

git-svn-id: trunk@27874 -
2014-06-06 14:22:17 +00:00
svenbarth
12f5cb85e8 Forgot to include option to trash variables for the test for Mantis #26271.
git-svn-id: trunk@27873 -
2014-06-06 14:10:54 +00:00
svenbarth
4a0d27ebfe Fix for Mantis #26271: Don't trash local variables that are used for the Default() intrinsic.
* ngenutil.pas, tnodeutils.trashable_sym:
    check for vo_is_default_var flag and don't consider such as trashable

+ added test

git-svn-id: trunk@27872 -
2014-06-06 13:59:52 +00:00
reiniero
a025a87c19 * fcl-db: test sql scanner: fix test case
git-svn-id: trunk@27871 -
2014-06-06 13:39:21 +00:00
svenbarth
1bbcc08a8b Fix for Mantis #26176. Don't handle "type helper" as unique.
ptype.pas:
  * read_named_type: change hadtypetoken from a value to a var parameter and set it to false if a type helper is parsed so that calling code does not handle it as unique
  * read_anon_type: handle that hadtypetoken is now a var parameter

pgenutil.pas, generate_specialization:
  * handle that hadtypetoken of read_named_type is now a var parameter

+ added test

git-svn-id: trunk@27870 -
2014-06-06 13:26:21 +00:00
svenbarth
9ab5affd55 Contrary to popular believe the VMT for a generic needs to be at least generated so that check for inherited methods can be done correctly. This does however not mean that the VMT is written to the object file which is handled at a completely different place. Fixes Mantis #26193.
pdecl.pas, types_dec:
  * invoke the VMT builder for generic classes as well

+ added test

git-svn-id: trunk@27869 -
2014-06-06 13:05:39 +00:00
reiniero
79d2abd1ca * fcl-db: sql parser test: test for create domain with check constraint, default and not null, a la
CREATE DOMAIN PRODTYPE AS VARCHAR(12)
         DEFAULT 'software'
         CHECK (VALUE IN ('software', 'hardware', 'other', 'N/A')) NOT NULL;

git-svn-id: trunk@27868 -
2014-06-06 12:59:01 +00:00
reiniero
9ee1ec412f * fcl-db: sql parser: fix failing STARTING WITH test committed in r27854
git-svn-id: trunk@27867 -
2014-06-06 12:45:42 +00:00
reiniero
02014da511 * fcl-db: cosmetic
git-svn-id: trunk@27866 -
2014-06-06 12:44:12 +00:00
reiniero
86e54269a0 * fcl-db: cosmetic
git-svn-id: trunk@27865 -
2014-06-06 12:43:56 +00:00
Károly Balogh
e89669bedc rewrite SpinLock to still work without the need to accidentally disable optimizations for a large part of the classes unit
git-svn-id: trunk@27864 -
2014-06-06 11:05:57 +00:00
reiniero
d3bb0d4a17 + fcl-db: add GUI for tests in testsqlscanner
git-svn-id: trunk@27863 -
2014-06-06 08:49:16 +00:00
Károly Balogh
df7af34de9 m68k: very early optimizer implementation experiments
git-svn-id: trunk@27862 -
2014-06-06 07:38:50 +00:00