986 ) { |
986 ) { |
987 return method_code; |
987 return method_code; |
988 } |
988 } |
989 if (method->is_not_compilable(comp_level)) return NULL; |
989 if (method->is_not_compilable(comp_level)) return NULL; |
990 |
990 |
991 nmethod* saved = CodeCache::find_and_remove_saved_code(method()); |
991 if (UseCodeCacheFlushing) { |
992 if (saved != NULL) { |
992 nmethod* saved = CodeCache::find_and_remove_saved_code(method()); |
993 method->set_code(method, saved); |
993 if (saved != NULL) { |
994 return saved; |
994 method->set_code(method, saved); |
|
995 return saved; |
|
996 } |
995 } |
997 } |
996 |
998 |
997 } else { |
999 } else { |
998 // osr compilation |
1000 // osr compilation |
999 #ifndef TIERED |
1001 #ifndef TIERED |