Changeset 212 for trunk/coverager.c
- Timestamp:
- 10/04/2006 12:38:45 AM (2 years ago)
- Files:
-
- 1 modified
-
trunk/coverager.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/coverager.c
r208 r212 147 147 for (; len >= sizeof(long) * 2; len -= sizeof(long) * 2, p += 2) { 148 148 if (zend_hash_index_find(cov, p[0], (void**)&phits) == SUCCESS) { 149 if (p[1] == 0) {149 if (p[1] == -1) { 150 150 /* OPTIMIZE: already marked */ 151 151 continue; 152 152 } 153 p[1] += *phits; 153 if (*phits != -1) { 154 p[1] += *phits; 155 } 154 156 } 155 157 zend_hash_index_update(cov, p[0], &p[1], sizeof(p[1]), NULL); … … 219 221 long hits = *phits; 220 222 221 if (hits != 0) {222 hits = 0;223 if (hits != -1) { 224 hits = -1; 223 225 zend_hash_index_update(cov, pos2->h, &hits, sizeof(hits), NULL); 224 226 } … … 377 379 } 378 380 if (zend_hash_index_find(cov, line, (void**)&poldhits) == SUCCESS) { 379 if (hits == 0) {380 /* OPTIMIZE: already marked */381 if (hits == -1) { 382 /* OPTIMIZE: -1 == init-ing, but it's already initized */ 381 383 return; 382 384 } 383 hits += *poldhits; 385 if (*poldhits != -1) { 386 hits += *poldhits; 387 } 384 388 } 385 389 zend_hash_index_update(cov, line, &hits, sizeof(hits), NULL); … … 430 434 case ZEND_EXT_FCALL_END: 431 435 #endif 432 xc_coverager_add_hits(cov, op_array->opcodes[i].lineno, 0TSRMLS_CC);436 xc_coverager_add_hits(cov, op_array->opcodes[i].lineno, -1 TSRMLS_CC); 433 437 break; 434 438 }

