| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/globals.h" | 5 #include "vm/globals.h" |
| 6 #if defined(TARGET_ARCH_X64) | 6 #if defined(TARGET_ARCH_X64) |
| 7 | 7 |
| 8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
| 9 #include "vm/heap.h" | 9 #include "vm/heap.h" |
| 10 #include "vm/memory_region.h" | 10 #include "vm/memory_region.h" |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 patchable_pool_entries_(), | 71 patchable_pool_entries_(), |
| 72 prologue_offset_(-1), | 72 prologue_offset_(-1), |
| 73 comments_() { | 73 comments_() { |
| 74 // Far branching mode is only needed and implemented for MIPS and ARM. | 74 // Far branching mode is only needed and implemented for MIPS and ARM. |
| 75 ASSERT(!use_far_branches); | 75 ASSERT(!use_far_branches); |
| 76 if (Isolate::Current() != Dart::vm_isolate()) { | 76 if (Isolate::Current() != Dart::vm_isolate()) { |
| 77 object_pool_ = GrowableObjectArray::New(Heap::kOld); | 77 object_pool_ = GrowableObjectArray::New(Heap::kOld); |
| 78 | 78 |
| 79 // These objects and labels need to be accessible through every pool-pointer | 79 // These objects and labels need to be accessible through every pool-pointer |
| 80 // at the same index. | 80 // at the same index. |
| 81 object_pool_.Add(Object::Handle(), Heap::kOld); | 81 object_pool_.Add(Object::null_object(), Heap::kOld); |
| 82 patchable_pool_entries_.Add(kNotPatchable); | 82 patchable_pool_entries_.Add(kNotPatchable); |
| 83 | 83 |
| 84 object_pool_.Add(Bool::True(), Heap::kOld); | 84 object_pool_.Add(Bool::True(), Heap::kOld); |
| 85 patchable_pool_entries_.Add(kNotPatchable); | 85 patchable_pool_entries_.Add(kNotPatchable); |
| 86 | 86 |
| 87 object_pool_.Add(Bool::False(), Heap::kOld); | 87 object_pool_.Add(Bool::False(), Heap::kOld); |
| 88 patchable_pool_entries_.Add(kNotPatchable); | 88 patchable_pool_entries_.Add(kNotPatchable); |
| 89 | 89 |
| 90 if (StubCode::UpdateStoreBuffer_entry() != NULL) { | 90 if (StubCode::UpdateStoreBuffer_entry() != NULL) { |
| 91 FindExternalLabel(&StubCode::UpdateStoreBufferLabel(), kNotPatchable); | 91 FindExternalLabel(&StubCode::UpdateStoreBufferLabel(), kNotPatchable); |
| 92 patchable_pool_entries_.Add(kNotPatchable); | 92 patchable_pool_entries_.Add(kNotPatchable); |
| 93 } else { | 93 } else { |
| 94 object_pool_.Add(Object::Handle(), Heap::kOld); | 94 object_pool_.Add(Object::null_object(), Heap::kOld); |
| 95 patchable_pool_entries_.Add(kNotPatchable); | 95 patchable_pool_entries_.Add(kNotPatchable); |
| 96 } | 96 } |
| 97 | 97 |
| 98 if (StubCode::CallToRuntime_entry() != NULL) { | 98 if (StubCode::CallToRuntime_entry() != NULL) { |
| 99 FindExternalLabel(&StubCode::CallToRuntimeLabel(), kNotPatchable); | 99 FindExternalLabel(&StubCode::CallToRuntimeLabel(), kNotPatchable); |
| 100 patchable_pool_entries_.Add(kNotPatchable); | 100 patchable_pool_entries_.Add(kNotPatchable); |
| 101 } else { | 101 } else { |
| 102 object_pool_.Add(Object::Handle(), Heap::kOld); | 102 object_pool_.Add(Object::null_object(), Heap::kOld); |
| 103 patchable_pool_entries_.Add(kNotPatchable); | 103 patchable_pool_entries_.Add(kNotPatchable); |
| 104 } | 104 } |
| 105 } | 105 } |
| 106 } | 106 } |
| 107 | 107 |
| 108 | 108 |
| 109 void Assembler::InitializeMemoryWithBreakpoints(uword data, int length) { | 109 void Assembler::InitializeMemoryWithBreakpoints(uword data, int length) { |
| 110 memset(reinterpret_cast<void*>(data), Instr::kBreakPointInstruction, length); | 110 memset(reinterpret_cast<void*>(data), Instr::kBreakPointInstruction, length); |
| 111 } | 111 } |
| 112 | 112 |
| (...skipping 2748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2861 | 2861 |
| 2862 | 2862 |
| 2863 const char* Assembler::FpuRegisterName(FpuRegister reg) { | 2863 const char* Assembler::FpuRegisterName(FpuRegister reg) { |
| 2864 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters)); | 2864 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters)); |
| 2865 return xmm_reg_names[reg]; | 2865 return xmm_reg_names[reg]; |
| 2866 } | 2866 } |
| 2867 | 2867 |
| 2868 } // namespace dart | 2868 } // namespace dart |
| 2869 | 2869 |
| 2870 #endif // defined TARGET_ARCH_X64 | 2870 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |