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 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 #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 1105 matching lines...) Expand 10 before | Expand all | Expand 10 after
1116 LOperand* function = UseFixed(instr->function(), edi); 1116 LOperand* function = UseFixed(instr->function(), edi);
1117 1117
1118 LCallJSFunction* result = new(zone()) LCallJSFunction(function); 1118 LCallJSFunction* result = new(zone()) LCallJSFunction(function);
1119 1119
1120 return MarkAsCall(DefineFixed(result, eax), instr, CANNOT_DEOPTIMIZE_EAGERLY); 1120 return MarkAsCall(DefineFixed(result, eax), instr, CANNOT_DEOPTIMIZE_EAGERLY);
1121 } 1121 }
1122 1122
1123 1123
1124 LInstruction* LChunkBuilder::DoCallWithDescriptor( 1124 LInstruction* LChunkBuilder::DoCallWithDescriptor(
1125 HCallWithDescriptor* instr) { 1125 HCallWithDescriptor* instr) {
1126 const CallInterfaceDescriptor* descriptor = instr->descriptor(); 1126 CallInterfaceDescriptor descriptor = instr->descriptor();
1127 LOperand* target = UseRegisterOrConstantAtStart(instr->target()); 1127 LOperand* target = UseRegisterOrConstantAtStart(instr->target());
1128 ZoneList<LOperand*> ops(instr->OperandCount(), zone()); 1128 ZoneList<LOperand*> ops(instr->OperandCount(), zone());
1129 ops.Add(target, zone()); 1129 ops.Add(target, zone());
1130 for (int i = 1; i < instr->OperandCount(); i++) { 1130 for (int i = 1; i < instr->OperandCount(); i++) {
1131 LOperand* op = UseFixed(instr->OperandAt(i), 1131 LOperand* op =
1132 descriptor->GetParameterRegister(i - 1)); 1132 UseFixed(instr->OperandAt(i), descriptor.GetParameterRegister(i - 1));
1133 ops.Add(op, zone()); 1133 ops.Add(op, zone());
1134 } 1134 }
1135 1135
1136 LCallWithDescriptor* result = new(zone()) LCallWithDescriptor( 1136 LCallWithDescriptor* result = new(zone()) LCallWithDescriptor(
1137 descriptor, ops, zone()); 1137 descriptor, ops, zone());
1138 return MarkAsCall(DefineFixed(result, eax), instr, CANNOT_DEOPTIMIZE_EAGERLY); 1138 return MarkAsCall(DefineFixed(result, eax), instr, CANNOT_DEOPTIMIZE_EAGERLY);
1139 } 1139 }
1140 1140
1141 1141
1142 LInstruction* LChunkBuilder::DoInvokeFunction(HInvokeFunction* instr) { 1142 LInstruction* LChunkBuilder::DoInvokeFunction(HInvokeFunction* instr) {
(...skipping 957 matching lines...) Expand 10 before | Expand all | Expand 10 after
2100 LLoadGlobalCell* result = new(zone()) LLoadGlobalCell; 2100 LLoadGlobalCell* result = new(zone()) LLoadGlobalCell;
2101 return instr->RequiresHoleCheck() 2101 return instr->RequiresHoleCheck()
2102 ? AssignEnvironment(DefineAsRegister(result)) 2102 ? AssignEnvironment(DefineAsRegister(result))
2103 : DefineAsRegister(result); 2103 : DefineAsRegister(result);
2104 } 2104 }
2105 2105
2106 2106
2107 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) { 2107 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) {
2108 LOperand* context = UseFixed(instr->context(), esi); 2108 LOperand* context = UseFixed(instr->context(), esi);
2109 LOperand* global_object = 2109 LOperand* global_object =
2110 UseFixed(instr->global_object(), LoadConvention::ReceiverRegister()); 2110 UseFixed(instr->global_object(), LoadDescriptor::ReceiverRegister());
2111 LOperand* vector = NULL; 2111 LOperand* vector = NULL;
2112 if (FLAG_vector_ics) { 2112 if (FLAG_vector_ics) {
2113 vector = FixedTemp(FullVectorLoadConvention::VectorRegister()); 2113 vector = FixedTemp(VectorLoadICDescriptor::VectorRegister());
2114 } 2114 }
2115 2115
2116 LLoadGlobalGeneric* result = 2116 LLoadGlobalGeneric* result =
2117 new(zone()) LLoadGlobalGeneric(context, global_object, vector); 2117 new(zone()) LLoadGlobalGeneric(context, global_object, vector);
2118 return MarkAsCall(DefineFixed(result, eax), instr); 2118 return MarkAsCall(DefineFixed(result, eax), instr);
2119 } 2119 }
2120 2120
2121 2121
2122 LInstruction* LChunkBuilder::DoStoreGlobalCell(HStoreGlobalCell* instr) { 2122 LInstruction* LChunkBuilder::DoStoreGlobalCell(HStoreGlobalCell* instr) {
2123 LStoreGlobalCell* result = 2123 LStoreGlobalCell* result =
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
2161 instr->access().offset() == 0) 2161 instr->access().offset() == 0)
2162 ? UseRegisterOrConstantAtStart(instr->object()) 2162 ? UseRegisterOrConstantAtStart(instr->object())
2163 : UseRegisterAtStart(instr->object()); 2163 : UseRegisterAtStart(instr->object());
2164 return DefineAsRegister(new(zone()) LLoadNamedField(obj)); 2164 return DefineAsRegister(new(zone()) LLoadNamedField(obj));
2165 } 2165 }
2166 2166
2167 2167
2168 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) { 2168 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) {
2169 LOperand* context = UseFixed(instr->context(), esi); 2169 LOperand* context = UseFixed(instr->context(), esi);
2170 LOperand* object = 2170 LOperand* object =
2171 UseFixed(instr->object(), LoadConvention::ReceiverRegister()); 2171 UseFixed(instr->object(), LoadDescriptor::ReceiverRegister());
2172 LOperand* vector = NULL; 2172 LOperand* vector = NULL;
2173 if (FLAG_vector_ics) { 2173 if (FLAG_vector_ics) {
2174 vector = FixedTemp(FullVectorLoadConvention::VectorRegister()); 2174 vector = FixedTemp(VectorLoadICDescriptor::VectorRegister());
2175 } 2175 }
2176 LLoadNamedGeneric* result = new(zone()) LLoadNamedGeneric( 2176 LLoadNamedGeneric* result = new(zone()) LLoadNamedGeneric(
2177 context, object, vector); 2177 context, object, vector);
2178 return MarkAsCall(DefineFixed(result, eax), instr); 2178 return MarkAsCall(DefineFixed(result, eax), instr);
2179 } 2179 }
2180 2180
2181 2181
2182 LInstruction* LChunkBuilder::DoLoadFunctionPrototype( 2182 LInstruction* LChunkBuilder::DoLoadFunctionPrototype(
2183 HLoadFunctionPrototype* instr) { 2183 HLoadFunctionPrototype* instr) {
2184 return AssignEnvironment(DefineAsRegister( 2184 return AssignEnvironment(DefineAsRegister(
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
2225 instr->RequiresHoleCheck()) { 2225 instr->RequiresHoleCheck()) {
2226 result = AssignEnvironment(result); 2226 result = AssignEnvironment(result);
2227 } 2227 }
2228 return result; 2228 return result;
2229 } 2229 }
2230 2230
2231 2231
2232 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { 2232 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) {
2233 LOperand* context = UseFixed(instr->context(), esi); 2233 LOperand* context = UseFixed(instr->context(), esi);
2234 LOperand* object = 2234 LOperand* object =
2235 UseFixed(instr->object(), LoadConvention::ReceiverRegister()); 2235 UseFixed(instr->object(), LoadDescriptor::ReceiverRegister());
2236 LOperand* key = UseFixed(instr->key(), LoadConvention::NameRegister()); 2236 LOperand* key = UseFixed(instr->key(), LoadDescriptor::NameRegister());
2237 LOperand* vector = NULL; 2237 LOperand* vector = NULL;
2238 if (FLAG_vector_ics) { 2238 if (FLAG_vector_ics) {
2239 vector = FixedTemp(FullVectorLoadConvention::VectorRegister()); 2239 vector = FixedTemp(VectorLoadICDescriptor::VectorRegister());
2240 } 2240 }
2241 LLoadKeyedGeneric* result = 2241 LLoadKeyedGeneric* result =
2242 new(zone()) LLoadKeyedGeneric(context, object, key, vector); 2242 new(zone()) LLoadKeyedGeneric(context, object, key, vector);
2243 return MarkAsCall(DefineFixed(result, eax), instr); 2243 return MarkAsCall(DefineFixed(result, eax), instr);
2244 } 2244 }
2245 2245
2246 2246
2247 LOperand* LChunkBuilder::GetStoreKeyedValueOperand(HStoreKeyed* instr) { 2247 LOperand* LChunkBuilder::GetStoreKeyedValueOperand(HStoreKeyed* instr) {
2248 ElementsKind elements_kind = instr->elements_kind(); 2248 ElementsKind elements_kind = instr->elements_kind();
2249 2249
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
2311 LOperand* key = clobbers_key 2311 LOperand* key = clobbers_key
2312 ? UseTempRegister(instr->key()) 2312 ? UseTempRegister(instr->key())
2313 : UseRegisterOrConstantAtStart(instr->key()); 2313 : UseRegisterOrConstantAtStart(instr->key());
2314 return new(zone()) LStoreKeyed(backing_store, key, val); 2314 return new(zone()) LStoreKeyed(backing_store, key, val);
2315 } 2315 }
2316 2316
2317 2317
2318 LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) { 2318 LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) {
2319 LOperand* context = UseFixed(instr->context(), esi); 2319 LOperand* context = UseFixed(instr->context(), esi);
2320 LOperand* object = 2320 LOperand* object =
2321 UseFixed(instr->object(), StoreConvention::ReceiverRegister()); 2321 UseFixed(instr->object(), StoreDescriptor::ReceiverRegister());
2322 LOperand* key = UseFixed(instr->key(), StoreConvention::NameRegister()); 2322 LOperand* key = UseFixed(instr->key(), StoreDescriptor::NameRegister());
2323 LOperand* value = UseFixed(instr->value(), StoreConvention::ValueRegister()); 2323 LOperand* value = UseFixed(instr->value(), StoreDescriptor::ValueRegister());
2324 2324
2325 DCHECK(instr->object()->representation().IsTagged()); 2325 DCHECK(instr->object()->representation().IsTagged());
2326 DCHECK(instr->key()->representation().IsTagged()); 2326 DCHECK(instr->key()->representation().IsTagged());
2327 DCHECK(instr->value()->representation().IsTagged()); 2327 DCHECK(instr->value()->representation().IsTagged());
2328 2328
2329 LStoreKeyedGeneric* result = 2329 LStoreKeyedGeneric* result =
2330 new(zone()) LStoreKeyedGeneric(context, object, key, value); 2330 new(zone()) LStoreKeyedGeneric(context, object, key, value);
2331 return MarkAsCall(result, instr); 2331 return MarkAsCall(result, instr);
2332 } 2332 }
2333 2333
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
2416 // We need a temporary register for write barrier of the map field. 2416 // We need a temporary register for write barrier of the map field.
2417 LOperand* temp_map = needs_write_barrier_for_map ? TempRegister() : NULL; 2417 LOperand* temp_map = needs_write_barrier_for_map ? TempRegister() : NULL;
2418 2418
2419 return new(zone()) LStoreNamedField(obj, val, temp, temp_map); 2419 return new(zone()) LStoreNamedField(obj, val, temp, temp_map);
2420 } 2420 }
2421 2421
2422 2422
2423 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) { 2423 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) {
2424 LOperand* context = UseFixed(instr->context(), esi); 2424 LOperand* context = UseFixed(instr->context(), esi);
2425 LOperand* object = 2425 LOperand* object =
2426 UseFixed(instr->object(), StoreConvention::ReceiverRegister()); 2426 UseFixed(instr->object(), StoreDescriptor::ReceiverRegister());
2427 LOperand* value = UseFixed(instr->value(), StoreConvention::ValueRegister()); 2427 LOperand* value = UseFixed(instr->value(), StoreDescriptor::ValueRegister());
2428 2428
2429 LStoreNamedGeneric* result = 2429 LStoreNamedGeneric* result =
2430 new(zone()) LStoreNamedGeneric(context, object, value); 2430 new(zone()) LStoreNamedGeneric(context, object, value);
2431 return MarkAsCall(result, instr); 2431 return MarkAsCall(result, instr);
2432 } 2432 }
2433 2433
2434 2434
2435 LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) { 2435 LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) {
2436 LOperand* context = UseFixed(instr->context(), esi); 2436 LOperand* context = UseFixed(instr->context(), esi);
2437 LOperand* left = UseFixed(instr->left(), edx); 2437 LOperand* left = UseFixed(instr->left(), edx);
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
2701 LOperand* function = UseRegisterAtStart(instr->function()); 2701 LOperand* function = UseRegisterAtStart(instr->function());
2702 LAllocateBlockContext* result = 2702 LAllocateBlockContext* result =
2703 new(zone()) LAllocateBlockContext(context, function); 2703 new(zone()) LAllocateBlockContext(context, function);
2704 return MarkAsCall(DefineFixed(result, esi), instr); 2704 return MarkAsCall(DefineFixed(result, esi), instr);
2705 } 2705 }
2706 2706
2707 2707
2708 } } // namespace v8::internal 2708 } } // namespace v8::internal
2709 2709
2710 #endif // V8_TARGET_ARCH_IA32 2710 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698