Moved FlagList::EnforceFlagImplications to V8::InitializeOncePerProcessImpl.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13442 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent a1e2d62a
...@@ -63,8 +63,6 @@ static EntropySource entropy_source; ...@@ -63,8 +63,6 @@ static EntropySource entropy_source;
bool V8::Initialize(Deserializer* des) { bool V8::Initialize(Deserializer* des) {
FlagList::EnforceFlagImplications();
InitializeOncePerProcess(); InitializeOncePerProcess();
// The current thread may not yet had entered an isolate to run. // The current thread may not yet had entered an isolate to run.
...@@ -263,31 +261,20 @@ Object* V8::FillHeapNumberWithRandom(Object* heap_number, ...@@ -263,31 +261,20 @@ Object* V8::FillHeapNumberWithRandom(Object* heap_number,
} }
void V8::InitializeOncePerProcessImpl() { void V8::InitializeOncePerProcessImpl() {
OS::SetUp(); FlagList::EnforceFlagImplications();
use_crankshaft_ = FLAG_crankshaft;
if (Serializer::enabled()) {
use_crankshaft_ = false;
}
CPU::SetUp();
if (!CPU::SupportsCrankshaft()) {
use_crankshaft_ = false;
}
OS::PostSetUp();
RuntimeProfiler::GlobalSetUp();
ElementsAccessor::InitializeOncePerProcess();
if (FLAG_stress_compaction) { if (FLAG_stress_compaction) {
FLAG_force_marking_deque_overflows = true; FLAG_force_marking_deque_overflows = true;
FLAG_gc_global = true; FLAG_gc_global = true;
FLAG_max_new_space_size = (1 << (kPageSizeBits - 10)) * 2; FLAG_max_new_space_size = (1 << (kPageSizeBits - 10)) * 2;
} }
OS::SetUp();
CPU::SetUp();
use_crankshaft_ = FLAG_crankshaft
&& !Serializer::enabled()
&& CPU::SupportsCrankshaft();
OS::PostSetUp();
RuntimeProfiler::GlobalSetUp();
ElementsAccessor::InitializeOncePerProcess();
LOperand::SetUpCaches(); LOperand::SetUpCaches();
SetUpJSCallerSavedCodeData(); SetUpJSCallerSavedCodeData();
SamplerRegistry::SetUp(); SamplerRegistry::SetUp();
......
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