Make filter for optimized code sharing finer.

R=titzer@chromium.org

Review URL: https://codereview.chromium.org/506793003

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23417 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent defea14c
......@@ -138,6 +138,7 @@ void CompilationInfo::Initialize(Isolate* isolate,
abort_due_to_dependency_ = false;
if (script_->type()->value() == Script::TYPE_NATIVE) MarkAsNative();
if (isolate_->debug()->is_active()) MarkAsDebug();
if (FLAG_context_specialization) MarkAsContextSpecializing();
if (!shared_info_.is_null()) {
DCHECK(strict_mode() == SLOPPY);
......@@ -1145,7 +1146,7 @@ static void InsertCodeIntoOptimizedCodeMap(CompilationInfo* info) {
if (code->kind() != Code::OPTIMIZED_FUNCTION) return; // Nothing to do.
// Context specialization folds-in the context, so no sharing can occur.
if (code->is_turbofanned() && FLAG_context_specialization) return;
if (code->is_turbofanned() && info->is_context_specializing()) return;
// Cache optimized code.
if (FLAG_cache_optimized_code) {
......
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