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

Unified Diff: src/compiler/linkage.h

Issue 1461973002: [turbofan] Make new.target explicit in JSCallDescriptor. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/js-typed-lowering.cc ('k') | src/compiler/linkage.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/linkage.h
diff --git a/src/compiler/linkage.h b/src/compiler/linkage.h
index 61efb9bd8f9234dfe5dd4aee2e039254044fff42..6c2db6a91d01a2c12ea139872d78d4ded772376a 100644
--- a/src/compiler/linkage.h
+++ b/src/compiler/linkage.h
@@ -263,11 +263,11 @@ std::ostream& operator<<(std::ostream& os, const CallDescriptor::Kind& k);
// Can be used to translate {arg_index} (i.e. index of the call node input) as
// well as {param_index} (i.e. as stored in parameter nodes) into an operator
// representing the architecture-specific location. The following call node
-// layouts are supported (where {n} is the number value inputs):
+// layouts are supported (where {n} is the number of value inputs):
//
// #0 #1 #2 #3 [...] #n
// Call[CodeStub] code, arg 1, arg 2, arg 3, [...], context
-// Call[JSFunction] function, rcvr, arg 1, arg 2, [...], #arg, context
+// Call[JSFunction] function, rcvr, arg 1, arg 2, [...], new, #arg, context
// Call[Runtime] CEntryStub, arg 1, arg 2, arg 3, [...], fun, #arg, context
class Linkage : public ZoneObject {
public:
@@ -340,8 +340,23 @@ class Linkage : public ZoneObject {
// Get the location where an incoming OSR value is stored.
LinkageLocation GetOsrValueLocation(int index) const;
- // A special parameter index for JSCalls that represents the closure.
- static const int kJSFunctionCallClosureParamIndex = -1;
+ // A special {Parameter} index for JSCalls that represents the new target.
+ static int GetJSCallNewTargetParamIndex(int parameter_count) {
+ return parameter_count + 0; // Parameter (arity + 0) is special.
+ }
+
+ // A special {Parameter} index for JSCalls that represents the argument count.
+ static int GetJSCallArgCountParamIndex(int parameter_count) {
+ return parameter_count + 1; // Parameter (arity + 1) is special.
+ }
+
+ // A special {Parameter} index for JSCalls that represents the context.
+ static int GetJSCallContextParamIndex(int parameter_count) {
+ return parameter_count + 2; // Parameter (arity + 2) is special.
+ }
+
+ // A special {Parameter} index for JSCalls that represents the closure.
+ static const int kJSCallClosureParamIndex = -1;
// A special {OsrValue} index to indicate the context spill slot.
static const int kOsrContextSpillSlotIndex = -1;
« no previous file with comments | « src/compiler/js-typed-lowering.cc ('k') | src/compiler/linkage.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698