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

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

Issue 1697503002: [turbofan] Remove support for LazyBailout operators. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_trycatch-test-enable
Patch Set: Rebased. Created 4 years, 10 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/linkage.h ('k') | src/compiler/mips/code-generator-mips.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 #include "src/ast/scopes.h" 5 #include "src/ast/scopes.h"
6 #include "src/code-stubs.h" 6 #include "src/code-stubs.h"
7 #include "src/compiler.h" 7 #include "src/compiler.h"
8 #include "src/compiler/common-operator.h" 8 #include "src/compiler/common-operator.h"
9 #include "src/compiler/frame.h" 9 #include "src/compiler/frame.h"
10 #include "src/compiler/linkage.h" 10 #include "src/compiler/linkage.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 switch (k) { 56 switch (k) {
57 case CallDescriptor::kCallCodeObject: 57 case CallDescriptor::kCallCodeObject:
58 os << "Code"; 58 os << "Code";
59 break; 59 break;
60 case CallDescriptor::kCallJSFunction: 60 case CallDescriptor::kCallJSFunction:
61 os << "JS"; 61 os << "JS";
62 break; 62 break;
63 case CallDescriptor::kCallAddress: 63 case CallDescriptor::kCallAddress:
64 os << "Addr"; 64 os << "Addr";
65 break; 65 break;
66 case CallDescriptor::kLazyBailout:
67 os << "LazyBail";
68 break;
69 } 66 }
70 return os; 67 return os;
71 } 68 }
72 69
73 70
74 std::ostream& operator<<(std::ostream& os, const CallDescriptor& d) { 71 std::ostream& operator<<(std::ostream& os, const CallDescriptor& d) {
75 // TODO(svenpanne) Output properties etc. and be less cryptic. 72 // TODO(svenpanne) Output properties etc. and be less cryptic.
76 return os << d.kind() << ":" << d.debug_name() << ":r" << d.ReturnCount() 73 return os << d.kind() << ":" << d.debug_name() << ":r" << d.ReturnCount()
77 << "s" << d.StackParameterCount() << "i" << d.InputCount() << "f" 74 << "s" << d.StackParameterCount() << "i" << d.InputCount() << "f"
78 << d.FrameStateCount() << "t" << d.SupportsTailCalls(); 75 << d.FrameStateCount() << "t" << d.SupportsTailCalls();
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 locations.Build(), // location_sig 272 locations.Build(), // location_sig
276 js_parameter_count, // stack_parameter_count 273 js_parameter_count, // stack_parameter_count
277 properties, // properties 274 properties, // properties
278 kNoCalleeSaved, // callee-saved 275 kNoCalleeSaved, // callee-saved
279 kNoCalleeSaved, // callee-saved fp 276 kNoCalleeSaved, // callee-saved fp
280 flags, // flags 277 flags, // flags
281 function->name); // debug name 278 function->name); // debug name
282 } 279 }
283 280
284 281
285 CallDescriptor* Linkage::GetLazyBailoutDescriptor(Zone* zone) {
286 const size_t return_count = 0;
287 const size_t parameter_count = 0;
288
289 LocationSignature::Builder locations(zone, return_count, parameter_count);
290 MachineSignature::Builder types(zone, return_count, parameter_count);
291
292 // The target is ignored, but we need to give some values here.
293 MachineType target_type = MachineType::AnyTagged();
294 LinkageLocation target_loc = regloc(kJSFunctionRegister);
295 return new (zone) CallDescriptor( // --
296 CallDescriptor::kLazyBailout, // kind
297 target_type, // target MachineType
298 target_loc, // target location
299 types.Build(), // machine_sig
300 locations.Build(), // location_sig
301 0, // stack_parameter_count
302 Operator::kNoThrow, // properties
303 kNoCalleeSaved, // callee-saved
304 kNoCalleeSaved, // callee-saved fp
305 CallDescriptor::kNeedsFrameState, // flags
306 "lazy-bailout");
307 }
308
309
310 CallDescriptor* Linkage::GetJSCallDescriptor(Zone* zone, bool is_osr, 282 CallDescriptor* Linkage::GetJSCallDescriptor(Zone* zone, bool is_osr,
311 int js_parameter_count, 283 int js_parameter_count,
312 CallDescriptor::Flags flags) { 284 CallDescriptor::Flags flags) {
313 const size_t return_count = 1; 285 const size_t return_count = 1;
314 const size_t context_count = 1; 286 const size_t context_count = 1;
315 const size_t new_target_count = 1; 287 const size_t new_target_count = 1;
316 const size_t num_args_count = 1; 288 const size_t num_args_count = 1;
317 const size_t parameter_count = 289 const size_t parameter_count =
318 js_parameter_count + new_target_count + num_args_count + context_count; 290 js_parameter_count + new_target_count + num_args_count + context_count;
319 291
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 } else { 446 } else {
475 DCHECK(loc == regloc(kContextRegister)); 447 DCHECK(loc == regloc(kContextRegister));
476 return LinkageLocation::ForCalleeFrameSlot(Frame::kContextSlot); 448 return LinkageLocation::ForCalleeFrameSlot(Frame::kContextSlot);
477 } 449 }
478 } 450 }
479 451
480 452
481 } // namespace compiler 453 } // namespace compiler
482 } // namespace internal 454 } // namespace internal
483 } // namespace v8 455 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/linkage.h ('k') | src/compiler/mips/code-generator-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698