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

Side by Side Diff: src/compiler/linkage.cc

Issue 1287383003: Re-reland: Remove register index/code indirection (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix MIPS tests again Created 5 years, 2 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
« no previous file with comments | « src/compiler/instruction-selector-impl.h ('k') | src/compiler/pipeline.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/code-stubs.h" 5 #include "src/code-stubs.h"
6 #include "src/compiler.h" 6 #include "src/compiler.h"
7 #include "src/compiler/common-operator.h" 7 #include "src/compiler/common-operator.h"
8 #include "src/compiler/frame.h" 8 #include "src/compiler/frame.h"
9 #include "src/compiler/linkage.h" 9 #include "src/compiler/linkage.h"
10 #include "src/compiler/node.h" 10 #include "src/compiler/node.h"
11 #include "src/compiler/osr.h" 11 #include "src/compiler/osr.h"
12 #include "src/compiler/pipeline.h" 12 #include "src/compiler/pipeline.h"
13 #include "src/scopes.h" 13 #include "src/scopes.h"
14 14
15 namespace v8 { 15 namespace v8 {
16 namespace internal { 16 namespace internal {
17 namespace compiler { 17 namespace compiler {
18 18
19 namespace { 19 namespace {
20 LinkageLocation regloc(Register reg) { 20 LinkageLocation regloc(Register reg) {
21 return LinkageLocation::ForRegister(Register::ToAllocationIndex(reg)); 21 return LinkageLocation::ForRegister(reg.code());
22 } 22 }
23 23
24 24
25 MachineType reptyp(Representation representation) { 25 MachineType reptyp(Representation representation) {
26 switch (representation.kind()) { 26 switch (representation.kind()) {
27 case Representation::kInteger8: 27 case Representation::kInteger8:
28 return kMachInt8; 28 return kMachInt8;
29 case Representation::kUInteger8: 29 case Representation::kUInteger8:
30 return kMachUint8; 30 return kMachUint8;
31 case Representation::kInteger16: 31 case Representation::kInteger16:
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 return LinkageLocation::ForCalleeFrameSlot(spill_index); 525 return LinkageLocation::ForCalleeFrameSlot(spill_index);
526 } else { 526 } else {
527 // Parameter. Use the assigned location from the incoming call descriptor. 527 // Parameter. Use the assigned location from the incoming call descriptor.
528 int parameter_index = 1 + index; // skip index 0, which is the target. 528 int parameter_index = 1 + index; // skip index 0, which is the target.
529 return incoming_->GetInputLocation(parameter_index); 529 return incoming_->GetInputLocation(parameter_index);
530 } 530 }
531 } 531 }
532 } // namespace compiler 532 } // namespace compiler
533 } // namespace internal 533 } // namespace internal
534 } // namespace v8 534 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/instruction-selector-impl.h ('k') | src/compiler/pipeline.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698