зеркало из https://github.com/mozilla/pjs.git
* 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:
Родитель
dca471f970
Коммит
ef54ffb244
|
@ -1244,7 +1244,7 @@ public class Context {
|
||||||
*/
|
*/
|
||||||
public void setGeneratingDebug(boolean generatingDebug) {
|
public void setGeneratingDebug(boolean generatingDebug) {
|
||||||
generatingDebugChanged = true;
|
generatingDebugChanged = true;
|
||||||
if (generatingDebug)
|
if (generatingDebug && getOptimizationLevel() > 0)
|
||||||
setOptimizationLevel(0);
|
setOptimizationLevel(0);
|
||||||
this.generatingDebug = generatingDebug;
|
this.generatingDebug = generatingDebug;
|
||||||
}
|
}
|
||||||
|
@ -1618,9 +1618,8 @@ public class Context {
|
||||||
if (isCachingEnabled && !cachingEnabled) {
|
if (isCachingEnabled && !cachingEnabled) {
|
||||||
// Caching is being turned off. Empty caches.
|
// Caching is being turned off. Empty caches.
|
||||||
JavaMembers.classTable = new Hashtable();
|
JavaMembers.classTable = new Hashtable();
|
||||||
ClassNameHelper nameHelper = getNameHelper();
|
if (savedNameHelper != null)
|
||||||
if (nameHelper != null)
|
savedNameHelper.reset();
|
||||||
nameHelper.reset();
|
|
||||||
}
|
}
|
||||||
isCachingEnabled = cachingEnabled;
|
isCachingEnabled = cachingEnabled;
|
||||||
FunctionObject.setCachingEnabled(cachingEnabled);
|
FunctionObject.setCachingEnabled(cachingEnabled);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче