| OLD | NEW |
| 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 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 if (value() == NULL) { | 376 if (value() == NULL) { |
| 377 DCHECK(hydrogen()->IsConstantHoleStore() && | 377 DCHECK(hydrogen()->IsConstantHoleStore() && |
| 378 hydrogen()->value()->representation().IsDouble()); | 378 hydrogen()->value()->representation().IsDouble()); |
| 379 stream->Add("<the hole(nan)>"); | 379 stream->Add("<the hole(nan)>"); |
| 380 } else { | 380 } else { |
| 381 value()->PrintTo(stream); | 381 value()->PrintTo(stream); |
| 382 } | 382 } |
| 383 } | 383 } |
| 384 | 384 |
| 385 | 385 |
| 386 void LStoreKeyedGeneric::PrintDataTo(StringStream* stream) { | |
| 387 object()->PrintTo(stream); | |
| 388 stream->Add("["); | |
| 389 key()->PrintTo(stream); | |
| 390 stream->Add("] <- "); | |
| 391 value()->PrintTo(stream); | |
| 392 } | |
| 393 | |
| 394 | |
| 395 void LTransitionElementsKind::PrintDataTo(StringStream* stream) { | 386 void LTransitionElementsKind::PrintDataTo(StringStream* stream) { |
| 396 object()->PrintTo(stream); | 387 object()->PrintTo(stream); |
| 397 stream->Add(" %p -> %p", *original_map(), *transitioned_map()); | 388 stream->Add(" %p -> %p", *original_map(), *transitioned_map()); |
| 398 } | 389 } |
| 399 | 390 |
| 400 | 391 |
| 401 LPlatformChunk* LChunkBuilder::Build() { | 392 LPlatformChunk* LChunkBuilder::Build() { |
| 402 DCHECK(is_unused()); | 393 DCHECK(is_unused()); |
| 403 chunk_ = new(zone()) LPlatformChunk(info(), graph()); | 394 chunk_ = new(zone()) LPlatformChunk(info(), graph()); |
| 404 LPhase phase("L_Building chunk", chunk_); | 395 LPhase phase("L_Building chunk", chunk_); |
| (...skipping 1790 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2195 LOperand* val = GetStoreKeyedValueOperand(instr); | 2186 LOperand* val = GetStoreKeyedValueOperand(instr); |
| 2196 bool clobbers_key = ExternalArrayOpRequiresTemp( | 2187 bool clobbers_key = ExternalArrayOpRequiresTemp( |
| 2197 instr->key()->representation(), elements_kind); | 2188 instr->key()->representation(), elements_kind); |
| 2198 LOperand* key = clobbers_key | 2189 LOperand* key = clobbers_key |
| 2199 ? UseTempRegister(instr->key()) | 2190 ? UseTempRegister(instr->key()) |
| 2200 : UseRegisterOrConstantAtStart(instr->key()); | 2191 : UseRegisterOrConstantAtStart(instr->key()); |
| 2201 return new (zone()) LStoreKeyed(backing_store, key, val, backing_store_owner); | 2192 return new (zone()) LStoreKeyed(backing_store, key, val, backing_store_owner); |
| 2202 } | 2193 } |
| 2203 | 2194 |
| 2204 | 2195 |
| 2205 LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) { | |
| 2206 LOperand* context = UseFixed(instr->context(), esi); | |
| 2207 LOperand* object = | |
| 2208 UseFixed(instr->object(), StoreDescriptor::ReceiverRegister()); | |
| 2209 LOperand* key = UseFixed(instr->key(), StoreDescriptor::NameRegister()); | |
| 2210 LOperand* value = UseFixed(instr->value(), StoreDescriptor::ValueRegister()); | |
| 2211 | |
| 2212 DCHECK(instr->object()->representation().IsTagged()); | |
| 2213 DCHECK(instr->key()->representation().IsTagged()); | |
| 2214 DCHECK(instr->value()->representation().IsTagged()); | |
| 2215 | |
| 2216 LOperand* slot = FixedTemp(StoreWithVectorDescriptor::SlotRegister()); | |
| 2217 LOperand* vector = FixedTemp(StoreWithVectorDescriptor::VectorRegister()); | |
| 2218 | |
| 2219 LStoreKeyedGeneric* result = new (zone()) | |
| 2220 LStoreKeyedGeneric(context, object, key, value, slot, vector); | |
| 2221 return MarkAsCall(result, instr); | |
| 2222 } | |
| 2223 | |
| 2224 | |
| 2225 LInstruction* LChunkBuilder::DoTransitionElementsKind( | 2196 LInstruction* LChunkBuilder::DoTransitionElementsKind( |
| 2226 HTransitionElementsKind* instr) { | 2197 HTransitionElementsKind* instr) { |
| 2227 if (IsSimpleMapChangeTransition(instr->from_kind(), instr->to_kind())) { | 2198 if (IsSimpleMapChangeTransition(instr->from_kind(), instr->to_kind())) { |
| 2228 LOperand* object = UseRegister(instr->object()); | 2199 LOperand* object = UseRegister(instr->object()); |
| 2229 LOperand* new_map_reg = TempRegister(); | 2200 LOperand* new_map_reg = TempRegister(); |
| 2230 LOperand* temp_reg = TempRegister(); | 2201 LOperand* temp_reg = TempRegister(); |
| 2231 LTransitionElementsKind* result = | 2202 LTransitionElementsKind* result = |
| 2232 new(zone()) LTransitionElementsKind(object, NULL, | 2203 new(zone()) LTransitionElementsKind(object, NULL, |
| 2233 new_map_reg, temp_reg); | 2204 new_map_reg, temp_reg); |
| 2234 return result; | 2205 return result; |
| (...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2540 LOperand* index = UseTempRegister(instr->index()); | 2511 LOperand* index = UseTempRegister(instr->index()); |
| 2541 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); | 2512 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); |
| 2542 LInstruction* result = DefineSameAsFirst(load); | 2513 LInstruction* result = DefineSameAsFirst(load); |
| 2543 return AssignPointerMap(result); | 2514 return AssignPointerMap(result); |
| 2544 } | 2515 } |
| 2545 | 2516 |
| 2546 } // namespace internal | 2517 } // namespace internal |
| 2547 } // namespace v8 | 2518 } // namespace v8 |
| 2548 | 2519 |
| 2549 #endif // V8_TARGET_ARCH_IA32 | 2520 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |