forked from ldc-developers/ldc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tango-0.99.8.patch
121 lines (113 loc) · 4.53 KB
/
tango-0.99.8.patch
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
Index: object.di
===================================================================
--- object.di (revision 4578)
+++ object.di (working copy)
@@ -35,15 +35,17 @@
Interface[] interfaces;
ClassInfo base;
void* destructor;
- void(*classInvariant)(Object);
+ void* classInvariant;
uint flags;
// 1: // IUnknown
// 2: // has no possible pointers into GC memory
// 4: // has offTi[] member
// 8: // has constructors
+ // 32: // has typeinfo
void* deallocator;
OffsetTypeInfo[] offTi;
void* defaultConstructor;
+ TypeInfo typeinfo;
static ClassInfo find(char[] classname);
Object create();
@@ -127,10 +129,11 @@
char[] name;
void[] m_init;
- uint function(void*) xtoHash;
- int function(void*,void*) xopEquals;
- int function(void*,void*) xopCmp;
- char[] function(void*) xtoString;
+ // These are ONLY for use as a delegate.funcptr!
+ hash_t function() xtoHash;
+ int function(void*) xopEquals;
+ int function(void*) xopCmp;
+ char[] function() xtoString;
uint m_flags;
}
Index: lib/common/tango/core/Thread.d
===================================================================
--- lib/common/tango/core/Thread.d (revision 4578)
+++ lib/common/tango/core/Thread.d (working copy)
@@ -295,7 +295,7 @@
}
else version (X86_64)
{
- ulong rax,rbx,rcx,rdx,rbp,rsi,rdi,rsp,r10,r11,r12,r13,r14,r15;
+ ulong rax,rbx,rcx,rdx,rbp,rsi,rdi,rsp,r8,r9,r10,r11,r12,r13,r14,r15;
asm
{
movq rax[RBP], RAX ;
@@ -306,6 +306,8 @@
movq rsi[RBP], RSI ;
movq rdi[RBP], RDI ;
movq rsp[RBP], RSP ;
+ movq r8[RBP], R8 ;
+ movq r9[RBP], R9 ;
movq r10[RBP], R10 ;
movq r11[RBP], R11 ;
movq r12[RBP], R12 ;
Index: lib/gc/basic/gcx.d
===================================================================
--- lib/gc/basic/gcx.d (revision 4578)
+++ lib/gc/basic/gcx.d (working copy)
@@ -2198,7 +2198,7 @@
}
else version (X86_64)
{
- ulong rax,rbx,rcx,rdx,rbp,rsi,rdi,rsp,r10,r11,r12,r13,r14,r15;
+ ulong rax,rbx,rcx,rdx,rbp,rsi,rdi,rsp,r8,r9,r10,r11,r12,r13,r14,r15;
asm
{
movq rax[RBP], RAX ;
@@ -2209,6 +2209,8 @@
movq rsi[RBP], RSI ;
movq rdi[RBP], RDI ;
movq rsp[RBP], RSP ;
+ movq r8[RBP], R8 ;
+ movq r9[RBP], R9 ;
movq r10[RBP], R10 ;
movq r11[RBP], R11 ;
movq r12[RBP], R12 ;
Index: tango/text/convert/Layout.d
===================================================================
--- tango/text/convert/Layout.d (revision 4578)
+++ tango/text/convert/Layout.d (working copy)
@@ -660,8 +660,12 @@
case TypeCode.STRUCT:
auto s = cast(TypeInfo_Struct) type;
- if (s.xtoString)
- return Utf.fromString8 (s.xtoString(p), result);
+ if (s.xtoString) {
+ char[] delegate() toString;
+ toString.ptr = p;
+ toString.funcptr = cast(char[] function()) s.xtoString;
+ return Utf.fromString8 (toString(), result);
+ }
goto default;
case TypeCode.INTERFACE:
Index: tango/net/Socket.d
===================================================================
--- tango/net/Socket.d (revision 4578)
+++ tango/net/Socket.d (working copy)
@@ -1545,10 +1545,10 @@
abstract class Address
{
- protected sockaddr* name();
- protected int nameLen();
- AddressFamily addressFamily();
- char[] toString();
+ abstract protected sockaddr* name();
+ abstract protected int nameLen();
+ abstract AddressFamily addressFamily();
+ abstract char[] toString();
/***********************************************************************