Skip to content

Instantly share code, notes, and snippets.

@syg
Created March 9, 2013 19:39
Show Gist options
  • Save syg/5125461 to your computer and use it in GitHub Desktop.
Save syg/5125461 to your computer and use it in GitHub Desktop.
diff --git a/js/src/ion/Ion.cpp b/js/src/ion/Ion.cpp
index 8766100..b6c667c 100644
--- a/js/src/ion/Ion.cpp
+++ b/js/src/ion/Ion.cpp
@@ -1428,7 +1428,8 @@ Compile(JSContext *cx, HandleScript script, HandleFunction fun, jsbytecode *osrP
return Method_Compiled;
}
- if (executionMode == SequentialExecution) {
+ switch (executionMode) {
+ case SequentialExecution:
if (cx->methodJitEnabled) {
// If JM is enabled we use getUseCount instead of incUseCount to avoid
// bumping the use count twice.
@@ -1439,6 +1440,12 @@ Compile(JSContext *cx, HandleScript script, HandleFunction fun, jsbytecode *osrP
if (script->incUseCount() < js_IonOptions.usesBeforeCompileNoJaeger)
return Method_Skipped;
}
+ break;
+ case ParallelExecution:
+ // Bump the use count, but do not use it as a heuristic here.
+ if (!cx->methodJitEnabled)
+ script->incUseCount();
+ break;
}
AbortReason reason = IonCompile(cx, script, fun, osrPc, constructing, compileContext);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment