зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1673497: Part 2: Cancel off-thread compiles when invalidating Warp r=jandem
Depends on D94875 Differential Revision: https://phabricator.services.mozilla.com/D94876
This commit is contained in:
Родитель
dfe0b97563
Коммит
d095428907
|
@ -0,0 +1,21 @@
|
|||
// |jit-test| --fast-warmup; skip-if: helperThreadCount() === 0
|
||||
|
||||
function foo(o) {
|
||||
return o.y;
|
||||
}
|
||||
|
||||
with ({}) {}
|
||||
|
||||
var sum = 0;
|
||||
|
||||
// Trigger an off-thread Warp compile.
|
||||
for (var i = 0; i < 30; i++) {
|
||||
sum += foo({y: 1});
|
||||
}
|
||||
|
||||
// Attach a new stub and cancel that compile.
|
||||
for (var i = 0; i < 30; i++) {
|
||||
sum += foo({x: 1, y: 1});
|
||||
}
|
||||
|
||||
assertEq(sum, 60);
|
|
@ -640,6 +640,8 @@ void ICFallbackStub::maybeInvalidateWarp(JSContext* cx, JSScript* script) {
|
|||
|
||||
if (script->hasIonScript()) {
|
||||
Invalidate(cx, script);
|
||||
} else {
|
||||
CancelOffThreadIonCompile(script);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче