mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
[INFER] Always analyze executed scripts if -a is used, bug 621654.
This commit is contained in:
parent
f868e29684
commit
13b4f981c6
@ -549,15 +549,23 @@ JSScript::typeSetThis(JSContext *cx, js::types::jstype type)
|
||||
JS_ASSERT(cx->typeInferenceEnabled());
|
||||
if (!ensureVarTypes(cx))
|
||||
return false;
|
||||
if (!thisTypes()->hasType(type)) {
|
||||
|
||||
/* Analyze the script regardless if -a was used. */
|
||||
bool analyze = !types && cx->hasRunOption(JSOPTION_METHODJIT_ALWAYS) && !isUncachedEval;
|
||||
|
||||
if (!thisTypes()->hasType(type) || analyze) {
|
||||
js::types::AutoEnterTypeInference enter(cx);
|
||||
|
||||
js::types::InferSpew(js::types::ISpewDynamic, "AddThis: #%u: %s",
|
||||
id(), js::types::TypeString(type));
|
||||
thisTypes()->addType(cx, type);
|
||||
|
||||
if (analyze)
|
||||
js::types::AnalyzeScriptTypes(cx, this);
|
||||
|
||||
return cx->compartment->types.checkPendingRecompiles(cx);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user