/
object.d
48 lines (38 loc) · 942 Bytes
/
object.d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
module object;
nothrow:
@safe:
alias size_t = typeof(int.sizeof);
alias ptrdiff_t = typeof(cast(void*)0 - cast(void*)0);
alias string = immutable(char)[];
version(GNU)
{
private import gcc.attribute;
enum inline = attribute("forceinline");
enum noinline = attribute("noinline");
private import gcc.builtins;
public alias alloca = __builtin_alloca;
// See https://bugzilla.gdcproject.org/show_bug.cgi?id=299
bool _xopEquals(in void*, in void*)
{
return false;
}
}
version(LDC)
{
enum inline = "";
enum noinline = "";
}
version(LDC)
{
struct __asmtuple_t(T...)
{
T v;
}
pragma(LDC_inline_asm)
{
void __asm()(const(char)[] asmcode, const(char)[] constraints, ...) pure nothrow @nogc;
T __asm(T)(const(char)[] asmcode, const(char)[] constraints, ...) pure nothrow @nogc;
}
pragma(LDC_alloca)
void* alloca(size_t size) pure;
}