Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Side by Side Diff: runtime/vm/assembler_x64.cc

Issue 1713853003: VM: Share object pool entries for optimized static calls. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/assembler_x64.h ('k') | runtime/vm/code_generator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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" // NOLINT 5 #include "vm/globals.h" // NOLINT
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/cpu.h" 9 #include "vm/cpu.h"
10 #include "vm/heap.h" 10 #include "vm/heap.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 intptr_t call_start = buffer_.GetPosition(); 90 intptr_t call_start = buffer_.GetPosition();
91 const int32_t offset = ObjectPool::element_offset( 91 const int32_t offset = ObjectPool::element_offset(
92 object_pool_wrapper_.FindObject(target, kPatchable)); 92 object_pool_wrapper_.FindObject(target, kPatchable));
93 LoadWordFromPoolOffset(CODE_REG, offset - kHeapObjectTag); 93 LoadWordFromPoolOffset(CODE_REG, offset - kHeapObjectTag);
94 movq(TMP, FieldAddress(CODE_REG, Code::entry_point_offset())); 94 movq(TMP, FieldAddress(CODE_REG, Code::entry_point_offset()));
95 call(TMP); 95 call(TMP);
96 ASSERT((buffer_.GetPosition() - call_start) == kCallExternalLabelSize); 96 ASSERT((buffer_.GetPosition() - call_start) == kCallExternalLabelSize);
97 } 97 }
98 98
99 99
100 void Assembler::CallWithEquivalence(const StubEntry& stub_entry,
101 const Object& equivalence) {
102 ASSERT(constant_pool_allowed());
103 const Code& target = Code::Handle(stub_entry.code());
104 const int32_t offset = ObjectPool::element_offset(
105 object_pool_wrapper_.FindObject(target, equivalence));
106 LoadWordFromPoolOffset(CODE_REG, offset - kHeapObjectTag);
107 movq(TMP, FieldAddress(CODE_REG, Code::entry_point_offset()));
108 call(TMP);
109 }
110
111
100 void Assembler::Call(const StubEntry& stub_entry) { 112 void Assembler::Call(const StubEntry& stub_entry) {
101 ASSERT(constant_pool_allowed()); 113 ASSERT(constant_pool_allowed());
102 const Code& target = Code::Handle(stub_entry.code()); 114 const Code& target = Code::Handle(stub_entry.code());
103 const int32_t offset = ObjectPool::element_offset( 115 const int32_t offset = ObjectPool::element_offset(
104 object_pool_wrapper_.FindObject(target, kNotPatchable)); 116 object_pool_wrapper_.FindObject(target, kNotPatchable));
105 LoadWordFromPoolOffset(CODE_REG, offset - kHeapObjectTag); 117 LoadWordFromPoolOffset(CODE_REG, offset - kHeapObjectTag);
106 movq(TMP, FieldAddress(CODE_REG, Code::entry_point_offset())); 118 movq(TMP, FieldAddress(CODE_REG, Code::entry_point_offset()));
107 call(TMP); 119 call(TMP);
108 } 120 }
109 121
(...skipping 3816 matching lines...) Expand 10 before | Expand all | Expand 10 after
3926 3938
3927 3939
3928 const char* Assembler::FpuRegisterName(FpuRegister reg) { 3940 const char* Assembler::FpuRegisterName(FpuRegister reg) {
3929 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters)); 3941 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters));
3930 return xmm_reg_names[reg]; 3942 return xmm_reg_names[reg];
3931 } 3943 }
3932 3944
3933 } // namespace dart 3945 } // namespace dart
3934 3946
3935 #endif // defined TARGET_ARCH_X64 3947 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/assembler_x64.h ('k') | runtime/vm/code_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698