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

Side by Side Diff: src/x64/lithium-x64.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/x64/lithium-codegen-x64.cc ('k') | tools/gyp/v8.gyp » ('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_X64 7 #if V8_TARGET_ARCH_X64
8 8
9 #include "src/hydrogen-osr.h" 9 #include "src/hydrogen-osr.h"
10 #include "src/lithium-inl.h" 10 #include "src/lithium-inl.h"
(...skipping 2040 matching lines...) Expand 10 before | Expand all | Expand 10 after
2051 LInstruction* LChunkBuilder::DoLoadGlobalCell(HLoadGlobalCell* instr) { 2051 LInstruction* LChunkBuilder::DoLoadGlobalCell(HLoadGlobalCell* instr) {
2052 LLoadGlobalCell* result = new(zone()) LLoadGlobalCell; 2052 LLoadGlobalCell* result = new(zone()) LLoadGlobalCell;
2053 return instr->RequiresHoleCheck() 2053 return instr->RequiresHoleCheck()
2054 ? AssignEnvironment(DefineAsRegister(result)) 2054 ? AssignEnvironment(DefineAsRegister(result))
2055 : DefineAsRegister(result); 2055 : DefineAsRegister(result);
2056 } 2056 }
2057 2057
2058 2058
2059 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) { 2059 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) {
2060 LOperand* context = UseFixed(instr->context(), rsi); 2060 LOperand* context = UseFixed(instr->context(), rsi);
2061 LOperand* global_object = UseFixed(instr->global_object(), 2061 LOperand* global_object =
2062 LoadIC::ReceiverRegister()); 2062 UseFixed(instr->global_object(), LoadConvention::ReceiverRegister());
2063 LOperand* vector = NULL; 2063 LOperand* vector = NULL;
2064 if (FLAG_vector_ics) { 2064 if (FLAG_vector_ics) {
2065 vector = FixedTemp(LoadIC::VectorRegister()); 2065 vector = FixedTemp(FullVectorLoadConvention::VectorRegister());
2066 } 2066 }
2067 2067
2068 LLoadGlobalGeneric* result = 2068 LLoadGlobalGeneric* result =
2069 new(zone()) LLoadGlobalGeneric(context, global_object, vector); 2069 new(zone()) LLoadGlobalGeneric(context, global_object, vector);
2070 return MarkAsCall(DefineFixed(result, rax), instr); 2070 return MarkAsCall(DefineFixed(result, rax), instr);
2071 } 2071 }
2072 2072
2073 2073
2074 LInstruction* LChunkBuilder::DoStoreGlobalCell(HStoreGlobalCell* instr) { 2074 LInstruction* LChunkBuilder::DoStoreGlobalCell(HStoreGlobalCell* instr) {
2075 LOperand* value = UseRegister(instr->value()); 2075 LOperand* value = UseRegister(instr->value());
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
2124 LOperand* obj = UseRegisterOrConstantAtStart(instr->object()); 2124 LOperand* obj = UseRegisterOrConstantAtStart(instr->object());
2125 return DefineFixed(new(zone()) LLoadNamedField(obj), rax); 2125 return DefineFixed(new(zone()) LLoadNamedField(obj), rax);
2126 } 2126 }
2127 LOperand* obj = UseRegisterAtStart(instr->object()); 2127 LOperand* obj = UseRegisterAtStart(instr->object());
2128 return DefineAsRegister(new(zone()) LLoadNamedField(obj)); 2128 return DefineAsRegister(new(zone()) LLoadNamedField(obj));
2129 } 2129 }
2130 2130
2131 2131
2132 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) { 2132 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) {
2133 LOperand* context = UseFixed(instr->context(), rsi); 2133 LOperand* context = UseFixed(instr->context(), rsi);
2134 LOperand* object = UseFixed(instr->object(), LoadIC::ReceiverRegister()); 2134 LOperand* object =
2135 UseFixed(instr->object(), LoadConvention::ReceiverRegister());
2135 LOperand* vector = NULL; 2136 LOperand* vector = NULL;
2136 if (FLAG_vector_ics) { 2137 if (FLAG_vector_ics) {
2137 vector = FixedTemp(LoadIC::VectorRegister()); 2138 vector = FixedTemp(FullVectorLoadConvention::VectorRegister());
2138 } 2139 }
2139 LLoadNamedGeneric* result = new(zone()) LLoadNamedGeneric( 2140 LLoadNamedGeneric* result = new(zone()) LLoadNamedGeneric(
2140 context, object, vector); 2141 context, object, vector);
2141 return MarkAsCall(DefineFixed(result, rax), instr); 2142 return MarkAsCall(DefineFixed(result, rax), instr);
2142 } 2143 }
2143 2144
2144 2145
2145 LInstruction* LChunkBuilder::DoLoadFunctionPrototype( 2146 LInstruction* LChunkBuilder::DoLoadFunctionPrototype(
2146 HLoadFunctionPrototype* instr) { 2147 HLoadFunctionPrototype* instr) {
2147 return AssignEnvironment(DefineAsRegister( 2148 return AssignEnvironment(DefineAsRegister(
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
2215 // LCodeGen::DoLoadKeyedFixedArray 2216 // LCodeGen::DoLoadKeyedFixedArray
2216 instr->RequiresHoleCheck()) { 2217 instr->RequiresHoleCheck()) {
2217 result = AssignEnvironment(result); 2218 result = AssignEnvironment(result);
2218 } 2219 }
2219 return result; 2220 return result;
2220 } 2221 }
2221 2222
2222 2223
2223 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { 2224 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) {
2224 LOperand* context = UseFixed(instr->context(), rsi); 2225 LOperand* context = UseFixed(instr->context(), rsi);
2225 LOperand* object = UseFixed(instr->object(), LoadIC::ReceiverRegister()); 2226 LOperand* object =
2226 LOperand* key = UseFixed(instr->key(), LoadIC::NameRegister()); 2227 UseFixed(instr->object(), LoadConvention::ReceiverRegister());
2228 LOperand* key = UseFixed(instr->key(), LoadConvention::NameRegister());
2227 LOperand* vector = NULL; 2229 LOperand* vector = NULL;
2228 if (FLAG_vector_ics) { 2230 if (FLAG_vector_ics) {
2229 vector = FixedTemp(LoadIC::VectorRegister()); 2231 vector = FixedTemp(FullVectorLoadConvention::VectorRegister());
2230 } 2232 }
2231 2233
2232 LLoadKeyedGeneric* result = 2234 LLoadKeyedGeneric* result =
2233 new(zone()) LLoadKeyedGeneric(context, object, key, vector); 2235 new(zone()) LLoadKeyedGeneric(context, object, key, vector);
2234 return MarkAsCall(DefineFixed(result, rax), instr); 2236 return MarkAsCall(DefineFixed(result, rax), instr);
2235 } 2237 }
2236 2238
2237 2239
2238 LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) { 2240 LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) {
2239 ElementsKind elements_kind = instr->elements_kind(); 2241 ElementsKind elements_kind = instr->elements_kind();
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
2296 ? UseTempRegister(instr->key()) 2298 ? UseTempRegister(instr->key())
2297 : UseRegisterOrConstantAtStart(instr->key()); 2299 : UseRegisterOrConstantAtStart(instr->key());
2298 } 2300 }
2299 LOperand* backing_store = UseRegister(instr->elements()); 2301 LOperand* backing_store = UseRegister(instr->elements());
2300 return new(zone()) LStoreKeyed(backing_store, key, val); 2302 return new(zone()) LStoreKeyed(backing_store, key, val);
2301 } 2303 }
2302 2304
2303 2305
2304 LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) { 2306 LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) {
2305 LOperand* context = UseFixed(instr->context(), rsi); 2307 LOperand* context = UseFixed(instr->context(), rsi);
2306 LOperand* object = UseFixed(instr->object(), 2308 LOperand* object =
2307 KeyedStoreIC::ReceiverRegister()); 2309 UseFixed(instr->object(), StoreConvention::ReceiverRegister());
2308 LOperand* key = UseFixed(instr->key(), KeyedStoreIC::NameRegister()); 2310 LOperand* key = UseFixed(instr->key(), StoreConvention::NameRegister());
2309 LOperand* value = UseFixed(instr->value(), KeyedStoreIC::ValueRegister()); 2311 LOperand* value = UseFixed(instr->value(), StoreConvention::ValueRegister());
2310 2312
2311 DCHECK(instr->object()->representation().IsTagged()); 2313 DCHECK(instr->object()->representation().IsTagged());
2312 DCHECK(instr->key()->representation().IsTagged()); 2314 DCHECK(instr->key()->representation().IsTagged());
2313 DCHECK(instr->value()->representation().IsTagged()); 2315 DCHECK(instr->value()->representation().IsTagged());
2314 2316
2315 LStoreKeyedGeneric* result = 2317 LStoreKeyedGeneric* result =
2316 new(zone()) LStoreKeyedGeneric(context, object, key, value); 2318 new(zone()) LStoreKeyedGeneric(context, object, key, value);
2317 return MarkAsCall(result, instr); 2319 return MarkAsCall(result, instr);
2318 } 2320 }
2319 2321
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
2394 // have a store into the properties array (not in-object-property). 2396 // have a store into the properties array (not in-object-property).
2395 LOperand* temp = (!is_in_object || needs_write_barrier || 2397 LOperand* temp = (!is_in_object || needs_write_barrier ||
2396 needs_write_barrier_for_map) ? TempRegister() : NULL; 2398 needs_write_barrier_for_map) ? TempRegister() : NULL;
2397 2399
2398 return new(zone()) LStoreNamedField(obj, val, temp); 2400 return new(zone()) LStoreNamedField(obj, val, temp);
2399 } 2401 }
2400 2402
2401 2403
2402 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) { 2404 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) {
2403 LOperand* context = UseFixed(instr->context(), rsi); 2405 LOperand* context = UseFixed(instr->context(), rsi);
2404 LOperand* object = UseFixed(instr->object(), StoreIC::ReceiverRegister()); 2406 LOperand* object =
2405 LOperand* value = UseFixed(instr->value(), StoreIC::ValueRegister()); 2407 UseFixed(instr->object(), StoreConvention::ReceiverRegister());
2408 LOperand* value = UseFixed(instr->value(), StoreConvention::ValueRegister());
2406 2409
2407 LStoreNamedGeneric* result = 2410 LStoreNamedGeneric* result =
2408 new(zone()) LStoreNamedGeneric(context, object, value); 2411 new(zone()) LStoreNamedGeneric(context, object, value);
2409 return MarkAsCall(result, instr); 2412 return MarkAsCall(result, instr);
2410 } 2413 }
2411 2414
2412 2415
2413 LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) { 2416 LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) {
2414 LOperand* context = UseFixed(instr->context(), rsi); 2417 LOperand* context = UseFixed(instr->context(), rsi);
2415 LOperand* left = UseFixed(instr->left(), rdx); 2418 LOperand* left = UseFixed(instr->left(), rdx);
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
2674 LOperand* function = UseRegisterAtStart(instr->function()); 2677 LOperand* function = UseRegisterAtStart(instr->function());
2675 LAllocateBlockContext* result = 2678 LAllocateBlockContext* result =
2676 new(zone()) LAllocateBlockContext(context, function); 2679 new(zone()) LAllocateBlockContext(context, function);
2677 return MarkAsCall(DefineFixed(result, rsi), instr); 2680 return MarkAsCall(DefineFixed(result, rsi), instr);
2678 } 2681 }
2679 2682
2680 2683
2681 } } // namespace v8::internal 2684 } } // namespace v8::internal
2682 2685
2683 #endif // V8_TARGET_ARCH_X64 2686 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/lithium-codegen-x64.cc ('k') | tools/gyp/v8.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698