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

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

Issue 2019313003: IC: Eliminate initialization_state as a factor in IC installation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixed compile error. 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
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/ia32/lithium-ia32.h" 5 #include "src/crankshaft/ia32/lithium-ia32.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #if V8_TARGET_ARCH_IA32 9 #if V8_TARGET_ARCH_IA32
10 10
(...skipping 2002 matching lines...) Expand 10 before | Expand all | Expand 10 after
2013 UNREACHABLE(); 2013 UNREACHABLE();
2014 return NULL; 2014 return NULL;
2015 } 2015 }
2016 } 2016 }
2017 2017
2018 2018
2019 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) { 2019 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) {
2020 LOperand* context = UseFixed(instr->context(), esi); 2020 LOperand* context = UseFixed(instr->context(), esi);
2021 LOperand* global_object = 2021 LOperand* global_object =
2022 UseFixed(instr->global_object(), LoadDescriptor::ReceiverRegister()); 2022 UseFixed(instr->global_object(), LoadDescriptor::ReceiverRegister());
2023 LOperand* vector = NULL; 2023 LOperand* vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister());
2024 if (instr->HasVectorAndSlot()) {
2025 vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister());
2026 }
2027 2024
2028 LLoadGlobalGeneric* result = 2025 LLoadGlobalGeneric* result =
2029 new(zone()) LLoadGlobalGeneric(context, global_object, vector); 2026 new(zone()) LLoadGlobalGeneric(context, global_object, vector);
2030 return MarkAsCall(DefineFixed(result, eax), instr); 2027 return MarkAsCall(DefineFixed(result, eax), instr);
2031 } 2028 }
2032 2029
2033 2030
2034 LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) { 2031 LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) {
2035 LOperand* context = UseRegisterAtStart(instr->value()); 2032 LOperand* context = UseRegisterAtStart(instr->value());
2036 LInstruction* result = 2033 LInstruction* result =
(...skipping 30 matching lines...) Expand all
2067 ? UseRegisterOrConstantAtStart(instr->object()) 2064 ? UseRegisterOrConstantAtStart(instr->object())
2068 : UseRegisterAtStart(instr->object()); 2065 : UseRegisterAtStart(instr->object());
2069 return DefineAsRegister(new(zone()) LLoadNamedField(obj)); 2066 return DefineAsRegister(new(zone()) LLoadNamedField(obj));
2070 } 2067 }
2071 2068
2072 2069
2073 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) { 2070 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) {
2074 LOperand* context = UseFixed(instr->context(), esi); 2071 LOperand* context = UseFixed(instr->context(), esi);
2075 LOperand* object = 2072 LOperand* object =
2076 UseFixed(instr->object(), LoadDescriptor::ReceiverRegister()); 2073 UseFixed(instr->object(), LoadDescriptor::ReceiverRegister());
2077 LOperand* vector = NULL; 2074 LOperand* vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister());
2078 if (instr->HasVectorAndSlot()) {
2079 vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister());
2080 }
2081 LLoadNamedGeneric* result = new(zone()) LLoadNamedGeneric( 2075 LLoadNamedGeneric* result = new(zone()) LLoadNamedGeneric(
2082 context, object, vector); 2076 context, object, vector);
2083 return MarkAsCall(DefineFixed(result, eax), instr); 2077 return MarkAsCall(DefineFixed(result, eax), instr);
2084 } 2078 }
2085 2079
2086 2080
2087 LInstruction* LChunkBuilder::DoLoadFunctionPrototype( 2081 LInstruction* LChunkBuilder::DoLoadFunctionPrototype(
2088 HLoadFunctionPrototype* instr) { 2082 HLoadFunctionPrototype* instr) {
2089 return AssignEnvironment(DefineAsRegister( 2083 return AssignEnvironment(DefineAsRegister(
2090 new(zone()) LLoadFunctionPrototype(UseRegister(instr->function()), 2084 new(zone()) LLoadFunctionPrototype(UseRegister(instr->function()),
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
2140 } 2134 }
2141 return result; 2135 return result;
2142 } 2136 }
2143 2137
2144 2138
2145 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { 2139 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) {
2146 LOperand* context = UseFixed(instr->context(), esi); 2140 LOperand* context = UseFixed(instr->context(), esi);
2147 LOperand* object = 2141 LOperand* object =
2148 UseFixed(instr->object(), LoadDescriptor::ReceiverRegister()); 2142 UseFixed(instr->object(), LoadDescriptor::ReceiverRegister());
2149 LOperand* key = UseFixed(instr->key(), LoadDescriptor::NameRegister()); 2143 LOperand* key = UseFixed(instr->key(), LoadDescriptor::NameRegister());
2150 LOperand* vector = NULL; 2144 LOperand* vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister());
2151 if (instr->HasVectorAndSlot()) {
2152 vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister());
2153 }
2154 LLoadKeyedGeneric* result = 2145 LLoadKeyedGeneric* result =
2155 new(zone()) LLoadKeyedGeneric(context, object, key, vector); 2146 new(zone()) LLoadKeyedGeneric(context, object, key, vector);
2156 return MarkAsCall(DefineFixed(result, eax), instr); 2147 return MarkAsCall(DefineFixed(result, eax), instr);
2157 } 2148 }
2158 2149
2159 2150
2160 LOperand* LChunkBuilder::GetStoreKeyedValueOperand(HStoreKeyed* instr) { 2151 LOperand* LChunkBuilder::GetStoreKeyedValueOperand(HStoreKeyed* instr) {
2161 ElementsKind elements_kind = instr->elements_kind(); 2152 ElementsKind elements_kind = instr->elements_kind();
2162 2153
2163 // Determine if we need a byte register in this case for the value. 2154 // Determine if we need a byte register in this case for the value.
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
2227 LOperand* context = UseFixed(instr->context(), esi); 2218 LOperand* context = UseFixed(instr->context(), esi);
2228 LOperand* object = 2219 LOperand* object =
2229 UseFixed(instr->object(), StoreDescriptor::ReceiverRegister()); 2220 UseFixed(instr->object(), StoreDescriptor::ReceiverRegister());
2230 LOperand* key = UseFixed(instr->key(), StoreDescriptor::NameRegister()); 2221 LOperand* key = UseFixed(instr->key(), StoreDescriptor::NameRegister());
2231 LOperand* value = UseFixed(instr->value(), StoreDescriptor::ValueRegister()); 2222 LOperand* value = UseFixed(instr->value(), StoreDescriptor::ValueRegister());
2232 2223
2233 DCHECK(instr->object()->representation().IsTagged()); 2224 DCHECK(instr->object()->representation().IsTagged());
2234 DCHECK(instr->key()->representation().IsTagged()); 2225 DCHECK(instr->key()->representation().IsTagged());
2235 DCHECK(instr->value()->representation().IsTagged()); 2226 DCHECK(instr->value()->representation().IsTagged());
2236 2227
2237 LOperand* slot = NULL; 2228 LOperand* slot = FixedTemp(VectorStoreICDescriptor::SlotRegister());
2238 LOperand* vector = NULL; 2229 LOperand* vector = FixedTemp(VectorStoreICDescriptor::VectorRegister());
2239 if (instr->HasVectorAndSlot()) {
2240 slot = FixedTemp(VectorStoreICDescriptor::SlotRegister());
2241 vector = FixedTemp(VectorStoreICDescriptor::VectorRegister());
2242 }
2243 2230
2244 LStoreKeyedGeneric* result = new (zone()) 2231 LStoreKeyedGeneric* result = new (zone())
2245 LStoreKeyedGeneric(context, object, key, value, slot, vector); 2232 LStoreKeyedGeneric(context, object, key, value, slot, vector);
2246 return MarkAsCall(result, instr); 2233 return MarkAsCall(result, instr);
2247 } 2234 }
2248 2235
2249 2236
2250 LInstruction* LChunkBuilder::DoTransitionElementsKind( 2237 LInstruction* LChunkBuilder::DoTransitionElementsKind(
2251 HTransitionElementsKind* instr) { 2238 HTransitionElementsKind* instr) {
2252 if (IsSimpleMapChangeTransition(instr->from_kind(), instr->to_kind())) { 2239 if (IsSimpleMapChangeTransition(instr->from_kind(), instr->to_kind())) {
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
2346 2333
2347 return new(zone()) LStoreNamedField(obj, val, temp, temp_map); 2334 return new(zone()) LStoreNamedField(obj, val, temp, temp_map);
2348 } 2335 }
2349 2336
2350 2337
2351 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) { 2338 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) {
2352 LOperand* context = UseFixed(instr->context(), esi); 2339 LOperand* context = UseFixed(instr->context(), esi);
2353 LOperand* object = 2340 LOperand* object =
2354 UseFixed(instr->object(), StoreDescriptor::ReceiverRegister()); 2341 UseFixed(instr->object(), StoreDescriptor::ReceiverRegister());
2355 LOperand* value = UseFixed(instr->value(), StoreDescriptor::ValueRegister()); 2342 LOperand* value = UseFixed(instr->value(), StoreDescriptor::ValueRegister());
2356 LOperand* slot = NULL; 2343 LOperand* slot = FixedTemp(VectorStoreICDescriptor::SlotRegister());
2357 LOperand* vector = NULL; 2344 LOperand* vector = FixedTemp(VectorStoreICDescriptor::VectorRegister());
2358 if (instr->HasVectorAndSlot()) {
2359 slot = FixedTemp(VectorStoreICDescriptor::SlotRegister());
2360 vector = FixedTemp(VectorStoreICDescriptor::VectorRegister());
2361 }
2362 2345
2363 LStoreNamedGeneric* result = 2346 LStoreNamedGeneric* result =
2364 new (zone()) LStoreNamedGeneric(context, object, value, slot, vector); 2347 new (zone()) LStoreNamedGeneric(context, object, value, slot, vector);
2365 return MarkAsCall(result, instr); 2348 return MarkAsCall(result, instr);
2366 } 2349 }
2367 2350
2368 2351
2369 LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) { 2352 LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) {
2370 LOperand* context = UseFixed(instr->context(), esi); 2353 LOperand* context = UseFixed(instr->context(), esi);
2371 LOperand* left = UseFixed(instr->left(), edx); 2354 LOperand* left = UseFixed(instr->left(), edx);
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
2583 LOperand* index = UseTempRegister(instr->index()); 2566 LOperand* index = UseTempRegister(instr->index());
2584 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); 2567 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index);
2585 LInstruction* result = DefineSameAsFirst(load); 2568 LInstruction* result = DefineSameAsFirst(load);
2586 return AssignPointerMap(result); 2569 return AssignPointerMap(result);
2587 } 2570 }
2588 2571
2589 } // namespace internal 2572 } // namespace internal
2590 } // namespace v8 2573 } // namespace v8
2591 2574
2592 #endif // V8_TARGET_ARCH_IA32 2575 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/crankshaft/ia32/lithium-codegen-ia32.cc ('k') | src/crankshaft/mips/lithium-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698