fixing an assert and warnings

This commit is contained in:
beard%netscape.com 2000-04-11 01:10:26 +00:00
parent 647f8b9dc7
commit bbffbab18d
2 changed files with 6 additions and 6 deletions

View File

@ -43,7 +43,7 @@ namespace JavaScript {
ASSERT(stitcher.empty());
for (LabelIterator i = labels.begin(); i != labels.end(); i++) {
ASSERT((*i)->itsBase == iCode);
ASSERT((*i)->itsOffset < iCode->size());
ASSERT((*i)->itsOffset <= iCode->size());
}
#endif
@ -616,7 +616,7 @@ namespace JavaScript {
for (InstructionIterator i = iCode->begin(); i != iCode->end(); i++) {
for (LabelList::iterator k = labels.begin(); k != labels.end(); k++)
if ((*k)->itsOffset == (ptrdiff_t)(i - iCode->begin())) {
if ((ptrdiff_t)(*k)->itsOffset == (i - iCode->begin())) {
//s << "label #" << (k - labels.begin()) << ":\n";
s << "#" << (i - iCode->begin());
break;
@ -754,7 +754,7 @@ namespace JavaScript {
s << "\n";
}
for (LabelList::iterator k = labels.begin(); k != labels.end(); k++)
if ((*k)->itsOffset == (ptrdiff_t)(iCode->end() - iCode->begin())) {
if ((ptrdiff_t)(*k)->itsOffset == (iCode->end() - iCode->begin())) {
// s << "label #" << (k - labels.begin()) << ":\n";
// s << "#" << (i - iCode->begin());
}

View File

@ -43,7 +43,7 @@ namespace JavaScript {
ASSERT(stitcher.empty());
for (LabelIterator i = labels.begin(); i != labels.end(); i++) {
ASSERT((*i)->itsBase == iCode);
ASSERT((*i)->itsOffset < iCode->size());
ASSERT((*i)->itsOffset <= iCode->size());
}
#endif
@ -616,7 +616,7 @@ namespace JavaScript {
for (InstructionIterator i = iCode->begin(); i != iCode->end(); i++) {
for (LabelList::iterator k = labels.begin(); k != labels.end(); k++)
if ((*k)->itsOffset == (ptrdiff_t)(i - iCode->begin())) {
if ((ptrdiff_t)(*k)->itsOffset == (i - iCode->begin())) {
//s << "label #" << (k - labels.begin()) << ":\n";
s << "#" << (i - iCode->begin());
break;
@ -754,7 +754,7 @@ namespace JavaScript {
s << "\n";
}
for (LabelList::iterator k = labels.begin(); k != labels.end(); k++)
if ((*k)->itsOffset == (ptrdiff_t)(iCode->end() - iCode->begin())) {
if ((ptrdiff_t)(*k)->itsOffset == (iCode->end() - iCode->begin())) {
// s << "label #" << (k - labels.begin()) << ":\n";
// s << "#" << (i - iCode->begin());
}