diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
commit | 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch) | |
tree | 46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/JavaScriptCore/interpreter/ProtoCallFrame.cpp | |
parent | 32761a6cee1d0dee366b885b7b9c777e67885688 (diff) | |
download | WebKitGtk-tarball-master.tar.gz |
webkitgtk-2.16.5HEADwebkitgtk-2.16.5master
Diffstat (limited to 'Source/JavaScriptCore/interpreter/ProtoCallFrame.cpp')
-rw-r--r-- | Source/JavaScriptCore/interpreter/ProtoCallFrame.cpp | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/Source/JavaScriptCore/interpreter/ProtoCallFrame.cpp b/Source/JavaScriptCore/interpreter/ProtoCallFrame.cpp index a36001437..eb80b2c23 100644 --- a/Source/JavaScriptCore/interpreter/ProtoCallFrame.cpp +++ b/Source/JavaScriptCore/interpreter/ProtoCallFrame.cpp @@ -27,23 +27,25 @@ #include "ProtoCallFrame.h" #include "CodeBlock.h" +#include "JSCInlines.h" +#include "StackAlignment.h" namespace JSC { -void ProtoCallFrame::init(CodeBlock* codeBlock, JSScope* scope, JSObject* callee, JSValue thisValue, int argCountIncludingThis, JSValue* otherArgs) +void ProtoCallFrame::init(CodeBlock* codeBlock, JSObject* callee, JSValue thisValue, int argCountIncludingThis, JSValue* otherArgs) { this->args = otherArgs; this->setCodeBlock(codeBlock); - this->setScope(scope); this->setCallee(callee); this->setArgumentCountIncludingThis(argCountIncludingThis); - size_t paddedArgsCount = argCountIncludingThis; - if (codeBlock) { - size_t numParameters = codeBlock->numParameters(); - if (paddedArgsCount < numParameters) - paddedArgsCount = numParameters; - } - this->setPaddedArgsCount(paddedArgsCount); + if (codeBlock && argCountIncludingThis < codeBlock->numParameters()) + this->arityMissMatch = true; + else + this->arityMissMatch = false; + + // Round up argCountIncludingThis to keep the stack frame size aligned. + size_t paddedArgsCount = roundArgumentCountToAlignFrame(argCountIncludingThis); + this->setPaddedArgCount(paddedArgsCount); this->clearCurrentVPC(); this->setThisValue(thisValue); } |