Changeset 837
- Timestamp:
- 01/02/11 07:08:10 (14 years ago)
- Files:
-
- branches/dmd-1.x/src/glue.c (modified) (1 diff)
- trunk/src/glue.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/dmd-1.x/src/glue.c
r772 r837 300 300 301 301 /* Generate: 302 302 * _d_cover_register(uint[] __coverage, BitArray __bcoverage, string filename); 303 303 * and prepend it to the static constructor. 304 304 */ 305 305 306 306 /* t will be the type of the functions generated: 307 307 * extern (C) void func(); 308 308 */ 309 309 type *t = type_alloc(TYnfunc); 310 310 t->Tflags |= TFprototype | TFfixed; 311 311 t->Tmangle = mTYman_c; 312 312 t->Tnext = tsvoid; 313 313 tsvoid->Tcount++; 314 314 315 315 sictor = toSymbolX("__modictor", SCglobal, t, "FZv"); 316 316 cstate.CSpsymtab = &sictor->Sfunc->Flocsym; 317 317 localgot = ictorlocalgot; 318 318 elem *e; 319 319 320 e = el_params(el_p tr(cov), el_long(TYuint, numlines),321 el_p tr(bcov), el_long(TYuint, numlines),320 e = el_params(el_pair(TYdarray, el_long(TYsize_t, numlines), el_ptr(cov)), 321 el_pair(TYdarray, el_long(TYsize_t, numlines), el_ptr(bcov)), 322 322 toEfilename(), 323 323 NULL); 324 324 e = el_bin(OPcall, TYvoid, el_var(rtlsym[RTLSYM_DCOVER]), e); 325 325 eictor = el_combine(e, eictor); 326 326 ictorlocalgot = localgot; 327 327 } 328 328 329 329 // If coverage / static constructor / destructor / unittest calls 330 330 if (eictor || ector || edtor || etest) 331 331 { 332 332 /* t will be the type of the functions generated: 333 333 * extern (C) void func(); 334 334 */ 335 335 type *t = type_alloc(TYnfunc); 336 336 t->Tflags |= TFprototype | TFfixed; 337 337 t->Tmangle = mTYman_c; 338 338 t->Tnext = tsvoid; 339 339 tsvoid->Tcount++; 340 340 341 341 static char moddeco[] = "FZv"; trunk/src/glue.c
r772 r837 300 300 301 301 /* Generate: 302 302 * _d_cover_register(uint[] __coverage, BitArray __bcoverage, string filename); 303 303 * and prepend it to the static constructor. 304 304 */ 305 305 306 306 /* t will be the type of the functions generated: 307 307 * extern (C) void func(); 308 308 */ 309 309 type *t = type_alloc(TYnfunc); 310 310 t->Tflags |= TFprototype | TFfixed; 311 311 t->Tmangle = mTYman_c; 312 312 t->Tnext = tsvoid; 313 313 tsvoid->Tcount++; 314 314 315 315 sictor = toSymbolX("__modictor", SCglobal, t, "FZv"); 316 316 cstate.CSpsymtab = &sictor->Sfunc->Flocsym; 317 317 localgot = ictorlocalgot; 318 318 elem *e; 319 319 320 e = el_params(el_p tr(cov), el_long(TYuint, numlines),321 el_p tr(bcov), el_long(TYuint, numlines),320 e = el_params(el_pair(TYdarray, el_long(TYsize_t, numlines), el_ptr(cov)), 321 el_pair(TYdarray, el_long(TYsize_t, numlines), el_ptr(bcov)), 322 322 toEfilename(), 323 323 NULL); 324 324 e = el_bin(OPcall, TYvoid, el_var(rtlsym[RTLSYM_DCOVER]), e); 325 325 eictor = el_combine(e, eictor); 326 326 ictorlocalgot = localgot; 327 327 } 328 328 329 329 // If coverage / static constructor / destructor / unittest calls 330 330 if (eictor || ector || ectorgates.dim || edtor || 331 331 esharedctor || esharedctorgates.dim || eshareddtor || etest) 332 332 { 333 333 /* t will be the type of the functions generated: 334 334 * extern (C) void func(); 335 335 */ 336 336 type *t = type_alloc(TYnfunc); 337 337 t->Tflags |= TFprototype | TFfixed; 338 338 t->Tmangle = mTYman_c; 339 339 t->Tnext = tsvoid; 340 340 tsvoid->Tcount++; 341 341
