mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 949878 - Switch to integer indexes to avoid pathological array slowdown, r=terrence
--HG-- extra : rebase_source : 93cd0bdd1bb2b1b4f104112613b3609ee4235ddd
This commit is contained in:
parent
fdf58ed14b
commit
486de8a456
@ -96,8 +96,9 @@ function loadCallgraph(file)
|
||||
// Find all functions reachable via an unsuppressed call chain, and remove
|
||||
// them from the suppressedFunctions set. Everything remaining is only
|
||||
// reachable when GC is suppressed.
|
||||
while (worklist.length) {
|
||||
name = worklist.pop();
|
||||
var top = worklist.length;
|
||||
while (top > 0) {
|
||||
name = worklist[--top];
|
||||
if (shouldSuppressGC(name))
|
||||
continue;
|
||||
if (!(name in suppressedFunctions))
|
||||
@ -107,7 +108,7 @@ function loadCallgraph(file)
|
||||
continue;
|
||||
for (var entry of calleeGraph[name]) {
|
||||
if (!entry.suppressed)
|
||||
worklist.push(entry.callee);
|
||||
worklist[top++] = entry.callee;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user