Added TRACE_DEBUG, fixed int/uint compare and bad iterator use.

This commit is contained in:
rogerl%netscape.com 2003-07-14 20:56:24 +00:00
parent 5eacb08aab
commit 841ca6e5c5
3 changed files with 3 additions and 3 deletions

View File

@ -6,7 +6,7 @@ WFLAGS = -Wmissing-prototypes -Wstrict-prototypes -Wunused \
-Wswitch -Wall -Wconversion
if DEBUG
CXXFLAGS = -DXP_UNIX -g -DDEBUG $(WFLAGS) -Iregexp/
CXXFLAGS = -DXP_UNIX -g -DDEBUG -DTRACE_DEBUG $(WFLAGS) -Iregexp/
JS1x_BINDIR = Linux_All_DBG.OBJ
else
CXXFLAGS = -DXP_UNIX -O2 -Wuninitialized $(WFLAGS) -Iregexp/

View File

@ -3178,7 +3178,7 @@ doUnary:
LocalBindingEntry &lbe = *bi;
lbe.clear();
}
for (LocalBindingIterator bi2(pluralFrame->localBindings); bi; ++bi) {
for (LocalBindingIterator bi2(pluralFrame->localBindings); bi2; ++bi2) {
LocalBindingEntry &lbe = *bi2;
LocalBindingEntry *new_lbe = &singularFrame->localBindings.insert(lbe.name);

View File

@ -406,7 +406,7 @@ static void regexpSplitMatch(JS2Metadata *meta, const String *S, uint32 q, JS2Re
result.capturesCount = toUInt32(match->parenCount);
if (match->parenCount) {
result.captures = new js2val[match->parenCount];
for (int32 i = 0; i < match->parenCount; i++) {
for (uint32 i = 0; i < match->parenCount; i++) {
if (match->parens[i].index != -1)
result.captures[i] = meta->engine->allocString(S->substr((uint32)(match->parens[i].index + q),
(uint32)(match->parens[i].length)));