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

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

Issue 2030303002: X87: IC: Eliminate initialization_state as a factor in IC installation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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/crankshaft/x87/lithium-codegen-x87.cc ('k') | no next file » | 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/crankshaft/x87/lithium-x87.h" 5 #include "src/crankshaft/x87/lithium-x87.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #if V8_TARGET_ARCH_X87 9 #if V8_TARGET_ARCH_X87
10 10
(...skipping 1989 matching lines...) Expand 10 before | Expand all | Expand 10 after
2000 UNREACHABLE(); 2000 UNREACHABLE();
2001 return NULL; 2001 return NULL;
2002 } 2002 }
2003 } 2003 }
2004 2004
2005 2005
2006 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) { 2006 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) {
2007 LOperand* context = UseFixed(instr->context(), esi); 2007 LOperand* context = UseFixed(instr->context(), esi);
2008 LOperand* global_object = 2008 LOperand* global_object =
2009 UseFixed(instr->global_object(), LoadDescriptor::ReceiverRegister()); 2009 UseFixed(instr->global_object(), LoadDescriptor::ReceiverRegister());
2010 LOperand* vector = NULL; 2010 LOperand* vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister());
2011 if (instr->HasVectorAndSlot()) {
2012 vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister());
2013 }
2014 2011
2015 LLoadGlobalGeneric* result = 2012 LLoadGlobalGeneric* result =
2016 new(zone()) LLoadGlobalGeneric(context, global_object, vector); 2013 new(zone()) LLoadGlobalGeneric(context, global_object, vector);
2017 return MarkAsCall(DefineFixed(result, eax), instr); 2014 return MarkAsCall(DefineFixed(result, eax), instr);
2018 } 2015 }
2019 2016
2020 2017
2021 LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) { 2018 LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) {
2022 LOperand* context = UseRegisterAtStart(instr->value()); 2019 LOperand* context = UseRegisterAtStart(instr->value());
2023 LInstruction* result = 2020 LInstruction* result =
(...skipping 30 matching lines...) Expand all
2054 ? UseRegisterOrConstantAtStart(instr->object()) 2051 ? UseRegisterOrConstantAtStart(instr->object())
2055 : UseRegisterAtStart(instr->object()); 2052 : UseRegisterAtStart(instr->object());
2056 return DefineAsRegister(new(zone()) LLoadNamedField(obj)); 2053 return DefineAsRegister(new(zone()) LLoadNamedField(obj));
2057 } 2054 }
2058 2055
2059 2056
2060 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) { 2057 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) {
2061 LOperand* context = UseFixed(instr->context(), esi); 2058 LOperand* context = UseFixed(instr->context(), esi);
2062 LOperand* object = 2059 LOperand* object =
2063 UseFixed(instr->object(), LoadDescriptor::ReceiverRegister()); 2060 UseFixed(instr->object(), LoadDescriptor::ReceiverRegister());
2064 LOperand* vector = NULL; 2061 LOperand* vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister());
2065 if (instr->HasVectorAndSlot()) {
2066 vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister());
2067 }
2068 LLoadNamedGeneric* result = new(zone()) LLoadNamedGeneric( 2062 LLoadNamedGeneric* result = new(zone()) LLoadNamedGeneric(
2069 context, object, vector); 2063 context, object, vector);
2070 return MarkAsCall(DefineFixed(result, eax), instr); 2064 return MarkAsCall(DefineFixed(result, eax), instr);
2071 } 2065 }
2072 2066
2073 2067
2074 LInstruction* LChunkBuilder::DoLoadFunctionPrototype( 2068 LInstruction* LChunkBuilder::DoLoadFunctionPrototype(
2075 HLoadFunctionPrototype* instr) { 2069 HLoadFunctionPrototype* instr) {
2076 return AssignEnvironment(DefineAsRegister( 2070 return AssignEnvironment(DefineAsRegister(
2077 new(zone()) LLoadFunctionPrototype(UseRegister(instr->function()), 2071 new(zone()) LLoadFunctionPrototype(UseRegister(instr->function()),
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
2127 } 2121 }
2128 return result; 2122 return result;
2129 } 2123 }
2130 2124
2131 2125
2132 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { 2126 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) {
2133 LOperand* context = UseFixed(instr->context(), esi); 2127 LOperand* context = UseFixed(instr->context(), esi);
2134 LOperand* object = 2128 LOperand* object =
2135 UseFixed(instr->object(), LoadDescriptor::ReceiverRegister()); 2129 UseFixed(instr->object(), LoadDescriptor::ReceiverRegister());
2136 LOperand* key = UseFixed(instr->key(), LoadDescriptor::NameRegister()); 2130 LOperand* key = UseFixed(instr->key(), LoadDescriptor::NameRegister());
2137 LOperand* vector = NULL; 2131 LOperand* vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister());
2138 if (instr->HasVectorAndSlot()) {
2139 vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister());
2140 }
2141 LLoadKeyedGeneric* result = 2132 LLoadKeyedGeneric* result =
2142 new(zone()) LLoadKeyedGeneric(context, object, key, vector); 2133 new(zone()) LLoadKeyedGeneric(context, object, key, vector);
2143 return MarkAsCall(DefineFixed(result, eax), instr); 2134 return MarkAsCall(DefineFixed(result, eax), instr);
2144 } 2135 }
2145 2136
2146 2137
2147 LOperand* LChunkBuilder::GetStoreKeyedValueOperand(HStoreKeyed* instr) { 2138 LOperand* LChunkBuilder::GetStoreKeyedValueOperand(HStoreKeyed* instr) {
2148 ElementsKind elements_kind = instr->elements_kind(); 2139 ElementsKind elements_kind = instr->elements_kind();
2149 2140
2150 // Determine if we need a byte register in this case for the value. 2141 // Determine if we need a byte register in this case for the value.
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
2220 LOperand* context = UseFixed(instr->context(), esi); 2211 LOperand* context = UseFixed(instr->context(), esi);
2221 LOperand* object = 2212 LOperand* object =
2222 UseFixed(instr->object(), StoreDescriptor::ReceiverRegister()); 2213 UseFixed(instr->object(), StoreDescriptor::ReceiverRegister());
2223 LOperand* key = UseFixed(instr->key(), StoreDescriptor::NameRegister()); 2214 LOperand* key = UseFixed(instr->key(), StoreDescriptor::NameRegister());
2224 LOperand* value = UseFixed(instr->value(), StoreDescriptor::ValueRegister()); 2215 LOperand* value = UseFixed(instr->value(), StoreDescriptor::ValueRegister());
2225 2216
2226 DCHECK(instr->object()->representation().IsTagged()); 2217 DCHECK(instr->object()->representation().IsTagged());
2227 DCHECK(instr->key()->representation().IsTagged()); 2218 DCHECK(instr->key()->representation().IsTagged());
2228 DCHECK(instr->value()->representation().IsTagged()); 2219 DCHECK(instr->value()->representation().IsTagged());
2229 2220
2230 LOperand* slot = NULL; 2221 LOperand* slot = FixedTemp(VectorStoreICDescriptor::SlotRegister());
2231 LOperand* vector = NULL; 2222 LOperand* vector = FixedTemp(VectorStoreICDescriptor::VectorRegister());
2232 if (instr->HasVectorAndSlot()) {
2233 slot = FixedTemp(VectorStoreICDescriptor::SlotRegister());
2234 vector = FixedTemp(VectorStoreICDescriptor::VectorRegister());
2235 }
2236 2223
2237 LStoreKeyedGeneric* result = new (zone()) 2224 LStoreKeyedGeneric* result = new (zone())
2238 LStoreKeyedGeneric(context, object, key, value, slot, vector); 2225 LStoreKeyedGeneric(context, object, key, value, slot, vector);
2239 return MarkAsCall(result, instr); 2226 return MarkAsCall(result, instr);
2240 } 2227 }
2241 2228
2242 2229
2243 LInstruction* LChunkBuilder::DoTransitionElementsKind( 2230 LInstruction* LChunkBuilder::DoTransitionElementsKind(
2244 HTransitionElementsKind* instr) { 2231 HTransitionElementsKind* instr) {
2245 if (IsSimpleMapChangeTransition(instr->from_kind(), instr->to_kind())) { 2232 if (IsSimpleMapChangeTransition(instr->from_kind(), instr->to_kind())) {
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
2339 2326
2340 return new(zone()) LStoreNamedField(obj, val, temp, temp_map); 2327 return new(zone()) LStoreNamedField(obj, val, temp, temp_map);
2341 } 2328 }
2342 2329
2343 2330
2344 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) { 2331 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) {
2345 LOperand* context = UseFixed(instr->context(), esi); 2332 LOperand* context = UseFixed(instr->context(), esi);
2346 LOperand* object = 2333 LOperand* object =
2347 UseFixed(instr->object(), StoreDescriptor::ReceiverRegister()); 2334 UseFixed(instr->object(), StoreDescriptor::ReceiverRegister());
2348 LOperand* value = UseFixed(instr->value(), StoreDescriptor::ValueRegister()); 2335 LOperand* value = UseFixed(instr->value(), StoreDescriptor::ValueRegister());
2349 LOperand* slot = NULL; 2336 LOperand* slot = FixedTemp(VectorStoreICDescriptor::SlotRegister());
2350 LOperand* vector = NULL; 2337 LOperand* vector = FixedTemp(VectorStoreICDescriptor::VectorRegister());
2351 if (instr->HasVectorAndSlot()) {
2352 slot = FixedTemp(VectorStoreICDescriptor::SlotRegister());
2353 vector = FixedTemp(VectorStoreICDescriptor::VectorRegister());
2354 }
2355 2338
2356 LStoreNamedGeneric* result = 2339 LStoreNamedGeneric* result =
2357 new (zone()) LStoreNamedGeneric(context, object, value, slot, vector); 2340 new (zone()) LStoreNamedGeneric(context, object, value, slot, vector);
2358 return MarkAsCall(result, instr); 2341 return MarkAsCall(result, instr);
2359 } 2342 }
2360 2343
2361 2344
2362 LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) { 2345 LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) {
2363 LOperand* context = UseFixed(instr->context(), esi); 2346 LOperand* context = UseFixed(instr->context(), esi);
2364 LOperand* left = UseFixed(instr->left(), edx); 2347 LOperand* left = UseFixed(instr->left(), edx);
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
2576 LOperand* index = UseTempRegister(instr->index()); 2559 LOperand* index = UseTempRegister(instr->index());
2577 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); 2560 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index);
2578 LInstruction* result = DefineSameAsFirst(load); 2561 LInstruction* result = DefineSameAsFirst(load);
2579 return AssignPointerMap(result); 2562 return AssignPointerMap(result);
2580 } 2563 }
2581 2564
2582 } // namespace internal 2565 } // namespace internal
2583 } // namespace v8 2566 } // namespace v8
2584 2567
2585 #endif // V8_TARGET_ARCH_X87 2568 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/crankshaft/x87/lithium-codegen-x87.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698