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

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

Issue 1238143002: [stubs] Optimize LoadGlobalViaContextStub and StoreGlobalViaContextStub. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: ia32 port. small x64 beautification. Created 5 years, 5 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
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/interface-descriptors.h" 7 #include "src/interface-descriptors.h"
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 Register registers[] = {ReceiverRegister(), NameRegister(), ValueRegister(), 105 Register registers[] = {ReceiverRegister(), NameRegister(), ValueRegister(),
106 MapRegister()}; 106 MapRegister()};
107 data->InitializePlatformSpecific(arraysize(registers), registers); 107 data->InitializePlatformSpecific(arraysize(registers), registers);
108 } 108 }
109 109
110 110
111 Type::FunctionType* 111 Type::FunctionType*
112 LoadGlobalViaContextDescriptor::BuildCallInterfaceDescriptorFunctionType( 112 LoadGlobalViaContextDescriptor::BuildCallInterfaceDescriptorFunctionType(
113 Isolate* isolate, int paramater_count) { 113 Isolate* isolate, int paramater_count) {
114 Type::FunctionType* function = Type::FunctionType::New( 114 Type::FunctionType* function = Type::FunctionType::New(
115 AnyTagged(), Type::Undefined(), 3, isolate->interface_descriptor_zone()); 115 AnyTagged(), Type::Undefined(), 2, isolate->interface_descriptor_zone());
116 function->InitParameter(0, SmiType()); 116 function->InitParameter(0, UntaggedSigned32());
117 function->InitParameter(1, SmiType()); 117 function->InitParameter(1, AnyTagged());
118 function->InitParameter(2, AnyTagged());
119 return function; 118 return function;
120 } 119 }
121 120
122 121
123 void LoadGlobalViaContextDescriptor::InitializePlatformSpecific( 122 void LoadGlobalViaContextDescriptor::InitializePlatformSpecific(
124 CallInterfaceDescriptorData* data) { 123 CallInterfaceDescriptorData* data) {
125 Register registers[] = {DepthRegister(), SlotRegister(), NameRegister()}; 124 Register registers[] = {SlotRegister(), NameRegister()};
126 data->InitializePlatformSpecific(arraysize(registers), registers); 125 data->InitializePlatformSpecific(arraysize(registers), registers);
127 } 126 }
128 127
129 128
130 Type::FunctionType* 129 Type::FunctionType*
131 StoreGlobalViaContextDescriptor::BuildCallInterfaceDescriptorFunctionType( 130 StoreGlobalViaContextDescriptor::BuildCallInterfaceDescriptorFunctionType(
132 Isolate* isolate, int paramater_count) { 131 Isolate* isolate, int paramater_count) {
133 Type::FunctionType* function = Type::FunctionType::New( 132 Type::FunctionType* function = Type::FunctionType::New(
134 AnyTagged(), Type::Undefined(), 5, isolate->interface_descriptor_zone()); 133 AnyTagged(), Type::Undefined(), 3, isolate->interface_descriptor_zone());
135 function->InitParameter(0, SmiType()); 134 function->InitParameter(0, UntaggedSigned32());
136 function->InitParameter(1, SmiType()); 135 function->InitParameter(1, AnyTagged());
137 function->InitParameter(2, AnyTagged()); 136 function->InitParameter(2, AnyTagged());
138 function->InitParameter(3, AnyTagged());
139 return function; 137 return function;
140 } 138 }
141 139
142 140
143 void StoreGlobalViaContextDescriptor::InitializePlatformSpecific( 141 void StoreGlobalViaContextDescriptor::InitializePlatformSpecific(
144 CallInterfaceDescriptorData* data) { 142 CallInterfaceDescriptorData* data) {
145 Register registers[] = {DepthRegister(), SlotRegister(), NameRegister(), 143 Register registers[] = {SlotRegister(), NameRegister(), ValueRegister()};
146 ValueRegister()};
147 data->InitializePlatformSpecific(arraysize(registers), registers); 144 data->InitializePlatformSpecific(arraysize(registers), registers);
148 } 145 }
149 146
150 147
151 void ElementTransitionAndStoreDescriptor::InitializePlatformSpecific( 148 void ElementTransitionAndStoreDescriptor::InitializePlatformSpecific(
152 CallInterfaceDescriptorData* data) { 149 CallInterfaceDescriptorData* data) {
153 Register registers[] = {ValueRegister(), MapRegister(), NameRegister(), 150 Register registers[] = {ValueRegister(), MapRegister(), NameRegister(),
154 ReceiverRegister()}; 151 ReceiverRegister()};
155 data->InitializePlatformSpecific(arraysize(registers), registers); 152 data->InitializePlatformSpecific(arraysize(registers), registers);
156 } 153 }
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 AnyTagged(), Type::Undefined(), 5, isolate->interface_descriptor_zone()); 416 AnyTagged(), Type::Undefined(), 5, isolate->interface_descriptor_zone());
420 function->InitParameter(0, Type::Receiver()); 417 function->InitParameter(0, Type::Receiver());
421 function->InitParameter(1, SmiType()); 418 function->InitParameter(1, SmiType());
422 function->InitParameter(2, AnyTagged()); 419 function->InitParameter(2, AnyTagged());
423 function->InitParameter(3, AnyTagged()); 420 function->InitParameter(3, AnyTagged());
424 function->InitParameter(4, AnyTagged()); 421 function->InitParameter(4, AnyTagged());
425 return function; 422 return function;
426 } 423 }
427 } // namespace internal 424 } // namespace internal
428 } // namespace v8 425 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698