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 372 matching lines...) Loading... |
383 | 383 |
384 | 384 |
385 void LTransitionElementsKind::PrintDataTo(StringStream* stream) { | 385 void LTransitionElementsKind::PrintDataTo(StringStream* stream) { |
386 object()->PrintTo(stream); | 386 object()->PrintTo(stream); |
387 stream->Add(" %p -> %p", *original_map(), *transitioned_map()); | 387 stream->Add(" %p -> %p", *original_map(), *transitioned_map()); |
388 } | 388 } |
389 | 389 |
390 | 390 |
391 int LPlatformChunk::GetNextSpillIndex(RegisterKind kind) { | 391 int LPlatformChunk::GetNextSpillIndex(RegisterKind kind) { |
392 // Skip a slot if for a double-width slot. | 392 // Skip a slot if for a double-width slot. |
393 if (kind == DOUBLE_REGISTERS) current_frame_slots_++; | 393 if (kind == DOUBLE_REGISTERS) spill_slot_count_++; |
394 return current_frame_slots_++; | 394 return spill_slot_count_++; |
395 } | 395 } |
396 | 396 |
397 | 397 |
398 LOperand* LPlatformChunk::GetNextSpillSlot(RegisterKind kind) { | 398 LOperand* LPlatformChunk::GetNextSpillSlot(RegisterKind kind) { |
399 int index = GetNextSpillIndex(kind); | 399 int index = GetNextSpillIndex(kind); |
400 if (kind == DOUBLE_REGISTERS) { | 400 if (kind == DOUBLE_REGISTERS) { |
401 return LDoubleStackSlot::Create(index, zone()); | 401 return LDoubleStackSlot::Create(index, zone()); |
402 } else { | 402 } else { |
403 DCHECK(kind == GENERAL_REGISTERS); | 403 DCHECK(kind == GENERAL_REGISTERS); |
404 return LStackSlot::Create(index, zone()); | 404 return LStackSlot::Create(index, zone()); |
(...skipping 1991 matching lines...) Loading... |
2396 int env_index = instr->index(); | 2396 int env_index = instr->index(); |
2397 int spill_index = 0; | 2397 int spill_index = 0; |
2398 if (instr->environment()->is_parameter_index(env_index)) { | 2398 if (instr->environment()->is_parameter_index(env_index)) { |
2399 spill_index = chunk()->GetParameterStackSlot(env_index); | 2399 spill_index = chunk()->GetParameterStackSlot(env_index); |
2400 } else { | 2400 } else { |
2401 spill_index = env_index - instr->environment()->first_local_index(); | 2401 spill_index = env_index - instr->environment()->first_local_index(); |
2402 if (spill_index > LUnallocated::kMaxFixedSlotIndex) { | 2402 if (spill_index > LUnallocated::kMaxFixedSlotIndex) { |
2403 Retry(kTooManySpillSlotsNeededForOSR); | 2403 Retry(kTooManySpillSlotsNeededForOSR); |
2404 spill_index = 0; | 2404 spill_index = 0; |
2405 } | 2405 } |
2406 spill_index += StandardFrameConstants::kFixedSlotCount; | |
2407 } | 2406 } |
2408 return DefineAsSpilled(new(zone()) LUnknownOSRValue, spill_index); | 2407 return DefineAsSpilled(new(zone()) LUnknownOSRValue, spill_index); |
2409 } | 2408 } |
2410 | 2409 |
2411 | 2410 |
2412 LInstruction* LChunkBuilder::DoCallStub(HCallStub* instr) { | 2411 LInstruction* LChunkBuilder::DoCallStub(HCallStub* instr) { |
2413 LOperand* context = UseFixed(instr->context(), cp); | 2412 LOperand* context = UseFixed(instr->context(), cp); |
2414 return MarkAsCall(DefineFixed(new(zone()) LCallStub(context), v0), instr); | 2413 return MarkAsCall(DefineFixed(new(zone()) LCallStub(context), v0), instr); |
2415 } | 2414 } |
2416 | 2415 |
(...skipping 146 matching lines...) Loading... |
2563 LOperand* function = UseRegisterAtStart(instr->function()); | 2562 LOperand* function = UseRegisterAtStart(instr->function()); |
2564 LAllocateBlockContext* result = | 2563 LAllocateBlockContext* result = |
2565 new(zone()) LAllocateBlockContext(context, function); | 2564 new(zone()) LAllocateBlockContext(context, function); |
2566 return MarkAsCall(DefineFixed(result, cp), instr); | 2565 return MarkAsCall(DefineFixed(result, cp), instr); |
2567 } | 2566 } |
2568 | 2567 |
2569 } // namespace internal | 2568 } // namespace internal |
2570 } // namespace v8 | 2569 } // namespace v8 |
2571 | 2570 |
2572 #endif // V8_TARGET_ARCH_MIPS | 2571 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |