| 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/mips/lithium-mips.h" | 5 #include "src/crankshaft/mips/lithium-mips.h" |
| 6 | 6 |
| 7 #include <sstream> | 7 #include <sstream> |
| 8 | 8 |
| 9 #if V8_TARGET_ARCH_MIPS | 9 #if V8_TARGET_ARCH_MIPS |
| 10 | 10 |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 if (value() == NULL) { | 336 if (value() == NULL) { |
| 337 DCHECK(hydrogen()->IsConstantHoleStore() && | 337 DCHECK(hydrogen()->IsConstantHoleStore() && |
| 338 hydrogen()->value()->representation().IsDouble()); | 338 hydrogen()->value()->representation().IsDouble()); |
| 339 stream->Add("<the hole(nan)>"); | 339 stream->Add("<the hole(nan)>"); |
| 340 } else { | 340 } else { |
| 341 value()->PrintTo(stream); | 341 value()->PrintTo(stream); |
| 342 } | 342 } |
| 343 } | 343 } |
| 344 | 344 |
| 345 | 345 |
| 346 void LStoreKeyedGeneric::PrintDataTo(StringStream* stream) { | |
| 347 object()->PrintTo(stream); | |
| 348 stream->Add("["); | |
| 349 key()->PrintTo(stream); | |
| 350 stream->Add("] <- "); | |
| 351 value()->PrintTo(stream); | |
| 352 } | |
| 353 | |
| 354 | |
| 355 void LTransitionElementsKind::PrintDataTo(StringStream* stream) { | 346 void LTransitionElementsKind::PrintDataTo(StringStream* stream) { |
| 356 object()->PrintTo(stream); | 347 object()->PrintTo(stream); |
| 357 stream->Add(" %p -> %p", *original_map(), *transitioned_map()); | 348 stream->Add(" %p -> %p", *original_map(), *transitioned_map()); |
| 358 } | 349 } |
| 359 | 350 |
| 360 | 351 |
| 361 int LPlatformChunk::GetNextSpillIndex(RegisterKind kind) { | 352 int LPlatformChunk::GetNextSpillIndex(RegisterKind kind) { |
| 362 // Skip a slot if for a double-width slot. | 353 // Skip a slot if for a double-width slot. |
| 363 if (kind == DOUBLE_REGISTERS) current_frame_slots_++; | 354 if (kind == DOUBLE_REGISTERS) current_frame_slots_++; |
| 364 return current_frame_slots_++; | 355 return current_frame_slots_++; |
| (...skipping 1746 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2111 IsDoubleOrFloatElementsKind(instr->elements_kind()))); | 2102 IsDoubleOrFloatElementsKind(instr->elements_kind()))); |
| 2112 DCHECK(instr->elements()->representation().IsExternal()); | 2103 DCHECK(instr->elements()->representation().IsExternal()); |
| 2113 LOperand* val = UseRegister(instr->value()); | 2104 LOperand* val = UseRegister(instr->value()); |
| 2114 LOperand* key = UseRegisterOrConstantAtStart(instr->key()); | 2105 LOperand* key = UseRegisterOrConstantAtStart(instr->key()); |
| 2115 LOperand* backing_store = UseRegister(instr->elements()); | 2106 LOperand* backing_store = UseRegister(instr->elements()); |
| 2116 LOperand* backing_store_owner = UseAny(instr->backing_store_owner()); | 2107 LOperand* backing_store_owner = UseAny(instr->backing_store_owner()); |
| 2117 return new (zone()) LStoreKeyed(backing_store, key, val, backing_store_owner); | 2108 return new (zone()) LStoreKeyed(backing_store, key, val, backing_store_owner); |
| 2118 } | 2109 } |
| 2119 | 2110 |
| 2120 | 2111 |
| 2121 LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) { | |
| 2122 LOperand* context = UseFixed(instr->context(), cp); | |
| 2123 LOperand* obj = | |
| 2124 UseFixed(instr->object(), StoreDescriptor::ReceiverRegister()); | |
| 2125 LOperand* key = UseFixed(instr->key(), StoreDescriptor::NameRegister()); | |
| 2126 LOperand* val = UseFixed(instr->value(), StoreDescriptor::ValueRegister()); | |
| 2127 | |
| 2128 DCHECK(instr->object()->representation().IsTagged()); | |
| 2129 DCHECK(instr->key()->representation().IsTagged()); | |
| 2130 DCHECK(instr->value()->representation().IsTagged()); | |
| 2131 | |
| 2132 LOperand* slot = FixedTemp(StoreWithVectorDescriptor::SlotRegister()); | |
| 2133 LOperand* vector = FixedTemp(StoreWithVectorDescriptor::VectorRegister()); | |
| 2134 | |
| 2135 LStoreKeyedGeneric* result = | |
| 2136 new (zone()) LStoreKeyedGeneric(context, obj, key, val, slot, vector); | |
| 2137 return MarkAsCall(result, instr); | |
| 2138 } | |
| 2139 | |
| 2140 | |
| 2141 LInstruction* LChunkBuilder::DoTransitionElementsKind( | 2112 LInstruction* LChunkBuilder::DoTransitionElementsKind( |
| 2142 HTransitionElementsKind* instr) { | 2113 HTransitionElementsKind* instr) { |
| 2143 if (IsSimpleMapChangeTransition(instr->from_kind(), instr->to_kind())) { | 2114 if (IsSimpleMapChangeTransition(instr->from_kind(), instr->to_kind())) { |
| 2144 LOperand* object = UseRegister(instr->object()); | 2115 LOperand* object = UseRegister(instr->object()); |
| 2145 LOperand* new_map_reg = TempRegister(); | 2116 LOperand* new_map_reg = TempRegister(); |
| 2146 LTransitionElementsKind* result = | 2117 LTransitionElementsKind* result = |
| 2147 new(zone()) LTransitionElementsKind(object, NULL, new_map_reg); | 2118 new(zone()) LTransitionElementsKind(object, NULL, new_map_reg); |
| 2148 return result; | 2119 return result; |
| 2149 } else { | 2120 } else { |
| 2150 LOperand* object = UseFixed(instr->object(), a0); | 2121 LOperand* object = UseFixed(instr->object(), a0); |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2423 LOperand* index = UseTempRegister(instr->index()); | 2394 LOperand* index = UseTempRegister(instr->index()); |
| 2424 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); | 2395 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); |
| 2425 LInstruction* result = DefineSameAsFirst(load); | 2396 LInstruction* result = DefineSameAsFirst(load); |
| 2426 return AssignPointerMap(result); | 2397 return AssignPointerMap(result); |
| 2427 } | 2398 } |
| 2428 | 2399 |
| 2429 } // namespace internal | 2400 } // namespace internal |
| 2430 } // namespace v8 | 2401 } // namespace v8 |
| 2431 | 2402 |
| 2432 #endif // V8_TARGET_ARCH_MIPS | 2403 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |