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