| 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/base/platform/platform.h" |
| 10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
| 11 #include "src/compiler/instruction.h" | 11 #include "src/compiler/pipeline.h" |
| 12 #include "src/debug.h" | 12 #include "src/debug.h" |
| 13 #include "src/deoptimizer.h" | 13 #include "src/deoptimizer.h" |
| 14 #include "src/elements.h" | 14 #include "src/elements.h" |
| 15 #include "src/frames.h" | 15 #include "src/frames.h" |
| 16 #include "src/heap-profiler.h" | 16 #include "src/heap-profiler.h" |
| 17 #include "src/hydrogen.h" | 17 #include "src/hydrogen.h" |
| 18 #include "src/isolate.h" | 18 #include "src/isolate.h" |
| 19 #include "src/lithium-allocator.h" | 19 #include "src/lithium-allocator.h" |
| 20 #include "src/objects.h" | 20 #include "src/objects.h" |
| 21 #include "src/runtime-profiler.h" | 21 #include "src/runtime-profiler.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 41 if (isolate->IsInitialized()) return true; | 41 if (isolate->IsInitialized()) return true; |
| 42 | 42 |
| 43 return isolate->Init(des); | 43 return isolate->Init(des); |
| 44 } | 44 } |
| 45 | 45 |
| 46 | 46 |
| 47 void V8::TearDown() { | 47 void V8::TearDown() { |
| 48 Bootstrapper::TearDownExtensions(); | 48 Bootstrapper::TearDownExtensions(); |
| 49 ElementsAccessor::TearDown(); | 49 ElementsAccessor::TearDown(); |
| 50 LOperand::TearDownCaches(); | 50 LOperand::TearDownCaches(); |
| 51 compiler::InstructionOperand::TearDownCaches(); | 51 compiler::Pipeline::TearDown(); |
| 52 ExternalReference::TearDownMathExpData(); | 52 ExternalReference::TearDownMathExpData(); |
| 53 RegisteredExtension::UnregisterAll(); | 53 RegisteredExtension::UnregisterAll(); |
| 54 Isolate::GlobalTearDown(); | 54 Isolate::GlobalTearDown(); |
| 55 | 55 |
| 56 Sampler::TearDown(); | 56 Sampler::TearDown(); |
| 57 } | 57 } |
| 58 | 58 |
| 59 | 59 |
| 60 void V8::SetReturnAddressLocationResolver( | 60 void V8::SetReturnAddressLocationResolver( |
| 61 ReturnAddressLocationResolver resolver) { | 61 ReturnAddressLocationResolver resolver) { |
| (...skipping 21 matching lines...) Expand all Loading... |
| 83 CpuFeatures::Probe(false); | 83 CpuFeatures::Probe(false); |
| 84 init_memcopy_functions(); | 84 init_memcopy_functions(); |
| 85 // The custom exp implementation needs 16KB of lookup data; initialize it | 85 // The custom exp implementation needs 16KB of lookup data; initialize it |
| 86 // on demand. | 86 // on demand. |
| 87 init_fast_sqrt_function(); | 87 init_fast_sqrt_function(); |
| 88 #ifdef _WIN64 | 88 #ifdef _WIN64 |
| 89 init_modulo_function(); | 89 init_modulo_function(); |
| 90 #endif | 90 #endif |
| 91 ElementsAccessor::InitializeOncePerProcess(); | 91 ElementsAccessor::InitializeOncePerProcess(); |
| 92 LOperand::SetUpCaches(); | 92 LOperand::SetUpCaches(); |
| 93 compiler::InstructionOperand::SetUpCaches(); | 93 compiler::Pipeline::SetUp(); |
| 94 SetUpJSCallerSavedCodeData(); | 94 SetUpJSCallerSavedCodeData(); |
| 95 ExternalReference::SetUp(); | 95 ExternalReference::SetUp(); |
| 96 Bootstrapper::InitializeOncePerProcess(); | 96 Bootstrapper::InitializeOncePerProcess(); |
| 97 } | 97 } |
| 98 | 98 |
| 99 | 99 |
| 100 void V8::InitializeOncePerProcess() { | 100 void V8::InitializeOncePerProcess() { |
| 101 base::CallOnce(&init_once, &InitializeOncePerProcessImpl); | 101 base::CallOnce(&init_once, &InitializeOncePerProcessImpl); |
| 102 } | 102 } |
| 103 | 103 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 114 platform_ = NULL; | 114 platform_ = NULL; |
| 115 } | 115 } |
| 116 | 116 |
| 117 | 117 |
| 118 v8::Platform* V8::GetCurrentPlatform() { | 118 v8::Platform* V8::GetCurrentPlatform() { |
| 119 DCHECK(platform_); | 119 DCHECK(platform_); |
| 120 return platform_; | 120 return platform_; |
| 121 } | 121 } |
| 122 | 122 |
| 123 } } // namespace v8::internal | 123 } } // namespace v8::internal |
| OLD | NEW |