mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 851067 - Box non-matching argument types. r=h4writer
This commit is contained in:
parent
28aeb1f5c4
commit
f5a3040883
@ -3060,6 +3060,16 @@ IonBuilder::addTypeBarrier(uint32_t i, CallInfo &callinfo, types::StackTypeSet *
|
||||
if (needsBarrier) {
|
||||
MTypeBarrier *barrier = MTypeBarrier::New(ins, cloneTypeSet(calleeObs), Bailout_Normal);
|
||||
current->add(barrier);
|
||||
|
||||
// Non-matching types are boxed such as the MIRType does not conflict
|
||||
// with the inferred type.
|
||||
if (callerObs->getKnownTypeTag() != calleeObs->getKnownTypeTag() &&
|
||||
ins->type() != MIRType_Value)
|
||||
{
|
||||
MBox *box = MBox::New(ins);
|
||||
current->add(box);
|
||||
ins = box;
|
||||
}
|
||||
}
|
||||
|
||||
if (i == 0)
|
||||
|
6
js/src/jit-test/tests/ion/bug851067.js
Normal file
6
js/src/jit-test/tests/ion/bug851067.js
Normal file
@ -0,0 +1,6 @@
|
||||
function toPrinted(value) {
|
||||
value = String(value);
|
||||
}
|
||||
String = Array;
|
||||
toPrinted(123);
|
||||
evaluate('toPrinted("foo");');
|
Loading…
Reference in New Issue
Block a user