Reviewers: danno,

Message:
PTAL

Description:
Remove redundant set_optimizable() call

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

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

Affected files:
  M     src/objects-inl.h
  M     src/objects.cc


Index: src/objects-inl.h
===================================================================
--- src/objects-inl.h   (revision 15528)
+++ src/objects-inl.h   (working copy)
@@ -4631,8 +4631,8 @@
                                      disable));
   // If disabling optimizations we reflect that in the code object so
   // it will not be counted as optimizable code.
-  if ((code()->kind() == Code::FUNCTION) && disable) {
-    code()->set_optimizable(false);
+  if (code()->kind() == Code::FUNCTION) {
+    code()->set_optimizable(!disable);
   }
 }

@@ -4852,7 +4852,6 @@
     set_optimization_disabled(false);
     set_opt_count(0);
     set_deopt_count(0);
-    code()->set_optimizable(true);
   }
 }

Index: src/objects.cc
===================================================================
--- src/objects.cc      (revision 15528)
+++ src/objects.cc      (working copy)
@@ -9742,9 +9742,6 @@
   // Code should be the lazy compilation stub or else unoptimized.  If the
   // latter, disable optimization for the code too.
ASSERT(code()->kind() == Code::FUNCTION || code()->kind() == Code::BUILTIN);
-  if (code()->kind() == Code::FUNCTION) {
-    code()->set_optimizable(false);
-  }
   if (FLAG_trace_opt) {
     PrintF("[disabled optimization for ");
     ShortPrint();
@@ -9840,7 +9837,6 @@
         opt_count() >= FLAG_max_opt_count) {
// Re-enable optimizations if they were disabled due to opt_count limit.
       set_optimization_disabled(false);
-      code()->set_optimizable(true);
     }
     set_opt_count(0);
     set_deopt_count(0);


--
--
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/groups/opt_out.


Reply via email to