зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1657820 - Part 1: Add support for ArgumentKind::Arg3. r=jandem
The next patch requires to have support for four arguments. Differential Revision: https://phabricator.services.mozilla.com/D86298
This commit is contained in:
Родитель
3c0a965bd5
Коммит
e8c9163853
|
@ -367,7 +367,15 @@ enum class AttachDecision {
|
|||
// Set of arguments supported by GetIndexOfArgument.
|
||||
// Support for higher argument indices can be added easily, but is currently
|
||||
// unneeded.
|
||||
enum class ArgumentKind : uint8_t { Callee, This, NewTarget, Arg0, Arg1, Arg2 };
|
||||
enum class ArgumentKind : uint8_t {
|
||||
Callee,
|
||||
This,
|
||||
NewTarget,
|
||||
Arg0,
|
||||
Arg1,
|
||||
Arg2,
|
||||
Arg3
|
||||
};
|
||||
|
||||
// This function calculates the index of an argument based on the call flags.
|
||||
// addArgc is an out-parameter, indicating whether the value of argc should
|
||||
|
@ -418,6 +426,8 @@ inline int32_t GetIndexOfArgument(ArgumentKind kind, CallFlags flags,
|
|||
return flags.isConstructing() + hasArgumentArray - 2;
|
||||
case ArgumentKind::Arg2:
|
||||
return flags.isConstructing() + hasArgumentArray - 3;
|
||||
case ArgumentKind::Arg3:
|
||||
return flags.isConstructing() + hasArgumentArray - 4;
|
||||
case ArgumentKind::NewTarget:
|
||||
MOZ_ASSERT(flags.isConstructing());
|
||||
*addArgc = false;
|
||||
|
|
Загрузка…
Ссылка в новой задаче