| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/assembler.h" | 7 #include "src/assembler.h" |
| 8 #include "src/base/once.h" | 8 #include "src/base/once.h" |
| 9 #include "src/base/platform/platform.h" |
| 9 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
| 10 #include "src/debug.h" | 11 #include "src/debug.h" |
| 11 #include "src/deoptimizer.h" | 12 #include "src/deoptimizer.h" |
| 12 #include "src/elements.h" | 13 #include "src/elements.h" |
| 13 #include "src/frames.h" | 14 #include "src/frames.h" |
| 14 #include "src/heap-profiler.h" | 15 #include "src/heap-profiler.h" |
| 15 #include "src/hydrogen.h" | 16 #include "src/hydrogen.h" |
| 16 #include "src/isolate.h" | 17 #include "src/isolate.h" |
| 17 #ifdef V8_USE_DEFAULT_PLATFORM | 18 #ifdef V8_USE_DEFAULT_PLATFORM |
| 18 #include "src/libplatform/default-platform.h" | 19 #include "src/libplatform/default-platform.h" |
| 19 #endif | 20 #endif |
| 20 #include "src/lithium-allocator.h" | 21 #include "src/lithium-allocator.h" |
| 21 #include "src/objects.h" | 22 #include "src/objects.h" |
| 22 #include "src/platform.h" | |
| 23 #include "src/runtime-profiler.h" | 23 #include "src/runtime-profiler.h" |
| 24 #include "src/sampler.h" | 24 #include "src/sampler.h" |
| 25 #include "src/serialize.h" | 25 #include "src/serialize.h" |
| 26 #include "src/store-buffer.h" | 26 #include "src/store-buffer.h" |
| 27 | 27 |
| 28 namespace v8 { | 28 namespace v8 { |
| 29 namespace internal { | 29 namespace internal { |
| 30 | 30 |
| 31 V8_DECLARE_ONCE(init_once); | 31 V8_DECLARE_ONCE(init_once); |
| 32 | 32 |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 // Avoid random seeds in predictable mode. | 83 // Avoid random seeds in predictable mode. |
| 84 FLAG_random_seed = 12347; | 84 FLAG_random_seed = 12347; |
| 85 } | 85 } |
| 86 | 86 |
| 87 if (FLAG_stress_compaction) { | 87 if (FLAG_stress_compaction) { |
| 88 FLAG_force_marking_deque_overflows = true; | 88 FLAG_force_marking_deque_overflows = true; |
| 89 FLAG_gc_global = true; | 89 FLAG_gc_global = true; |
| 90 FLAG_max_semi_space_size = 1; | 90 FLAG_max_semi_space_size = 1; |
| 91 } | 91 } |
| 92 | 92 |
| 93 OS::Initialize(FLAG_random_seed, FLAG_hard_abort, FLAG_gc_fake_mmap); | 93 base::OS::Initialize(FLAG_random_seed, FLAG_hard_abort, FLAG_gc_fake_mmap); |
| 94 | 94 |
| 95 #ifdef V8_USE_DEFAULT_PLATFORM | 95 #ifdef V8_USE_DEFAULT_PLATFORM |
| 96 platform_ = new DefaultPlatform; | 96 platform_ = new DefaultPlatform; |
| 97 #endif | 97 #endif |
| 98 Sampler::SetUp(); | 98 Sampler::SetUp(); |
| 99 CpuFeatures::Probe(false); | 99 CpuFeatures::Probe(false); |
| 100 init_memcopy_functions(); | 100 init_memcopy_functions(); |
| 101 // The custom exp implementation needs 16KB of lookup data; initialize it | 101 // The custom exp implementation needs 16KB of lookup data; initialize it |
| 102 // on demand. | 102 // on demand. |
| 103 init_fast_sqrt_function(); | 103 init_fast_sqrt_function(); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 129 platform_ = NULL; | 129 platform_ = NULL; |
| 130 } | 130 } |
| 131 | 131 |
| 132 | 132 |
| 133 v8::Platform* V8::GetCurrentPlatform() { | 133 v8::Platform* V8::GetCurrentPlatform() { |
| 134 ASSERT(platform_); | 134 ASSERT(platform_); |
| 135 return platform_; | 135 return platform_; |
| 136 } | 136 } |
| 137 | 137 |
| 138 } } // namespace v8::internal | 138 } } // namespace v8::internal |
| OLD | NEW |