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

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

Issue 892593002: [turbofan] Fix usage of ThisFunction parameter in OSR. (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/js-generic-lowering.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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 Linkage(Isolate* isolate, Zone* zone, CallDescriptor* incoming) 178 Linkage(Isolate* isolate, Zone* zone, CallDescriptor* incoming)
179 : isolate_(isolate), zone_(zone), incoming_(incoming) {} 179 : isolate_(isolate), zone_(zone), incoming_(incoming) {}
180 180
181 static CallDescriptor* ComputeIncoming(Zone* zone, CompilationInfo* info); 181 static CallDescriptor* ComputeIncoming(Zone* zone, CompilationInfo* info);
182 182
183 // The call descriptor for this compilation unit describes the locations 183 // The call descriptor for this compilation unit describes the locations
184 // of incoming parameters and the outgoing return value(s). 184 // of incoming parameters and the outgoing return value(s).
185 CallDescriptor* GetIncomingDescriptor() const { return incoming_; } 185 CallDescriptor* GetIncomingDescriptor() const { return incoming_; }
186 CallDescriptor* GetJSCallDescriptor(int parameter_count, 186 CallDescriptor* GetJSCallDescriptor(int parameter_count,
187 CallDescriptor::Flags flags) const; 187 CallDescriptor::Flags flags) const;
188 static CallDescriptor* GetJSCallDescriptor(Zone* zone, int parameter_count, 188 static CallDescriptor* GetJSCallDescriptor(Zone* zone, bool is_osr,
189 int parameter_count,
189 CallDescriptor::Flags flags); 190 CallDescriptor::Flags flags);
190 CallDescriptor* GetRuntimeCallDescriptor( 191 CallDescriptor* GetRuntimeCallDescriptor(
191 Runtime::FunctionId function, int parameter_count, 192 Runtime::FunctionId function, int parameter_count,
192 Operator::Properties properties) const; 193 Operator::Properties properties) const;
193 static CallDescriptor* GetRuntimeCallDescriptor( 194 static CallDescriptor* GetRuntimeCallDescriptor(
194 Zone* zone, Runtime::FunctionId function, int parameter_count, 195 Zone* zone, Runtime::FunctionId function, int parameter_count,
195 Operator::Properties properties); 196 Operator::Properties properties);
196 197
197 CallDescriptor* GetStubCallDescriptor( 198 CallDescriptor* GetStubCallDescriptor(
198 const CallInterfaceDescriptor& descriptor, int stack_parameter_count = 0, 199 const CallInterfaceDescriptor& descriptor, int stack_parameter_count = 0,
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 // architecture-specific. Negative spill slots indicate arguments on the 234 // architecture-specific. Negative spill slots indicate arguments on the
234 // caller's frame. The {extra} parameter indicates an additional offset from 235 // caller's frame. The {extra} parameter indicates an additional offset from
235 // the frame offset, e.g. to index into part of a double slot. 236 // the frame offset, e.g. to index into part of a double slot.
236 FrameOffset GetFrameOffset(int spill_slot, Frame* frame, int extra = 0) const; 237 FrameOffset GetFrameOffset(int spill_slot, Frame* frame, int extra = 0) const;
237 238
238 static bool NeedsFrameState(Runtime::FunctionId function); 239 static bool NeedsFrameState(Runtime::FunctionId function);
239 240
240 // Get the location where an incoming OSR value is stored. 241 // Get the location where an incoming OSR value is stored.
241 LinkageLocation GetOsrValueLocation(int index) const; 242 LinkageLocation GetOsrValueLocation(int index) const;
242 243
244 // A special parameter index for JSCalls that represents the closure.
245 static const int kJSFunctionCallClosureParamIndex = -1;
246
243 private: 247 private:
244 Isolate* isolate_; 248 Isolate* isolate_;
245 Zone* const zone_; 249 Zone* const zone_;
246 CallDescriptor* const incoming_; 250 CallDescriptor* const incoming_;
247 251
248 DISALLOW_COPY_AND_ASSIGN(Linkage); 252 DISALLOW_COPY_AND_ASSIGN(Linkage);
249 }; 253 };
250 254
251 } // namespace compiler 255 } // namespace compiler
252 } // namespace internal 256 } // namespace internal
253 } // namespace v8 257 } // namespace v8
254 258
255 #endif // V8_COMPILER_LINKAGE_H_ 259 #endif // V8_COMPILER_LINKAGE_H_
OLDNEW
« no previous file with comments | « src/compiler/js-generic-lowering.cc ('k') | src/compiler/linkage.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698