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

Side by Side Diff: src/arm/lithium-arm.cc

Issue 527093002: Make concrete classes for individual call descriptors. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE. 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
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/arm/lithium-codegen-arm.h" 7 #include "src/arm/lithium-codegen-arm.h"
8 #include "src/hydrogen-osr.h" 8 #include "src/hydrogen-osr.h"
9 #include "src/lithium-inl.h" 9 #include "src/lithium-inl.h"
10 10
(...skipping 1064 matching lines...) Expand 10 before | Expand all | Expand 10 after
1075 LOperand* function = UseFixed(instr->function(), r1); 1075 LOperand* function = UseFixed(instr->function(), r1);
1076 1076
1077 LCallJSFunction* result = new(zone()) LCallJSFunction(function); 1077 LCallJSFunction* result = new(zone()) LCallJSFunction(function);
1078 1078
1079 return MarkAsCall(DefineFixed(result, r0), instr); 1079 return MarkAsCall(DefineFixed(result, r0), instr);
1080 } 1080 }
1081 1081
1082 1082
1083 LInstruction* LChunkBuilder::DoCallWithDescriptor( 1083 LInstruction* LChunkBuilder::DoCallWithDescriptor(
1084 HCallWithDescriptor* instr) { 1084 HCallWithDescriptor* instr) {
1085 const CallInterfaceDescriptor* descriptor = instr->descriptor(); 1085 CallInterfaceDescriptor descriptor = instr->descriptor();
1086 1086
1087 LOperand* target = UseRegisterOrConstantAtStart(instr->target()); 1087 LOperand* target = UseRegisterOrConstantAtStart(instr->target());
1088 ZoneList<LOperand*> ops(instr->OperandCount(), zone()); 1088 ZoneList<LOperand*> ops(instr->OperandCount(), zone());
1089 ops.Add(target, zone()); 1089 ops.Add(target, zone());
1090 for (int i = 1; i < instr->OperandCount(); i++) { 1090 for (int i = 1; i < instr->OperandCount(); i++) {
1091 LOperand* op = UseFixed(instr->OperandAt(i), 1091 LOperand* op =
1092 descriptor->GetParameterRegister(i - 1)); 1092 UseFixed(instr->OperandAt(i), descriptor.GetParameterRegister(i - 1));
1093 ops.Add(op, zone()); 1093 ops.Add(op, zone());
1094 } 1094 }
1095 1095
1096 LCallWithDescriptor* result = new(zone()) LCallWithDescriptor( 1096 LCallWithDescriptor* result = new(zone()) LCallWithDescriptor(
1097 descriptor, ops, zone()); 1097 descriptor, ops, zone());
1098 return MarkAsCall(DefineFixed(result, r0), instr); 1098 return MarkAsCall(DefineFixed(result, r0), instr);
1099 } 1099 }
1100 1100
1101 1101
1102 LInstruction* LChunkBuilder::DoInvokeFunction(HInvokeFunction* instr) { 1102 LInstruction* LChunkBuilder::DoInvokeFunction(HInvokeFunction* instr) {
(...skipping 993 matching lines...) Expand 10 before | Expand all | Expand 10 after
2096 LLoadGlobalCell* result = new(zone()) LLoadGlobalCell; 2096 LLoadGlobalCell* result = new(zone()) LLoadGlobalCell;
2097 return instr->RequiresHoleCheck() 2097 return instr->RequiresHoleCheck()
2098 ? AssignEnvironment(DefineAsRegister(result)) 2098 ? AssignEnvironment(DefineAsRegister(result))
2099 : DefineAsRegister(result); 2099 : DefineAsRegister(result);
2100 } 2100 }
2101 2101
2102 2102
2103 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) { 2103 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) {
2104 LOperand* context = UseFixed(instr->context(), cp); 2104 LOperand* context = UseFixed(instr->context(), cp);
2105 LOperand* global_object = 2105 LOperand* global_object =
2106 UseFixed(instr->global_object(), LoadConvention::ReceiverRegister()); 2106 UseFixed(instr->global_object(), LoadDescriptor::ReceiverRegister());
2107 LOperand* vector = NULL; 2107 LOperand* vector = NULL;
2108 if (FLAG_vector_ics) { 2108 if (FLAG_vector_ics) {
2109 vector = FixedTemp(FullVectorLoadConvention::VectorRegister()); 2109 vector = FixedTemp(VectorLoadICDescriptor::VectorRegister());
2110 } 2110 }
2111 LLoadGlobalGeneric* result = 2111 LLoadGlobalGeneric* result =
2112 new(zone()) LLoadGlobalGeneric(context, global_object, vector); 2112 new(zone()) LLoadGlobalGeneric(context, global_object, vector);
2113 return MarkAsCall(DefineFixed(result, r0), instr); 2113 return MarkAsCall(DefineFixed(result, r0), instr);
2114 } 2114 }
2115 2115
2116 2116
2117 LInstruction* LChunkBuilder::DoStoreGlobalCell(HStoreGlobalCell* instr) { 2117 LInstruction* LChunkBuilder::DoStoreGlobalCell(HStoreGlobalCell* instr) {
2118 LOperand* value = UseRegister(instr->value()); 2118 LOperand* value = UseRegister(instr->value());
2119 // Use a temp to check the value in the cell in the case where we perform 2119 // Use a temp to check the value in the cell in the case where we perform
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
2155 2155
2156 LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) { 2156 LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) {
2157 LOperand* obj = UseRegisterAtStart(instr->object()); 2157 LOperand* obj = UseRegisterAtStart(instr->object());
2158 return DefineAsRegister(new(zone()) LLoadNamedField(obj)); 2158 return DefineAsRegister(new(zone()) LLoadNamedField(obj));
2159 } 2159 }
2160 2160
2161 2161
2162 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) { 2162 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) {
2163 LOperand* context = UseFixed(instr->context(), cp); 2163 LOperand* context = UseFixed(instr->context(), cp);
2164 LOperand* object = 2164 LOperand* object =
2165 UseFixed(instr->object(), LoadConvention::ReceiverRegister()); 2165 UseFixed(instr->object(), LoadDescriptor::ReceiverRegister());
2166 LOperand* vector = NULL; 2166 LOperand* vector = NULL;
2167 if (FLAG_vector_ics) { 2167 if (FLAG_vector_ics) {
2168 vector = FixedTemp(FullVectorLoadConvention::VectorRegister()); 2168 vector = FixedTemp(VectorLoadICDescriptor::VectorRegister());
2169 } 2169 }
2170 2170
2171 LInstruction* result = 2171 LInstruction* result =
2172 DefineFixed(new(zone()) LLoadNamedGeneric(context, object, vector), r0); 2172 DefineFixed(new(zone()) LLoadNamedGeneric(context, object, vector), r0);
2173 return MarkAsCall(result, instr); 2173 return MarkAsCall(result, instr);
2174 } 2174 }
2175 2175
2176 2176
2177 LInstruction* LChunkBuilder::DoLoadFunctionPrototype( 2177 LInstruction* LChunkBuilder::DoLoadFunctionPrototype(
2178 HLoadFunctionPrototype* instr) { 2178 HLoadFunctionPrototype* instr) {
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
2221 instr->RequiresHoleCheck()) { 2221 instr->RequiresHoleCheck()) {
2222 result = AssignEnvironment(result); 2222 result = AssignEnvironment(result);
2223 } 2223 }
2224 return result; 2224 return result;
2225 } 2225 }
2226 2226
2227 2227
2228 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { 2228 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) {
2229 LOperand* context = UseFixed(instr->context(), cp); 2229 LOperand* context = UseFixed(instr->context(), cp);
2230 LOperand* object = 2230 LOperand* object =
2231 UseFixed(instr->object(), LoadConvention::ReceiverRegister()); 2231 UseFixed(instr->object(), LoadDescriptor::ReceiverRegister());
2232 LOperand* key = UseFixed(instr->key(), LoadConvention::NameRegister()); 2232 LOperand* key = UseFixed(instr->key(), LoadDescriptor::NameRegister());
2233 LOperand* vector = NULL; 2233 LOperand* vector = NULL;
2234 if (FLAG_vector_ics) { 2234 if (FLAG_vector_ics) {
2235 vector = FixedTemp(FullVectorLoadConvention::VectorRegister()); 2235 vector = FixedTemp(VectorLoadICDescriptor::VectorRegister());
2236 } 2236 }
2237 2237
2238 LInstruction* result = 2238 LInstruction* result =
2239 DefineFixed(new(zone()) LLoadKeyedGeneric(context, object, key, vector), 2239 DefineFixed(new(zone()) LLoadKeyedGeneric(context, object, key, vector),
2240 r0); 2240 r0);
2241 return MarkAsCall(result, instr); 2241 return MarkAsCall(result, instr);
2242 } 2242 }
2243 2243
2244 2244
2245 LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) { 2245 LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) {
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
2282 LOperand* val = UseRegister(instr->value()); 2282 LOperand* val = UseRegister(instr->value());
2283 LOperand* key = UseRegisterOrConstantAtStart(instr->key()); 2283 LOperand* key = UseRegisterOrConstantAtStart(instr->key());
2284 LOperand* backing_store = UseRegister(instr->elements()); 2284 LOperand* backing_store = UseRegister(instr->elements());
2285 return new(zone()) LStoreKeyed(backing_store, key, val); 2285 return new(zone()) LStoreKeyed(backing_store, key, val);
2286 } 2286 }
2287 2287
2288 2288
2289 LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) { 2289 LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) {
2290 LOperand* context = UseFixed(instr->context(), cp); 2290 LOperand* context = UseFixed(instr->context(), cp);
2291 LOperand* obj = 2291 LOperand* obj =
2292 UseFixed(instr->object(), StoreConvention::ReceiverRegister()); 2292 UseFixed(instr->object(), StoreDescriptor::ReceiverRegister());
2293 LOperand* key = UseFixed(instr->key(), StoreConvention::NameRegister()); 2293 LOperand* key = UseFixed(instr->key(), StoreDescriptor::NameRegister());
2294 LOperand* val = UseFixed(instr->value(), StoreConvention::ValueRegister()); 2294 LOperand* val = UseFixed(instr->value(), StoreDescriptor::ValueRegister());
2295 2295
2296 DCHECK(instr->object()->representation().IsTagged()); 2296 DCHECK(instr->object()->representation().IsTagged());
2297 DCHECK(instr->key()->representation().IsTagged()); 2297 DCHECK(instr->key()->representation().IsTagged());
2298 DCHECK(instr->value()->representation().IsTagged()); 2298 DCHECK(instr->value()->representation().IsTagged());
2299 2299
2300 return MarkAsCall( 2300 return MarkAsCall(
2301 new(zone()) LStoreKeyedGeneric(context, obj, key, val), instr); 2301 new(zone()) LStoreKeyedGeneric(context, obj, key, val), instr);
2302 } 2302 }
2303 2303
2304 2304
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
2359 // We need a temporary register for write barrier of the map field. 2359 // We need a temporary register for write barrier of the map field.
2360 LOperand* temp = needs_write_barrier_for_map ? TempRegister() : NULL; 2360 LOperand* temp = needs_write_barrier_for_map ? TempRegister() : NULL;
2361 2361
2362 return new(zone()) LStoreNamedField(obj, val, temp); 2362 return new(zone()) LStoreNamedField(obj, val, temp);
2363 } 2363 }
2364 2364
2365 2365
2366 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) { 2366 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) {
2367 LOperand* context = UseFixed(instr->context(), cp); 2367 LOperand* context = UseFixed(instr->context(), cp);
2368 LOperand* obj = 2368 LOperand* obj =
2369 UseFixed(instr->object(), StoreConvention::ReceiverRegister()); 2369 UseFixed(instr->object(), StoreDescriptor::ReceiverRegister());
2370 LOperand* val = UseFixed(instr->value(), StoreConvention::ValueRegister()); 2370 LOperand* val = UseFixed(instr->value(), StoreDescriptor::ValueRegister());
2371 2371
2372 LInstruction* result = new(zone()) LStoreNamedGeneric(context, obj, val); 2372 LInstruction* result = new(zone()) LStoreNamedGeneric(context, obj, val);
2373 return MarkAsCall(result, instr); 2373 return MarkAsCall(result, instr);
2374 } 2374 }
2375 2375
2376 2376
2377 LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) { 2377 LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) {
2378 LOperand* context = UseFixed(instr->context(), cp); 2378 LOperand* context = UseFixed(instr->context(), cp);
2379 LOperand* left = UseFixed(instr->left(), r1); 2379 LOperand* left = UseFixed(instr->left(), r1);
2380 LOperand* right = UseFixed(instr->right(), r0); 2380 LOperand* right = UseFixed(instr->right(), r0);
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
2625 LInstruction* LChunkBuilder::DoAllocateBlockContext( 2625 LInstruction* LChunkBuilder::DoAllocateBlockContext(
2626 HAllocateBlockContext* instr) { 2626 HAllocateBlockContext* instr) {
2627 LOperand* context = UseFixed(instr->context(), cp); 2627 LOperand* context = UseFixed(instr->context(), cp);
2628 LOperand* function = UseRegisterAtStart(instr->function()); 2628 LOperand* function = UseRegisterAtStart(instr->function());
2629 LAllocateBlockContext* result = 2629 LAllocateBlockContext* result =
2630 new(zone()) LAllocateBlockContext(context, function); 2630 new(zone()) LAllocateBlockContext(context, function);
2631 return MarkAsCall(DefineFixed(result, cp), instr); 2631 return MarkAsCall(DefineFixed(result, cp), instr);
2632 } 2632 }
2633 2633
2634 } } // namespace v8::internal 2634 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698