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

Side by Side Diff: src/compiler/code-generator.cc

Issue 1287383003: Re-reland: Remove register index/code indirection (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Updated to ToT Created 5 years, 3 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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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/compiler/code-generator.h" 5 #include "src/compiler/code-generator.h"
6 6
7 #include "src/compiler/code-generator-impl.h" 7 #include "src/compiler/code-generator-impl.h"
8 #include "src/compiler/linkage.h" 8 #include "src/compiler/linkage.h"
9 #include "src/compiler/pipeline.h" 9 #include "src/compiler/pipeline.h"
10 #include "src/frames-inl.h" 10 #include "src/frames-inl.h"
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 frame()->GetTotalFrameSlotCount() - frame()->GetSpillSlotCount(); 220 frame()->GetTotalFrameSlotCount() - frame()->GetSpillSlotCount();
221 for (auto& operand : references->reference_operands()) { 221 for (auto& operand : references->reference_operands()) {
222 if (operand.IsStackSlot()) { 222 if (operand.IsStackSlot()) {
223 int index = StackSlotOperand::cast(operand).index(); 223 int index = StackSlotOperand::cast(operand).index();
224 DCHECK(index >= 0); 224 DCHECK(index >= 0);
225 // Safepoint table indices are 0-based from the beginning of the spill 225 // Safepoint table indices are 0-based from the beginning of the spill
226 // slot area, adjust appropriately. 226 // slot area, adjust appropriately.
227 index -= stackSlotToSpillSlotDelta; 227 index -= stackSlotToSpillSlotDelta;
228 safepoint.DefinePointerSlot(index, zone()); 228 safepoint.DefinePointerSlot(index, zone());
229 } else if (operand.IsRegister() && (kind & Safepoint::kWithRegisters)) { 229 } else if (operand.IsRegister() && (kind & Safepoint::kWithRegisters)) {
230 Register reg = 230 Register reg = RegisterOperand::cast(operand).GetRegister();
231 Register::FromAllocationIndex(RegisterOperand::cast(operand).index());
232 safepoint.DefinePointerRegister(reg, zone()); 231 safepoint.DefinePointerRegister(reg, zone());
233 } 232 }
234 } 233 }
235 } 234 }
236 235
237 236
238 bool CodeGenerator::IsMaterializableFromFrame(Handle<HeapObject> object, 237 bool CodeGenerator::IsMaterializableFromFrame(Handle<HeapObject> object,
239 int* offset_return) { 238 int* offset_return) {
240 if (linkage()->GetIncomingDescriptor()->IsJSFunctionCall()) { 239 if (linkage()->GetIncomingDescriptor()->IsJSFunctionCall()) {
241 if (info()->has_context() && object.is_identical_to(info()->context()) && 240 if (info()->has_context() && object.is_identical_to(info()->context()) &&
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
665 : masm_(gen->masm()), next_(gen->ools_) { 664 : masm_(gen->masm()), next_(gen->ools_) {
666 gen->ools_ = this; 665 gen->ools_ = this;
667 } 666 }
668 667
669 668
670 OutOfLineCode::~OutOfLineCode() {} 669 OutOfLineCode::~OutOfLineCode() {}
671 670
672 } // namespace compiler 671 } // namespace compiler
673 } // namespace internal 672 } // namespace internal
674 } // namespace v8 673 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698