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

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

Issue 792463003: [turbofan] Turn JSToBoolean and JSUnaryNot into pure operators. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years 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 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 9
10 namespace v8 { 10 namespace v8 {
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 properties, // properties 127 properties, // properties
128 kNoCalleeSaved, // callee-saved 128 kNoCalleeSaved, // callee-saved
129 flags, // flags 129 flags, // flags
130 function->name); // debug name 130 function->name); // debug name
131 } 131 }
132 132
133 133
134 // TODO(turbofan): cache call descriptors for code stub calls. 134 // TODO(turbofan): cache call descriptors for code stub calls.
135 static CallDescriptor* GetStubCallDescriptor( 135 static CallDescriptor* GetStubCallDescriptor(
136 Zone* zone, const CallInterfaceDescriptor& descriptor, 136 Zone* zone, const CallInterfaceDescriptor& descriptor,
137 int stack_parameter_count, CallDescriptor::Flags flags) { 137 int stack_parameter_count, CallDescriptor::Flags flags,
138 Operator::Properties properties) {
138 const int register_parameter_count = 139 const int register_parameter_count =
139 descriptor.GetEnvironmentParameterCount(); 140 descriptor.GetEnvironmentParameterCount();
140 const int js_parameter_count = 141 const int js_parameter_count =
141 register_parameter_count + stack_parameter_count; 142 register_parameter_count + stack_parameter_count;
142 const int context_count = 1; 143 const int context_count = 1;
143 const size_t return_count = 1; 144 const size_t return_count = 1;
144 const size_t parameter_count = 145 const size_t parameter_count =
145 static_cast<size_t>(js_parameter_count + context_count); 146 static_cast<size_t>(js_parameter_count + context_count);
146 147
147 LocationSignature::Builder locations(zone, return_count, parameter_count); 148 LocationSignature::Builder locations(zone, return_count, parameter_count);
(...skipping 23 matching lines...) Expand all
171 // The target for stub calls is a code object. 172 // The target for stub calls is a code object.
172 MachineType target_type = kMachAnyTagged; 173 MachineType target_type = kMachAnyTagged;
173 LinkageLocation target_loc = LinkageLocation::AnyRegister(); 174 LinkageLocation target_loc = LinkageLocation::AnyRegister();
174 return new (zone) CallDescriptor( // -- 175 return new (zone) CallDescriptor( // --
175 CallDescriptor::kCallCodeObject, // kind 176 CallDescriptor::kCallCodeObject, // kind
176 target_type, // target MachineType 177 target_type, // target MachineType
177 target_loc, // target location 178 target_loc, // target location
178 types.Build(), // machine_sig 179 types.Build(), // machine_sig
179 locations.Build(), // location_sig 180 locations.Build(), // location_sig
180 js_parameter_count, // js_parameter_count 181 js_parameter_count, // js_parameter_count
181 Operator::kNoProperties, // properties 182 properties, // properties
182 kNoCalleeSaved, // callee-saved registers 183 kNoCalleeSaved, // callee-saved registers
183 flags, // flags 184 flags, // flags
184 descriptor.DebugName(zone->isolate())); 185 descriptor.DebugName(zone->isolate()));
185 } 186 }
186 187
187 static CallDescriptor* GetSimplifiedCDescriptor(Zone* zone, 188 static CallDescriptor* GetSimplifiedCDescriptor(Zone* zone,
188 MachineSignature* msig) { 189 MachineSignature* msig) {
189 LocationSignature::Builder locations(zone, msig->return_count(), 190 LocationSignature::Builder locations(zone, msig->return_count(),
190 msig->parameter_count()); 191 msig->parameter_count());
191 // Add return location(s). 192 // Add return location(s).
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 static LinkageLocation stackloc(int i) { 224 static LinkageLocation stackloc(int i) {
224 DCHECK_LT(i, 0); 225 DCHECK_LT(i, 0);
225 return LinkageLocation(i); 226 return LinkageLocation(i);
226 } 227 }
227 }; 228 };
228 } // namespace compiler 229 } // namespace compiler
229 } // namespace internal 230 } // namespace internal
230 } // namespace v8 231 } // namespace v8
231 232
232 #endif // V8_COMPILER_LINKAGE_IMPL_H_ 233 #endif // V8_COMPILER_LINKAGE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698