if (IvarsInfo[0].ivar_bytepos == 0) {
WordsToSkip = 0;
WordsToScan = IvarsInfo[0].ivar_size;
- }
- else {
+ } else {
WordsToSkip = IvarsInfo[0].ivar_bytepos/WordSize;
WordsToScan = IvarsInfo[0].ivar_size;
}
- for (unsigned int i=1, Last=IvarsInfo.size(); i != Last; i++)
- {
+ for (unsigned int i=1, Last=IvarsInfo.size(); i != Last; i++) {
unsigned int TailPrevGCObjC =
IvarsInfo[i-1].ivar_bytepos + IvarsInfo[i-1].ivar_size * WordSize;
- if (IvarsInfo[i].ivar_bytepos == TailPrevGCObjC)
- {
+ if (IvarsInfo[i].ivar_bytepos == TailPrevGCObjC) {
// consecutive 'scanned' object pointers.
WordsToScan += IvarsInfo[i].ivar_size;
- }
- else
- {
+ } else {
// Skip over 'gc'able object pointer which lay over each other.
if (TailPrevGCObjC > IvarsInfo[i].ivar_bytepos)
continue;
WordsToScan = IvarsInfo[i].ivar_size;
}
}
- if (WordsToScan > 0)
- {
+ if (WordsToScan > 0) {
SKIP_SCAN SkScan;
SkScan.skip = WordsToSkip;
SkScan.scan = WordsToScan;
}
bool BytesSkipped = false;
- if (!SkipIvars.empty())
- {
+ if (!SkipIvars.empty()) {
unsigned int LastIndex = SkipIvars.size()-1;
int LastByteSkipped =
SkipIvars[LastIndex].ivar_bytepos + SkipIvars[LastIndex].ivar_size;
IvarsInfo[LastIndex].ivar_size * WordSize;
BytesSkipped = (LastByteSkipped > LastByteScanned);
// Compute number of bytes to skip at the tail end of the last ivar scanned.
- if (BytesSkipped)
- {
+ if (BytesSkipped) {
unsigned int TotalWords = (LastByteSkipped + (WordSize -1)) / WordSize;
SKIP_SCAN SkScan;
SkScan.skip = TotalWords - (LastByteScanned/WordSize);
// Mini optimization of nibbles such that an 0xM0 followed by 0x0N is produced
// as 0xMN.
int SkipScan = SkipScanIvars.size()-1;
- for (int i = 0; i <= SkipScan; i++)
- {
+ for (int i = 0; i <= SkipScan; i++) {
if ((i < SkipScan) && SkipScanIvars[i].skip && SkipScanIvars[i].scan == 0
&& SkipScanIvars[i+1].skip == 0 && SkipScanIvars[i+1].scan) {
// 0xM0 followed by 0x0N detected.
// Generate the string.
std::string BitMap;
- for (int i = 0; i <= SkipScan; i++)
- {
+ for (int i = 0; i <= SkipScan; i++) {
unsigned char byte;
unsigned int skip_small = SkipScanIvars[i].skip % 0xf;
unsigned int scan_small = SkipScanIvars[i].scan % 0xf;
BitMap += (unsigned char)(0xf0);
// next (skip small, scan)
- if (skip_small)
- {
+ if (skip_small) {
byte = skip_small << 4;
- if (scan_big > 0)
- {
+ if (scan_big > 0) {
byte |= 0xf;
--scan_big;
- }
- else if (scan_small)
- {
+ } else if (scan_small) {
byte |= scan_small;
scan_small = 0;
}
for (unsigned int ix = 0; ix < scan_big; ix++)
BitMap += (unsigned char)(0x0f);
// last scan small
- if (scan_small)
- {
+ if (scan_small) {
byte = scan_small;
BitMap += byte;
}