mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1147224 - Only keep the optimization information of the last time IonBuilder visits a bytecode location. (r=djvj)
This commit is contained in:
parent
9ec35438a8
commit
32abf472e0
@ -1040,6 +1040,11 @@ IonBuilder::startTrackingOptimizations()
|
||||
// OOMs are handled as if optimization tracking were turned off.
|
||||
if (!trackedOptimizationSites_.append(site))
|
||||
site = nullptr;
|
||||
} else {
|
||||
// The same bytecode may be visited multiple times (see
|
||||
// restartLoop). Only the last time matters, so clear any previous
|
||||
// tracked optimizations.
|
||||
site->optimizations()->clear();
|
||||
}
|
||||
|
||||
if (site)
|
||||
|
@ -107,6 +107,12 @@ class TrackedOptimizations : public TempObject
|
||||
currentAttempt_(UINT32_MAX)
|
||||
{ }
|
||||
|
||||
void clear() {
|
||||
types_.clear();
|
||||
attempts_.clear();
|
||||
currentAttempt_ = UINT32_MAX;
|
||||
}
|
||||
|
||||
bool trackTypeInfo(OptimizationTypeInfo &&ty);
|
||||
|
||||
bool trackAttempt(JS::TrackedStrategy strategy);
|
||||
|
Loading…
Reference in New Issue
Block a user