mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1139368 - Set FilterTypeSet dependency in improveThisTypesForCall. r=h4writer
This commit is contained in:
parent
6c9f728df0
commit
382bb03e1d
10
js/src/jit-test/tests/ion/bug1139368.js
Normal file
10
js/src/jit-test/tests/ion/bug1139368.js
Normal file
@ -0,0 +1,10 @@
|
||||
// |jit-test| error: TypeError
|
||||
function f() {
|
||||
for (var i=2; i<2; i++) {
|
||||
var a = /a/;
|
||||
}
|
||||
for (var i=0; i<2; i++) {
|
||||
a.exec("aaa");
|
||||
}
|
||||
}
|
||||
f();
|
@ -10019,6 +10019,11 @@ IonBuilder::improveThisTypesForCall()
|
||||
MFilterTypeSet *filter = MFilterTypeSet::New(alloc(), thisDef, types);
|
||||
current->add(filter);
|
||||
current->rewriteAtDepth(-2, filter);
|
||||
|
||||
// FilterTypeSetPolicy::adjustInputs will insert an infallible Unbox(Object)
|
||||
// for the input. Don't hoist this unbox above the getprop or getelem
|
||||
// operation.
|
||||
filter->setDependency(current->peek(-1)->toInstruction());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user