主权项 |
1. A computer-implemented method for optimizing code, the method comprising the steps of:
identifying a variable declaration in a source code file; identifying a variable associated with the variable declaration; determining, by one or more computer processors, a location of first use of the variable in the source code file; determining, by one or more computer processors, an empty line located preceding the location of first use of the variable in the source code file; and moving the variable declaration to the empty line. |