avancement planning
This commit is contained in:
+9
-4
@@ -150,14 +150,19 @@ function _evaluate(path, state) {
|
||||
deopt(binding.path, state);
|
||||
return;
|
||||
}
|
||||
const resolved = path.resolve();
|
||||
if (resolved === path) {
|
||||
if (!binding) {
|
||||
deopt(path, state);
|
||||
return;
|
||||
}
|
||||
const value = evaluateCached(resolved, state);
|
||||
const bindingPath = binding.path;
|
||||
if (!bindingPath.isVariableDeclarator()) {
|
||||
deopt(bindingPath, state);
|
||||
return;
|
||||
}
|
||||
const initPath = bindingPath.get("init");
|
||||
const value = evaluateCached(initPath, state);
|
||||
if (typeof value === "object" && value !== null && binding.references > 1) {
|
||||
deopt(resolved, state);
|
||||
deopt(initPath, state);
|
||||
return;
|
||||
}
|
||||
return value;
|
||||
|
||||
Reference in New Issue
Block a user