OLD | NEW |
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/operator.h" | 10 #include "src/compiler/operator.h" |
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
360 } | 360 } |
361 | 361 |
362 bool ParameterHasSecondaryLocation(int index) const; | 362 bool ParameterHasSecondaryLocation(int index) const; |
363 LinkageLocation GetParameterSecondaryLocation(int index) const; | 363 LinkageLocation GetParameterSecondaryLocation(int index) const; |
364 | 364 |
365 static int FrameStateInputCount(Runtime::FunctionId function); | 365 static int FrameStateInputCount(Runtime::FunctionId function); |
366 | 366 |
367 // Get the location where an incoming OSR value is stored. | 367 // Get the location where an incoming OSR value is stored. |
368 LinkageLocation GetOsrValueLocation(int index) const; | 368 LinkageLocation GetOsrValueLocation(int index) const; |
369 | 369 |
| 370 // A special {Parameter} index for Stub Calls that represents context. |
| 371 static int GetStubCallContextParamIndex(int parameter_count) { |
| 372 return parameter_count + 0; // Parameter (arity + 0) is special. |
| 373 } |
| 374 |
370 // A special {Parameter} index for JSCalls that represents the new target. | 375 // A special {Parameter} index for JSCalls that represents the new target. |
371 static int GetJSCallNewTargetParamIndex(int parameter_count) { | 376 static int GetJSCallNewTargetParamIndex(int parameter_count) { |
372 return parameter_count + 0; // Parameter (arity + 0) is special. | 377 return parameter_count + 0; // Parameter (arity + 0) is special. |
373 } | 378 } |
374 | 379 |
375 // A special {Parameter} index for JSCalls that represents the argument count. | 380 // A special {Parameter} index for JSCalls that represents the argument count. |
376 static int GetJSCallArgCountParamIndex(int parameter_count) { | 381 static int GetJSCallArgCountParamIndex(int parameter_count) { |
377 return parameter_count + 1; // Parameter (arity + 1) is special. | 382 return parameter_count + 1; // Parameter (arity + 1) is special. |
378 } | 383 } |
379 | 384 |
(...skipping 12 matching lines...) Expand all Loading... |
392 CallDescriptor* const incoming_; | 397 CallDescriptor* const incoming_; |
393 | 398 |
394 DISALLOW_COPY_AND_ASSIGN(Linkage); | 399 DISALLOW_COPY_AND_ASSIGN(Linkage); |
395 }; | 400 }; |
396 | 401 |
397 } // namespace compiler | 402 } // namespace compiler |
398 } // namespace internal | 403 } // namespace internal |
399 } // namespace v8 | 404 } // namespace v8 |
400 | 405 |
401 #endif // V8_COMPILER_LINKAGE_H_ | 406 #endif // V8_COMPILER_LINKAGE_H_ |
OLD | NEW |