1. A method of restoring synchronization to program code comprising: determining if a class object has been dynamically loaded; performing an escape analysis on the program code; determining if assumptions made during an initial escape analysis are valid; and restoring synchronization to at least a portion of the program code affected by loading of the class object if the assumptions made during the initial escape analysis are no longer valid.