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

Side by Side Diff: src/ic/x64/access-compiler-x64.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/s390/access-compiler-s390.cc ('k') | src/ic/x87/access-compiler-x87.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_X64 5 #if V8_TARGET_ARCH_X64
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
15 void PropertyAccessCompiler::GenerateTailCall(MacroAssembler* masm, 14 void PropertyAccessCompiler::GenerateTailCall(MacroAssembler* masm,
16 Handle<Code> code) { 15 Handle<Code> code) {
17 __ jmp(code, RelocInfo::CODE_TARGET); 16 __ jmp(code, RelocInfo::CODE_TARGET);
18 } 17 }
19 18
20 19 void PropertyAccessCompiler::InitializePlatformSpecific(
21 Register* PropertyAccessCompiler::load_calling_convention() { 20 AccessCompilerData* data) {
22 // receiver, name, scratch1, scratch2, scratch3.
23 Register receiver = LoadDescriptor::ReceiverRegister(); 21 Register receiver = LoadDescriptor::ReceiverRegister();
24 Register name = LoadDescriptor::NameRegister(); 22 Register name = LoadDescriptor::NameRegister();
25 static Register registers[] = {receiver, name, rax, rbx, rdi}; 23
26 return registers; 24 // Load calling convention.
25 // receiver, name, scratch1, scratch2, scratch3.
26 Register load_registers[] = {receiver, name, rax, rbx, rdi};
27
28 // Store calling convention.
29 // receiver, name, scratch1, scratch2.
30 Register store_registers[] = {receiver, name, rbx, rdi};
31
32 data->Initialize(arraysize(load_registers), load_registers,
33 arraysize(store_registers), store_registers);
27 } 34 }
28 35
29
30 Register* PropertyAccessCompiler::store_calling_convention() {
31 // receiver, name, scratch1, scratch2.
32 Register receiver = StoreDescriptor::ReceiverRegister();
33 Register name = StoreDescriptor::NameRegister();
34 static Register registers[] = {receiver, name, rbx, rdi};
35 return registers;
36 }
37
38
39 #undef __ 36 #undef __
40 } // namespace internal 37 } // namespace internal
41 } // namespace v8 38 } // namespace v8
42 39
43 #endif // V8_TARGET_ARCH_X64 40 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/ic/s390/access-compiler-s390.cc ('k') | src/ic/x87/access-compiler-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698