aboutsummaryrefslogtreecommitdiff
path: root/lib/compilers/java.js
diff options
context:
space:
mode:
authorMatt Godbolt <matt@godbolt.org>2022-12-28 11:42:14 -0600
committerGitHub <noreply@github.com>2022-12-28 11:42:14 -0600
commit749319f7912ff479d25d9afb1e751f4ea704b0e2 (patch)
tree6f1504440fcdaf033dc406d454bb00299b0d8fa6 /lib/compilers/java.js
parentb597095f6ee657e6b1fde4b02f9bb2f61457d225 (diff)
downloadcompiler-explorer-749319f7912ff479d25d9afb1e751f4ea704b0e2.tar.gz
compiler-explorer-749319f7912ff479d25d9afb1e751f4ea704b0e2.zip
Slightly more controversial bumpings (#4503)gh-5552
- latest sentry, tar-stream, which, some yamljs versions - latest eslint-* stuff - latest webpack manifest - Applies all the automatic fixes for newer lint rules - Bump the webpack version applies new tslint stuff
Diffstat (limited to 'lib/compilers/java.js')
-rw-r--r--lib/compilers/java.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/compilers/java.js b/lib/compilers/java.js
index b321fffe1..383f56013 100644
--- a/lib/compilers/java.js
+++ b/lib/compilers/java.js
@@ -81,10 +81,10 @@ export class JavaCompiler extends BaseCompiler {
asm: objResult.stdout,
};
- if (objResult.code !== 0) {
- oneResult.asm = '<No output: javap returned ' + objResult.code + '>';
- } else {
+ if (objResult.code === 0) {
oneResult.objdumpTime = objResult.execTime;
+ } else {
+ oneResult.asm = '<No output: javap returned ' + objResult.code + '>';
}
return oneResult;
}),
@@ -328,11 +328,11 @@ export class JavaCompiler extends BaseCompiler {
currentInstr < method.instructions.length &&
method.instructions[currentInstr].instrOffset !== instrOffset
) {
- if (currentSourceLine !== -1) {
+ if (currentSourceLine === -1) {
+ logger.error('Skipping over instruction even though currentSourceLine == -1');
+ } else {
// instructions without explicit line number get assigned the last explicit/same line number
method.instructions[currentInstr].sourceLine = currentSourceLine;
- } else {
- logger.error('Skipping over instruction even though currentSourceLine == -1');
}
currentInstr++;
}
@@ -343,7 +343,7 @@ export class JavaCompiler extends BaseCompiler {
method.instructions[currentInstr].sourceLine = currentSourceLine;
}
- if (typeof method.startLine === 'undefined') {
+ if (method.startLine === undefined) {
method.startLine = sourceLine;
}
// method.instructions.push({sourceLine: instrOffset});