Commit f97b28f8 authored by leszeks's avatar leszeks Committed by Commit bot

[compiler] Put shared function marking behind a flag

This lets us investigate regressions caused by this marking while
letting others continue their work without being impacted.

BUG=v8:5512

Review-Url: https://codereview.chromium.org/2446673002
Cr-Commit-Position: refs/heads/master@{#40563}
parent c6722aea
......@@ -978,6 +978,8 @@ MaybeHandle<Code> GetLazyCode(Handle<JSFunction> function) {
}
if (function->shared()->was_marked_for_optimization()) {
DCHECK(FLAG_optimize_shared_functions);
function->shared()->set_was_marked_for_optimization(false);
if (FLAG_trace_opt) {
......
......@@ -275,6 +275,8 @@ DEFINE_BOOL(track_field_types, true, "track field types")
DEFINE_IMPLICATION(track_field_types, track_fields)
DEFINE_IMPLICATION(track_field_types, track_heap_object_fields)
DEFINE_BOOL(smi_binop, true, "support smi representation in binary operations")
DEFINE_BOOL(optimize_shared_functions, false,
"mark shared functions for optimization")
// Flags for optimization types.
DEFINE_BOOL(optimize_for_size, false,
......
......@@ -12212,9 +12212,11 @@ void JSFunction::MarkForOptimization() {
void JSFunction::AttemptConcurrentOptimization() {
// Mark the shared function for optimization regardless of whether the
// optimization is concurrent or not.
shared()->set_was_marked_for_optimization(true);
if (FLAG_optimize_shared_functions) {
// Mark the shared function for optimization regardless of whether the
// optimization is concurrent or not.
shared()->set_was_marked_for_optimization(true);
}
Isolate* isolate = GetIsolate();
if (!isolate->concurrent_recompilation_enabled() ||
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment