Bug 1010417 - IonMonkey: Remove the script size limit for offthread compilation, r=jandem

This commit is contained in:
Hannes Verschore 2014-08-19 15:30:59 +02:00
Родитель 300766f367
Коммит 41e126149e
3 изменённых файлов: 2 добавлений и 8 удалений

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

@ -2036,12 +2036,6 @@ CheckScriptSize(JSContext *cx, JSScript* script)
if (!js_JitOptions.limitScriptSize)
return Method_Compiled;
if (script->length() > MAX_OFF_THREAD_SCRIPT_SIZE) {
// Some scripts are so large we never try to Ion compile them.
IonSpew(IonSpew_Abort, "Script too large (%u bytes)", script->length());
return Method_CantCompile;
}
uint32_t numLocalsAndArgs = NumLocalsAndArgs(script);
if (script->length() > MAX_MAIN_THREAD_SCRIPT_SIZE ||

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

@ -15,7 +15,6 @@ namespace jit {
// Longer scripts can only be compiled off thread, as these compilations
// can be expensive and stall the main thread for too long.
static const uint32_t MAX_OFF_THREAD_SCRIPT_SIZE = 100 * 1000;
static const uint32_t MAX_MAIN_THREAD_SCRIPT_SIZE = 2 * 1000;
static const uint32_t MAX_MAIN_THREAD_LOCALS_AND_ARGS = 256;

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

@ -560,7 +560,8 @@ IonBuilderHasHigherPriority(jit::IonBuilder *first, jit::IonBuilder *second)
return !first->script()->hasIonScript();
// A higher useCount indicates a higher priority.
return first->script()->getUseCount() > second->script()->getUseCount();
return first->script()->getUseCount() / first->script()->length() >
second->script()->getUseCount() / second->script()->length();
}
bool