Revision: 13442
Author:   [email protected]
Date:     Mon Jan 21 04:04:40 2013
Log: Moved FlagList::EnforceFlagImplications to V8::InitializeOncePerProcessImpl.

Cleaned up V8::InitializeOncePerProcessImpl a bit on the way.

Review URL: https://codereview.chromium.org/12045005
http://code.google.com/p/v8/source/detail?r=13442

Modified:
 /branches/bleeding_edge/src/v8.cc

=======================================
--- /branches/bleeding_edge/src/v8.cc   Mon Nov 26 05:12:35 2012
+++ /branches/bleeding_edge/src/v8.cc   Mon Jan 21 04:04:40 2013
@@ -63,8 +63,6 @@


 bool V8::Initialize(Deserializer* des) {
-  FlagList::EnforceFlagImplications();
-
   InitializeOncePerProcess();

   // The current thread may not yet had entered an isolate to run.
@@ -263,31 +261,20 @@
 }

 void V8::InitializeOncePerProcessImpl() {
+  FlagList::EnforceFlagImplications();
+  if (FLAG_stress_compaction) {
+    FLAG_force_marking_deque_overflows = true;
+    FLAG_gc_global = true;
+    FLAG_max_new_space_size = (1 << (kPageSizeBits - 10)) * 2;
+  }
   OS::SetUp();
-
-  use_crankshaft_ = FLAG_crankshaft;
-
-  if (Serializer::enabled()) {
-    use_crankshaft_ = false;
-  }
-
   CPU::SetUp();
-  if (!CPU::SupportsCrankshaft()) {
-    use_crankshaft_ = false;
-  }
-
+  use_crankshaft_ = FLAG_crankshaft
+      && !Serializer::enabled()
+      && CPU::SupportsCrankshaft();
   OS::PostSetUp();
-
   RuntimeProfiler::GlobalSetUp();
-
   ElementsAccessor::InitializeOncePerProcess();
-
-  if (FLAG_stress_compaction) {
-    FLAG_force_marking_deque_overflows = true;
-    FLAG_gc_global = true;
-    FLAG_max_new_space_size = (1 << (kPageSizeBits - 10)) * 2;
-  }
-
   LOperand::SetUpCaches();
   SetUpJSCallerSavedCodeData();
   SamplerRegistry::SetUp();

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to