| 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/arm/lithium-arm.h" | 5 #include "src/crankshaft/arm/lithium-arm.h" | 
| 6 | 6 | 
| 7 #include <sstream> | 7 #include <sstream> | 
| 8 | 8 | 
| 9 #include "src/crankshaft/arm/lithium-codegen-arm.h" | 9 #include "src/crankshaft/arm/lithium-codegen-arm.h" | 
| 10 #include "src/crankshaft/hydrogen-osr.h" | 10 #include "src/crankshaft/hydrogen-osr.h" | 
| (...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 376 | 376 | 
| 377 | 377 | 
| 378 void LTransitionElementsKind::PrintDataTo(StringStream* stream) { | 378 void LTransitionElementsKind::PrintDataTo(StringStream* stream) { | 
| 379   object()->PrintTo(stream); | 379   object()->PrintTo(stream); | 
| 380   stream->Add(" %p -> %p", *original_map(), *transitioned_map()); | 380   stream->Add(" %p -> %p", *original_map(), *transitioned_map()); | 
| 381 } | 381 } | 
| 382 | 382 | 
| 383 | 383 | 
| 384 int LPlatformChunk::GetNextSpillIndex(RegisterKind kind) { | 384 int LPlatformChunk::GetNextSpillIndex(RegisterKind kind) { | 
| 385   // Skip a slot if for a double-width slot. | 385   // Skip a slot if for a double-width slot. | 
| 386   if (kind == DOUBLE_REGISTERS) spill_slot_count_++; | 386   if (kind == DOUBLE_REGISTERS) current_frame_slots_++; | 
| 387   return spill_slot_count_++; | 387   return current_frame_slots_++; | 
| 388 } | 388 } | 
| 389 | 389 | 
| 390 | 390 | 
| 391 LOperand* LPlatformChunk::GetNextSpillSlot(RegisterKind kind)  { | 391 LOperand* LPlatformChunk::GetNextSpillSlot(RegisterKind kind)  { | 
| 392   int index = GetNextSpillIndex(kind); | 392   int index = GetNextSpillIndex(kind); | 
| 393   if (kind == DOUBLE_REGISTERS) { | 393   if (kind == DOUBLE_REGISTERS) { | 
| 394     return LDoubleStackSlot::Create(index, zone()); | 394     return LDoubleStackSlot::Create(index, zone()); | 
| 395   } else { | 395   } else { | 
| 396     DCHECK(kind == GENERAL_REGISTERS); | 396     DCHECK(kind == GENERAL_REGISTERS); | 
| 397     return LStackSlot::Create(index, zone()); | 397     return LStackSlot::Create(index, zone()); | 
| (...skipping 2051 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2449   int env_index = instr->index(); | 2449   int env_index = instr->index(); | 
| 2450   int spill_index = 0; | 2450   int spill_index = 0; | 
| 2451   if (instr->environment()->is_parameter_index(env_index)) { | 2451   if (instr->environment()->is_parameter_index(env_index)) { | 
| 2452     spill_index = chunk()->GetParameterStackSlot(env_index); | 2452     spill_index = chunk()->GetParameterStackSlot(env_index); | 
| 2453   } else { | 2453   } else { | 
| 2454     spill_index = env_index - instr->environment()->first_local_index(); | 2454     spill_index = env_index - instr->environment()->first_local_index(); | 
| 2455     if (spill_index > LUnallocated::kMaxFixedSlotIndex) { | 2455     if (spill_index > LUnallocated::kMaxFixedSlotIndex) { | 
| 2456       Retry(kTooManySpillSlotsNeededForOSR); | 2456       Retry(kTooManySpillSlotsNeededForOSR); | 
| 2457       spill_index = 0; | 2457       spill_index = 0; | 
| 2458     } | 2458     } | 
|  | 2459     spill_index += StandardFrameConstants::kFixedSlotCount; | 
| 2459   } | 2460   } | 
| 2460   return DefineAsSpilled(new(zone()) LUnknownOSRValue, spill_index); | 2461   return DefineAsSpilled(new(zone()) LUnknownOSRValue, spill_index); | 
| 2461 } | 2462 } | 
| 2462 | 2463 | 
| 2463 | 2464 | 
| 2464 LInstruction* LChunkBuilder::DoCallStub(HCallStub* instr) { | 2465 LInstruction* LChunkBuilder::DoCallStub(HCallStub* instr) { | 
| 2465   LOperand* context = UseFixed(instr->context(), cp); | 2466   LOperand* context = UseFixed(instr->context(), cp); | 
| 2466   return MarkAsCall(DefineFixed(new(zone()) LCallStub(context), r0), instr); | 2467   return MarkAsCall(DefineFixed(new(zone()) LCallStub(context), r0), instr); | 
| 2467 } | 2468 } | 
| 2468 | 2469 | 
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2612     HAllocateBlockContext* instr) { | 2613     HAllocateBlockContext* instr) { | 
| 2613   LOperand* context = UseFixed(instr->context(), cp); | 2614   LOperand* context = UseFixed(instr->context(), cp); | 
| 2614   LOperand* function = UseRegisterAtStart(instr->function()); | 2615   LOperand* function = UseRegisterAtStart(instr->function()); | 
| 2615   LAllocateBlockContext* result = | 2616   LAllocateBlockContext* result = | 
| 2616       new(zone()) LAllocateBlockContext(context, function); | 2617       new(zone()) LAllocateBlockContext(context, function); | 
| 2617   return MarkAsCall(DefineFixed(result, cp), instr); | 2618   return MarkAsCall(DefineFixed(result, cp), instr); | 
| 2618 } | 2619 } | 
| 2619 | 2620 | 
| 2620 }  // namespace internal | 2621 }  // namespace internal | 
| 2621 }  // namespace v8 | 2622 }  // namespace v8 | 
| OLD | NEW | 
|---|