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

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

Issue 688633002: [turbofan] add configuration parameters for register allocator (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebase Created 6 years, 1 month 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 | Annotate | Revision Log
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"
9
8 namespace v8 { 10 namespace v8 {
9 namespace internal { 11 namespace internal {
10 namespace compiler { 12 namespace compiler {
11 13
12 // TODO(titzer): replace uses of int with size_t in LinkageHelper. 14 // TODO(titzer): replace uses of int with size_t in LinkageHelper.
13 template <typename LinkageTraits> 15 template <typename LinkageTraits>
14 class LinkageHelper { 16 class LinkageHelper {
15 public: 17 public:
16 static const RegList kNoCalleeSaved = 0; 18 static const RegList kNoCalleeSaved = 0;
17 19
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 js_parameter_count, // js_parameter_count 124 js_parameter_count, // js_parameter_count
123 properties, // properties 125 properties, // properties
124 kNoCalleeSaved, // callee-saved 126 kNoCalleeSaved, // callee-saved
125 flags, // flags 127 flags, // flags
126 function->name); // debug name 128 function->name); // debug name
127 } 129 }
128 130
129 131
130 // TODO(turbofan): cache call descriptors for code stub calls. 132 // TODO(turbofan): cache call descriptors for code stub calls.
131 static CallDescriptor* GetStubCallDescriptor( 133 static CallDescriptor* GetStubCallDescriptor(
132 Zone* zone, CallInterfaceDescriptor descriptor, int stack_parameter_count, 134 Zone* zone, const CallInterfaceDescriptor& descriptor,
133 CallDescriptor::Flags flags) { 135 int stack_parameter_count, CallDescriptor::Flags flags) {
134 const int register_parameter_count = 136 const int register_parameter_count =
135 descriptor.GetEnvironmentParameterCount(); 137 descriptor.GetEnvironmentParameterCount();
136 const int js_parameter_count = 138 const int js_parameter_count =
137 register_parameter_count + stack_parameter_count; 139 register_parameter_count + stack_parameter_count;
138 const int context_count = 1; 140 const int context_count = 1;
139 const size_t return_count = 1; 141 const size_t return_count = 1;
140 const size_t parameter_count = 142 const size_t parameter_count =
141 static_cast<size_t>(js_parameter_count + context_count); 143 static_cast<size_t>(js_parameter_count + context_count);
142 144
143 LocationSignature::Builder locations(zone, return_count, parameter_count); 145 LocationSignature::Builder locations(zone, return_count, parameter_count);
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 static LinkageLocation stackloc(int i) { 219 static LinkageLocation stackloc(int i) {
218 DCHECK_LT(i, 0); 220 DCHECK_LT(i, 0);
219 return LinkageLocation(i); 221 return LinkageLocation(i);
220 } 222 }
221 }; 223 };
222 } // namespace compiler 224 } // namespace compiler
223 } // namespace internal 225 } // namespace internal
224 } // namespace v8 226 } // namespace v8
225 227
226 #endif // V8_COMPILER_LINKAGE_IMPL_H_ 228 #endif // V8_COMPILER_LINKAGE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698