aboutsummaryrefslogtreecommitdiff
path: root/lib/compilers/pascal.js
diff options
context:
space:
mode:
authorRabsRincon <ruben@rinconblanco.es>2019-03-24 20:31:42 +0100
committerRabsRincon <ruben@rinconblanco.es>2019-03-24 20:31:42 +0100
commit27eccb968da99394e0b069f6b93e665c8a62da61 (patch)
tree0c4b95ceebce22fecfe34e8fc49377b0294ef090 /lib/compilers/pascal.js
parent2b06ad9a5f44a6765ac171cbea8011ce2fd12197 (diff)
parent9410c2a0abee595c9f8edd29bd38733d16fbc044 (diff)
downloadcompiler-explorer-27eccb968da99394e0b069f6b93e665c8a62da61.tar.gz
compiler-explorer-27eccb968da99394e0b069f6b93e665c8a62da61.zip
Merge branch 'master' into policy-dating
Diffstat (limited to 'lib/compilers/pascal.js')
-rw-r--r--lib/compilers/pascal.js12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/compilers/pascal.js b/lib/compilers/pascal.js
index 19ada7285..d9f027749 100644
--- a/lib/compilers/pascal.js
+++ b/lib/compilers/pascal.js
@@ -74,6 +74,10 @@ class FPCCompiler extends BaseCompiler {
return path.join(dirPath, `${path.basename(this.compileFilename, this.lang.extensions[0])}.s`);
}
+ getExecutableFilename(dirPath) {
+ return path.join(dirPath, "prog");
+ }
+
static preProcessBinaryAsm(input) {
const relevantAsmStartsAt = input.indexOf("<OUTPUT");
if (relevantAsmStartsAt !== -1) {
@@ -92,7 +96,7 @@ class FPCCompiler extends BaseCompiler {
}
objdump(outputFilename, result, maxSize, intelAsm, demangle) {
- outputFilename = path.join(path.dirname(outputFilename), "prog");
+ outputFilename = this.getExecutableFilename(path.dirname(outputFilename));
let args = ["-d", outputFilename, "-l", "--insn-width=16"];
if (demangle) args = args.concat(["-C"]);
if (intelAsm) args = args.concat(["-M", "intel"]);
@@ -146,13 +150,13 @@ class FPCCompiler extends BaseCompiler {
}
execBinary(executable, result, maxSize) {
- executable = path.join(path.dirname(executable), "prog");
+ executable = this.getExecutableFilename(path.dirname(executable));
- super.execBinary(executable, result, maxSize);
+ return super.execBinary(executable, result, maxSize);
}
getArgumentParser() {
- return argumentParsers.Base;
+ return argumentParsers.Pascal;
}
getExtraAsmHint(asm) {