@@ -160,22 +160,12 @@ rand_new() {
160
160
}
161
161
162
162
extern " C" CDECL size_t
163
- <<<<<<< HEAD
164
163
rand_next (randctx *rctx) {
165
- =======
166
- rand_next (randctx *rctx)
167
- {
168
- >>>>>>> move rand functions into c-stack-cdecl mode
169
164
return isaac_rand (rctx);
170
165
}
171
166
172
167
extern " C" CDECL void
173
- <<<<<<< HEAD
174
168
rand_free (randctx *rctx) {
175
- =======
176
- rand_free (randctx *rctx)
177
- {
178
- >>>>>>> move rand functions into c-stack-cdecl mode
179
169
rust_task *task = rust_scheduler::get_task ();
180
170
task->free (rctx);
181
171
}
@@ -221,7 +211,9 @@ task_join(rust_task_id tid) {
221
211
/* Debug builtins for std::dbg. */
222
212
223
213
static void
224
- debug_tydesc_helper (rust_task* task, type_desc *t) {
214
+ debug_tydesc_helper (type_desc *t)
215
+ {
216
+ rust_task *task = rust_scheduler::get_task ();
225
217
LOG (task, stdlib, " size %" PRIdPTR " , align %" PRIdPTR
226
218
" , first_param 0x%" PRIxPTR,
227
219
t->size , t->align , t->first_param );
@@ -231,14 +223,14 @@ extern "C" CDECL void
231
223
debug_tydesc (type_desc *t) {
232
224
rust_task *task = rust_scheduler::get_task ();
233
225
LOG (task, stdlib, " debug_tydesc" );
234
- debug_tydesc_helper (task, t);
226
+ debug_tydesc_helper (t);
235
227
}
236
228
237
229
extern " C" CDECL void
238
230
debug_opaque (type_desc *t, uint8_t *front) {
239
231
rust_task *task = rust_scheduler::get_task ();
240
232
LOG (task, stdlib, " debug_opaque" );
241
- debug_tydesc_helper (task, t);
233
+ debug_tydesc_helper (t);
242
234
// FIXME may want to actually account for alignment. `front` may not
243
235
// indeed be the front byte of the passed-in argument.
244
236
for (uintptr_t i = 0 ; i < t->size ; ++front, ++i) {
@@ -257,7 +249,7 @@ extern "C" CDECL void
257
249
debug_box (type_desc *t, rust_box *box) {
258
250
rust_task *task = rust_scheduler::get_task ();
259
251
LOG (task, stdlib, " debug_box(0x%" PRIxPTR " )" , box);
260
- debug_tydesc_helper (task, t);
252
+ debug_tydesc_helper (t);
261
253
LOG (task, stdlib, " refcount %" PRIdPTR,
262
254
box->ref_count - 1 ); // -1 because we ref'ed for this call
263
255
for (uintptr_t i = 0 ; i < t->size ; ++i) {
@@ -275,7 +267,7 @@ debug_tag(type_desc *t, rust_tag *tag) {
275
267
rust_task *task = rust_scheduler::get_task ();
276
268
277
269
LOG (task, stdlib, " debug_tag" );
278
- debug_tydesc_helper (task, t);
270
+ debug_tydesc_helper (t);
279
271
LOG (task, stdlib, " discriminant %" PRIdPTR, tag->discriminant );
280
272
281
273
for (uintptr_t i = 0 ; i < t->size - sizeof (tag->discriminant ); ++i)
@@ -293,7 +285,7 @@ debug_obj(type_desc *t, rust_obj *obj, size_t nmethods, size_t nbytes) {
293
285
rust_task *task = rust_scheduler::get_task ();
294
286
295
287
LOG (task, stdlib, " debug_obj with %" PRIdPTR " methods" , nmethods);
296
- debug_tydesc_helper (task, t);
288
+ debug_tydesc_helper (t);
297
289
LOG (task, stdlib, " vtbl at 0x%" PRIxPTR, obj->vtbl );
298
290
LOG (task, stdlib, " body at 0x%" PRIxPTR, obj->body );
299
291
@@ -314,7 +306,7 @@ extern "C" CDECL void
314
306
debug_fn (type_desc *t, rust_fn *fn) {
315
307
rust_task *task = rust_scheduler::get_task ();
316
308
LOG (task, stdlib, " debug_fn" );
317
- debug_tydesc_helper (task, t);
309
+ debug_tydesc_helper (t);
318
310
LOG (task, stdlib, " thunk at 0x%" PRIxPTR, fn->thunk );
319
311
LOG (task, stdlib, " closure at 0x%" PRIxPTR, fn->closure );
320
312
if (fn->closure ) {
@@ -328,9 +320,9 @@ debug_ptrcast(type_desc *from_ty,
328
320
void *ptr) {
329
321
rust_task *task = rust_scheduler::get_task ();
330
322
LOG (task, stdlib, " debug_ptrcast from" );
331
- debug_tydesc_helper (task, from_ty);
323
+ debug_tydesc_helper (from_ty);
332
324
LOG (task, stdlib, " to" );
333
- debug_tydesc_helper (task, to_ty);
325
+ debug_tydesc_helper (to_ty);
334
326
return ptr;
335
327
}
336
328
0 commit comments