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

Side by Side Diff: src/interface-descriptors.cc

Issue 532473002: InterfaceDescriptor becomes CallInterfaceDescriptor. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Ports. Created 6 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « src/interface-descriptors.h ('k') | src/x64/interface-descriptors-x64.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 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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/ic/ic-conventions.h" 7 #include "src/ic/ic-conventions.h"
8 #include "src/interface-descriptors.h" 8 #include "src/interface-descriptors.h"
9 9
10 namespace v8 { 10 namespace v8 {
11 namespace internal { 11 namespace internal {
12 12
13 InterfaceDescriptor::InterfaceDescriptor() : register_param_count_(-1) {} 13 void CallInterfaceDescriptor::Initialize(
14
15
16 void InterfaceDescriptor::Initialize(
17 int register_parameter_count, Register* registers, 14 int register_parameter_count, Register* registers,
18 Representation* register_param_representations, 15 Representation* register_param_representations,
19 PlatformInterfaceDescriptor* platform_descriptor) { 16 PlatformInterfaceDescriptor* platform_descriptor) {
20 platform_specific_descriptor_ = platform_descriptor; 17 platform_specific_descriptor_ = platform_descriptor;
21 register_param_count_ = register_parameter_count; 18 register_param_count_ = register_parameter_count;
22 19
23 // An interface descriptor must have a context register. 20 // An interface descriptor must have a context register.
24 DCHECK(register_parameter_count > 0 && registers[0].is(ContextRegister())); 21 DCHECK(register_parameter_count > 0 && registers[0].is(ContextRegister()));
25 22
26 // InterfaceDescriptor owns a copy of the registers array. 23 // InterfaceDescriptor owns a copy of the registers array.
(...skipping 11 matching lines...) Expand all
38 // If there is a context register, the representation must be tagged. 35 // If there is a context register, the representation must be tagged.
39 DCHECK( 36 DCHECK(
40 i != 0 || 37 i != 0 ||
41 register_param_representations[i].Equals(Representation::Tagged())); 38 register_param_representations[i].Equals(Representation::Tagged()));
42 register_param_representations_[i] = register_param_representations[i]; 39 register_param_representations_[i] = register_param_representations[i];
43 } 40 }
44 } 41 }
45 } 42 }
46 43
47 44
48 void CallInterfaceDescriptor::Initialize(
49 int register_parameter_count, Register* registers,
50 Representation* param_representations,
51 PlatformInterfaceDescriptor* platform_descriptor) {
52 InterfaceDescriptor::Initialize(register_parameter_count, registers,
53 param_representations, platform_descriptor);
54 }
55
56
57 void CallDescriptors::InitializeForIsolateAllPlatforms(Isolate* isolate) { 45 void CallDescriptors::InitializeForIsolateAllPlatforms(Isolate* isolate) {
58 { 46 {
59 CallInterfaceDescriptor* descriptor = 47 CallInterfaceDescriptor* descriptor =
60 isolate->call_descriptor(CallDescriptorKey::LoadICCall); 48 isolate->call_descriptor(CallDescriptorKey::LoadICCall);
61 Register registers[] = {InterfaceDescriptor::ContextRegister(), 49 Register registers[] = {CallInterfaceDescriptor::ContextRegister(),
62 LoadConvention::ReceiverRegister(), 50 LoadConvention::ReceiverRegister(),
63 LoadConvention::NameRegister()}; 51 LoadConvention::NameRegister()};
64 descriptor->Initialize(arraysize(registers), registers, NULL); 52 descriptor->Initialize(arraysize(registers), registers, NULL);
65 } 53 }
66 { 54 {
67 CallInterfaceDescriptor* descriptor = 55 CallInterfaceDescriptor* descriptor =
68 isolate->call_descriptor(CallDescriptorKey::StoreICCall); 56 isolate->call_descriptor(CallDescriptorKey::StoreICCall);
69 Register registers[] = {InterfaceDescriptor::ContextRegister(), 57 Register registers[] = {CallInterfaceDescriptor::ContextRegister(),
70 StoreConvention::ReceiverRegister(), 58 StoreConvention::ReceiverRegister(),
71 StoreConvention::NameRegister(), 59 StoreConvention::NameRegister(),
72 StoreConvention::ValueRegister()}; 60 StoreConvention::ValueRegister()};
73 descriptor->Initialize(arraysize(registers), registers, NULL); 61 descriptor->Initialize(arraysize(registers), registers, NULL);
74 } 62 }
75 { 63 {
76 CallInterfaceDescriptor* descriptor = isolate->call_descriptor( 64 CallInterfaceDescriptor* descriptor = isolate->call_descriptor(
77 CallDescriptorKey::ElementTransitionAndStoreCall); 65 CallDescriptorKey::ElementTransitionAndStoreCall);
78 Register registers[] = { 66 Register registers[] = {
79 InterfaceDescriptor::ContextRegister(), 67 CallInterfaceDescriptor::ContextRegister(),
80 StoreConvention::ValueRegister(), StoreConvention::MapRegister(), 68 StoreConvention::ValueRegister(), StoreConvention::MapRegister(),
81 StoreConvention::NameRegister(), StoreConvention::ReceiverRegister()}; 69 StoreConvention::NameRegister(), StoreConvention::ReceiverRegister()};
82 descriptor->Initialize(arraysize(registers), registers, NULL); 70 descriptor->Initialize(arraysize(registers), registers, NULL);
83 } 71 }
84 { 72 {
85 CallInterfaceDescriptor* descriptor = 73 CallInterfaceDescriptor* descriptor =
86 isolate->call_descriptor(CallDescriptorKey::InstanceofCall); 74 isolate->call_descriptor(CallDescriptorKey::InstanceofCall);
87 Register registers[] = {InterfaceDescriptor::ContextRegister(), 75 Register registers[] = {CallInterfaceDescriptor::ContextRegister(),
88 InstanceofConvention::left(), 76 InstanceofConvention::left(),
89 InstanceofConvention::right()}; 77 InstanceofConvention::right()};
90 descriptor->Initialize(arraysize(registers), registers, NULL); 78 descriptor->Initialize(arraysize(registers), registers, NULL);
91 } 79 }
92 { 80 {
93 CallInterfaceDescriptor* descriptor = 81 CallInterfaceDescriptor* descriptor =
94 isolate->call_descriptor(CallDescriptorKey::VectorLoadICCall); 82 isolate->call_descriptor(CallDescriptorKey::VectorLoadICCall);
95 Register registers[] = {InterfaceDescriptor::ContextRegister(), 83 Register registers[] = {CallInterfaceDescriptor::ContextRegister(),
96 FullVectorLoadConvention::ReceiverRegister(), 84 FullVectorLoadConvention::ReceiverRegister(),
97 FullVectorLoadConvention::NameRegister(), 85 FullVectorLoadConvention::NameRegister(),
98 FullVectorLoadConvention::SlotRegister(), 86 FullVectorLoadConvention::SlotRegister(),
99 FullVectorLoadConvention::VectorRegister()}; 87 FullVectorLoadConvention::VectorRegister()};
100 descriptor->Initialize(arraysize(registers), registers, NULL); 88 descriptor->Initialize(arraysize(registers), registers, NULL);
101 } 89 }
102 } 90 }
103 } 91 }
104 } // namespace v8::internal 92 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/interface-descriptors.h ('k') | src/x64/interface-descriptors-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698