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

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

Issue 1412443003: [turbofan] Introduce lazy bailout, masked as a call. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Enable test 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.cc ('k') | src/compiler/linkage.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_H_ 5 #ifndef V8_COMPILER_LINKAGE_H_
6 #define V8_COMPILER_LINKAGE_H_ 6 #define V8_COMPILER_LINKAGE_H_
7 7
8 #include "src/base/flags.h" 8 #include "src/base/flags.h"
9 #include "src/compiler/frame.h" 9 #include "src/compiler/frame.h"
10 #include "src/compiler/machine-type.h" 10 #include "src/compiler/machine-type.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 }; 103 };
104 104
105 typedef Signature<LinkageLocation> LocationSignature; 105 typedef Signature<LinkageLocation> LocationSignature;
106 106
107 // Describes a call to various parts of the compiler. Every call has the notion 107 // Describes a call to various parts of the compiler. Every call has the notion
108 // of a "target", which is the first input to the call. 108 // of a "target", which is the first input to the call.
109 class CallDescriptor final : public ZoneObject { 109 class CallDescriptor final : public ZoneObject {
110 public: 110 public:
111 // Describes the kind of this call, which determines the target. 111 // Describes the kind of this call, which determines the target.
112 enum Kind { 112 enum Kind {
113 kCallCodeObject, // target is a Code object 113 kCallCodeObject, // target is a Code object
114 kCallJSFunction, // target is a JSFunction object 114 kCallJSFunction, // target is a JSFunction object
115 kCallAddress, // target is a machine pointer 115 kCallAddress, // target is a machine pointer
116 kLazyBailout // the call is no-op, only used for lazy bailout
116 }; 117 };
117 118
118 enum Flag { 119 enum Flag {
119 kNoFlags = 0u, 120 kNoFlags = 0u,
120 kNeedsFrameState = 1u << 0, 121 kNeedsFrameState = 1u << 0,
121 kPatchableCallSite = 1u << 1, 122 kPatchableCallSite = 1u << 1,
122 kNeedsNopAfterCall = 1u << 2, 123 kNeedsNopAfterCall = 1u << 2,
123 kHasExceptionHandler = 1u << 3, 124 kHasExceptionHandler = 1u << 3,
124 kHasLocalCatchHandler = 1u << 4, 125 kHasLocalCatchHandler = 1u << 4,
125 kSupportsTailCalls = 1u << 5, 126 kSupportsTailCalls = 1u << 5,
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 explicit Linkage(CallDescriptor* incoming) : incoming_(incoming) {} 265 explicit Linkage(CallDescriptor* incoming) : incoming_(incoming) {}
265 266
266 static CallDescriptor* ComputeIncoming(Zone* zone, CompilationInfo* info); 267 static CallDescriptor* ComputeIncoming(Zone* zone, CompilationInfo* info);
267 268
268 // The call descriptor for this compilation unit describes the locations 269 // The call descriptor for this compilation unit describes the locations
269 // of incoming parameters and the outgoing return value(s). 270 // of incoming parameters and the outgoing return value(s).
270 CallDescriptor* GetIncomingDescriptor() const { return incoming_; } 271 CallDescriptor* GetIncomingDescriptor() const { return incoming_; }
271 static CallDescriptor* GetJSCallDescriptor(Zone* zone, bool is_osr, 272 static CallDescriptor* GetJSCallDescriptor(Zone* zone, bool is_osr,
272 int parameter_count, 273 int parameter_count,
273 CallDescriptor::Flags flags); 274 CallDescriptor::Flags flags);
275
274 static CallDescriptor* GetRuntimeCallDescriptor( 276 static CallDescriptor* GetRuntimeCallDescriptor(
275 Zone* zone, Runtime::FunctionId function, int parameter_count, 277 Zone* zone, Runtime::FunctionId function, int parameter_count,
276 Operator::Properties properties, bool needs_frame_state = true); 278 Operator::Properties properties, bool needs_frame_state = true);
277 279
280 static CallDescriptor* GetLazyBailoutDescriptor(Zone* zone);
281
278 static CallDescriptor* GetStubCallDescriptor( 282 static CallDescriptor* GetStubCallDescriptor(
279 Isolate* isolate, Zone* zone, const CallInterfaceDescriptor& descriptor, 283 Isolate* isolate, Zone* zone, const CallInterfaceDescriptor& descriptor,
280 int stack_parameter_count, CallDescriptor::Flags flags, 284 int stack_parameter_count, CallDescriptor::Flags flags,
281 Operator::Properties properties = Operator::kNoProperties, 285 Operator::Properties properties = Operator::kNoProperties,
282 MachineType return_type = kMachAnyTagged); 286 MachineType return_type = kMachAnyTagged);
283 287
284 // Creates a call descriptor for simplified C calls that is appropriate 288 // Creates a call descriptor for simplified C calls that is appropriate
285 // for the host platform. This simplified calling convention only supports 289 // for the host platform. This simplified calling convention only supports
286 // integers and pointers of one word size each, i.e. no floating point, 290 // integers and pointers of one word size each, i.e. no floating point,
287 // structs, pointers to members, etc. 291 // structs, pointers to members, etc.
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 CallDescriptor* const incoming_; 347 CallDescriptor* const incoming_;
344 348
345 DISALLOW_COPY_AND_ASSIGN(Linkage); 349 DISALLOW_COPY_AND_ASSIGN(Linkage);
346 }; 350 };
347 351
348 } // namespace compiler 352 } // namespace compiler
349 } // namespace internal 353 } // namespace internal
350 } // namespace v8 354 } // namespace v8
351 355
352 #endif // V8_COMPILER_LINKAGE_H_ 356 #endif // V8_COMPILER_LINKAGE_H_
OLDNEW
« no previous file with comments | « src/compiler/instruction-selector.cc ('k') | src/compiler/linkage.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698