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

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

Issue 486213003: Move register conventions out of the IC classes. (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
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/arm/lithium-codegen-arm.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/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 2084 matching lines...) Expand 10 before | Expand all | Expand 10 after
2095 LInstruction* LChunkBuilder::DoLoadGlobalCell(HLoadGlobalCell* instr) { 2095 LInstruction* LChunkBuilder::DoLoadGlobalCell(HLoadGlobalCell* instr) {
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 = UseFixed(instr->global_object(), 2105 LOperand* global_object =
2106 LoadIC::ReceiverRegister()); 2106 UseFixed(instr->global_object(), LoadConvention::ReceiverRegister());
2107 LOperand* vector = NULL; 2107 LOperand* vector = NULL;
2108 if (FLAG_vector_ics) { 2108 if (FLAG_vector_ics) {
2109 vector = FixedTemp(LoadIC::VectorRegister()); 2109 vector = FixedTemp(FullVectorLoadConvention::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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
2154 2154
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 = UseFixed(instr->object(), LoadIC::ReceiverRegister()); 2164 LOperand* object =
2165 UseFixed(instr->object(), LoadConvention::ReceiverRegister());
2165 LOperand* vector = NULL; 2166 LOperand* vector = NULL;
2166 if (FLAG_vector_ics) { 2167 if (FLAG_vector_ics) {
2167 vector = FixedTemp(LoadIC::VectorRegister()); 2168 vector = FixedTemp(FullVectorLoadConvention::VectorRegister());
2168 } 2169 }
2169 2170
2170 LInstruction* result = 2171 LInstruction* result =
2171 DefineFixed(new(zone()) LLoadNamedGeneric(context, object, vector), r0); 2172 DefineFixed(new(zone()) LLoadNamedGeneric(context, object, vector), r0);
2172 return MarkAsCall(result, instr); 2173 return MarkAsCall(result, instr);
2173 } 2174 }
2174 2175
2175 2176
2176 LInstruction* LChunkBuilder::DoLoadFunctionPrototype( 2177 LInstruction* LChunkBuilder::DoLoadFunctionPrototype(
2177 HLoadFunctionPrototype* instr) { 2178 HLoadFunctionPrototype* instr) {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
2219 // LCodeGen::DoLoadKeyedFixedArray 2220 // LCodeGen::DoLoadKeyedFixedArray
2220 instr->RequiresHoleCheck()) { 2221 instr->RequiresHoleCheck()) {
2221 result = AssignEnvironment(result); 2222 result = AssignEnvironment(result);
2222 } 2223 }
2223 return result; 2224 return result;
2224 } 2225 }
2225 2226
2226 2227
2227 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { 2228 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) {
2228 LOperand* context = UseFixed(instr->context(), cp); 2229 LOperand* context = UseFixed(instr->context(), cp);
2229 LOperand* object = UseFixed(instr->object(), LoadIC::ReceiverRegister()); 2230 LOperand* object =
2230 LOperand* key = UseFixed(instr->key(), LoadIC::NameRegister()); 2231 UseFixed(instr->object(), LoadConvention::ReceiverRegister());
2232 LOperand* key = UseFixed(instr->key(), LoadConvention::NameRegister());
2231 LOperand* vector = NULL; 2233 LOperand* vector = NULL;
2232 if (FLAG_vector_ics) { 2234 if (FLAG_vector_ics) {
2233 vector = FixedTemp(LoadIC::VectorRegister()); 2235 vector = FixedTemp(FullVectorLoadConvention::VectorRegister());
2234 } 2236 }
2235 2237
2236 LInstruction* result = 2238 LInstruction* result =
2237 DefineFixed(new(zone()) LLoadKeyedGeneric(context, object, key, vector), 2239 DefineFixed(new(zone()) LLoadKeyedGeneric(context, object, key, vector),
2238 r0); 2240 r0);
2239 return MarkAsCall(result, instr); 2241 return MarkAsCall(result, instr);
2240 } 2242 }
2241 2243
2242 2244
2243 LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) { 2245 LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
2279 instr->elements()->representation().IsExternal())); 2281 instr->elements()->representation().IsExternal()));
2280 LOperand* val = UseRegister(instr->value()); 2282 LOperand* val = UseRegister(instr->value());
2281 LOperand* key = UseRegisterOrConstantAtStart(instr->key()); 2283 LOperand* key = UseRegisterOrConstantAtStart(instr->key());
2282 LOperand* backing_store = UseRegister(instr->elements()); 2284 LOperand* backing_store = UseRegister(instr->elements());
2283 return new(zone()) LStoreKeyed(backing_store, key, val); 2285 return new(zone()) LStoreKeyed(backing_store, key, val);
2284 } 2286 }
2285 2287
2286 2288
2287 LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) { 2289 LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) {
2288 LOperand* context = UseFixed(instr->context(), cp); 2290 LOperand* context = UseFixed(instr->context(), cp);
2289 LOperand* obj = UseFixed(instr->object(), KeyedStoreIC::ReceiverRegister()); 2291 LOperand* obj =
2290 LOperand* key = UseFixed(instr->key(), KeyedStoreIC::NameRegister()); 2292 UseFixed(instr->object(), StoreConvention::ReceiverRegister());
2291 LOperand* val = UseFixed(instr->value(), KeyedStoreIC::ValueRegister()); 2293 LOperand* key = UseFixed(instr->key(), StoreConvention::NameRegister());
2294 LOperand* val = UseFixed(instr->value(), StoreConvention::ValueRegister());
2292 2295
2293 DCHECK(instr->object()->representation().IsTagged()); 2296 DCHECK(instr->object()->representation().IsTagged());
2294 DCHECK(instr->key()->representation().IsTagged()); 2297 DCHECK(instr->key()->representation().IsTagged());
2295 DCHECK(instr->value()->representation().IsTagged()); 2298 DCHECK(instr->value()->representation().IsTagged());
2296 2299
2297 return MarkAsCall( 2300 return MarkAsCall(
2298 new(zone()) LStoreKeyedGeneric(context, obj, key, val), instr); 2301 new(zone()) LStoreKeyedGeneric(context, obj, key, val), instr);
2299 } 2302 }
2300 2303
2301 2304
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
2355 2358
2356 // 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.
2357 LOperand* temp = needs_write_barrier_for_map ? TempRegister() : NULL; 2360 LOperand* temp = needs_write_barrier_for_map ? TempRegister() : NULL;
2358 2361
2359 return new(zone()) LStoreNamedField(obj, val, temp); 2362 return new(zone()) LStoreNamedField(obj, val, temp);
2360 } 2363 }
2361 2364
2362 2365
2363 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) { 2366 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) {
2364 LOperand* context = UseFixed(instr->context(), cp); 2367 LOperand* context = UseFixed(instr->context(), cp);
2365 LOperand* obj = UseFixed(instr->object(), StoreIC::ReceiverRegister()); 2368 LOperand* obj =
2366 LOperand* val = UseFixed(instr->value(), StoreIC::ValueRegister()); 2369 UseFixed(instr->object(), StoreConvention::ReceiverRegister());
2370 LOperand* val = UseFixed(instr->value(), StoreConvention::ValueRegister());
2367 2371
2368 LInstruction* result = new(zone()) LStoreNamedGeneric(context, obj, val); 2372 LInstruction* result = new(zone()) LStoreNamedGeneric(context, obj, val);
2369 return MarkAsCall(result, instr); 2373 return MarkAsCall(result, instr);
2370 } 2374 }
2371 2375
2372 2376
2373 LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) { 2377 LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) {
2374 LOperand* context = UseFixed(instr->context(), cp); 2378 LOperand* context = UseFixed(instr->context(), cp);
2375 LOperand* left = UseFixed(instr->left(), r1); 2379 LOperand* left = UseFixed(instr->left(), r1);
2376 LOperand* right = UseFixed(instr->right(), r0); 2380 LOperand* right = UseFixed(instr->right(), r0);
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
2620 LInstruction* LChunkBuilder::DoAllocateBlockContext( 2624 LInstruction* LChunkBuilder::DoAllocateBlockContext(
2621 HAllocateBlockContext* instr) { 2625 HAllocateBlockContext* instr) {
2622 LOperand* context = UseFixed(instr->context(), cp); 2626 LOperand* context = UseFixed(instr->context(), cp);
2623 LOperand* function = UseRegisterAtStart(instr->function()); 2627 LOperand* function = UseRegisterAtStart(instr->function());
2624 LAllocateBlockContext* result = 2628 LAllocateBlockContext* result =
2625 new(zone()) LAllocateBlockContext(context, function); 2629 new(zone()) LAllocateBlockContext(context, function);
2626 return MarkAsCall(DefineFixed(result, cp), instr); 2630 return MarkAsCall(DefineFixed(result, cp), instr);
2627 } 2631 }
2628 2632
2629 } } // namespace v8::internal 2633 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/arm/lithium-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698