File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -86,6 +86,8 @@ let alwaysGenerateVarDecl = false
8686*)
8787let addNestedScopeAttr = ref false
8888
89+ let addLoopConditionLabels = ref false
90+
8991(* * Indicates whether we're allowed to duplicate small chunks. *)
9092let allowDuplication: bool ref = ref true
9193
@@ -1258,7 +1260,10 @@ let consLabContinue (c: chunk) =
12581260 | NotWhile lr :: rest -> if ! lr = " " then c else consLabel ! lr c ! currentLoc false
12591261
12601262let consLabLoopCondition (c : chunk ) =
1261- consLabel (newLabelName " __loop_condition" ) c ! currentLoc false
1263+ if ! addLoopConditionLabels then
1264+ consLabel (newLabelName " __loop_condition" ) c ! currentLoc false
1265+ else
1266+ c
12621267
12631268let break_env = Stack. create ()
12641269
Original file line number Diff line number Diff line change @@ -56,6 +56,9 @@ val nocil: int ref
5656*)
5757val addNestedScopeAttr : bool ref
5858
59+ (* * Add [__loop_condition] labels before syntactic loop conditions. *)
60+ val addLoopConditionLabels : bool ref
61+
5962(* * Indicates whether we're allowed to duplicate small chunks of code. *)
6063val allowDuplication : bool ref
6164
You can’t perform that action at this time.
0 commit comments