Skip to content

Commit

Permalink
avoid emit end label in inline expansion when not used
Browse files Browse the repository at this point in the history
  • Loading branch information
NotFound committed Jun 30, 2013
1 parent eb8fc8d commit 28c5110
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions winxedst2.winxed
Expand Up @@ -11657,7 +11657,10 @@ class InlinedBlock : BlockStatement

function getendlabel()
{
return self.endlabel;
var endlabel = self.endlabel;
if (endlabel == null)
self.endlabel = endlabel = self.genlabel();
return string(endlabel);
}
function getrettype()
{
Expand All @@ -11675,7 +11678,6 @@ class InlinedBlock : BlockStatement
{
if (e.getDebug())
e.comment("inlined start");
self.endlabel = self.genlabel();
var params = self.params;
var args = self.args;
int nparams = params == null ? 0 : elements(params);
Expand All @@ -11699,7 +11701,9 @@ class InlinedBlock : BlockStatement
}
e.print(join("", transform(self.usedsubids, [], emit_subid)));
self.body.emit(e);
e.emitlabel(self.endlabel);
var endlabel = self.endlabel;
if (endlabel != null)
e.emitlabel(endlabel);
}
function emit(var e, string result)
{
Expand Down

0 comments on commit 28c5110

Please sign in to comment.