@@ -49,8 +49,10 @@ impl fmt::Debug for c_void {
49
49
/// Basic implementation of a `va_list`.
50
50
// The name is WIP, using `VaListImpl` for now.
51
51
#[ cfg( any( all( not( target_arch = "aarch64" ) , not( target_arch = "powerpc" ) ,
52
- not( target_arch = "x86_64" ) , not ( target_arch = "asmjs" ) ) ,
52
+ not( target_arch = "x86_64" ) ) ,
53
53
all( target_arch = "aarch64" , target_os = "ios" ) ,
54
+ target_arch = "wasm32" ,
55
+ target_arch = "asmjs" ,
54
56
windows) ) ]
55
57
#[ repr( transparent) ]
56
58
#[ unstable( feature = "c_variadic" ,
@@ -67,8 +69,10 @@ pub struct VaListImpl<'f> {
67
69
}
68
70
69
71
#[ cfg( any( all( not( target_arch = "aarch64" ) , not( target_arch = "powerpc" ) ,
70
- not( target_arch = "x86_64" ) , not ( target_arch = "asmjs" ) ) ,
72
+ not( target_arch = "x86_64" ) ) ,
71
73
all( target_arch = "aarch64" , target_os = "ios" ) ,
74
+ target_arch = "wasm32" ,
75
+ target_arch = "asmjs" ,
72
76
windows) ) ]
73
77
#[ unstable( feature = "c_variadic" ,
74
78
reason = "the `c_variadic` feature has not been properly tested on \
@@ -137,38 +141,6 @@ pub struct VaListImpl<'f> {
137
141
_marker : PhantomData < & ' f mut & ' f c_void > ,
138
142
}
139
143
140
- /// asm.js ABI implementation of a `va_list`.
141
- // asm.js uses the PNaCl ABI, which specifies that a `va_list` is
142
- // an array of 4 32-bit integers, according to the old PNaCl docs at
143
- // https://web.archive.org/web/20130518054430/https://www.chromium.org/nativeclient/pnacl/bitcode-abi#TOC-Derived-Types
144
- // and clang does the same in `CreatePNaClABIBuiltinVaListDecl` from `lib/AST/ASTContext.cpp`
145
- #[ cfg( all( target_arch = "asmjs" , not( windows) ) ) ]
146
- #[ repr( C ) ]
147
- #[ unstable( feature = "c_variadic" ,
148
- reason = "the `c_variadic` feature has not been properly tested on \
149
- all supported platforms",
150
- issue = "44930" ) ]
151
- #[ lang = "va_list" ]
152
- pub struct VaListImpl < ' f > {
153
- inner : [ crate :: mem:: MaybeUninit < i32 > ; 4 ] ,
154
- _marker : PhantomData < & ' f mut & ' f c_void > ,
155
- }
156
-
157
- #[ cfg( all( target_arch = "asmjs" , not( windows) ) ) ]
158
- #[ unstable( feature = "c_variadic" ,
159
- reason = "the `c_variadic` feature has not been properly tested on \
160
- all supported platforms",
161
- issue = "44930" ) ]
162
- impl < ' f > fmt:: Debug for VaListImpl < ' f > {
163
- fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
164
- unsafe {
165
- write ! ( f, "va_list* [{:#x}, {:#x}, {:#x}, {:#x}]" ,
166
- self . inner[ 0 ] . read( ) , self . inner[ 1 ] . read( ) ,
167
- self . inner[ 2 ] . read( ) , self . inner[ 3 ] . read( ) )
168
- }
169
- }
170
- }
171
-
172
144
/// A wrapper for a `va_list`
173
145
#[ repr( transparent) ]
174
146
#[ derive( Debug ) ]
@@ -178,23 +150,29 @@ impl<'f> fmt::Debug for VaListImpl<'f> {
178
150
issue = "44930" ) ]
179
151
pub struct VaList < ' a , ' f : ' a > {
180
152
#[ cfg( any( all( not( target_arch = "aarch64" ) , not( target_arch = "powerpc" ) ,
181
- not( target_arch = "x86_64" ) , not ( target_arch = "asmjs" ) ) ,
153
+ not( target_arch = "x86_64" ) ) ,
182
154
all( target_arch = "aarch64" , target_os = "ios" ) ,
155
+ target_arch = "wasm32" ,
156
+ target_arch = "asmjs" ,
183
157
windows) ) ]
184
158
inner : VaListImpl < ' f > ,
185
159
186
160
#[ cfg( all( any( target_arch = "aarch64" , target_arch = "powerpc" ,
187
- target_arch = "x86_64" , target_arch = "asmjs" ) ,
161
+ target_arch = "x86_64" ) ,
188
162
any( not( target_arch = "aarch64" ) , not( target_os = "ios" ) ) ,
163
+ not( target_arch = "wasm32" ) ,
164
+ not( target_arch = "asmjs" ) ,
189
165
not( windows) ) ) ]
190
166
inner : & ' a mut VaListImpl < ' f > ,
191
167
192
168
_marker : PhantomData < & ' a mut VaListImpl < ' f > > ,
193
169
}
194
170
195
171
#[ cfg( any( all( not( target_arch = "aarch64" ) , not( target_arch = "powerpc" ) ,
196
- not( target_arch = "x86_64" ) , not ( target_arch = "asmjs" ) ) ,
172
+ not( target_arch = "x86_64" ) ) ,
197
173
all( target_arch = "aarch64" , target_os = "ios" ) ,
174
+ target_arch = "wasm32" ,
175
+ target_arch = "asmjs" ,
198
176
windows) ) ]
199
177
#[ unstable( feature = "c_variadic" ,
200
178
reason = "the `c_variadic` feature has not been properly tested on \
@@ -212,8 +190,10 @@ impl<'f> VaListImpl<'f> {
212
190
}
213
191
214
192
#[ cfg( all( any( target_arch = "aarch64" , target_arch = "powerpc" ,
215
- target_arch = "x86_64" , target_arch = "asmjs" ) ,
193
+ target_arch = "x86_64" ) ,
216
194
any( not( target_arch = "aarch64" ) , not( target_os = "ios" ) ) ,
195
+ not( target_arch = "wasm32" ) ,
196
+ not( target_arch = "asmjs" ) ,
217
197
not( windows) ) ) ]
218
198
#[ unstable( feature = "c_variadic" ,
219
199
reason = "the `c_variadic` feature has not been properly tested on \
0 commit comments