Commit Graph

94 Commits

Author SHA1 Message Date
florian
6459b97052 + write(ln) support for variants added 2002-10-10 19:24:28 +00:00
florian
161d1b923e + several widestring/pwidechar related stuff added 2002-10-10 16:07:57 +00:00
peter
3f32669ded * Length(PChar) supported 2002-10-05 14:21:08 +00:00
carl
98468d63e9 * only enumerations have range checking for succ/pred in const section 2002-09-13 19:12:09 +00:00
peter
1df5c70e42 * check ranges for pred() and succ() 2002-09-09 19:41:01 +00:00
Jonas Maebe
6592c96e70 * first_pi now just generates a constant, added missing calls to firstpass() 2002-09-08 13:01:25 +00:00
carl
752beef0dd * cardinal -> longword 2002-09-07 20:40:23 +00:00
carl
6c2bede5a8 * second part bug report 1996 fix, testrange in cordconstnode
only called if option is set (also make parsing a tiny faster)
2002-09-07 12:16:03 +00:00
peter
a17291b2d4 * array of char support for Str() 2002-09-02 19:24:41 +00:00
peter
91b49914f6 * More fixes for cross unit inlining, all tnodes are now implemented
* Moved pocall_internconst to po_internconst because it is not a
    calling type at all and it conflicted when inlining of these small
    functions was requested
2002-08-19 19:36:42 +00:00
Jonas Maebe
f8b6c707a2 * made assigned() handling generic
* add nodes now can also evaluate constant expressions at compile time
    that contain nil nodes
2002-08-02 07:44:30 +00:00
florian
e7a6cd18dd * more fixes for the ppc
+ wrappers for the tcnvnode.first_* stuff introduced
2002-07-29 21:23:42 +00:00
Jonas Maebe
3ac9c35136 * don't always convert the second argument of inc/dec to a longint, but
to a type based on the first argument
2002-07-26 12:28:50 +00:00
carl
f6b1f35207 + Resulttype for floats is now CPU independent (bestrealytype)
+ Generic version of some routines (call to RTL routines)
      : still untested.
2002-07-25 18:00:19 +00:00
florian
59abf2555b * types.pas renamed to defbase.pas because D6 contains a types
unit so this would conflicts if D6 programms are compiled
  + Willamette/SSE2 instructions to assembler added
2002-07-20 11:57:52 +00:00
florian
336808f6c3 * start of the new generic parameter handling 2002-07-11 14:41:27 +00:00
Jonas Maebe
d31e59b824 * fixed fpu stack overflow in compiler when compiled with -Or 2002-06-06 18:53:53 +00:00
peter
06ebac4e27 * readded missing revisions 2002-05-18 13:34:04 +00:00
carl
21b3a10f02 + defines.inc -> fpcdefs.inc to avoid conflicts if compiling by hand
+ try to fix temp allocation (still in ifdef)
+ generic constructor calls
+ start of tassembler / tmodulebase class cleanup
2002-05-16 19:46:34 +00:00
peter
2992e1819c * removed old logs and updated copyright year 2002-05-14 19:34:38 +00:00
peter
4dcd96747e * moved entry and exitcode to ncgutil and cgobj
* foreach gets extra argument for passing local data to the
    iterator function
  * -CR checks also class typecasts at runtime by changing them
    into as
  * fixed compiler to cycle with the -CR option
  * fixed stabs with elf writer, finally the global variables can
    be watched
  * removed a lot of routines from cga unit and replaced them by
    calls to cgobj
  * u32bit-s32bit updates for and,or,xor nodes. When one element is
    u32bit then the other is typecasted also to u32bit without giving
    a rangecheck warning/error.
  * fixed pascal calling method with reversing also the high tree in
    the parast, detected by tcalcst3 test
2002-05-12 16:53:04 +00:00
florian
6bbaa14daf * block nodes within expressions shouldn't release the used registers,
fixed using a flag till the new rg is ready
2002-04-25 20:15:39 +00:00
peter
67ede1276b * add pinline unit that inserts compiler supported functions using
one or more statements
  * moved finalize and setlength from ninl to pinline
2002-04-23 19:16:34 +00:00
peter
5b242f7741 * tlocation,treference update
* LOC_CONSTANT added for better constant handling
  * secondadd splitted in multiple routines
  * location_force_reg added for loading a location to a register
    of a specified size
  * secondassignment parses now first the right and then the left node
    (this is compatible with Kylix). This saves a lot of push/pop especially
    with string operations
  * adapted some routines to use the new cg methods
2002-04-02 17:11:27 +00:00
Jonas Maebe
7fb55bf4e4 + a_loadfpu_* and a_loadmm_* methods in tcg
* register allocation is now handled by a class and is mostly processor
    independent (+rgobj.pas and i386/rgcpu.pas)
  * temp allocation is now handled by a class (+tgobj.pas, -i386\tgcpu.pas)
  * some small improvements and fixes to the optimizer
  * some register allocation fixes
  * some fpuvaroffset fixes in the unary minus node
  * push/popusedregisters is now called rg.save/restoreusedregisters and
    (for i386) uses temps instead of push/pop's when using -Op3 (that code is
    also better optimizable)
  * fixed and optimized register saving/restoring for new/dispose nodes
  * LOC_FPU locations now also require their "register" field to be set to
    R_ST, not R_ST0 (the latter is used for LOC_CFPUREGISTER locations only)
  - list field removed of the tnode class because it's not used currently
    and can cause hard-to-find bugs
2002-03-31 20:26:33 +00:00
peter
fd2ad837e2 * implicit result variable generation for assembler routines
* removed m_tp modeswitch, use m_tp7 or not(m_fpc) instead
2002-01-24 18:25:48 +00:00
peter
cb11c08d49 * constant evaluation for assinged added 2002-01-19 11:53:56 +00:00
Jonas Maebe
ad0fc51cf6 * fixed web bug #1735 (argument of inc/dec must be made unique) ("merged") 2001-12-28 14:09:21 +00:00
Jonas Maebe
e5f6ff03cb - removed unnecessary resulttypepass call 2001-12-10 14:26:22 +00:00
Jonas Maebe
5501aa4e9a * converted lo/hi to processor independent code, generated code is the
same as before (when turning on the optimizer)
2001-12-04 15:59:03 +00:00
Jonas Maebe
4490bc91f7 * fixed web bug #1693 (dynarray support for length) 2001-12-03 14:21:34 +00:00
Jonas Maebe
241f775056 * fixed web bug #1621 (write(typed_file,function_call) works again)
* allow write(typed_file,procvar_call) too (it was already allowed for
    text file writes)
2001-10-24 16:17:36 +00:00
Jonas Maebe
a40c2b8dd0 - removed unused units form uses-clause and unused local vars 2001-09-30 16:16:28 +00:00
Jonas Maebe
2055618933 * check if amount of dimensions passed to setlength for dynamic arrays
is correct
2001-09-24 16:09:55 +00:00
Jonas Maebe
b33cb43da4 * fix from Pavel V. Ozersk to accept multiple dimensions for setlength
and dynamical arrays
2001-09-24 11:35:55 +00:00
peter
45dab81414 * merged netbsd, fpu-overflow from fixes branch 2001-09-17 21:29:10 +00:00
Jonas Maebe
2e6a221b2a * the result of high/low nodes wasn't always resulttypepassed 2001-09-05 15:19:43 +00:00
Jonas Maebe
17b2fa3424 * simplified det_resulttype code for include/exclude
* include/exclude doesn't use any helpers anymore in the i386 secondpass
2001-09-04 14:32:45 +00:00
Jonas Maebe
ed449defca + searchsystype() and searchsystype() functions in symtable
* changed ninl and nadd to use these functions
  * i386 set comparison functions now return their results in al instead
    of in the flags so that they can be sued as compilerprocs
  - removed all processor specific code from n386add.pas that has to do
    with set handling, it's now all done in nadd.pas
  * fixed fpc_set_contains_sets in genset.inc
  * fpc_set_in_byte is now coded inline in n386set.pas and doesn't use a
    helper anymore
  * some small fixes in compproc.inc/set.inc regarding the declaration of
    internal helper types (fpc_small_set and fpc_normal_set)
2001-09-04 11:38:54 +00:00
peter
43dea5a35f * move class of definitions into type section for delphi 2001-09-02 21:12:06 +00:00
Jonas Maebe
fc92c3b336 + compilerproc implementation of most string-related type conversions
- removed all code from the compiler which has been replaced by
    compilerproc implementations (using {$ifdef hascompilerproc} is not
    necessary in the compiler)
2001-08-28 13:24:46 +00:00
Jonas Maebe
74f494f9f1 * avoid nonsense range error when using cardinal with value
> high(longint) as code para with val()
2001-08-27 11:04:41 +00:00
florian
9746f4c2d6 * some cg reorganisation
* some PPC updates
2001-08-26 13:35:06 +00:00
Jonas Maebe
fc1b58c22c * moved "reverseparameters" from ninl.pas to ncal.pas
+ support for non-persistent temps in ttempcreatenode.create, for use
    with typeconversion nodes
2001-08-24 13:47:26 +00:00
Jonas Maebe
808ab9e7e7 * fixed big bug in handle_str that caused it to (almost) always call
fpc_<stringtype>_longint
  * fixed small bug in handle_read_write that caused wrong warnigns about
    uninitialized vars with read(ln)
  + handle_val (processor independent val() handling)
2001-08-24 12:33:54 +00:00
Jonas Maebe
a6cfe4083a + tempcreate/ref/delete nodes (allows the use of temps in the
resulttype and first pass)
  * made handling of read(ln)/write(ln) processor independent
  * moved processor independent handling for str and reset/rewrite-typed
    from firstpass to resulttype pass
  * changed names of helpers in text.inc to be generic for use as
    compilerprocs + added "iocheck" directive for most of them
  * reading of ordinals is done by procedures instead of functions
    because otherwise FPC_IOCHECK overwrote the result before it could
    be stored elsewhere (range checking still works)
  * compilerprocs can now be used in the system unit before they are
    implemented
  * added note to errore.msg that booleans can't be read using read/readln
2001-08-23 14:28:35 +00:00
Jonas Maebe
61020cd424 * made in_reset_typedfile/in_rewrite_typedfile handling processor
independent
2001-08-13 15:39:52 +00:00
Jonas Maebe
0895ca2f28 * made code for str(x,y) completely processor independent 2001-08-13 12:41:56 +00:00
Jonas Maebe
a18acc21b2 * parameters to FPC_TYPED_WRITE can't be regvars (merged) 2001-08-06 12:47:31 +00:00
Jonas Maebe
239d2d6fee + support for high(dynarray) using compilerproc (forgot to commit
previously)
2001-08-06 09:44:10 +00:00