OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/ppc/lithium-ppc.h" | 5 #include "src/crankshaft/ppc/lithium-ppc.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #include "src/crankshaft/hydrogen-osr.h" | 9 #include "src/crankshaft/hydrogen-osr.h" |
10 #include "src/crankshaft/lithium-inl.h" | 10 #include "src/crankshaft/lithium-inl.h" |
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 if (value() == NULL) { | 342 if (value() == NULL) { |
343 DCHECK(hydrogen()->IsConstantHoleStore() && | 343 DCHECK(hydrogen()->IsConstantHoleStore() && |
344 hydrogen()->value()->representation().IsDouble()); | 344 hydrogen()->value()->representation().IsDouble()); |
345 stream->Add("<the hole(nan)>"); | 345 stream->Add("<the hole(nan)>"); |
346 } else { | 346 } else { |
347 value()->PrintTo(stream); | 347 value()->PrintTo(stream); |
348 } | 348 } |
349 } | 349 } |
350 | 350 |
351 | 351 |
352 void LStoreKeyedGeneric::PrintDataTo(StringStream* stream) { | |
353 object()->PrintTo(stream); | |
354 stream->Add("["); | |
355 key()->PrintTo(stream); | |
356 stream->Add("] <- "); | |
357 value()->PrintTo(stream); | |
358 } | |
359 | |
360 | |
361 void LTransitionElementsKind::PrintDataTo(StringStream* stream) { | 352 void LTransitionElementsKind::PrintDataTo(StringStream* stream) { |
362 object()->PrintTo(stream); | 353 object()->PrintTo(stream); |
363 stream->Add(" %p -> %p", *original_map(), *transitioned_map()); | 354 stream->Add(" %p -> %p", *original_map(), *transitioned_map()); |
364 } | 355 } |
365 | 356 |
366 | 357 |
367 int LPlatformChunk::GetNextSpillIndex(RegisterKind kind) { | 358 int LPlatformChunk::GetNextSpillIndex(RegisterKind kind) { |
368 // Skip a slot if for a double-width slot. | 359 // Skip a slot if for a double-width slot. |
369 if (kind == DOUBLE_REGISTERS) current_frame_slots_++; | 360 if (kind == DOUBLE_REGISTERS) current_frame_slots_++; |
370 return current_frame_slots_++; | 361 return current_frame_slots_++; |
(...skipping 1763 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2134 IsDoubleOrFloatElementsKind(instr->elements_kind()))); | 2125 IsDoubleOrFloatElementsKind(instr->elements_kind()))); |
2135 DCHECK(instr->elements()->representation().IsExternal()); | 2126 DCHECK(instr->elements()->representation().IsExternal()); |
2136 LOperand* val = UseRegister(instr->value()); | 2127 LOperand* val = UseRegister(instr->value()); |
2137 LOperand* key = UseRegisterOrConstantAtStart(instr->key()); | 2128 LOperand* key = UseRegisterOrConstantAtStart(instr->key()); |
2138 LOperand* backing_store = UseRegister(instr->elements()); | 2129 LOperand* backing_store = UseRegister(instr->elements()); |
2139 LOperand* backing_store_owner = UseAny(instr->backing_store_owner()); | 2130 LOperand* backing_store_owner = UseAny(instr->backing_store_owner()); |
2140 return new (zone()) LStoreKeyed(backing_store, key, val, backing_store_owner); | 2131 return new (zone()) LStoreKeyed(backing_store, key, val, backing_store_owner); |
2141 } | 2132 } |
2142 | 2133 |
2143 | 2134 |
2144 LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) { | |
2145 LOperand* context = UseFixed(instr->context(), cp); | |
2146 LOperand* obj = | |
2147 UseFixed(instr->object(), StoreDescriptor::ReceiverRegister()); | |
2148 LOperand* key = UseFixed(instr->key(), StoreDescriptor::NameRegister()); | |
2149 LOperand* val = UseFixed(instr->value(), StoreDescriptor::ValueRegister()); | |
2150 | |
2151 DCHECK(instr->object()->representation().IsTagged()); | |
2152 DCHECK(instr->key()->representation().IsTagged()); | |
2153 DCHECK(instr->value()->representation().IsTagged()); | |
2154 | |
2155 LOperand* slot = FixedTemp(StoreWithVectorDescriptor::SlotRegister()); | |
2156 LOperand* vector = FixedTemp(StoreWithVectorDescriptor::VectorRegister()); | |
2157 | |
2158 LStoreKeyedGeneric* result = | |
2159 new (zone()) LStoreKeyedGeneric(context, obj, key, val, slot, vector); | |
2160 return MarkAsCall(result, instr); | |
2161 } | |
2162 | |
2163 | |
2164 LInstruction* LChunkBuilder::DoTransitionElementsKind( | 2135 LInstruction* LChunkBuilder::DoTransitionElementsKind( |
2165 HTransitionElementsKind* instr) { | 2136 HTransitionElementsKind* instr) { |
2166 if (IsSimpleMapChangeTransition(instr->from_kind(), instr->to_kind())) { | 2137 if (IsSimpleMapChangeTransition(instr->from_kind(), instr->to_kind())) { |
2167 LOperand* object = UseRegister(instr->object()); | 2138 LOperand* object = UseRegister(instr->object()); |
2168 LOperand* new_map_reg = TempRegister(); | 2139 LOperand* new_map_reg = TempRegister(); |
2169 LTransitionElementsKind* result = | 2140 LTransitionElementsKind* result = |
2170 new (zone()) LTransitionElementsKind(object, NULL, new_map_reg); | 2141 new (zone()) LTransitionElementsKind(object, NULL, new_map_reg); |
2171 return result; | 2142 return result; |
2172 } else { | 2143 } else { |
2173 LOperand* object = UseFixed(instr->object(), r3); | 2144 LOperand* object = UseFixed(instr->object(), r3); |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2443 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2414 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2444 LOperand* object = UseRegister(instr->object()); | 2415 LOperand* object = UseRegister(instr->object()); |
2445 LOperand* index = UseTempRegister(instr->index()); | 2416 LOperand* index = UseTempRegister(instr->index()); |
2446 LLoadFieldByIndex* load = new (zone()) LLoadFieldByIndex(object, index); | 2417 LLoadFieldByIndex* load = new (zone()) LLoadFieldByIndex(object, index); |
2447 LInstruction* result = DefineSameAsFirst(load); | 2418 LInstruction* result = DefineSameAsFirst(load); |
2448 return AssignPointerMap(result); | 2419 return AssignPointerMap(result); |
2449 } | 2420 } |
2450 | 2421 |
2451 } // namespace internal | 2422 } // namespace internal |
2452 } // namespace v8 | 2423 } // namespace v8 |
OLD | NEW |