Commit Graph

239 Commits

Author SHA1 Message Date
peter
0557ddc342 * removed typed const, it is now handled by staticvarsym
* globalvarsym renamed to staticvarsym
  * fixed invalid regvar use in init when the finalize also uses the var

git-svn-id: trunk@5290 -
2006-11-08 21:04:22 +00:00
yury
5a9b0949c5 * fixed wince build.
git-svn-id: trunk@5250 -
2006-11-05 17:55:00 +00:00
peter
658c46b903 * remove tdictionary and tindexarray
* symtables based on TFPHashObjectList and TFPObjectList
  * rename torddef.typ to torddef.ordtype
  * rename tfloatdef.typ to tfloatdef.floattype
  * rename tdef.deftype to tdef.typ
  * remove obsolete browser code, browcol is kept so the ide
    can still be compiled

git-svn-id: trunk@5192 -
2006-11-03 00:30:30 +00:00
florian
85d63d9fa9 * settings refactored
git-svn-id: trunk@5094 -
2006-10-30 18:02:58 +00:00
Jonas Maebe
d5b069a935 * added missing typecheckpasses for new left/right nodes created in
taddnode.typecheckpass()

git-svn-id: trunk@5089 -
2006-10-30 10:29:29 +00:00
peter
3078a1927f * remove ttype
* rename old ttype variables *type to *def
  * rename resulttypepass to pass_typecheck
  * rename pass_2 to pass_generate_code

git-svn-id: trunk@5077 -
2006-10-29 22:19:39 +00:00
florian
67aa148602 * fixed softfpu support
+ softfpu enabled for arm-gba

git-svn-id: trunk@4939 -
2006-10-15 21:31:27 +00:00
micha
8678d52aeb * avoid warning when pointer points to size 1 data
* fix variantmanager for {$T+}

git-svn-id: trunk@4861 -
2006-10-11 16:40:40 +00:00
florian
fb5e396881 + experimental -Sv option to support vector arithmetics
git-svn-id: trunk@4825 -
2006-10-07 21:39:48 +00:00
micha
5f353d6fef add warning for arithmetic on untyped pointers
git-svn-id: trunk@4823 -
2006-10-07 19:34:16 +00:00
peter
d07f470b71 * remove ifdef fpc
git-svn-id: trunk@4819 -
2006-10-07 13:43:34 +00:00
micha
d704af7216 fix compilation for {$T+} linux/win
git-svn-id: trunk@4794 -
2006-10-04 20:43:55 +00:00
peter
2f0ce31751 * string concat changed from function to procedure to
allow runtime optimization if the destination is the
    same as a source parameter
  * tassignmentnode now sets aktassignmentnode global that can be used
    to use the left node as a destination parameter and
    skip the assignment
  * disabled all cpu specific shortstr concat/append

git-svn-id: trunk@4770 -
2006-10-02 20:00:06 +00:00
florian
569c4871fc + first batch of varset support, as long as packset isn't changed, it doesn't change anything
git-svn-id: trunk@4710 -
2006-09-24 14:40:11 +00:00
olle
05d6f0e94d macos: added a fake sysutils for use by compiler, and fixed some tests
git-svn-id: trunk@4549 -
2006-09-03 22:30:37 +00:00
Jonas Maebe
b4668054c5 * avoid unnecessary sign extensions for integer comparisons
git-svn-id: trunk@4038 -
2006-07-01 16:05:57 +00:00
Jonas Maebe
03302dc7c4 * fixed support for macpas & and | operators: they only work on booleans
now, and always perform short circuit boolean evaluation (also in {$b+})

git-svn-id: trunk@3745 -
2006-05-30 13:02:36 +00:00
florian
454fb81c5b + optimize <string>+'' and ''+<string>
git-svn-id: trunk@3522 -
2006-05-14 09:43:53 +00:00
florian
5d9f3cf33d * fixed s<'', fixes 4925
git-svn-id: trunk@3505 -
2006-05-13 20:10:27 +00:00
Jonas Maebe
039e7143f4 * avoid some unnecessary bool->int->bool type conversions
git-svn-id: trunk@3184 -
2006-04-09 18:33:05 +00:00
peter
95be416b9d * don't allow stringconst+integer
* change booleans in arraydef to set
  * set option in arraydef to indicate a constant string so
    a nicer type can be shown instead of array[0..x] of char

git-svn-id: trunk@3051 -
2006-03-27 07:22:02 +00:00
Jonas Maebe
07ce826be0 + added ability for (mainly 32bit) code generators to directly handle
32bit*32bit->64bit          
  + implemented the above for ppc32 (note: does not happen very often
    in practice, at least not in the compiler and rtl)       
  + test for the above

git-svn-id: trunk@2735 -
2006-03-04 15:09:09 +00:00
peter
a77f503a30 * optimize multiple concats for ansi/widestring
git-svn-id: trunk@2650 -
2006-02-20 10:58:28 +00:00
peter
232555904e * symtablestack cleanup and rewrite
git-svn-id: trunk@2448 -
2006-02-05 22:24:18 +00:00
peter
45176ea2a8 * split tstringtype for stringdef and stringconstnode
to prevent wrong typecasts

git-svn-id: trunk@2276 -
2006-01-13 17:20:27 +00:00
Jonas Maebe
42ec76598c * new categories for vs_*: vs_declared, vs_initialised, vs_read,
vs_written, vs_readwritten. vs_initialised is the old vs_assigned;
    vs_used has been replaced by vs_read, vs_written and vs_readwritten
  * the valid_for_*() routines in htypechk now get an extra parameter to
    decide whether or not errors should be reported

git-svn-id: trunk@1913 -
2005-12-10 16:51:26 +00:00
peter
4c73e86058 * check for allowed floatdef operations
git-svn-id: trunk@1455 -
2005-10-18 05:45:50 +00:00
yury
80fbc143ab * removed MULS->MULD substitution for wince, because MULS was added to system unit.
git-svn-id: trunk@1313 -
2005-10-07 13:58:37 +00:00
peter
2a6623a97f * stringconst+pchar returns a string
git-svn-id: trunk@1283 -
2005-10-04 11:45:26 +00:00
florian
c1f1424640 * pchar +/- <array of char> is allowed as well
git-svn-id: trunk@1277 -
2005-10-03 21:15:18 +00:00
florian
d9c071da6d * fixed double comparison on wince
git-svn-id: trunk@1262 -
2005-10-03 07:43:36 +00:00
peter
edf553a223 * string constants are now array of char until
they are converted to a specific string type

git-svn-id: trunk@1254 -
2005-10-02 11:08:58 +00:00
florian
10db94c8c1 * there is no muls, muld must be generated
git-svn-id: trunk@1175 -
2005-09-24 14:58:28 +00:00
florian
fa1575aeab * fixed array[..] of char <op> pchar: wrong type was determined for non op<>+ returned
git-svn-id: trunk@1107 -
2005-09-18 08:59:20 +00:00
florian
a53c9e2666 * fixed stupid copy/paste which turned softfloat always off
* fixed wince softfloat compiler proc. to be correctly named also when used outside the system unit

git-svn-id: trunk@966 -
2005-08-28 21:08:23 +00:00
florian
adb193497d + softfloat support for wince
* more units are build for wince

git-svn-id: trunk@959 -
2005-08-28 12:40:43 +00:00
peter
534109351b * another cardinal-cardinal fix
git-svn-id: trunk@548 -
2005-06-30 15:19:28 +00:00
peter
297f33b6c9 * unsigned-unsinged gives signed
git-svn-id: trunk@496 -
2005-06-25 20:57:19 +00:00
florian
cf2c0d52e3 * initialisation of global mm register variables
git-svn-id: trunk@206 -
2005-06-05 10:40:20 +00:00
florian
91f87244e3 * float calculation aren't executed anymore using the best real type if the types differ
git-svn-id: trunk@203 -
2005-06-05 09:01:17 +00:00
florian
21038de78d + started with refactoring det_resulttype
+ dosimplify
* inlinenig makes use of dosimplify

git-svn-id: trunk@140 -
2005-05-29 15:15:38 +00:00
peter
ac0277b40b * dword-dword now gives dword
git-svn-id: trunk@78 -
2005-05-23 20:44:47 +00:00
fpc
790a4fe2d3 * log and id tags removed
git-svn-id: trunk@42 -
2005-05-21 09:42:41 +00:00
fpc
50778076c3 initial import
git-svn-id: trunk@1 -
2005-05-16 18:37:41 +00:00
peter
c1f4f09911 longword-longword gives int64 2005-04-25 08:29:00 +00:00
michael
3e54552235 + * fix constant folding for string+char (from Peter) 2005-04-06 07:31:51 +00:00
peter
3f9d6ab32f * add hint when passing an uninitialized variable to a var parameter 2005-03-25 22:20:18 +00:00
peter
a82ee06691 * for methodpointers compare only proc field 2005-03-14 20:18:22 +00:00
peter
0ae80eea41 * allow enum arithmetics inside an enum def, compatible with delphi 2005-02-17 17:52:39 +00:00
peter
e417e34496 * truncate log 2005-02-14 17:13:06 +00:00
olle
4f43c7e09f + Added fake Exception classes, only for MACOS. 2005-01-31 21:30:56 +00:00
peter
9cf82cd7f6 * zero based array with elementsize>1 fix 2005-01-31 16:15:04 +00:00
peter
d3b559cfcc * detect arithmetic overflows for constants at compile time
* use try..except instead of setjmp
2005-01-26 16:23:28 +00:00
peter
9ba429a6e2 * fixed some tabs 2005-01-16 11:56:37 +00:00
peter
4f7d80ce91 * ord-ord always gives a signed result 2005-01-16 11:13:40 +00:00
peter
8f8e6f6809 * widestring patches from Alexey Barkovoy 2005-01-10 22:10:26 +00:00
peter
a8684d35ad unsigned*unsigned will also have unsigned result. 2005-01-02 17:31:07 +00:00
peter
d45dea5db8 * fix methodpointer compare, compare only the proc field 2004-12-06 15:57:22 +00:00
peter
2e161c5e9e * nf_internal flag for internal inserted typeconvs. This will
supress the generation of warning/hints
2004-11-02 12:55:16 +00:00
peter
f80f3fc0fa * shortstr compare with empty string fixed
* removed special i386 code
2004-11-01 12:43:28 +00:00
peter
33a834821f * paraloc branch merged 2004-09-21 17:25:12 +00:00
peter
38bebdb044 * only make both operands the same for xor,and,or when both are
integer types
2004-09-13 20:32:53 +00:00
Jonas Maebe
e3eb4f8359 * fixed "if @procvar_of_object <> nil" in Delphi/TP mode for for non-x86 2004-08-17 19:04:36 +00:00
florian
8cb7072e5f * fixed several ie9999s when illegal operators were used 2004-08-08 15:22:29 +00:00
florian
8a9758c5e2 * logs truncated 2004-06-20 08:55:28 +00:00
florian
588e2c38bf * dwarf branch merged 2004-06-16 20:07:06 +00:00
peter
71280bedad * fix cardinal+constint 2004-05-28 21:13:44 +00:00
florian
d6b865167c + added set of widechar support (limited to 256 chars, is delphi compatible) 2004-05-23 14:14:18 +00:00
peter
324144db92 * only convert widechar to widestring when both operands are
constant
  * support widechar-widechar operations in orddef part
2004-05-23 14:08:39 +00:00
florian
35f9b5a3ee * fixed <ordinal>+<pointer> 2004-05-21 13:08:14 +00:00
florian
b5bf8cefad + <pointer> - <pointer> result is divided by the pointer element size now
this is delphi compatible as well as resulting in the expected result for p1+(p2-p1)
2004-05-20 21:54:33 +00:00
peter
c25228226d * don't change sign for unsigned shl/shr operations
* cleanup for u32bit
2004-05-19 23:29:25 +00:00
daniel
b721e5872c * Prepare compiler infrastructure for multiple ansistring types 2004-04-29 19:56:36 +00:00
florian
e4f4b8acd6 * fixed web bug #3048: comparision of dyn. arrays 2004-04-18 07:52:43 +00:00
peter
e661df03ee * fixes to previous constant integer commit 2004-03-29 14:44:10 +00:00
peter
e46cdcea48 * constants ordinals now always have a type assigned
* integer constants have the smallest type, unsigned prefered over
    signed
2004-03-23 22:34:49 +00:00
peter
6b96b70118 * fixed operator overload allowing for pointer-string
* replaced some type_e_mismatch with more informational messages
2004-03-18 16:19:03 +00:00
daniel
3ea87ad054 * Avoid memory allocation and string copying 2004-02-21 22:08:46 +00:00
peter
c844c5a505 * procvar cleanup 2004-02-20 21:55:59 +00:00
florian
465aa5851b * several fixes to compile x86-64 system 2004-02-05 01:24:08 +00:00
peter
ecfbbeffc3 * renamed xNNbittype to xNNinttype
* renamed registers32 to registersint
  * replace some s32bit,u32bit with torddef([su]inttype).def.typ
2004-02-03 22:32:53 +00:00
florian
e35b683e4d + added prefetch(const mem) support 2004-02-02 20:41:59 +00:00
florian
c37035a450 * common addnode code for x86-64 and i386 2004-01-20 12:59:36 +00:00
peter
60814ccb16 * disable addmmxset 2004-01-14 17:19:04 +00:00
Jonas Maebe
2af569745c * if currency = int64, FPC_CURRENCY_IS_INT64 is defined
+ round and trunc for currency and comp if FPC_CURRENCY_IS_INT64 is
    defined
  * if currency = orddef, prefer currency -> int64/qword conversion over
    currency -> float conversions
  * optimized currency/currency if currency = orddef
  * TODO: write FPC_DIV_CURRENCY and FPC_MUL_CURRENCY routines to prevent
      precision loss if currency=int64 and bestreal = double
2004-01-02 17:19:04 +00:00
Jonas Maebe
a75ef67bfd * properly fixed assigned() mess (by handling it separately in ncginl)
-> all assigned()-related tests in the test suite work again
2003-12-31 20:47:02 +00:00
Jonas Maebe
3ff00d31b3 * fixed previous commit for tp and delphi modes 2003-12-30 16:30:50 +00:00
Jonas Maebe
f587f35457 * fixed methodpointer comparing in a generic way (typecast both left and
right explicitly to voidpointer), instead of relying on strange
    behvaiour or n386addnode.pass_2 (if size of def = 8, only use the first
    4 bytes instead of internalerror-ing or so)
2003-12-29 22:33:08 +00:00
daniel
448e336682 * Some work to allow mmx instructions to be used for 32 byte sets 2003-12-21 11:28:41 +00:00
Jonas Maebe
e9eff10134 + support for evaluating qword constant expressions (both arguments have
to be a qword, constants have to be explicitly typecasted to qword)
2003-12-09 21:17:04 +00:00
peter
4245cedfed * compare longint-cardinal also makes types wider 2003-10-28 15:35:18 +00:00
peter
a28d911c98 * IncompatibleTypes() added that will include unit names when
the typenames are the same
2003-10-21 18:16:13 +00:00
peter
95f132db3d * set_varstate cleanup 2003-10-08 19:19:45 +00:00
peter
70fe77ca7c * procinfo unit contains tprocinfo
* cginfo renamed to cgbase
  * moved cgmessage to verbose
  * fixed ppc and sparc compiles
2003-10-01 20:34:48 +00:00
florian
eb9a587759 + support of NaN and Inf in the compiler as values of real constants 2003-09-06 16:47:24 +00:00
peter
6a8d5eb25d * NEWRA branch merged 2003-09-03 15:55:00 +00:00
peter
28ebc69c8f * removed changesettype because that will change the definition
of the setdef forever and can result in a different between
    original interface and current implementation definition
2003-06-05 20:05:55 +00:00
peter
5197c95be6 * widen cardinal+signed operations 2003-06-03 21:04:43 +00:00
peter
75394a788e * disable string node optimizations for the moment 2003-05-26 21:15:18 +00:00
peter
0799b0663d * generic fpc_shorstr_concat
+ fpc_shortstr_append_shortstr optimization
2003-05-26 19:38:28 +00:00