@@ -108,8 +108,9 @@ typedef struct mi_nothrow_s { int _tag; } mi_nothrow_t;
108
108
void _ZdaPvm (void * p , size_t n ); // delete[]
109
109
void * _Znwm (size_t n ); // new
110
110
void * _Znam (size_t n ); // new[]
111
- void * _ZnwmRKSt9nothrow_t (size_t n , mi_nothrow_t tag ); // new nothrow
112
- void * _ZnamRKSt9nothrow_t (size_t n , mi_nothrow_t tag ); // new[] nothrow
111
+ // XXX EMSCRIPTEN: Use pointer type for nothrow argument
112
+ void * _ZnwmRKSt9nothrow_t (size_t n , mi_nothrow_t * tag ); // new nothrow
113
+ void * _ZnamRKSt9nothrow_t (size_t n , mi_nothrow_t * tag ); // new[] nothrow
113
114
#ifdef __cplusplus
114
115
}
115
116
#endif
@@ -201,21 +202,23 @@ typedef struct mi_nothrow_s { int _tag; } mi_nothrow_t;
201
202
#if (MI_INTPTR_SIZE == 8 )
202
203
void * _Znwm (size_t n ) MI_FORWARD1 (mi_new ,n ) // new 64-bit
203
204
void * _Znam (size_t n ) MI_FORWARD1 (mi_new ,n ) // new[] 64-bit
204
- void * _ZnwmRKSt9nothrow_t (size_t n , mi_nothrow_t tag ) { MI_UNUSED (tag ); return mi_new_nothrow (n ); }
205
- void * _ZnamRKSt9nothrow_t (size_t n , mi_nothrow_t tag ) { MI_UNUSED (tag ); return mi_new_nothrow (n ); }
205
+ // XXX EMSCRIPTEN: Use pointer type for nothrow argument
206
+ void * _ZnwmRKSt9nothrow_t (size_t n , mi_nothrow_t * tag ) { MI_UNUSED (tag ); return mi_new_nothrow (n ); }
207
+ void * _ZnamRKSt9nothrow_t (size_t n , mi_nothrow_t * tag ) { MI_UNUSED (tag ); return mi_new_nothrow (n ); }
206
208
void * _ZnwmSt11align_val_t (size_t n , size_t al ) MI_FORWARD2 (mi_new_aligned , n , al )
207
209
void * _ZnamSt11align_val_t (size_t n , size_t al ) MI_FORWARD2 (mi_new_aligned , n , al )
208
- void * _ZnwmSt11align_val_tRKSt9nothrow_t (size_t n , size_t al , mi_nothrow_t tag ) { MI_UNUSED (tag ); return mi_new_aligned_nothrow (n ,al ); }
209
- void * _ZnamSt11align_val_tRKSt9nothrow_t (size_t n , size_t al , mi_nothrow_t tag ) { MI_UNUSED (tag ); return mi_new_aligned_nothrow (n ,al ); }
210
+ void * _ZnwmSt11align_val_tRKSt9nothrow_t (size_t n , size_t al , mi_nothrow_t * tag ) { MI_UNUSED (tag ); return mi_new_aligned_nothrow (n ,al ); }
211
+ void * _ZnamSt11align_val_tRKSt9nothrow_t (size_t n , size_t al , mi_nothrow_t * tag ) { MI_UNUSED (tag ); return mi_new_aligned_nothrow (n ,al ); }
210
212
#elif (MI_INTPTR_SIZE == 4 )
211
213
void * _Znwj (size_t n ) MI_FORWARD1 (mi_new ,n ) // new 64-bit
212
214
void * _Znaj (size_t n ) MI_FORWARD1 (mi_new ,n ) // new[] 64-bit
213
- void * _ZnwjRKSt9nothrow_t (size_t n , mi_nothrow_t tag ) { MI_UNUSED (tag ); return mi_new_nothrow (n ); }
214
- void * _ZnajRKSt9nothrow_t (size_t n , mi_nothrow_t tag ) { MI_UNUSED (tag ); return mi_new_nothrow (n ); }
215
+ // XXX EMSCRIPTEN: Use pointer type for nothrow argument
216
+ void * _ZnwjRKSt9nothrow_t (size_t n , mi_nothrow_t * tag ) { MI_UNUSED (tag ); return mi_new_nothrow (n ); }
217
+ void * _ZnajRKSt9nothrow_t (size_t n , mi_nothrow_t * tag ) { MI_UNUSED (tag ); return mi_new_nothrow (n ); }
215
218
void * _ZnwjSt11align_val_t (size_t n , size_t al ) MI_FORWARD2 (mi_new_aligned , n , al )
216
219
void * _ZnajSt11align_val_t (size_t n , size_t al ) MI_FORWARD2 (mi_new_aligned , n , al )
217
- void * _ZnwjSt11align_val_tRKSt9nothrow_t (size_t n , size_t al , mi_nothrow_t tag ) { MI_UNUSED (tag ); return mi_new_aligned_nothrow (n ,al ); }
218
- void * _ZnajSt11align_val_tRKSt9nothrow_t (size_t n , size_t al , mi_nothrow_t tag ) { MI_UNUSED (tag ); return mi_new_aligned_nothrow (n ,al ); }
220
+ void * _ZnwjSt11align_val_tRKSt9nothrow_t (size_t n , size_t al , mi_nothrow_t * tag ) { MI_UNUSED (tag ); return mi_new_aligned_nothrow (n ,al ); }
221
+ void * _ZnajSt11align_val_tRKSt9nothrow_t (size_t n , size_t al , mi_nothrow_t * tag ) { MI_UNUSED (tag ); return mi_new_aligned_nothrow (n ,al ); }
219
222
#else
220
223
#error "define overloads for new/delete for this platform (just for performance, can be skipped)"
221
224
#endif
0 commit comments