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

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

Issue 544943002: X87: Make concrete classes for individual call descriptors (Closed) Base URL: https://github.com/v8/v8.git@bleeding_edge
Patch Set: 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
« no previous file with comments | « src/x87/lithium-x87.h ('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_X87 7 #if V8_TARGET_ARCH_X87
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 1101 matching lines...) Expand 10 before | Expand all | Expand 10 after
1112 LOperand* function = UseFixed(instr->function(), edi); 1112 LOperand* function = UseFixed(instr->function(), edi);
1113 1113
1114 LCallJSFunction* result = new(zone()) LCallJSFunction(function); 1114 LCallJSFunction* result = new(zone()) LCallJSFunction(function);
1115 1115
1116 return MarkAsCall(DefineFixed(result, eax), instr, CANNOT_DEOPTIMIZE_EAGERLY); 1116 return MarkAsCall(DefineFixed(result, eax), instr, CANNOT_DEOPTIMIZE_EAGERLY);
1117 } 1117 }
1118 1118
1119 1119
1120 LInstruction* LChunkBuilder::DoCallWithDescriptor( 1120 LInstruction* LChunkBuilder::DoCallWithDescriptor(
1121 HCallWithDescriptor* instr) { 1121 HCallWithDescriptor* instr) {
1122 const CallInterfaceDescriptor* descriptor = instr->descriptor(); 1122 CallInterfaceDescriptor descriptor = instr->descriptor();
1123 LOperand* target = UseRegisterOrConstantAtStart(instr->target()); 1123 LOperand* target = UseRegisterOrConstantAtStart(instr->target());
1124 ZoneList<LOperand*> ops(instr->OperandCount(), zone()); 1124 ZoneList<LOperand*> ops(instr->OperandCount(), zone());
1125 ops.Add(target, zone()); 1125 ops.Add(target, zone());
1126 for (int i = 1; i < instr->OperandCount(); i++) { 1126 for (int i = 1; i < instr->OperandCount(); i++) {
1127 LOperand* op = UseFixed(instr->OperandAt(i), 1127 LOperand* op =
1128 descriptor->GetParameterRegister(i - 1)); 1128 UseFixed(instr->OperandAt(i), descriptor.GetParameterRegister(i - 1));
1129 ops.Add(op, zone()); 1129 ops.Add(op, zone());
1130 } 1130 }
1131 1131
1132 LCallWithDescriptor* result = new(zone()) LCallWithDescriptor( 1132 LCallWithDescriptor* result = new(zone()) LCallWithDescriptor(
1133 descriptor, ops, zone()); 1133 descriptor, ops, zone());
1134 return MarkAsCall(DefineFixed(result, eax), instr, CANNOT_DEOPTIMIZE_EAGERLY); 1134 return MarkAsCall(DefineFixed(result, eax), instr, CANNOT_DEOPTIMIZE_EAGERLY);
1135 } 1135 }
1136 1136
1137 1137
1138 LInstruction* LChunkBuilder::DoInvokeFunction(HInvokeFunction* instr) { 1138 LInstruction* LChunkBuilder::DoInvokeFunction(HInvokeFunction* instr) {
(...skipping 934 matching lines...) Expand 10 before | Expand all | Expand 10 after
2073 LLoadGlobalCell* result = new(zone()) LLoadGlobalCell; 2073 LLoadGlobalCell* result = new(zone()) LLoadGlobalCell;
2074 return instr->RequiresHoleCheck() 2074 return instr->RequiresHoleCheck()
2075 ? AssignEnvironment(DefineAsRegister(result)) 2075 ? AssignEnvironment(DefineAsRegister(result))
2076 : DefineAsRegister(result); 2076 : DefineAsRegister(result);
2077 } 2077 }
2078 2078
2079 2079
2080 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) { 2080 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) {
2081 LOperand* context = UseFixed(instr->context(), esi); 2081 LOperand* context = UseFixed(instr->context(), esi);
2082 LOperand* global_object = 2082 LOperand* global_object =
2083 UseFixed(instr->global_object(), LoadConvention::ReceiverRegister()); 2083 UseFixed(instr->global_object(), LoadDescriptor::ReceiverRegister());
2084 LOperand* vector = NULL; 2084 LOperand* vector = NULL;
2085 if (FLAG_vector_ics) { 2085 if (FLAG_vector_ics) {
2086 vector = FixedTemp(FullVectorLoadConvention::VectorRegister()); 2086 vector = FixedTemp(VectorLoadICDescriptor::VectorRegister());
2087 } 2087 }
2088 2088
2089 LLoadGlobalGeneric* result = 2089 LLoadGlobalGeneric* result =
2090 new(zone()) LLoadGlobalGeneric(context, global_object, vector); 2090 new(zone()) LLoadGlobalGeneric(context, global_object, vector);
2091 return MarkAsCall(DefineFixed(result, eax), instr); 2091 return MarkAsCall(DefineFixed(result, eax), instr);
2092 } 2092 }
2093 2093
2094 2094
2095 LInstruction* LChunkBuilder::DoStoreGlobalCell(HStoreGlobalCell* instr) { 2095 LInstruction* LChunkBuilder::DoStoreGlobalCell(HStoreGlobalCell* instr) {
2096 LStoreGlobalCell* result = 2096 LStoreGlobalCell* result =
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
2134 instr->access().offset() == 0) 2134 instr->access().offset() == 0)
2135 ? UseRegisterOrConstantAtStart(instr->object()) 2135 ? UseRegisterOrConstantAtStart(instr->object())
2136 : UseRegisterAtStart(instr->object()); 2136 : UseRegisterAtStart(instr->object());
2137 return DefineAsRegister(new(zone()) LLoadNamedField(obj)); 2137 return DefineAsRegister(new(zone()) LLoadNamedField(obj));
2138 } 2138 }
2139 2139
2140 2140
2141 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) { 2141 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) {
2142 LOperand* context = UseFixed(instr->context(), esi); 2142 LOperand* context = UseFixed(instr->context(), esi);
2143 LOperand* object = 2143 LOperand* object =
2144 UseFixed(instr->object(), LoadConvention::ReceiverRegister()); 2144 UseFixed(instr->object(), LoadDescriptor::ReceiverRegister());
2145 LOperand* vector = NULL; 2145 LOperand* vector = NULL;
2146 if (FLAG_vector_ics) { 2146 if (FLAG_vector_ics) {
2147 vector = FixedTemp(FullVectorLoadConvention::VectorRegister()); 2147 vector = FixedTemp(VectorLoadICDescriptor::VectorRegister());
2148 } 2148 }
2149 LLoadNamedGeneric* result = new(zone()) LLoadNamedGeneric( 2149 LLoadNamedGeneric* result = new(zone()) LLoadNamedGeneric(
2150 context, object, vector); 2150 context, object, vector);
2151 return MarkAsCall(DefineFixed(result, eax), instr); 2151 return MarkAsCall(DefineFixed(result, eax), instr);
2152 } 2152 }
2153 2153
2154 2154
2155 LInstruction* LChunkBuilder::DoLoadFunctionPrototype( 2155 LInstruction* LChunkBuilder::DoLoadFunctionPrototype(
2156 HLoadFunctionPrototype* instr) { 2156 HLoadFunctionPrototype* instr) {
2157 return AssignEnvironment(DefineAsRegister( 2157 return AssignEnvironment(DefineAsRegister(
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
2198 instr->RequiresHoleCheck()) { 2198 instr->RequiresHoleCheck()) {
2199 result = AssignEnvironment(result); 2199 result = AssignEnvironment(result);
2200 } 2200 }
2201 return result; 2201 return result;
2202 } 2202 }
2203 2203
2204 2204
2205 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { 2205 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) {
2206 LOperand* context = UseFixed(instr->context(), esi); 2206 LOperand* context = UseFixed(instr->context(), esi);
2207 LOperand* object = 2207 LOperand* object =
2208 UseFixed(instr->object(), LoadConvention::ReceiverRegister()); 2208 UseFixed(instr->object(), LoadDescriptor::ReceiverRegister());
2209 LOperand* key = UseFixed(instr->key(), LoadConvention::NameRegister()); 2209 LOperand* key = UseFixed(instr->key(), LoadDescriptor::NameRegister());
2210 LOperand* vector = NULL; 2210 LOperand* vector = NULL;
2211 if (FLAG_vector_ics) { 2211 if (FLAG_vector_ics) {
2212 vector = FixedTemp(FullVectorLoadConvention::VectorRegister()); 2212 vector = FixedTemp(VectorLoadICDescriptor::VectorRegister());
2213 } 2213 }
2214 LLoadKeyedGeneric* result = 2214 LLoadKeyedGeneric* result =
2215 new(zone()) LLoadKeyedGeneric(context, object, key, vector); 2215 new(zone()) LLoadKeyedGeneric(context, object, key, vector);
2216 return MarkAsCall(DefineFixed(result, eax), instr); 2216 return MarkAsCall(DefineFixed(result, eax), instr);
2217 } 2217 }
2218 2218
2219 2219
2220 LOperand* LChunkBuilder::GetStoreKeyedValueOperand(HStoreKeyed* instr) { 2220 LOperand* LChunkBuilder::GetStoreKeyedValueOperand(HStoreKeyed* instr) {
2221 ElementsKind elements_kind = instr->elements_kind(); 2221 ElementsKind elements_kind = instr->elements_kind();
2222 2222
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
2288 LOperand* key = clobbers_key 2288 LOperand* key = clobbers_key
2289 ? UseTempRegister(instr->key()) 2289 ? UseTempRegister(instr->key())
2290 : UseRegisterOrConstantAtStart(instr->key()); 2290 : UseRegisterOrConstantAtStart(instr->key());
2291 return new(zone()) LStoreKeyed(backing_store, key, val); 2291 return new(zone()) LStoreKeyed(backing_store, key, val);
2292 } 2292 }
2293 2293
2294 2294
2295 LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) { 2295 LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) {
2296 LOperand* context = UseFixed(instr->context(), esi); 2296 LOperand* context = UseFixed(instr->context(), esi);
2297 LOperand* object = 2297 LOperand* object =
2298 UseFixed(instr->object(), StoreConvention::ReceiverRegister()); 2298 UseFixed(instr->object(), StoreDescriptor::ReceiverRegister());
2299 LOperand* key = UseFixed(instr->key(), StoreConvention::NameRegister()); 2299 LOperand* key = UseFixed(instr->key(), StoreDescriptor::NameRegister());
2300 LOperand* value = UseFixed(instr->value(), StoreConvention::ValueRegister()); 2300 LOperand* value = UseFixed(instr->value(), StoreDescriptor::ValueRegister());
2301 2301
2302 DCHECK(instr->object()->representation().IsTagged()); 2302 DCHECK(instr->object()->representation().IsTagged());
2303 DCHECK(instr->key()->representation().IsTagged()); 2303 DCHECK(instr->key()->representation().IsTagged());
2304 DCHECK(instr->value()->representation().IsTagged()); 2304 DCHECK(instr->value()->representation().IsTagged());
2305 2305
2306 LStoreKeyedGeneric* result = 2306 LStoreKeyedGeneric* result =
2307 new(zone()) LStoreKeyedGeneric(context, object, key, value); 2307 new(zone()) LStoreKeyedGeneric(context, object, key, value);
2308 return MarkAsCall(result, instr); 2308 return MarkAsCall(result, instr);
2309 } 2309 }
2310 2310
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
2393 // We need a temporary register for write barrier of the map field. 2393 // We need a temporary register for write barrier of the map field.
2394 LOperand* temp_map = needs_write_barrier_for_map ? TempRegister() : NULL; 2394 LOperand* temp_map = needs_write_barrier_for_map ? TempRegister() : NULL;
2395 2395
2396 return new(zone()) LStoreNamedField(obj, val, temp, temp_map); 2396 return new(zone()) LStoreNamedField(obj, val, temp, temp_map);
2397 } 2397 }
2398 2398
2399 2399
2400 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) { 2400 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) {
2401 LOperand* context = UseFixed(instr->context(), esi); 2401 LOperand* context = UseFixed(instr->context(), esi);
2402 LOperand* object = 2402 LOperand* object =
2403 UseFixed(instr->object(), StoreConvention::ReceiverRegister()); 2403 UseFixed(instr->object(), StoreDescriptor::ReceiverRegister());
2404 LOperand* value = UseFixed(instr->value(), StoreConvention::ValueRegister()); 2404 LOperand* value = UseFixed(instr->value(), StoreDescriptor::ValueRegister());
2405 2405
2406 LStoreNamedGeneric* result = 2406 LStoreNamedGeneric* result =
2407 new(zone()) LStoreNamedGeneric(context, object, value); 2407 new(zone()) LStoreNamedGeneric(context, object, value);
2408 return MarkAsCall(result, instr); 2408 return MarkAsCall(result, instr);
2409 } 2409 }
2410 2410
2411 2411
2412 LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) { 2412 LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) {
2413 LOperand* context = UseFixed(instr->context(), esi); 2413 LOperand* context = UseFixed(instr->context(), esi);
2414 LOperand* left = UseFixed(instr->left(), edx); 2414 LOperand* left = UseFixed(instr->left(), edx);
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
2678 LOperand* function = UseRegisterAtStart(instr->function()); 2678 LOperand* function = UseRegisterAtStart(instr->function());
2679 LAllocateBlockContext* result = 2679 LAllocateBlockContext* result =
2680 new(zone()) LAllocateBlockContext(context, function); 2680 new(zone()) LAllocateBlockContext(context, function);
2681 return MarkAsCall(DefineFixed(result, esi), instr); 2681 return MarkAsCall(DefineFixed(result, esi), instr);
2682 } 2682 }
2683 2683
2684 2684
2685 } } // namespace v8::internal 2685 } } // namespace v8::internal
2686 2686
2687 #endif // V8_TARGET_ARCH_X87 2687 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/x87/lithium-x87.h ('k') | tools/gyp/v8.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698