mirror of
https://github.com/facebookarchive/prepack.git
synced 2024-08-17 10:30:32 +03:00
Re-enable traverse cache clear (#2260)
Summary: Release notes: none Follow up to https://github.com/facebook/prepack/pull/2256. This re-enables Babel traverse cache clearing, but with the Babel 7 API. Pull Request resolved: https://github.com/facebook/prepack/pull/2260 Differential Revision: D8850784 Pulled By: trueadm fbshipit-source-id: 9d61feff152400262a050d72b9ee3567ddcf11e2
This commit is contained in:
parent
e170c37aaa
commit
c5f300de04
@ -422,8 +422,7 @@ function generateRuntimeForStatement(
|
||||
null,
|
||||
functionInfo
|
||||
);
|
||||
// Babel 7 removed clearCache
|
||||
// traverse.clearCache();
|
||||
traverse.cache.clear();
|
||||
let { usesReturn, usesThrow, usesArguments, usesGotoToLabel, varPatternUnsupported, usesThis } = functionInfo;
|
||||
|
||||
if (usesReturn || usesThrow || usesArguments || usesGotoToLabel || varPatternUnsupported) {
|
||||
|
@ -339,8 +339,7 @@ export function convertSimpleClassComponentToFunctionalComponent(
|
||||
{},
|
||||
undefined
|
||||
);
|
||||
// Babel 7 removed clearCache
|
||||
// traverse.clearCache();
|
||||
traverse.cache.clear();
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -566,8 +566,7 @@ export class ResidualHeapVisitor {
|
||||
null,
|
||||
state
|
||||
);
|
||||
// Babel 7 removed clearCache
|
||||
// traverse.clearCache();
|
||||
traverse.cache.clear();
|
||||
this.functionInfos.set(code, functionInfo);
|
||||
|
||||
if (val.isResidual && functionInfo.unbound.size) {
|
||||
|
@ -75,6 +75,5 @@ export function stripFlowTypeAnnotations(ast: BabelNode): void {
|
||||
{},
|
||||
undefined
|
||||
);
|
||||
// Babel 7 removed clearCache
|
||||
// traverse.clearCache();
|
||||
traverse.cache.clear();
|
||||
}
|
||||
|
@ -107,8 +107,7 @@ function getHavocedFunctionInfo(value: FunctionValue) {
|
||||
null,
|
||||
functionInfo
|
||||
);
|
||||
// Babel 7 removed clearCache
|
||||
// traverse.clearCache();
|
||||
traverse.cache.clear();
|
||||
return functionInfo;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user