refactor call and callArgs for HarmonyImportSpecifierDependency

This commit is contained in:
Tobias Koppers 2018-10-10 17:21:24 +02:00
parent 459fef0263
commit a09b9a5b8f
2 changed files with 1 additions and 6 deletions

View File

@ -122,7 +122,6 @@ module.exports = class HarmonyImportDependencyParserPlugin {
.for("imported var")
.tap("HarmonyImportDependencyParserPlugin", expr => {
const args = expr.arguments;
const fullExpr = expr;
expr = expr.callee;
if (expr.type !== "Identifier") return;
const name = expr.name;
@ -136,8 +135,7 @@ module.exports = class HarmonyImportDependencyParserPlugin {
this.strictExportPresence
);
dep.directImport = true;
dep.callArgs = args;
dep.call = fullExpr;
dep.call = true;
dep.loc = expr.loc;
parser.state.module.addDependency(dep);
if (args) parser.walkExpressions(args);

View File

@ -29,7 +29,6 @@ class HarmonyImportSpecifierDependency extends HarmonyImportDependency {
this.range = range;
this.strictExportPresence = strictExportPresence;
this.namespaceObjectAsContext = false;
this.callArgs = undefined;
this.call = undefined;
this.directImport = undefined;
this.shorthand = undefined;
@ -192,7 +191,6 @@ class HarmonyImportSpecifierDependency extends HarmonyImportDependency {
write(this.range);
write(this.strictExportPresence);
write(this.namespaceObjectAsContext);
write(this.callArgs);
write(this.call);
write(this.directImport);
write(this.shorthand);
@ -206,7 +204,6 @@ class HarmonyImportSpecifierDependency extends HarmonyImportDependency {
this.range = read();
this.strictExportPresence = read();
this.namespaceObjectAsContext = read();
this.callArgs = read();
this.call = read();
this.directImport = read();
this.shorthand = read();