Avoid calling compilerProps after compiler object construction (#3005)

This commit is contained in:
Austin Morton
2021-10-05 00:21:32 -04:00
committed by GitHub
parent a59c3df653
commit 810134942d
7 changed files with 42 additions and 35 deletions

View File

@@ -34,6 +34,8 @@ export class PythonCompiler extends BaseCompiler {
super(compilerInfo, env);
this.compiler.demangler = null;
this.demanglerClass = null;
this.disasmScriptPath =
this.compilerProps('disasmScript') || resolvePathFromAppRoot('etc', 'scripts', 'dis_all.py');
}
// eslint-disable-next-line no-unused-vars
@@ -66,15 +68,9 @@ export class PythonCompiler extends BaseCompiler {
return {asm: bytecodeResult};
}
getDisasmScriptPath() {
const script = this.compilerProps('disasmScript');
return script || resolvePathFromAppRoot('etc', 'scripts', 'dis_all.py');
}
optionsForFilter(filters, outputFilename) {
return ['-I',
this.getDisasmScriptPath(),
this.disasmScriptPath,
'--outputfile',
outputFilename,
'--inputfile'];