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

Side by Side Diff: src/compiler/linkage-impl.h

Issue 1197703002: Use big-boy Types to annotate interface descriptor parameters (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Latest Created 5 years, 6 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.cc ('k') | src/compiler/pipeline.cc » ('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 #ifndef V8_COMPILER_LINKAGE_IMPL_H_ 5 #ifndef V8_COMPILER_LINKAGE_IMPL_H_
6 #define V8_COMPILER_LINKAGE_IMPL_H_ 6 #define V8_COMPILER_LINKAGE_IMPL_H_
7 7
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/compiler/osr.h" 9 #include "src/compiler/osr.h"
10 10
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 // Add return location. 158 // Add return location.
159 AddReturnLocations(&locations); 159 AddReturnLocations(&locations);
160 types.AddReturn(return_type); 160 types.AddReturn(return_type);
161 161
162 // Add parameters in registers and on the stack. 162 // Add parameters in registers and on the stack.
163 for (int i = 0; i < js_parameter_count; i++) { 163 for (int i = 0; i < js_parameter_count; i++) {
164 if (i < register_parameter_count) { 164 if (i < register_parameter_count) {
165 // The first parameters go in registers. 165 // The first parameters go in registers.
166 Register reg = descriptor.GetEnvironmentParameterRegister(i); 166 Register reg = descriptor.GetEnvironmentParameterRegister(i);
167 Representation rep = 167 Representation rep =
168 descriptor.GetEnvironmentParameterRepresentation(i); 168 RepresentationFromType(descriptor.GetEnvironmentParameterType(i));
169 locations.AddParam(regloc(reg)); 169 locations.AddParam(regloc(reg));
170 types.AddParam(reptyp(rep)); 170 types.AddParam(reptyp(rep));
171 } else { 171 } else {
172 // The rest of the parameters go on the stack. 172 // The rest of the parameters go on the stack.
173 int stack_slot = i - register_parameter_count - stack_parameter_count; 173 int stack_slot = i - register_parameter_count - stack_parameter_count;
174 locations.AddParam(stackloc(stack_slot)); 174 locations.AddParam(stackloc(stack_slot));
175 types.AddParam(kMachAnyTagged); 175 types.AddParam(kMachAnyTagged);
176 } 176 }
177 } 177 }
178 // Add context. 178 // Add context.
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 int parameter_index = 1 + index; // skip index 0, which is the target. 284 int parameter_index = 1 + index; // skip index 0, which is the target.
285 return incoming_->GetInputLocation(parameter_index); 285 return incoming_->GetInputLocation(parameter_index);
286 } 286 }
287 } 287 }
288 288
289 } // namespace compiler 289 } // namespace compiler
290 } // namespace internal 290 } // namespace internal
291 } // namespace v8 291 } // namespace v8
292 292
293 #endif // V8_COMPILER_LINKAGE_IMPL_H_ 293 #endif // V8_COMPILER_LINKAGE_IMPL_H_
OLDNEW
« no previous file with comments | « src/compiler.cc ('k') | src/compiler/pipeline.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698