OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 | 47 |
48 namespace v8 { | 48 namespace v8 { |
49 namespace internal { | 49 namespace internal { |
50 | 50 |
51 V8_DECLARE_ONCE(init_once); | 51 V8_DECLARE_ONCE(init_once); |
52 | 52 |
53 bool V8::is_running_ = false; | 53 bool V8::is_running_ = false; |
54 bool V8::has_been_set_up_ = false; | 54 bool V8::has_been_set_up_ = false; |
55 bool V8::has_been_disposed_ = false; | 55 bool V8::has_been_disposed_ = false; |
56 bool V8::has_fatal_error_ = false; | 56 bool V8::has_fatal_error_ = false; |
57 bool V8::use_crankshaft_ = true; | |
58 List<CallCompletedCallback>* V8::call_completed_callbacks_ = NULL; | 57 List<CallCompletedCallback>* V8::call_completed_callbacks_ = NULL; |
59 v8::ArrayBuffer::Allocator* V8::array_buffer_allocator_ = NULL; | 58 v8::ArrayBuffer::Allocator* V8::array_buffer_allocator_ = NULL; |
60 | 59 |
61 static LazyMutex entropy_mutex = LAZY_MUTEX_INITIALIZER; | 60 static LazyMutex entropy_mutex = LAZY_MUTEX_INITIALIZER; |
62 | 61 |
63 static EntropySource entropy_source; | 62 static EntropySource entropy_source; |
64 | 63 |
65 | 64 |
66 bool V8::Initialize(Deserializer* des) { | 65 bool V8::Initialize(Deserializer* des) { |
67 InitializeOncePerProcess(); | 66 InitializeOncePerProcess(); |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 | 310 |
312 if (FLAG_concurrent_recompilation && | 311 if (FLAG_concurrent_recompilation && |
313 SystemThreadManager::NumberOfParallelSystemThreads( | 312 SystemThreadManager::NumberOfParallelSystemThreads( |
314 SystemThreadManager::PARALLEL_RECOMPILATION) == 0) { | 313 SystemThreadManager::PARALLEL_RECOMPILATION) == 0) { |
315 FLAG_concurrent_recompilation = false; | 314 FLAG_concurrent_recompilation = false; |
316 } | 315 } |
317 | 316 |
318 OS::SetUp(); | 317 OS::SetUp(); |
319 Sampler::SetUp(); | 318 Sampler::SetUp(); |
320 CPU::SetUp(); | 319 CPU::SetUp(); |
321 use_crankshaft_ = FLAG_crankshaft | |
322 && !Serializer::enabled() | |
323 && CPU::SupportsCrankshaft(); | |
324 OS::PostSetUp(); | 320 OS::PostSetUp(); |
325 ElementsAccessor::InitializeOncePerProcess(); | 321 ElementsAccessor::InitializeOncePerProcess(); |
326 LOperand::SetUpCaches(); | 322 LOperand::SetUpCaches(); |
327 SetUpJSCallerSavedCodeData(); | 323 SetUpJSCallerSavedCodeData(); |
328 ExternalReference::SetUp(); | 324 ExternalReference::SetUp(); |
329 Bootstrapper::InitializeOncePerProcess(); | 325 Bootstrapper::InitializeOncePerProcess(); |
330 } | 326 } |
331 | 327 |
332 | 328 |
333 void V8::InitializeOncePerProcess() { | 329 void V8::InitializeOncePerProcess() { |
334 CallOnce(&init_once, &InitializeOncePerProcessImpl); | 330 CallOnce(&init_once, &InitializeOncePerProcessImpl); |
335 } | 331 } |
336 | 332 |
337 } } // namespace v8::internal | 333 } } // namespace v8::internal |
OLD | NEW |