| 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 23 matching lines...) Expand all Loading... |
| 34 #include "debug.h" | 34 #include "debug.h" |
| 35 #include "deoptimizer.h" | 35 #include "deoptimizer.h" |
| 36 #include "frames.h" | 36 #include "frames.h" |
| 37 #include "heap-profiler.h" | 37 #include "heap-profiler.h" |
| 38 #include "hydrogen.h" | 38 #include "hydrogen.h" |
| 39 #include "lithium-allocator.h" | 39 #include "lithium-allocator.h" |
| 40 #include "log.h" | 40 #include "log.h" |
| 41 #include "objects.h" | 41 #include "objects.h" |
| 42 #include "once.h" | 42 #include "once.h" |
| 43 #include "platform.h" | 43 #include "platform.h" |
| 44 #include "sampler.h" |
| 44 #include "runtime-profiler.h" | 45 #include "runtime-profiler.h" |
| 45 #include "serialize.h" | 46 #include "serialize.h" |
| 46 #include "store-buffer.h" | 47 #include "store-buffer.h" |
| 47 | 48 |
| 48 namespace v8 { | 49 namespace v8 { |
| 49 namespace internal { | 50 namespace internal { |
| 50 | 51 |
| 51 V8_DECLARE_ONCE(init_once); | 52 V8_DECLARE_ONCE(init_once); |
| 52 | 53 |
| 53 bool V8::is_running_ = false; | 54 bool V8::is_running_ = false; |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 ExternalReference::TearDownMathExpData(); | 117 ExternalReference::TearDownMathExpData(); |
| 117 RegisteredExtension::UnregisterAll(); | 118 RegisteredExtension::UnregisterAll(); |
| 118 Isolate::GlobalTearDown(); | 119 Isolate::GlobalTearDown(); |
| 119 | 120 |
| 120 is_running_ = false; | 121 is_running_ = false; |
| 121 has_been_disposed_ = true; | 122 has_been_disposed_ = true; |
| 122 | 123 |
| 123 delete call_completed_callbacks_; | 124 delete call_completed_callbacks_; |
| 124 call_completed_callbacks_ = NULL; | 125 call_completed_callbacks_ = NULL; |
| 125 | 126 |
| 127 Sampler::TearDown(); |
| 126 OS::TearDown(); | 128 OS::TearDown(); |
| 127 } | 129 } |
| 128 | 130 |
| 129 | 131 |
| 130 static void seed_random(uint32_t* state) { | 132 static void seed_random(uint32_t* state) { |
| 131 for (int i = 0; i < 2; ++i) { | 133 for (int i = 0; i < 2; ++i) { |
| 132 if (FLAG_random_seed != 0) { | 134 if (FLAG_random_seed != 0) { |
| 133 state[i] = FLAG_random_seed; | 135 state[i] = FLAG_random_seed; |
| 134 } else if (entropy_source != NULL) { | 136 } else if (entropy_source != NULL) { |
| 135 uint32_t val; | 137 uint32_t val; |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 | 265 |
| 264 void V8::InitializeOncePerProcessImpl() { | 266 void V8::InitializeOncePerProcessImpl() { |
| 265 FlagList::EnforceFlagImplications(); | 267 FlagList::EnforceFlagImplications(); |
| 266 if (FLAG_stress_compaction) { | 268 if (FLAG_stress_compaction) { |
| 267 FLAG_force_marking_deque_overflows = true; | 269 FLAG_force_marking_deque_overflows = true; |
| 268 FLAG_gc_global = true; | 270 FLAG_gc_global = true; |
| 269 FLAG_max_new_space_size = (1 << (kPageSizeBits - 10)) * 2; | 271 FLAG_max_new_space_size = (1 << (kPageSizeBits - 10)) * 2; |
| 270 } | 272 } |
| 271 if (FLAG_trace_hydrogen) FLAG_parallel_recompilation = false; | 273 if (FLAG_trace_hydrogen) FLAG_parallel_recompilation = false; |
| 272 OS::SetUp(); | 274 OS::SetUp(); |
| 275 Sampler::SetUp(); |
| 273 CPU::SetUp(); | 276 CPU::SetUp(); |
| 274 use_crankshaft_ = FLAG_crankshaft | 277 use_crankshaft_ = FLAG_crankshaft |
| 275 && !Serializer::enabled() | 278 && !Serializer::enabled() |
| 276 && CPU::SupportsCrankshaft(); | 279 && CPU::SupportsCrankshaft(); |
| 277 OS::PostSetUp(); | 280 OS::PostSetUp(); |
| 278 ElementsAccessor::InitializeOncePerProcess(); | 281 ElementsAccessor::InitializeOncePerProcess(); |
| 279 LOperand::SetUpCaches(); | 282 LOperand::SetUpCaches(); |
| 280 SetUpJSCallerSavedCodeData(); | 283 SetUpJSCallerSavedCodeData(); |
| 281 SamplerRegistry::SetUp(); | 284 SamplerRegistry::SetUp(); |
| 282 ExternalReference::SetUp(); | 285 ExternalReference::SetUp(); |
| 283 } | 286 } |
| 284 | 287 |
| 285 void V8::InitializeOncePerProcess() { | 288 void V8::InitializeOncePerProcess() { |
| 286 CallOnce(&init_once, &InitializeOncePerProcessImpl); | 289 CallOnce(&init_once, &InitializeOncePerProcessImpl); |
| 287 } | 290 } |
| 288 | 291 |
| 289 } } // namespace v8::internal | 292 } } // namespace v8::internal |
| OLD | NEW |