diff options
author | Austin Morton <apmorton@users.noreply.github.com> | 2021-10-05 00:21:32 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-04 23:21:32 -0500 |
commit | 810134942d0e8af494d53dceade0054fa5086129 (patch) | |
tree | 9709639486c6c68a1974178c5485f9c4a9af818b /lib/compilers/python.js | |
parent | a59c3df6535aaf53b8a095d0c664af57764089e5 (diff) | |
download | compiler-explorer-810134942d0e8af494d53dceade0054fa5086129.tar.gz compiler-explorer-810134942d0e8af494d53dceade0054fa5086129.zip |
Avoid calling compilerProps after compiler object construction (#3005)gh-1092
Diffstat (limited to 'lib/compilers/python.js')
-rw-r--r-- | lib/compilers/python.js | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/compilers/python.js b/lib/compilers/python.js index 085e5a193..c1e9836f9 100644 --- a/lib/compilers/python.js +++ b/lib/compilers/python.js @@ -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']; |