aboutsummaryrefslogtreecommitdiff
path: root/src/jsifier.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-01-02 11:23:05 -0800
committerAlon Zakai <alonzakai@gmail.com>2012-01-02 11:23:05 -0800
commit52acac245a7599b7b4eba793c2384adaab39a1ff (patch)
tree54bb50303bb0175ab7964d8e027043091bd6b86a /src/jsifier.js
parent8950ba2d235173749bc97da1f635e2a2d7a6bc32 (diff)
do not set label when leaving a multiple with one post-entry, and properly optimize the case of not setting label with new BRNOL branch signature
Diffstat (limited to 'src/jsifier.js')
-rw-r--r--src/jsifier.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/jsifier.js b/src/jsifier.js
index b06b4334..1f4ab7f8 100644
--- a/src/jsifier.js
+++ b/src/jsifier.js
@@ -760,6 +760,9 @@ function JSify(data, functionsOnly, givenFunctions) {
var labelSetting = oldLabel ? '__label__ = ' + getLabelId(oldLabel) + ';' +
(SHOW_LABELS ? ' /* to: ' + cleanLabel(oldLabel) + ' */' : '') : ''; // TODO: optimize away the setting
if (label[1] == 'R') {
+ if (label[2] == 'N') { // BRNOL: break, no label setting
+ labelSetting = '';
+ }
return pre + labelSetting + 'break ' + trueLabel + ';';
} else if (label[1] == 'C') { // CONT
return pre + labelSetting + 'continue ' + trueLabel + ';';