Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page.
Requires a signed-in GitHub account. This works well for small changes.
If you'd like to make larger changes you may want to consider using
a local clone.
ddmd.target
Compiler implementation of the
D programming language.
Authors:
License:
Source: target.d
- struct
Target
; -
- static uint
alignsize
(Typetype
); - Return memory alignment size of
type
. - static uint
fieldalign
(Typetype
); - Return field alignment size of
type
. - static uint
critsecsize
(); - Return size of OS critical section.
NOTE: can't use the sizeof() calls directly since cross compiling is supported and would end up using the host sizes rather than the target sizes.
- static Type
va_listType
(); - Returns a Type for the va_list type of the target.
NOTE: For Posix/x86_64 this returns the type which will really be used for passing an argument of type va_list.
- static int
isVectorTypeSupported
(intsz
, Typetype
); - Checks whether the target supports a vector
type
with total sizesz
(in bytes) and elementtype
type
.Returns:0 if thetype
is supported, or else: 1 if vector types are not supported on the target at all, 2 if the given size isn't, or 3 if the elementtype
isn't. - static bool
isVectorOpSupported
(Typetype
, TOKop
, Typet2
= null); - Checks whether the target supports operation
op
for vectors oftype
type
. For binary opst2
is thetype
of the 2nd operand.Returns:true
if the operation is supported ortype
is not a vector - static Expression
paintAsType
(Expressione
, Typetype
); - Encode the given expression, which is assumed to be an rvalue literal as another
type
for use in CTFE. This corresponds roughly to the idiom *(Type *)&e
. - static void
loadModule
(Modulem
); - For the given module, perform any post parsing analysis. Certain compiler backends (ie: GDC) have special placeholder modules whose source are empty, but code gets injected immediately after loading.
- static void
prefixName
(OutBuffer*buf
, LINKlinkage
); - For the given symbol written to the OutBuffer, apply any target-specific prefixes based on the given
linkage
. - static const(char)*
cppTypeMangle
(Typet
); - For a vendor-specific type, return a string containing the C++ mangling. In all other cases, return
null
. - static LINK
systemLinkage
(); - Return the default system linkage for the target.
- static void
encodeInteger
(Expressione
, ubyte*buffer
); - Private helpers for Target::paintAsType.
Copyright © 1999-2017 by the D Language Foundation | Page generated by
Ddoc on Wed Jul 19 22:16:48 2017