mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 554043 - fix negated bool, broken by TT_VOID patch (r=dvander)
This commit is contained in:
parent
7ae7039dfe
commit
ad69b5f5fb
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
6
js/src/trace-test/tests/basic/testBug554043.js
Normal file
6
js/src/trace-test/tests/basic/testBug554043.js
Normal file
@ -0,0 +1,6 @@
|
||||
(function () {
|
||||
for (var a = 0; a < 5; a++) {
|
||||
print(-false)
|
||||
assertEq(-false, -0.0);
|
||||
}
|
||||
})()
|
Loading…
Reference in New Issue
Block a user