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

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

Issue 868883002: Remove the dependency of Zone on Isolate (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix compilation issues Created 5 years, 11 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/jump-threading.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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 // representing the architecture-specific location. The following call node 165 // representing the architecture-specific location. The following call node
166 // layouts are supported (where {n} is the number value inputs): 166 // layouts are supported (where {n} is the number value inputs):
167 // 167 //
168 // #0 #1 #2 #3 [...] #n 168 // #0 #1 #2 #3 [...] #n
169 // Call[CodeStub] code, arg 1, arg 2, arg 3, [...], context 169 // Call[CodeStub] code, arg 1, arg 2, arg 3, [...], context
170 // Call[JSFunction] function, rcvr, arg 1, arg 2, [...], context 170 // Call[JSFunction] function, rcvr, arg 1, arg 2, [...], context
171 // Call[Runtime] CEntryStub, arg 1, arg 2, arg 3, [...], fun, #arg, context 171 // Call[Runtime] CEntryStub, arg 1, arg 2, arg 3, [...], fun, #arg, context
172 class Linkage : public ZoneObject { 172 class Linkage : public ZoneObject {
173 public: 173 public:
174 Linkage(Zone* zone, CompilationInfo* info) 174 Linkage(Zone* zone, CompilationInfo* info)
175 : zone_(zone), incoming_(ComputeIncoming(zone, info)) {} 175 : isolate_(info->isolate()),
176 Linkage(Zone* zone, CallDescriptor* incoming) 176 zone_(zone),
177 : zone_(zone), incoming_(incoming) {} 177 incoming_(ComputeIncoming(zone, info)) {}
178 Linkage(Isolate* isolate, Zone* zone, CallDescriptor* incoming)
179 : isolate_(isolate), zone_(zone), incoming_(incoming) {}
178 180
179 static CallDescriptor* ComputeIncoming(Zone* zone, CompilationInfo* info); 181 static CallDescriptor* ComputeIncoming(Zone* zone, CompilationInfo* info);
180 182
181 // The call descriptor for this compilation unit describes the locations 183 // The call descriptor for this compilation unit describes the locations
182 // of incoming parameters and the outgoing return value(s). 184 // of incoming parameters and the outgoing return value(s).
183 CallDescriptor* GetIncomingDescriptor() const { return incoming_; } 185 CallDescriptor* GetIncomingDescriptor() const { return incoming_; }
184 CallDescriptor* GetJSCallDescriptor(int parameter_count, 186 CallDescriptor* GetJSCallDescriptor(int parameter_count,
185 CallDescriptor::Flags flags) const; 187 CallDescriptor::Flags flags) const;
186 static CallDescriptor* GetJSCallDescriptor(int parameter_count, Zone* zone, 188 static CallDescriptor* GetJSCallDescriptor(Zone* zone, int parameter_count,
187 CallDescriptor::Flags flags); 189 CallDescriptor::Flags flags);
188 CallDescriptor* GetRuntimeCallDescriptor( 190 CallDescriptor* GetRuntimeCallDescriptor(
189 Runtime::FunctionId function, int parameter_count, 191 Runtime::FunctionId function, int parameter_count,
190 Operator::Properties properties) const; 192 Operator::Properties properties) const;
191 static CallDescriptor* GetRuntimeCallDescriptor( 193 static CallDescriptor* GetRuntimeCallDescriptor(
192 Runtime::FunctionId function, int parameter_count, 194 Zone* zone, Runtime::FunctionId function, int parameter_count,
193 Operator::Properties properties, Zone* zone); 195 Operator::Properties properties);
194 196
195 CallDescriptor* GetStubCallDescriptor( 197 CallDescriptor* GetStubCallDescriptor(
196 const CallInterfaceDescriptor& descriptor, int stack_parameter_count = 0, 198 const CallInterfaceDescriptor& descriptor, int stack_parameter_count = 0,
197 CallDescriptor::Flags flags = CallDescriptor::kNoFlags, 199 CallDescriptor::Flags flags = CallDescriptor::kNoFlags,
198 Operator::Properties properties = Operator::kNoProperties) const; 200 Operator::Properties properties = Operator::kNoProperties) const;
199 static CallDescriptor* GetStubCallDescriptor( 201 static CallDescriptor* GetStubCallDescriptor(
200 const CallInterfaceDescriptor& descriptor, int stack_parameter_count, 202 Isolate* isolate, Zone* zone, const CallInterfaceDescriptor& descriptor,
201 CallDescriptor::Flags flags, Operator::Properties properties, Zone* zone); 203 int stack_parameter_count, CallDescriptor::Flags flags,
204 Operator::Properties properties);
202 205
203 // Creates a call descriptor for simplified C calls that is appropriate 206 // Creates a call descriptor for simplified C calls that is appropriate
204 // for the host platform. This simplified calling convention only supports 207 // for the host platform. This simplified calling convention only supports
205 // integers and pointers of one word size each, i.e. no floating point, 208 // integers and pointers of one word size each, i.e. no floating point,
206 // structs, pointers to members, etc. 209 // structs, pointers to members, etc.
207 static CallDescriptor* GetSimplifiedCDescriptor(Zone* zone, 210 static CallDescriptor* GetSimplifiedCDescriptor(Zone* zone,
208 MachineSignature* sig); 211 MachineSignature* sig);
209 212
210 // Get the location of an (incoming) parameter to this function. 213 // Get the location of an (incoming) parameter to this function.
211 LinkageLocation GetParameterLocation(int index) const { 214 LinkageLocation GetParameterLocation(int index) const {
(...skipping 19 matching lines...) Expand all
231 // caller's frame. The {extra} parameter indicates an additional offset from 234 // caller's frame. The {extra} parameter indicates an additional offset from
232 // the frame offset, e.g. to index into part of a double slot. 235 // the frame offset, e.g. to index into part of a double slot.
233 FrameOffset GetFrameOffset(int spill_slot, Frame* frame, int extra = 0) const; 236 FrameOffset GetFrameOffset(int spill_slot, Frame* frame, int extra = 0) const;
234 237
235 static bool NeedsFrameState(Runtime::FunctionId function); 238 static bool NeedsFrameState(Runtime::FunctionId function);
236 239
237 // Get the location where an incoming OSR value is stored. 240 // Get the location where an incoming OSR value is stored.
238 LinkageLocation GetOsrValueLocation(int index) const; 241 LinkageLocation GetOsrValueLocation(int index) const;
239 242
240 private: 243 private:
244 Isolate* isolate_;
241 Zone* const zone_; 245 Zone* const zone_;
242 CallDescriptor* const incoming_; 246 CallDescriptor* const incoming_;
243 247
244 DISALLOW_COPY_AND_ASSIGN(Linkage); 248 DISALLOW_COPY_AND_ASSIGN(Linkage);
245 }; 249 };
246 250
247 } // namespace compiler 251 } // namespace compiler
248 } // namespace internal 252 } // namespace internal
249 } // namespace v8 253 } // namespace v8
250 254
251 #endif // V8_COMPILER_LINKAGE_H_ 255 #endif // V8_COMPILER_LINKAGE_H_
OLDNEW
« no previous file with comments | « src/compiler/jump-threading.cc ('k') | src/compiler/linkage.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698