| 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/isolate.h" | 5 #include "src/isolate.h" |
| 6 | 6 |
| 7 #include <stdlib.h> | 7 #include <stdlib.h> |
| 8 | 8 |
| 9 #include <fstream> // NOLINT(readability/streams) | 9 #include <fstream> // NOLINT(readability/streams) |
| 10 #include <sstream> | 10 #include <sstream> |
| (...skipping 2681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2692 logger_->SetUp(this); | 2692 logger_->SetUp(this); |
| 2693 | 2693 |
| 2694 // Initialize other runtime facilities | 2694 // Initialize other runtime facilities |
| 2695 #if defined(USE_SIMULATOR) | 2695 #if defined(USE_SIMULATOR) |
| 2696 #if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_MIPS || \ | 2696 #if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_MIPS || \ |
| 2697 V8_TARGET_ARCH_MIPS64 || V8_TARGET_ARCH_PPC || V8_TARGET_ARCH_S390 | 2697 V8_TARGET_ARCH_MIPS64 || V8_TARGET_ARCH_PPC || V8_TARGET_ARCH_S390 |
| 2698 Simulator::Initialize(this); | 2698 Simulator::Initialize(this); |
| 2699 #endif | 2699 #endif |
| 2700 #endif | 2700 #endif |
| 2701 | 2701 |
| 2702 code_aging_helper_ = new CodeAgingHelper(this); | |
| 2703 | |
| 2704 { // NOLINT | 2702 { // NOLINT |
| 2705 // Ensure that the thread has a valid stack guard. The v8::Locker object | 2703 // Ensure that the thread has a valid stack guard. The v8::Locker object |
| 2706 // will ensure this too, but we don't have to use lockers if we are only | 2704 // will ensure this too, but we don't have to use lockers if we are only |
| 2707 // using one thread. | 2705 // using one thread. |
| 2708 ExecutionAccess lock(this); | 2706 ExecutionAccess lock(this); |
| 2709 stack_guard_.InitThread(lock); | 2707 stack_guard_.InitThread(lock); |
| 2710 } | 2708 } |
| 2711 | 2709 |
| 2712 // SetUp the object heap. | 2710 // SetUp the object heap. |
| 2713 DCHECK(!heap_.HasBeenSetUp()); | 2711 DCHECK(!heap_.HasBeenSetUp()); |
| 2714 if (!heap_.SetUp()) { | 2712 if (!heap_.SetUp()) { |
| 2715 V8::FatalProcessOutOfMemory("heap setup"); | 2713 V8::FatalProcessOutOfMemory("heap setup"); |
| 2716 return false; | 2714 return false; |
| 2717 } | 2715 } |
| 2718 | 2716 |
| 2717 code_aging_helper_ = new CodeAgingHelper(this); |
| 2718 |
| 2719 // Initialize the interface descriptors ahead of time. | 2719 // Initialize the interface descriptors ahead of time. |
| 2720 #define INTERFACE_DESCRIPTOR(V) \ | 2720 #define INTERFACE_DESCRIPTOR(V) \ |
| 2721 { V##Descriptor(this); } | 2721 { V##Descriptor(this); } |
| 2722 INTERFACE_DESCRIPTOR_LIST(INTERFACE_DESCRIPTOR) | 2722 INTERFACE_DESCRIPTOR_LIST(INTERFACE_DESCRIPTOR) |
| 2723 #undef INTERFACE_DESCRIPTOR | 2723 #undef INTERFACE_DESCRIPTOR |
| 2724 | 2724 |
| 2725 deoptimizer_data_ = new DeoptimizerData(heap()->memory_allocator()); | 2725 deoptimizer_data_ = new DeoptimizerData(heap()->memory_allocator()); |
| 2726 | 2726 |
| 2727 const bool create_heap_objects = (des == NULL); | 2727 const bool create_heap_objects = (des == NULL); |
| 2728 if (create_heap_objects && !heap_.CreateHeapObjects()) { | 2728 if (create_heap_objects && !heap_.CreateHeapObjects()) { |
| (...skipping 1010 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3739 // Then check whether this scope intercepts. | 3739 // Then check whether this scope intercepts. |
| 3740 if ((flag & intercept_mask_)) { | 3740 if ((flag & intercept_mask_)) { |
| 3741 intercepted_flags_ |= flag; | 3741 intercepted_flags_ |= flag; |
| 3742 return true; | 3742 return true; |
| 3743 } | 3743 } |
| 3744 return false; | 3744 return false; |
| 3745 } | 3745 } |
| 3746 | 3746 |
| 3747 } // namespace internal | 3747 } // namespace internal |
| 3748 } // namespace v8 | 3748 } // namespace v8 |
| OLD | NEW |