A method of translating computer source code into optimized object code.
The computer source code contains a first label statement defining a
first label, a second label statement defining a second label, a third
label statement defining a third label, and a computed goto statement for
instructing a computer to branch to the first label or to the second
label, but not to the third label. The method includes generating a list
of labels contained within at least a portion of the computer source
code. The list of labels includes the first label and the second label,
but not the third label. The method also includes translating the
computer source code into an intermediate language. The translation of
the computer source code includes translating the computed goto statement
into an indirect goto statement within the intermediate language. The
method also includes generating object code that includes the first label
and the second label but does not include the third label.