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

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

Issue 874693006: Const-corrected some MachineSignature* parameters. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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/ia32/linkage-ia32.cc ('k') | src/compiler/linkage-impl.h » ('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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 // TODO(jarin) kLazyDeoptimization and kNeedsFrameState should be unified. 57 // TODO(jarin) kLazyDeoptimization and kNeedsFrameState should be unified.
58 kNoFlags = 0u, 58 kNoFlags = 0u,
59 kNeedsFrameState = 1u << 0, 59 kNeedsFrameState = 1u << 0,
60 kPatchableCallSite = 1u << 1, 60 kPatchableCallSite = 1u << 1,
61 kNeedsNopAfterCall = 1u << 2, 61 kNeedsNopAfterCall = 1u << 2,
62 kPatchableCallSiteWithNop = kPatchableCallSite | kNeedsNopAfterCall 62 kPatchableCallSiteWithNop = kPatchableCallSite | kNeedsNopAfterCall
63 }; 63 };
64 typedef base::Flags<Flag> Flags; 64 typedef base::Flags<Flag> Flags;
65 65
66 CallDescriptor(Kind kind, MachineType target_type, LinkageLocation target_loc, 66 CallDescriptor(Kind kind, MachineType target_type, LinkageLocation target_loc,
67 MachineSignature* machine_sig, LocationSignature* location_sig, 67 const MachineSignature* machine_sig,
68 size_t js_param_count, Operator::Properties properties, 68 LocationSignature* location_sig, size_t js_param_count,
69 Operator::Properties properties,
69 RegList callee_saved_registers, Flags flags, 70 RegList callee_saved_registers, Flags flags,
70 const char* debug_name = "") 71 const char* debug_name = "")
71 : kind_(kind), 72 : kind_(kind),
72 target_type_(target_type), 73 target_type_(target_type),
73 target_loc_(target_loc), 74 target_loc_(target_loc),
74 machine_sig_(machine_sig), 75 machine_sig_(machine_sig),
75 location_sig_(location_sig), 76 location_sig_(location_sig),
76 js_param_count_(js_param_count), 77 js_param_count_(js_param_count),
77 properties_(properties), 78 properties_(properties),
78 callee_saved_registers_(callee_saved_registers), 79 callee_saved_registers_(callee_saved_registers),
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 static CallDescriptor* GetStubCallDescriptor( 203 static CallDescriptor* GetStubCallDescriptor(
203 Isolate* isolate, Zone* zone, const CallInterfaceDescriptor& descriptor, 204 Isolate* isolate, Zone* zone, const CallInterfaceDescriptor& descriptor,
204 int stack_parameter_count, CallDescriptor::Flags flags, 205 int stack_parameter_count, CallDescriptor::Flags flags,
205 Operator::Properties properties); 206 Operator::Properties properties);
206 207
207 // Creates a call descriptor for simplified C calls that is appropriate 208 // Creates a call descriptor for simplified C calls that is appropriate
208 // for the host platform. This simplified calling convention only supports 209 // for the host platform. This simplified calling convention only supports
209 // integers and pointers of one word size each, i.e. no floating point, 210 // integers and pointers of one word size each, i.e. no floating point,
210 // structs, pointers to members, etc. 211 // structs, pointers to members, etc.
211 static CallDescriptor* GetSimplifiedCDescriptor(Zone* zone, 212 static CallDescriptor* GetSimplifiedCDescriptor(Zone* zone,
212 MachineSignature* sig); 213 const MachineSignature* sig);
213 214
214 // Get the location of an (incoming) parameter to this function. 215 // Get the location of an (incoming) parameter to this function.
215 LinkageLocation GetParameterLocation(int index) const { 216 LinkageLocation GetParameterLocation(int index) const {
216 return incoming_->GetInputLocation(index + 1); // + 1 to skip target. 217 return incoming_->GetInputLocation(index + 1); // + 1 to skip target.
217 } 218 }
218 219
219 // Get the machine type of an (incoming) parameter to this function. 220 // Get the machine type of an (incoming) parameter to this function.
220 MachineType GetParameterType(int index) const { 221 MachineType GetParameterType(int index) const {
221 return incoming_->GetInputType(index + 1); // + 1 to skip target. 222 return incoming_->GetInputType(index + 1); // + 1 to skip target.
222 } 223 }
(...skipping 27 matching lines...) Expand all
250 CallDescriptor* const incoming_; 251 CallDescriptor* const incoming_;
251 252
252 DISALLOW_COPY_AND_ASSIGN(Linkage); 253 DISALLOW_COPY_AND_ASSIGN(Linkage);
253 }; 254 };
254 255
255 } // namespace compiler 256 } // namespace compiler
256 } // namespace internal 257 } // namespace internal
257 } // namespace v8 258 } // namespace v8
258 259
259 #endif // V8_COMPILER_LINKAGE_H_ 260 #endif // V8_COMPILER_LINKAGE_H_
OLDNEW
« no previous file with comments | « src/compiler/ia32/linkage-ia32.cc ('k') | src/compiler/linkage-impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698