mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
[INFER] Don't push a constant value in JSOP_TYPEOF, bug 643733. r=bhackett
This commit is contained in:
parent
bf929fa84d
commit
49c9ac30f6
4
js/src/jit-test/tests/basic/bug643733.js
Normal file
4
js/src/jit-test/tests/basic/bug643733.js
Normal file
@ -0,0 +1,4 @@
|
||||
var x;
|
||||
assertEq(-(typeof (x+x)), NaN);
|
||||
assertEq(-(typeof Math.abs()), NaN);
|
||||
|
@ -798,8 +798,10 @@ mjit::Compiler::jsop_typeof()
|
||||
}
|
||||
|
||||
if (atom) {
|
||||
RegisterID reg = frame.allocReg();
|
||||
masm.move(ImmPtr(ATOM_TO_STRING(atom)), reg);
|
||||
frame.pop();
|
||||
frame.push(StringValue(ATOM_TO_STRING(atom)));
|
||||
frame.pushTypedPayload(JSVAL_TYPE_STRING, reg);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user