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

Side by Side Diff: src/ic/arm64/access-compiler-arm64.cc

Issue 2389313002: Avoid static initializers in PropertyAccessCompiler (Closed)
Patch Set: Ports Created 4 years, 2 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 | « src/ic/arm/access-compiler-arm.cc ('k') | src/ic/ia32/access-compiler-ia32.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 #if V8_TARGET_ARCH_ARM64 5 #if V8_TARGET_ARCH_ARM64
6 6
7 #include "src/ic/access-compiler.h" 7 #include "src/ic/access-compiler.h"
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
11 11
12 #define __ ACCESS_MASM(masm) 12 #define __ ACCESS_MASM(masm)
13 13
14 14
15 void PropertyAccessCompiler::GenerateTailCall(MacroAssembler* masm, 15 void PropertyAccessCompiler::GenerateTailCall(MacroAssembler* masm,
16 Handle<Code> code) { 16 Handle<Code> code) {
17 __ Jump(code, RelocInfo::CODE_TARGET); 17 __ Jump(code, RelocInfo::CODE_TARGET);
18 } 18 }
19 19
20 20
21 // TODO(all): The so-called scratch registers are significant in some cases. For 21 // TODO(all): The so-called scratch registers are significant in some cases. For
22 // example, PropertyAccessCompiler::keyed_store_calling_convention()[3] (x3) is 22 // example, PropertyAccessCompiler::keyed_store_calling_convention()[3] (x3) is
23 // actually 23 // actually
24 // used for KeyedStoreCompiler::transition_map(). We should verify which 24 // used for KeyedStoreCompiler::transition_map(). We should verify which
25 // registers are actually scratch registers, and which are important. For now, 25 // registers are actually scratch registers, and which are important. For now,
26 // we use the same assignments as ARM to remain on the safe side. 26 // we use the same assignments as ARM to remain on the safe side.
27 27
28 Register* PropertyAccessCompiler::load_calling_convention() { 28 void PropertyAccessCompiler::InitializePlatformSpecific(
29 // receiver, name, scratch1, scratch2, scratch3. 29 AccessCompilerData* data) {
30 Register receiver = LoadDescriptor::ReceiverRegister(); 30 Register receiver = LoadDescriptor::ReceiverRegister();
31 Register name = LoadDescriptor::NameRegister(); 31 Register name = LoadDescriptor::NameRegister();
32 static Register registers[] = {receiver, name, x3, x0, x4}; 32
33 return registers; 33 // Load calling convention.
34 // receiver, name, scratch1, scratch2, scratch3.
35 Register load_registers[] = {receiver, name, x3, x0, x4};
36
37 // Store calling convention.
38 // receiver, name, scratch1, scratch2.
39 Register store_registers[] = {receiver, name, x3, x4};
40
41 data->Initialize(arraysize(load_registers), load_registers,
42 arraysize(store_registers), store_registers);
34 } 43 }
35 44
36
37 Register* PropertyAccessCompiler::store_calling_convention() {
38 // receiver, value, scratch1, scratch2.
39 Register receiver = StoreDescriptor::ReceiverRegister();
40 Register name = StoreDescriptor::NameRegister();
41 static Register registers[] = {receiver, name, x3, x4};
42 return registers;
43 }
44
45
46 #undef __ 45 #undef __
47 } // namespace internal 46 } // namespace internal
48 } // namespace v8 47 } // namespace v8
49 48
50 #endif // V8_TARGET_ARCH_ARM64 49 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/ic/arm/access-compiler-arm.cc ('k') | src/ic/ia32/access-compiler-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698