aboutsummaryrefslogtreecommitdiff
path: root/lib/compilers/pascal.js
diff options
context:
space:
mode:
authorPartouf <partouf@gmail.com>2018-11-05 14:24:52 +0100
committerPartouf <partouf@gmail.com>2018-11-06 12:56:36 +0100
commit2a6e10ccb5d281f1fb606a524d67a9044e119605 (patch)
tree4131b1860771dad99bef14154a6d1f708c1d1bca /lib/compilers/pascal.js
parentad98a4895bb9b824be2a7fb910016b3ecc0cc29e (diff)
downloadcompiler-explorer-2a6e10ccb5d281f1fb606a524d67a9044e119605.tar.gz
compiler-explorer-2a6e10ccb5d281f1fb606a524d67a9044e119605.zip
attempt at seperating compilation and execution
Diffstat (limited to 'lib/compilers/pascal.js')
-rw-r--r--lib/compilers/pascal.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/compilers/pascal.js b/lib/compilers/pascal.js
index 19ada7285..5af3bf8ef 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"]);
@@ -148,7 +152,7 @@ class FPCCompiler extends BaseCompiler {
execBinary(executable, result, maxSize) {
executable = path.join(path.dirname(executable), "prog");
- super.execBinary(executable, result, maxSize);
+ return super.execBinary(executable, result, maxSize);
}
getArgumentParser() {