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

Side by Side Diff: src/ia32/lithium-ia32.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/ia32/lithium-codegen-ia32.cc ('k') | src/ic/arm/access-compiler-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 #if V8_TARGET_ARCH_IA32 7 #if V8_TARGET_ARCH_IA32
8 8
9 #include "src/hydrogen-osr.h" 9 #include "src/hydrogen-osr.h"
10 #include "src/ia32/lithium-codegen-ia32.h" 10 #include "src/ia32/lithium-codegen-ia32.h"
(...skipping 2089 matching lines...) Expand 10 before | Expand all | Expand 10 after
2100 LInstruction* LChunkBuilder::DoLoadGlobalCell(HLoadGlobalCell* instr) { 2100 LInstruction* LChunkBuilder::DoLoadGlobalCell(HLoadGlobalCell* instr) {
2101 LLoadGlobalCell* result = new(zone()) LLoadGlobalCell; 2101 LLoadGlobalCell* result = new(zone()) LLoadGlobalCell;
2102 return instr->RequiresHoleCheck() 2102 return instr->RequiresHoleCheck()
2103 ? AssignEnvironment(DefineAsRegister(result)) 2103 ? AssignEnvironment(DefineAsRegister(result))
2104 : DefineAsRegister(result); 2104 : DefineAsRegister(result);
2105 } 2105 }
2106 2106
2107 2107
2108 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) { 2108 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) {
2109 LOperand* context = UseFixed(instr->context(), esi); 2109 LOperand* context = UseFixed(instr->context(), esi);
2110 LOperand* global_object = UseFixed(instr->global_object(), 2110 LOperand* global_object =
2111 LoadIC::ReceiverRegister()); 2111 UseFixed(instr->global_object(), LoadConvention::ReceiverRegister());
2112 LOperand* vector = NULL; 2112 LOperand* vector = NULL;
2113 if (FLAG_vector_ics) { 2113 if (FLAG_vector_ics) {
2114 vector = FixedTemp(LoadIC::VectorRegister()); 2114 vector = FixedTemp(FullVectorLoadConvention::VectorRegister());
2115 } 2115 }
2116 2116
2117 LLoadGlobalGeneric* result = 2117 LLoadGlobalGeneric* result =
2118 new(zone()) LLoadGlobalGeneric(context, global_object, vector); 2118 new(zone()) LLoadGlobalGeneric(context, global_object, vector);
2119 return MarkAsCall(DefineFixed(result, eax), instr); 2119 return MarkAsCall(DefineFixed(result, eax), instr);
2120 } 2120 }
2121 2121
2122 2122
2123 LInstruction* LChunkBuilder::DoStoreGlobalCell(HStoreGlobalCell* instr) { 2123 LInstruction* LChunkBuilder::DoStoreGlobalCell(HStoreGlobalCell* instr) {
2124 LStoreGlobalCell* result = 2124 LStoreGlobalCell* result =
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
2161 LOperand* obj = (instr->access().IsExternalMemory() && 2161 LOperand* obj = (instr->access().IsExternalMemory() &&
2162 instr->access().offset() == 0) 2162 instr->access().offset() == 0)
2163 ? UseRegisterOrConstantAtStart(instr->object()) 2163 ? UseRegisterOrConstantAtStart(instr->object())
2164 : UseRegisterAtStart(instr->object()); 2164 : UseRegisterAtStart(instr->object());
2165 return DefineAsRegister(new(zone()) LLoadNamedField(obj)); 2165 return DefineAsRegister(new(zone()) LLoadNamedField(obj));
2166 } 2166 }
2167 2167
2168 2168
2169 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) { 2169 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) {
2170 LOperand* context = UseFixed(instr->context(), esi); 2170 LOperand* context = UseFixed(instr->context(), esi);
2171 LOperand* object = UseFixed(instr->object(), LoadIC::ReceiverRegister()); 2171 LOperand* object =
2172 UseFixed(instr->object(), LoadConvention::ReceiverRegister());
2172 LOperand* vector = NULL; 2173 LOperand* vector = NULL;
2173 if (FLAG_vector_ics) { 2174 if (FLAG_vector_ics) {
2174 vector = FixedTemp(LoadIC::VectorRegister()); 2175 vector = FixedTemp(FullVectorLoadConvention::VectorRegister());
2175 } 2176 }
2176 LLoadNamedGeneric* result = new(zone()) LLoadNamedGeneric( 2177 LLoadNamedGeneric* result = new(zone()) LLoadNamedGeneric(
2177 context, object, vector); 2178 context, object, vector);
2178 return MarkAsCall(DefineFixed(result, eax), instr); 2179 return MarkAsCall(DefineFixed(result, eax), instr);
2179 } 2180 }
2180 2181
2181 2182
2182 LInstruction* LChunkBuilder::DoLoadFunctionPrototype( 2183 LInstruction* LChunkBuilder::DoLoadFunctionPrototype(
2183 HLoadFunctionPrototype* instr) { 2184 HLoadFunctionPrototype* instr) {
2184 return AssignEnvironment(DefineAsRegister( 2185 return AssignEnvironment(DefineAsRegister(
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
2224 // LCodeGen::DoLoadKeyedFixedArray 2225 // LCodeGen::DoLoadKeyedFixedArray
2225 instr->RequiresHoleCheck()) { 2226 instr->RequiresHoleCheck()) {
2226 result = AssignEnvironment(result); 2227 result = AssignEnvironment(result);
2227 } 2228 }
2228 return result; 2229 return result;
2229 } 2230 }
2230 2231
2231 2232
2232 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { 2233 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) {
2233 LOperand* context = UseFixed(instr->context(), esi); 2234 LOperand* context = UseFixed(instr->context(), esi);
2234 LOperand* object = UseFixed(instr->object(), LoadIC::ReceiverRegister()); 2235 LOperand* object =
2235 LOperand* key = UseFixed(instr->key(), LoadIC::NameRegister()); 2236 UseFixed(instr->object(), LoadConvention::ReceiverRegister());
2237 LOperand* key = UseFixed(instr->key(), LoadConvention::NameRegister());
2236 LOperand* vector = NULL; 2238 LOperand* vector = NULL;
2237 if (FLAG_vector_ics) { 2239 if (FLAG_vector_ics) {
2238 vector = FixedTemp(LoadIC::VectorRegister()); 2240 vector = FixedTemp(FullVectorLoadConvention::VectorRegister());
2239 } 2241 }
2240 LLoadKeyedGeneric* result = 2242 LLoadKeyedGeneric* result =
2241 new(zone()) LLoadKeyedGeneric(context, object, key, vector); 2243 new(zone()) LLoadKeyedGeneric(context, object, key, vector);
2242 return MarkAsCall(DefineFixed(result, eax), instr); 2244 return MarkAsCall(DefineFixed(result, eax), instr);
2243 } 2245 }
2244 2246
2245 2247
2246 LOperand* LChunkBuilder::GetStoreKeyedValueOperand(HStoreKeyed* instr) { 2248 LOperand* LChunkBuilder::GetStoreKeyedValueOperand(HStoreKeyed* instr) {
2247 ElementsKind elements_kind = instr->elements_kind(); 2249 ElementsKind elements_kind = instr->elements_kind();
2248 2250
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
2309 instr->key()->representation(), elements_kind); 2311 instr->key()->representation(), elements_kind);
2310 LOperand* key = clobbers_key 2312 LOperand* key = clobbers_key
2311 ? UseTempRegister(instr->key()) 2313 ? UseTempRegister(instr->key())
2312 : UseRegisterOrConstantAtStart(instr->key()); 2314 : UseRegisterOrConstantAtStart(instr->key());
2313 return new(zone()) LStoreKeyed(backing_store, key, val); 2315 return new(zone()) LStoreKeyed(backing_store, key, val);
2314 } 2316 }
2315 2317
2316 2318
2317 LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) { 2319 LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) {
2318 LOperand* context = UseFixed(instr->context(), esi); 2320 LOperand* context = UseFixed(instr->context(), esi);
2319 LOperand* object = UseFixed(instr->object(), 2321 LOperand* object =
2320 KeyedStoreIC::ReceiverRegister()); 2322 UseFixed(instr->object(), StoreConvention::ReceiverRegister());
2321 LOperand* key = UseFixed(instr->key(), KeyedStoreIC::NameRegister()); 2323 LOperand* key = UseFixed(instr->key(), StoreConvention::NameRegister());
2322 LOperand* value = UseFixed(instr->value(), KeyedStoreIC::ValueRegister()); 2324 LOperand* value = UseFixed(instr->value(), StoreConvention::ValueRegister());
2323 2325
2324 DCHECK(instr->object()->representation().IsTagged()); 2326 DCHECK(instr->object()->representation().IsTagged());
2325 DCHECK(instr->key()->representation().IsTagged()); 2327 DCHECK(instr->key()->representation().IsTagged());
2326 DCHECK(instr->value()->representation().IsTagged()); 2328 DCHECK(instr->value()->representation().IsTagged());
2327 2329
2328 LStoreKeyedGeneric* result = 2330 LStoreKeyedGeneric* result =
2329 new(zone()) LStoreKeyedGeneric(context, object, key, value); 2331 new(zone()) LStoreKeyedGeneric(context, object, key, value);
2330 return MarkAsCall(result, instr); 2332 return MarkAsCall(result, instr);
2331 } 2333 }
2332 2334
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
2414 2416
2415 // We need a temporary register for write barrier of the map field. 2417 // We need a temporary register for write barrier of the map field.
2416 LOperand* temp_map = needs_write_barrier_for_map ? TempRegister() : NULL; 2418 LOperand* temp_map = needs_write_barrier_for_map ? TempRegister() : NULL;
2417 2419
2418 return new(zone()) LStoreNamedField(obj, val, temp, temp_map); 2420 return new(zone()) LStoreNamedField(obj, val, temp, temp_map);
2419 } 2421 }
2420 2422
2421 2423
2422 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) { 2424 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) {
2423 LOperand* context = UseFixed(instr->context(), esi); 2425 LOperand* context = UseFixed(instr->context(), esi);
2424 LOperand* object = UseFixed(instr->object(), StoreIC::ReceiverRegister()); 2426 LOperand* object =
2425 LOperand* value = UseFixed(instr->value(), StoreIC::ValueRegister()); 2427 UseFixed(instr->object(), StoreConvention::ReceiverRegister());
2428 LOperand* value = UseFixed(instr->value(), StoreConvention::ValueRegister());
2426 2429
2427 LStoreNamedGeneric* result = 2430 LStoreNamedGeneric* result =
2428 new(zone()) LStoreNamedGeneric(context, object, value); 2431 new(zone()) LStoreNamedGeneric(context, object, value);
2429 return MarkAsCall(result, instr); 2432 return MarkAsCall(result, instr);
2430 } 2433 }
2431 2434
2432 2435
2433 LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) { 2436 LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) {
2434 LOperand* context = UseFixed(instr->context(), esi); 2437 LOperand* context = UseFixed(instr->context(), esi);
2435 LOperand* left = UseFixed(instr->left(), edx); 2438 LOperand* left = UseFixed(instr->left(), edx);
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
2698 LOperand* function = UseRegisterAtStart(instr->function()); 2701 LOperand* function = UseRegisterAtStart(instr->function());
2699 LAllocateBlockContext* result = 2702 LAllocateBlockContext* result =
2700 new(zone()) LAllocateBlockContext(context, function); 2703 new(zone()) LAllocateBlockContext(context, function);
2701 return MarkAsCall(DefineFixed(result, esi), instr); 2704 return MarkAsCall(DefineFixed(result, esi), instr);
2702 } 2705 }
2703 2706
2704 2707
2705 } } // namespace v8::internal 2708 } } // namespace v8::internal
2706 2709
2707 #endif // V8_TARGET_ARCH_IA32 2710 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | src/ic/arm/access-compiler-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698