Reviewers: titzer,

Description:
Make filter for optimized code sharing finer.

[email protected]

Please review this at https://codereview.chromium.org/506793003/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+2, -1 lines):
  M src/compiler.cc


Index: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index 68055889dc99cac8894d32b834c17005d6ce2533..0b75c8991ba044d426f8fa15b766e460c796acf2 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -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) {


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to