Commit Graph

829 Commits

Author SHA1 Message Date
nickysn
24fcac9f87 + added support for nested procvars in the i8086 far data memory models
git-svn-id: trunk@27812 -
2014-05-22 23:44:09 +00:00
nickysn
fc71081b74 * i8086 and i386-specific code from tabstractprocdef.is_pushleftright moved to
symi86

git-svn-id: trunk@27549 -
2014-04-12 15:34:08 +00:00
nickysn
0a515311e6 * tabstractprocdef.address_type i8086-specific code moved to symcpu, ifdef i8086 removed
git-svn-id: trunk@27548 -
2014-04-12 15:09:17 +00:00
nickysn
37168c8625 * use voidcodepointertype to determine tprocvardef.size; ifdef i8086 removed
git-svn-id: trunk@27546 -
2014-04-12 14:19:30 +00:00
nickysn
89584164b1 + added virtual methods tabstractprocdef.declared_far and .declared_near, which
are called, when the 'near' or 'far' directive is parsed in a procedure
  definition. This allows overriding and implementing them on architectures,
  which support near and far calls.

git-svn-id: trunk@27545 -
2014-04-12 12:55:05 +00:00
nickysn
b41892f048 * set po_far in the i8086-specific descendants of tprocdef and tprocvardef,
instead of in tabstractprocdef.create; ifdef i8086 removed

git-svn-id: trunk@27544 -
2014-04-12 12:17:10 +00:00
nickysn
902d118ec8 * i8086 far data memory model fixes in tobjectdef.vmtmethodoffset
git-svn-id: trunk@27539 -
2014-04-11 23:05:42 +00:00
nickysn
8d9fda9264 * use voidcodepointertype.size in tobjectdef.vmtmethodoffset, avoid ifdef i8086
git-svn-id: trunk@27538 -
2014-04-11 22:09:30 +00:00
nickysn
542719c8f5 + added symdef.voidcodepointertype
git-svn-id: trunk@27536 -
2014-04-11 20:47:45 +00:00
Jonas Maebe
4a0528399e * check all overloaded routines for mangled name conflicts on the JVM
platform, as different Pascal declarations are mapped to the same
    JVM representation

git-svn-id: trunk@27520 -
2014-04-10 21:07:14 +00:00
Jonas Maebe
d452686c39 * moved pbestrealtype from symdef to symcpu
git-svn-id: trunk@27441 -
2014-04-01 21:41:37 +00:00
Jonas Maebe
a251b270b6 - removed no longer used jvmdef unit from uses clause
git-svn-id: trunk@27440 -
2014-04-01 21:41:33 +00:00
Jonas Maebe
93d50bc287 * moved jvm-specific classdef-related fields from tenumdef to a platform-
specific descendant

git-svn-id: trunk@27439 -
2014-04-01 21:41:30 +00:00
Jonas Maebe
9c7c64a3af * moved amiga/morphos-specific libsym-related field from tprocdef to
cpu-specific descendants (unfortunately causes some duplication, but the
    code is trivial and there is no easy way to avoid it)
  * also moved the use of the field in ncal to cpu-specific files (with same
    caveat)

git-svn-id: trunk@27438 -
2014-04-01 21:41:27 +00:00
Jonas Maebe
5053a39501 * moved ARM-specific tprocdef.total_stackframe_size field to cpu-specific
descendant

git-svn-id: trunk@27437 -
2014-04-01 21:41:24 +00:00
Jonas Maebe
f101118cd6 * moved MIPS-specific tprocdef.total_local_size field to cpu-specific
descendant

git-svn-id: trunk@27436 -
2014-04-01 21:41:21 +00:00
Jonas Maebe
d020a32b9a - removed no longer used tprocdef.fpu_used field for i386/i8086 (the one
place where it was used, we now handle the consequence directly)

git-svn-id: trunk@27435 -
2014-04-01 21:41:18 +00:00
Jonas Maebe
806bf0b88e - removed storing/loading unused byte for tprocdef.fpu_used
git-svn-id: trunk@27434 -
2014-04-01 21:41:14 +00:00
Jonas Maebe
338c064beb * moved x86-specific tpointerdef functionality to architecture-specific
descendants

git-svn-id: trunk@27397 -
2014-03-30 21:04:36 +00:00
Jonas Maebe
43992495cb * moved jvm tprocdef name mangling to jvm-specific descendant class
git-svn-id: trunk@27395 -
2014-03-30 21:04:29 +00:00
Jonas Maebe
f4c0daddb4 * moved jvm-specific exprasm field from tprocdef to jvm-specific descendant
git-svn-id: trunk@27394 -
2014-03-30 21:04:25 +00:00
Jonas Maebe
11c7d5223c * moved ifdef'd jvm code from tprocvardef to jvm-specific descendant
git-svn-id: trunk@27386 -
2014-03-30 17:15:57 +00:00
Jonas Maebe
a05b078fa0 * made ppuload_platform() virtual (should have been part of r27378)
git-svn-id: trunk@27385 -
2014-03-30 17:15:53 +00:00
Jonas Maebe
2474369dde * made all ppuwrite methods in leaf classes "final", because you cannot
override them safely in subclasses to add more data (they finalise
    writing their ibentry)
  * removed "virtual" from all ppuload constructors for similar reason
    as above
  + added virtual (empty) ppuwrite_plaform() method that is called from
    tstoreddef/tstoredsym.ppuwrite(), which can be safely overridden in
    child classes to add extra data (called centrally from a new
    tstoreddef/sym.writeentry() method)
  + added virtual (empty) ppuload_platform() method that is called from
    tstoreddef/tstoredsym.ppuload(), which can be safely overridden in
    child classes to read the extra data (unfortunately cannot be called
    from one single location, and these calls had to be added for each
    generic subclass separately)

git-svn-id: trunk@27378 -
2014-03-30 15:42:49 +00:00
Jonas Maebe
b57c95043f + support overriding tdef/tsym methods with target-specific functionality:
o made all (non-abstract) tdef and tsym constructors virtual
   o added c*def/c*sym classref types for every (non-abstract) t*def/t*sym
     class
   o added cpusym unit for every architecture that derives a tcpu*def/tcpu*sym
     class from the base classes, and initialises the c*def/c*sym classes with
     them. This is done so that the llvm target will be able to derive from
     the tcpu*def/sym classes without umpteen ifdefs, and it also means that
     the WPO can devirtualise everything because the c* variables are only
     initialised with one class type
   o replaced all t*def/t*sym constructor calls with c*def/c*sym constructor
     calls

git-svn-id: trunk@27361 -
2014-03-29 22:31:55 +00:00
Jonas Maebe
57859963d6 - removed {$ifdef compress} code (it hasn't been activated/maintained since
a very long time)

git-svn-id: trunk@27359 -
2014-03-29 22:31:46 +00:00
nickysn
b1f69349f8 * use voidpointertype.size to obtain the current data (self) pointer size,
instead of checking the i8086 memory model manually in tprocvardef.size

git-svn-id: trunk@27313 -
2014-03-28 00:40:08 +00:00
nickysn
7f88dc9d95 + added symdef.voidstackpointertype - the pointer type that will be used in the
high level code generator for obtaining references to parameters, local
  variables and temps on the stack.

git-svn-id: trunk@27308 -
2014-03-27 23:23:20 +00:00
nickysn
71720533d7 * fixed the comparison of near pointers in i8086 far data memory models
+ added charfarpointertype and charnearpointertype to symdef
* the system unit compiles in the i8086 compact memory model now

git-svn-id: trunk@27251 -
2014-03-24 00:34:52 +00:00
nickysn
97a3f50351 * use voidpointertype.size (supports i8086 far data memory models) instead of
sizeof(pint) to return the size of tabstractpointerdef

git-svn-id: trunk@27246 -
2014-03-23 20:34:19 +00:00
nickysn
043c0ba215 * use voidpointertype.size (which supports i8086 far data memory models) instead
of sizeof(pint) in tobjectdef.size and tobjectdef.alignment when returning the
  size and alignment of classes and interfaces

git-svn-id: trunk@27244 -
2014-03-23 19:36:33 +00:00
nickysn
5d9a193887 * use voidpointertype.size instead of sizeof(pint) in tarraydef in order to
determine the size of dynarrays correctly in the i8086 far data memory models

git-svn-id: trunk@27243 -
2014-03-23 18:33:14 +00:00
nickysn
ebdfbeaac8 * return voidpointertype.size instead of sizeof(pint) in tstringdef.size in
order to return the correct size in the far data i8086 memory models

git-svn-id: trunk@27241 -
2014-03-23 17:44:52 +00:00
nickysn
2556ada8da * instead of setting savesize in each of the tstringdef constructors, added an
tstringdef.size overriden method, which returns the proper size according to
  the string type

git-svn-id: trunk@27240 -
2014-03-23 17:29:10 +00:00
Jonas Maebe
1ac4021178 * moved po_has_inlininginfo from procoptions to procimploptions so that
the availability of the body of a function declared as "inline" no
    longer changes the CRC and hence no longer triggers recompilations
    (mantis #24121)

git-svn-id: trunk@27192 -
2014-03-19 21:53:10 +00:00
Jonas Maebe
7d8e9cf0f6 * moved tprocdef.isempty to a new set called implprocoptions that
contains flags related to the procdef's implementation (and that
    don't influence the interface crc)

git-svn-id: trunk@27189 -
2014-03-19 21:52:59 +00:00
nickysn
015c7e951a * Changed the default packset setting to 1 and disabled the padding of 3-byte
sets to 4 bytes on 16 and 8-bit CPUs. This is compatible with Turbo Pascal 7
  and Delphi 1.

git-svn-id: trunk@27140 -
2014-03-14 23:51:14 +00:00
Károly Balogh
9e74fd4d33 include libsym handling for m68k as well, Amiga needs it
git-svn-id: trunk@27066 -
2014-03-10 00:32:57 +00:00
Jonas Maebe
ffac2feb59 * since we only build the deref for tprocdef.localst when we're
going to write it to the ppu since r26083, also only deref it
    if that's the case (mantis #25814)

git-svn-id: trunk@26956 -
2014-03-04 19:42:39 +00:00
nickysn
2908fa9123 + added type parentfpvoidpointertype, which is a void pointer with the same size
as the hidden parentfp parameter, passed to nested procs. On i8086 it is
  always a near pointer, unlike voidpointer (which changes according to the
  memory model). This fixes nested procs in i8086 far data memory models.

git-svn-id: trunk@26934 -
2014-03-02 22:55:52 +00:00
nickysn
75134c2a26 + default_x86_data_pointer_type implemented as function that returns the proper
type in far data memory models

git-svn-id: trunk@26928 -
2014-03-02 19:35:36 +00:00
florian
3e4198ea45 * take care of dyn. arrays in cse
git-svn-id: trunk@26740 -
2014-02-08 21:47:46 +00:00
sergei
7104157a57 * Changed tabstractprocdef.address_size to return the def, which can be used to get other properties like size and alignment. Removes one of i8086 ifdef's.
git-svn-id: trunk@26664 -
2014-02-03 10:47:54 +00:00
Jonas Maebe
2adfb6cdda * don't endlessly recurse when printing the typename of a procvardef that
refers to itself via a pointerdef in its parameter or result type(s)
    (mantis #25551)

git-svn-id: trunk@26610 -
2014-01-28 20:14:31 +00:00
Jonas Maebe
6d5bef3e1d * removed code duplication in tpointerdef.GetTypeName
git-svn-id: trunk@26609 -
2014-01-28 20:14:28 +00:00
Jonas Maebe
67413a2823 * fixed skpara setter of tprocdef after r26332
git-svn-id: trunk@26471 -
2014-01-15 20:36:49 +00:00
florian
e841027a48 * fixes handling of typed files in iso mode
git-svn-id: trunk@26436 -
2014-01-12 20:17:48 +00:00
Jonas Maebe
ab4844bdff * give an internal error when trying to set/get procdef properties that are
not available

git-svn-id: trunk@26367 -
2014-01-03 12:23:27 +00:00
Jonas Maebe
32b9926536 * don't check forwarddefs of copied record/objectdefs (there are none, since
such a def is just a renamed version of a def that's defined/implemented/
    checked elsewhere) -- fixes compiler crash when compiling webtbs/tw3930
    after r26332)

git-svn-id: trunk@26360 -
2014-01-02 16:21:06 +00:00
Jonas Maebe
32b149c622 * moved a bunch of tprocdef fields that are only required when compiling the
procdef to a dynamically allocated record that is not created when loading
    the procdef from ppu

git-svn-id: trunk@26332 -
2013-12-31 00:28:28 +00:00