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 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
389 | 389 |
390 | 390 |
391 void LTransitionElementsKind::PrintDataTo(StringStream* stream) { | 391 void LTransitionElementsKind::PrintDataTo(StringStream* stream) { |
392 object()->PrintTo(stream); | 392 object()->PrintTo(stream); |
393 stream->Add(" %p -> %p", *original_map(), *transitioned_map()); | 393 stream->Add(" %p -> %p", *original_map(), *transitioned_map()); |
394 } | 394 } |
395 | 395 |
396 | 396 |
397 int LPlatformChunk::GetNextSpillIndex(RegisterKind kind) { | 397 int LPlatformChunk::GetNextSpillIndex(RegisterKind kind) { |
398 // Skip a slot if for a double-width slot. | 398 // Skip a slot if for a double-width slot. |
399 if (kind == DOUBLE_REGISTERS) spill_slot_count_++; | 399 if (kind == DOUBLE_REGISTERS) current_frame_slots_++; |
400 return spill_slot_count_++; | 400 return current_frame_slots_++; |
401 } | 401 } |
402 | 402 |
403 | 403 |
404 LOperand* LPlatformChunk::GetNextSpillSlot(RegisterKind kind) { | 404 LOperand* LPlatformChunk::GetNextSpillSlot(RegisterKind kind) { |
405 int index = GetNextSpillIndex(kind); | 405 int index = GetNextSpillIndex(kind); |
406 if (kind == DOUBLE_REGISTERS) { | 406 if (kind == DOUBLE_REGISTERS) { |
407 return LDoubleStackSlot::Create(index, zone()); | 407 return LDoubleStackSlot::Create(index, zone()); |
408 } else { | 408 } else { |
409 DCHECK(kind == GENERAL_REGISTERS); | 409 DCHECK(kind == GENERAL_REGISTERS); |
410 return LStackSlot::Create(index, zone()); | 410 return LStackSlot::Create(index, zone()); |
(...skipping 1991 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2402 int env_index = instr->index(); | 2402 int env_index = instr->index(); |
2403 int spill_index = 0; | 2403 int spill_index = 0; |
2404 if (instr->environment()->is_parameter_index(env_index)) { | 2404 if (instr->environment()->is_parameter_index(env_index)) { |
2405 spill_index = chunk()->GetParameterStackSlot(env_index); | 2405 spill_index = chunk()->GetParameterStackSlot(env_index); |
2406 } else { | 2406 } else { |
2407 spill_index = env_index - instr->environment()->first_local_index(); | 2407 spill_index = env_index - instr->environment()->first_local_index(); |
2408 if (spill_index > LUnallocated::kMaxFixedSlotIndex) { | 2408 if (spill_index > LUnallocated::kMaxFixedSlotIndex) { |
2409 Retry(kTooManySpillSlotsNeededForOSR); | 2409 Retry(kTooManySpillSlotsNeededForOSR); |
2410 spill_index = 0; | 2410 spill_index = 0; |
2411 } | 2411 } |
| 2412 spill_index += StandardFrameConstants::kFixedSlotCount; |
2412 } | 2413 } |
2413 return DefineAsSpilled(new (zone()) LUnknownOSRValue, spill_index); | 2414 return DefineAsSpilled(new (zone()) LUnknownOSRValue, spill_index); |
2414 } | 2415 } |
2415 | 2416 |
2416 | 2417 |
2417 LInstruction* LChunkBuilder::DoArgumentsObject(HArgumentsObject* instr) { | 2418 LInstruction* LChunkBuilder::DoArgumentsObject(HArgumentsObject* instr) { |
2418 // There are no real uses of the arguments object. | 2419 // There are no real uses of the arguments object. |
2419 // arguments.length and element access are supported directly on | 2420 // arguments.length and element access are supported directly on |
2420 // stack arguments, and any real arguments object use causes a bailout. | 2421 // stack arguments, and any real arguments object use causes a bailout. |
2421 // So this value is never used. | 2422 // So this value is never used. |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2548 } | 2549 } |
2549 | 2550 |
2550 | 2551 |
2551 LInstruction* LChunkBuilder::DoStoreFrameContext(HStoreFrameContext* instr) { | 2552 LInstruction* LChunkBuilder::DoStoreFrameContext(HStoreFrameContext* instr) { |
2552 LOperand* context = UseRegisterAtStart(instr->context()); | 2553 LOperand* context = UseRegisterAtStart(instr->context()); |
2553 return new (zone()) LStoreFrameContext(context); | 2554 return new (zone()) LStoreFrameContext(context); |
2554 } | 2555 } |
2555 | 2556 |
2556 } // namespace internal | 2557 } // namespace internal |
2557 } // namespace v8 | 2558 } // namespace v8 |
OLD | NEW |