Bug 554043 - fix negated bool, broken by TT_VOID patch (r=dvander)

This commit is contained in:
Luke Wagner 2010-03-22 10:26:08 -07:00
parent 7ae7039dfe
commit ad69b5f5fb
3 changed files with 14 additions and 5 deletions

View File

@ -146,18 +146,21 @@ enum TokenKind {
TOK_LIMIT /* domain size */
};
static inline bool TokenKindIsXML(TokenKind tt)
static inline bool
TokenKindIsXML(TokenKind tt)
{
return tt == TOK_AT || tt == TOK_DBLCOLON || tt == TOK_ANYNAME;
}
static inline bool TreeTypeIsXML(TokenKind tt)
static inline bool
TreeTypeIsXML(TokenKind tt)
{
return tt == TOK_XMLCOMMENT || tt == TOK_XMLCDATA || tt == TOK_XMLPI ||
tt == TOK_XMLELEM || tt == TOK_XMLLIST;
}
static inline bool TokenKindIsDecl(TokenKind tt)
static inline bool
TokenKindIsDecl(TokenKind tt)
{
#if JS_HAS_BLOCK_SCOPE
return tt == TOK_VAR || tt == TOK_LET;

View File

@ -9403,7 +9403,7 @@ TraceRecorder::unbox_jsval(jsval v, LIns* v_ins, VMSideExit* exit)
lir->ins2(LIR_piand, v_ins, INS_CONSTWORD(JSVAL_TAGMASK)),
INS_CONSTWORD(JSVAL_SPECIAL)),
exit);
assert(!v_ins->isconstp());
JS_ASSERT(!v_ins->isconstp());
guard(false, lir->ins2(LIR_peq, v_ins, INS_CONSTWORD(JSVAL_VOID)), exit);
return p2i(lir->ins2i(LIR_pursh, v_ins, JSVAL_TAGBITS));
@ -10278,7 +10278,7 @@ TraceRecorder::record_JSOP_NEG()
}
JS_ASSERT(JSVAL_IS_BOOLEAN(v));
set(&v, i2f(get(&v)));
set(&v, lir->ins1(LIR_fneg, i2f(get(&v))));
return ARECORD_CONTINUE;
}

View File

@ -0,0 +1,6 @@
(function () {
for (var a = 0; a < 5; a++) {
print(-false)
assertEq(-false, -0.0);
}
})()