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

Side by Side Diff: src/crankshaft/mips64/lithium-mips64.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/mips64/lithium-mips64.h" 5 #include "src/crankshaft/mips64/lithium-mips64.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #if V8_TARGET_ARCH_MIPS64 9 #if V8_TARGET_ARCH_MIPS64
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 1996 matching lines...) Expand 10 before | Expand all | Expand 10 after
2401 int env_index = instr->index(); 2401 int env_index = instr->index();
2402 int spill_index = 0; 2402 int spill_index = 0;
2403 if (instr->environment()->is_parameter_index(env_index)) { 2403 if (instr->environment()->is_parameter_index(env_index)) {
2404 spill_index = chunk()->GetParameterStackSlot(env_index); 2404 spill_index = chunk()->GetParameterStackSlot(env_index);
2405 } else { 2405 } else {
2406 spill_index = env_index - instr->environment()->first_local_index(); 2406 spill_index = env_index - instr->environment()->first_local_index();
2407 if (spill_index > LUnallocated::kMaxFixedSlotIndex) { 2407 if (spill_index > LUnallocated::kMaxFixedSlotIndex) {
2408 Retry(kTooManySpillSlotsNeededForOSR); 2408 Retry(kTooManySpillSlotsNeededForOSR);
2409 spill_index = 0; 2409 spill_index = 0;
2410 } 2410 }
2411 spill_index += StandardFrameConstants::kFixedSlotCount;
2411 } 2412 }
2412 return DefineAsSpilled(new(zone()) LUnknownOSRValue, spill_index); 2413 return DefineAsSpilled(new(zone()) LUnknownOSRValue, spill_index);
2413 } 2414 }
2414 2415
2415 2416
2416 LInstruction* LChunkBuilder::DoCallStub(HCallStub* instr) { 2417 LInstruction* LChunkBuilder::DoCallStub(HCallStub* instr) {
2417 LOperand* context = UseFixed(instr->context(), cp); 2418 LOperand* context = UseFixed(instr->context(), cp);
2418 return MarkAsCall(DefineFixed(new(zone()) LCallStub(context), v0), instr); 2419 return MarkAsCall(DefineFixed(new(zone()) LCallStub(context), v0), instr);
2419 } 2420 }
2420 2421
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
2567 LAllocateBlockContext* result = 2568 LAllocateBlockContext* result =
2568 new(zone()) LAllocateBlockContext(context, function); 2569 new(zone()) LAllocateBlockContext(context, function);
2569 return MarkAsCall(DefineFixed(result, cp), instr); 2570 return MarkAsCall(DefineFixed(result, cp), instr);
2570 } 2571 }
2571 2572
2572 2573
2573 } // namespace internal 2574 } // namespace internal
2574 } // namespace v8 2575 } // namespace v8
2575 2576
2576 #endif // V8_TARGET_ARCH_MIPS64 2577 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/crankshaft/mips64/lithium-codegen-mips64.cc ('k') | src/crankshaft/x64/lithium-codegen-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698