aboutsummaryrefslogtreecommitdiff
path: root/src/jsifier.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/jsifier.js')
-rw-r--r--src/jsifier.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/jsifier.js b/src/jsifier.js
index a4d7b96e..69bc7d1e 100644
--- a/src/jsifier.js
+++ b/src/jsifier.js
@@ -260,6 +260,7 @@ function JSify(data) {
if (!block.entry && block.entries.length == 1) block.entry = block.entries[0];
dprint('relooping', 'walking block: ' + block.type + ',' + block.entry + ',' + block.entries + ' : ' + block.labels.length);
function getLabelLines(label, indent) {
+ if (!label) return '';
var ret = '';
if (LABEL_DEBUG) {
ret += indent + "print(INDENT + '" + func.ident + ":" + label.ident + "');\n";
@@ -427,7 +428,7 @@ function JSify(data) {
if (label[0] == 'B') {
if (label[1] == 'R') {
assert(oldLabel);
- return '__label__ = ' + getLabelId(oldLabel) + '; ' + // TODO: optimize away
+ return '__label__ = ' + getLabelId(oldLabel) + '; /* ' + label + ' */' + // TODO: optimize away
'break ' + label.substr(5) + ';';
} else if (label[1] == 'C') {
return 'continue ' + label.substr(5) + ';';
@@ -435,7 +436,7 @@ function JSify(data) {
return ';'; // Returning no text might confuse this parser
}
} else {
- return '__label__ = ' + getLabelId(label) + '; break;';
+ return '__label__ = ' + getLabelId(label) + '; /* ' + label + ' */ break;';
}
}