* Avoid creating a ClassNameHelper when turning caching off.

* When turning debug generation on, don't change opt level from -1 to 0.
This commit is contained in:
nboyd%atg.com 2002-02-07 17:54:57 +00:00
Родитель dca471f970
Коммит ef54ffb244
1 изменённых файлов: 3 добавлений и 4 удалений

Просмотреть файл

@ -1244,7 +1244,7 @@ public class Context {
*/
public void setGeneratingDebug(boolean generatingDebug) {
generatingDebugChanged = true;
if (generatingDebug)
if (generatingDebug && getOptimizationLevel() > 0)
setOptimizationLevel(0);
this.generatingDebug = generatingDebug;
}
@ -1618,9 +1618,8 @@ public class Context {
if (isCachingEnabled && !cachingEnabled) {
// Caching is being turned off. Empty caches.
JavaMembers.classTable = new Hashtable();
ClassNameHelper nameHelper = getNameHelper();
if (nameHelper != null)
nameHelper.reset();
if (savedNameHelper != null)
savedNameHelper.reset();
}
isCachingEnabled = cachingEnabled;
FunctionObject.setCachingEnabled(cachingEnabled);