Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(737)

Side by Side Diff: src/crankshaft/mips/lithium-mips.cc

Issue 1702593002: More simplification and unification of frame handling (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix arm64 Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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...) Expand 10 before | Expand all | Expand 10 after
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) spill_slot_count_++; 393 if (kind == DOUBLE_REGISTERS) current_frame_slots_++;
394 return spill_slot_count_++; 394 return current_frame_slots_++;
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...) Expand 10 before | Expand all | Expand 10 after
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;
2406 } 2407 }
2407 return DefineAsSpilled(new(zone()) LUnknownOSRValue, spill_index); 2408 return DefineAsSpilled(new(zone()) LUnknownOSRValue, spill_index);
2408 } 2409 }
2409 2410
2410 2411
2411 LInstruction* LChunkBuilder::DoCallStub(HCallStub* instr) { 2412 LInstruction* LChunkBuilder::DoCallStub(HCallStub* instr) {
2412 LOperand* context = UseFixed(instr->context(), cp); 2413 LOperand* context = UseFixed(instr->context(), cp);
2413 return MarkAsCall(DefineFixed(new(zone()) LCallStub(context), v0), instr); 2414 return MarkAsCall(DefineFixed(new(zone()) LCallStub(context), v0), instr);
2414 } 2415 }
2415 2416
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
2562 LOperand* function = UseRegisterAtStart(instr->function()); 2563 LOperand* function = UseRegisterAtStart(instr->function());
2563 LAllocateBlockContext* result = 2564 LAllocateBlockContext* result =
2564 new(zone()) LAllocateBlockContext(context, function); 2565 new(zone()) LAllocateBlockContext(context, function);
2565 return MarkAsCall(DefineFixed(result, cp), instr); 2566 return MarkAsCall(DefineFixed(result, cp), instr);
2566 } 2567 }
2567 2568
2568 } // namespace internal 2569 } // namespace internal
2569 } // namespace v8 2570 } // namespace v8
2570 2571
2571 #endif // V8_TARGET_ARCH_MIPS 2572 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/crankshaft/mips/lithium-codegen-mips.cc ('k') | src/crankshaft/mips64/lithium-codegen-mips64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698